-
Notifications
You must be signed in to change notification settings - Fork 213
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: at file in chat input box #1549
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Woohoo! I know this is a WIP, but I just gave it a go to give some early feedback. Awesome start. Two things I noticed:
|
toolmantim
reviewed
Nov 1, 2023
Thanks for testing this out! I've fixed the both issues in the PR. Also fixed the same issue (#1) on main in #1592 |
This was referenced Nov 3, 2023
abeatrix
added a commit
that referenced
this pull request
Nov 10, 2023
Continue from #1549 Close #1523 https://github.com/sourcegraph/cody/assets/68532117/0d2d868a-8031-4067-b933-705f331f539f This adds PR support for passing context files to recipe from chat input. The context files are extracted from the codebase and passed to the recipe context. - Create context messages from context files - Generate display text including context file names - Add getTextEditorContentForContextFile method in editor to get content for context files - Update editor interface to support getting content for context files - Add ContextFile type to represent context files - Add userInputContextFiles property to RecipeContext for passing context files - Update RecipeContext to accept ContextFile[] - Generate context messages from ContextFile[] - Update chat question recipe to support getContextFilesContext - Pass editor context as ContextFile[] to custom prompt and chat question handler > This PR focuses on implementing the feature that allows users to add local workspace file via @ command via chat box. ## Next - [ ] A widget that allows user to toggle between including enhanced context with chat questions or not #1524 - [ ] Replace current context file display widget with the new UI for enhanced context #1525 ## Test plan <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. --> - [ ] In the input box inside the new Chat view, add files from the current workspace using the `@` command - [ ] Typing `@` will display a pop up where you can select files in the current workspace - [ ] Typing `@` without additional character will show a list of currently opened files for you to choose - [ ] Typing `@` follow by additional character will update the file list and display results that matches the file path and symbol names when available - [ ] Allow you to attach multiple files via @ - [ ] Ask a question with a file attached using the `@` command - [ ] Cody should have context about the file or symbol you attached using the `@` command - [ ] The @-file is a link that's clickable in user's display text ![image](https://github.com/sourcegraph/cody/assets/68532117/97459faf-2e64-4a08-954a-b4d747c5fa69) --------- Co-authored-by: Tom Ross <tom@umpox.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CLOSE #1523
WIP
Test plan