Skip to content
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

Implement /add and /drop commands for files to include the files in the chat context #1889

Open
nrkovacs opened this issue May 18, 2024 · 0 comments
Labels
enhancement New feature or request severity:low Minor issues, code cleanup, etc

Comments

@nrkovacs
Copy link

What problem or use case are you trying to solve?
Allow the user to add and remove files from the chat context window similar to the behavior that aider uses. When a file is added, then the file and all added files are included in the chat sessions with the LLM.

Describe the UX of the solution you'd like
The way aider implements this is with /add and /drop commands. Maybe supporting a command line syntax would be good. Alternatively, files could be added or removed from the file browser UX.

Do you have thoughts on the technical implementation?
When files are added or removed, add them to a file list that is stored in memory. Before doing a chat completion, read the files from the workspace and send them over to the LLM. I'm not sure the best format to send over the files, but something like the following would probably work.

dir1/file1.py

file1 contents

dir2/file2.py

file2 contents

Describe alternatives you've considered
Alternatively, this could be hooked into the current memory infrastructure to add or remove file contents from memory.

Additional context
https://github.com/paul-gauthier/aider?tab=readme-ov-file#in-chat-commands

@nrkovacs nrkovacs added the enhancement New feature or request label May 18, 2024
@amanape amanape added the severity:low Minor issues, code cleanup, etc label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request severity:low Minor issues, code cleanup, etc
Projects
None yet
Development

No branches or pull requests

2 participants