Skip to content

Commit 25fceb1

Browse files
committed
Adding the grep search tool.
1. Implemented the tool using https://github.com/microsoft/vscode-ripgrep. 2. The grepped result show as clickable file path. 3. The tool currently is disable in current pr, once grepSearch tool tested, will update the tool_index.json to enable this tool.
1 parent ad148d4 commit 25fceb1

File tree

11 files changed

+667
-8
lines changed

11 files changed

+667
-8
lines changed

.github/workflows/node.js.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ jobs:
132132
NODE_OPTIONS: '--max-old-space-size=8192'
133133
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
134134
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135136
steps:
136137
- uses: actions/checkout@v4
137138
- name: Use Node.js ${{ matrix.node-version }}
@@ -169,6 +170,7 @@ jobs:
169170
NODE_OPTIONS: '--max-old-space-size=8192'
170171
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
171172
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172174
steps:
173175
- uses: actions/checkout@v4
174176
- name: Use Node.js ${{ matrix.node-version }}

buildspec/linuxTests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
# followed by Error: Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink <path>
1414
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
1515
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1617

1718
phases:
1819
install:
@@ -25,6 +26,7 @@ phases:
2526
pre_build:
2627
commands:
2728
- export HOME=/home/codebuild-user
29+
- export GITHUB_TOKEN=${GITHUB_TOKEN}
2830
- bash buildspec/shared/linux-pre_build.sh
2931

3032
build:

buildspec/packageTestVsix.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ env:
88
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/'
99
# needed or else webpack will cause it to run out of memory
1010
NODE_OPTIONS: '--max-old-space-size=8192'
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1112

1213
phases:
1314
install:
@@ -20,6 +21,7 @@ phases:
2021
pre_build:
2122
commands:
2223
- export HOME=/home/codebuild-user
24+
- export GITHUB_TOKEN=${GITHUB_TOKEN}
2325
- bash buildspec/shared/linux-pre_build.sh
2426

2527
build:

package-lock.json

Lines changed: 35 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"dependencies": {
7676
"@types/node": "^22.7.5",
7777
"vscode-nls": "^5.2.0",
78-
"vscode-nls-dev": "^4.0.4"
78+
"vscode-nls-dev": "^4.0.4",
79+
"@vscode/ripgrep": "1.15.11"
7980
}
8081
}

packages/amazonq/scripts/build/copyFiles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ const tasks: CopyTask[] = [
6060
target: path.join('../../node_modules', 'web-tree-sitter', 'tree-sitter.wasm'),
6161
destination: path.join('src', 'tree-sitter.wasm'),
6262
},
63+
// ripgrep binary
64+
{
65+
target: path.join('../../node_modules', '@vscode/ripgrep', 'bin'),
66+
destination: 'bin/',
67+
},
6368
]
6469

6570
function copy(task: CopyTask): void {

0 commit comments

Comments
 (0)