Skip to content

[Feature Request] Per-project chat buffers #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rogsme opened this issue Apr 3, 2025 · 6 comments
Open

[Feature Request] Per-project chat buffers #342

rogsme opened this issue Apr 3, 2025 · 6 comments

Comments

@rogsme
Copy link

rogsme commented Apr 3, 2025

Hi!

I often have multiple projects open at the same time, but currently chatgpt-shell uses a single shared chat buffer across all of them. It would be super helpful to have one chat session per project-ideally tied to Projectile or the current working directory—so that each conversation stays relevant to its own context.

This would make it easier to keep things organized, avoid cross-project confusion, and have more focused discussions with ChatGPT for each project.

This might be something I could tackle myself if it makes sense to you, @xenodium. Let me know what you think!

@xenodium
Copy link
Owner

xenodium commented Apr 4, 2025

currently chatgpt-shell uses a single shared chat buffer across all of them

I'm not sure if aware of it, but one can create mutilple shell buffers via C-u M-x chatgpt-shell. Would that do what you need? I've been contemplating changing the default behaviour to create new shells, and maybe add a config option to bring back today's behaviour (single shell). What do you think?

@djr7C4
Copy link
Contributor

djr7C4 commented Apr 4, 2025 via email

@xenodium
Copy link
Owner

xenodium commented Apr 4, 2025

Maybe there could be a
configuration option that allows the user to provide a function that
chooses the buffer based on the context or whatever else makes sense.

Certainly. I personally prefer the prefix to create new shells, but been finding this behaviour isn't very discoverable for users, thus why I've been contemplating the default change. In any case, agree with ya, should be configurable.

@rogsme
Copy link
Author

rogsme commented Apr 4, 2025

I'm not sure if aware of it, but one can create mutilple shell buffers via C-u M-x chatgpt-shell. Would that do what you need?

I think that would do it!

I've been contemplating changing the default behaviour to create new shells, and maybe add a config option to bring back today's behaviour (single shell). What do you think?

In my opinion, I would go the other way. Keep today's behavior as default (single shell) and adding a config option to open a new shell based on the projectile project or base dir

@rogsme
Copy link
Author

rogsme commented Apr 4, 2025

FWIW, I like having a single shared buffer for most things with the option
to create new ones with a prefix argument as needed

I see, and I wouldn't like to mess up with default behavior.

Maybe there could be a
configuration option that allows the user to provide a function that
chooses the buffer based on the context or whatever else makes sense.

Maybe we can add a variable (something like chatgpt-shell-create-shell-per-dir) that defaults to nil and implement this feature?

@xenodium
Copy link
Owner

xenodium commented Apr 4, 2025

Maybe we can add a variable (something like chatgpt-shell-create-shell-per-dir) that defaults to nil and implement this feature?

The challenge is we emacsers would have different preferences, so someone else will want another variable for a slightly different behavior. If the setting is a function itself, it can be customised to cater for anyone's preference without the need to add multiple settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants