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
Assistant Context Area for Panel #9705
Labels
ai
Improvement related to Assistant, Copilot, or other AI features
assistant
AI feedback for Assistant
editor
Feedback for code editing, formatting, editor iterations, etc
enhancement
[core label]
Comments
rgbkrk
added
enhancement
[core label]
triage
Maintainer needs to classify the issue
admin read
Pending admin review
labels
Mar 22, 2024
rgbkrk
added a commit
that referenced
this issue
Mar 29, 2024
Introducing the Active File Context portion of #9705. When someone is in the assistant panel it now includes the active file as a system message on send while showing them a nice little display in the lower right: ![image](https://github.com/zed-industries/zed/assets/836375/9abc56e0-e8f2-45ee-9e7e-b83b28b483ea) For this iteration, I'd love to see the following before we land this: * [x] Toggle-able context - user should be able to disable sending this context * [x] Show nothing if there is no context coming in * [x] Update token count as we change items * [x] Listen for a more finely scoped event for when the active item changes * [x] Create a global for pulling a file icon based on a path. Zed's main way to do this is nested within project panel's `FileAssociation`s. * [x] Get the code fence name for a Language for the system prompt * [x] Update the token count when the buffer content changes I'm seeing this PR as the foundation for providing other kinds of context -- diagnostic summaries, failing tests, additional files, etc. Release Notes: - Added file context to assistant chat panel ([#9705](#9705)). <img width="1558" alt="image" src="https://github.com/zed-industries/zed/assets/836375/86eb7e50-3e28-4754-9c3f-895be588616d"> --------- Co-authored-by: Conrad Irwin <conrad@zed.dev> Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
mrnugget
pushed a commit
to ciiqr/zed
that referenced
this issue
Apr 3, 2024
Introducing the Active File Context portion of zed-industries#9705. When someone is in the assistant panel it now includes the active file as a system message on send while showing them a nice little display in the lower right: ![image](https://github.com/zed-industries/zed/assets/836375/9abc56e0-e8f2-45ee-9e7e-b83b28b483ea) For this iteration, I'd love to see the following before we land this: * [x] Toggle-able context - user should be able to disable sending this context * [x] Show nothing if there is no context coming in * [x] Update token count as we change items * [x] Listen for a more finely scoped event for when the active item changes * [x] Create a global for pulling a file icon based on a path. Zed's main way to do this is nested within project panel's `FileAssociation`s. * [x] Get the code fence name for a Language for the system prompt * [x] Update the token count when the buffer content changes I'm seeing this PR as the foundation for providing other kinds of context -- diagnostic summaries, failing tests, additional files, etc. Release Notes: - Added file context to assistant chat panel ([zed-industries#9705](zed-industries#9705)). <img width="1558" alt="image" src="https://github.com/zed-industries/zed/assets/836375/86eb7e50-3e28-4754-9c3f-895be588616d"> --------- Co-authored-by: Conrad Irwin <conrad@zed.dev> Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Why is it enabled by default and how to change it's behaviour so I have to explicitly allow this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ai
Improvement related to Assistant, Copilot, or other AI features
assistant
AI feedback for Assistant
editor
Feedback for code editing, formatting, editor iterations, etc
enhancement
[core label]
Check for existing issues
Describe the feature
In order to be productive with Zed's assistant panel, you have to copy paste code and error context over. Often, a decent context injection prompt looks like this:
That'll give me good results to pair with the model for the first message. As I converse with the assistant all that old context sticks around unless I scroll back to delete it. Sometimes that takes up too much of the token limit and other times it can confuse the assistant to have all this extra context around.
Proposal
Introduce context into the assistant panel.
The context view shows to the user what the current context is that will be sent to the model, including:
The user would have the option of disabling sending any amount of context to the model.
On the model's side, it'll see this as a collection of system messages or tools available for it to call. Importantly, previous contexts don't have to be sent to the model -- only the most recent up to date version.
As you refactor your code, make changes, etc., the context sent should be up to date and wouldn't include old context (unless necessary).
If applicable, add mockups / screenshots to help present your vision of the feature
The text was updated successfully, but these errors were encountered: