-
Notifications
You must be signed in to change notification settings - Fork 294
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: add context file via @ in chat input #1631
Conversation
@toolmantim this is ready for test 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, have to drop off but will get back to this! Really cool to play around with and feels super powerful
Should the selector box show as soon as I start typing "@"? It feels like something isn't working because it doesn't show until I've typed a lot - an immediate indication that it is searching would be useful!
// NOTE: Symbol search is resources extensive, so only search if query is long enough | ||
// Five is an arbitrary minimum length | ||
if (!query.trim() || query.trim().length < 5) { | ||
return [] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we considered using symf as an option for this? This would give us a more advanced way of finding symbols, which might be awesome when trying this out.
Might also be faster? @beyang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea we can always add additional context here. For v1 the main goal was to support @ file but once we have other sources of context that are more reliable we can always update this!
…ph/cody into bee/user-input-context
@umpox @valerybugakov can i get your review if you've got a chance, please? 🙇♀️ |
@abeatrix Looking now, thanks for making those changes! AtCommand1252.movI noticed some unexpected behavior when trying it out 🤔 :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed some unexpected behavior and left a few comments, feels really great aside from that! Approving given this is behind a flag and don't want to block you!
(symbol.kind === vscode.SymbolKind.Function || | ||
symbol.kind === vscode.SymbolKind.Method || | ||
symbol.kind === vscode.SymbolKind.Class) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly if we support a way like prefixing the query with #
we would want to remove this filter so a user could still use a symbol like a TS interface or w/e
@umpox Thanks for testing it so throughly, really appreciate your help and feedback here 🙇♀️ Will make sure the issue is fixed before i merge anything, thank you! updateThe issue is now fixed Screen.Recording.2023-11-10.at.2.19.00.PM.mov |
Continue from #1549
Close #1523
demo_at_file.mov
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.
Next
Test plan
@
command@
will display a pop up where you can select files in the current workspace@
without additional character will show a list of currently opened files for you to choose@
follow by additional character will update the file list and display results that matches the file path and symbol names when available@
command@
command