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

feat (sidebar) allow chat without any files selected. #975

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brewinski
Copy link
Contributor

Small change to allow a user to remove all files without closing the sidebar. I've created this as a result of this issue: #970.

I'm not sure if it was intended that the sidebar would close when the file context was removed as the WinClosed auto command is closing the entire sidebar.

Happy to find another way if we'd prefer to have the selected files container not visible after all files have been deleted.

Raised PR as a result of this isssue: #970

After:
image

@CyprienRicque
Copy link

With this change only, the prompt sent to the llm needs to be changed.
For instance it contains

[...]
All changes to files must use this *SEARCH/REPLACE block* format.
ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
[...]

If there are no files, it does not make sense

@brewinski
Copy link
Contributor Author

brewinski commented Dec 20, 2024

With this change only, the prompt sent to the llm needs to be changed.
For instance it contains

[...]
All changes to files must use this *SEARCH/REPLACE block* format.
ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
[...]

If there are no files, it does not make sense

@CyprienRicque that's a good point. It should be fairly simple to alter the system prompt.

Does this warrant introducing a new mode such as "chatting" with a different system prompt & avanterules file? Or should we simply omit parts of the prompt when there are not context files?

Excuse my ignorance but what would the impact of leaving those references in the system prompt?

As far as I can tell from testing, behaviour is consistent with and without file context. Having the extra guidelines doesn't seem to impact or confuse the LLM. It's also possible for users to override the prompt if you're looking for something tailored to your use case: https://github.com/yetone/avante.nvim?tab=readme-ov-file#custom-prompts

@CyprienRicque
Copy link

CyprienRicque commented Dec 21, 2024

I think that having extra useless guidelines does in fact alter the model performance, but only from experience using these models and from my understanding on them. You probably can see if you attempt a problem at the limit of what the model can solve. It might fail with extra useless guidelines.

I believe adding a chatting mode with dedicated avanterules file is a great idea.

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

Successfully merging this pull request may close these issues.

2 participants