-
Notifications
You must be signed in to change notification settings - Fork 594
feat(chat): Adding the grep search tool and file search tool #7083
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
base: feature/agentic-chat
Are you sure you want to change the base?
Conversation
1. Implemented the grep search tool using https://github.com/microsoft/vscode-ripgrep. 2. The grepped result show as clickable file path. 3. Implemented the file search tool. 3. The tool currently is disable in current pr, once grepSearch tool tested, will update the tool_index.json to enable this tool.
|
@@ -132,6 +132,7 @@ jobs: | |||
NODE_OPTIONS: '--max-old-space-size=8192' | |||
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/' | |||
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/' | |||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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.
why do we need this?
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.
we are setting this up to increase GitHub API Limit while download the ripgrep binary.
ref: https://github.com/microsoft/vscode-ripgrep
You can produce an API key, set the GITHUB_TOKEN environment var to it, and vscode-ripgrep will use it when downloading from GitHub. This increases your API limit.
- Without this the most CI test will fail during download ripegrep binary.
@@ -75,6 +75,7 @@ | |||
"dependencies": { | |||
"@types/node": "^22.7.5", | |||
"vscode-nls": "^5.2.0", | |||
"vscode-nls-dev": "^4.0.4" | |||
"vscode-nls-dev": "^4.0.4", | |||
"@vscode/ripgrep": "1.15.11" |
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.
is this the right place to add it?
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.
yes, based on the vscode ripgrep, it asked to add in the dependencies, not dev dependencies: https://github.com/microsoft/vscode-ripgrep.
private createOutput(content: string): InvokeOutput { | ||
return { | ||
output: { | ||
kind: OutputKind.Text, |
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.
use JSON format seems like a better fit for this tool
public async invoke(updates?: Writable): Promise<InvokeOutput> { | ||
try { | ||
const fileUri = vscode.Uri.file(this.fsPath) | ||
const allFiles = await readDirectoryRecursively(fileUri, this.maxDepth) |
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.
filter to only keep [F]
prefix?
@@ -20,6 +21,9 @@ phases: | |||
pre_build: | |||
commands: | |||
- export HOME=/home/codebuild-user | |||
# Set up VSCODE_RIPGREP_TOKEN for GitHub API access | |||
- export VSCODE_RIPGREP_TOKEN=${GITHUB_READONLY_TOKEN} | |||
- echo "Setting up VSCODE_RIPGREP_TOKEN for GitHub API access" |
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.
why do we need this?
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.
similar as the GITHUB TOKEN env, set it setting this up to increase GitHub API Limit while download the ripgrep binary. otherwise, the ripgrep download failed.
Problem
Solution
feature/x
branches will not be squash-merged at release time.