@@ -9,12 +9,14 @@ import { LspApplyWorkspaceEdit } from './lspApplyWorkspaceEdit'
9
9
import { McpManager } from './mcp/mcpManager'
10
10
import { McpTool } from './mcp/mcpTool'
11
11
import { FuzzySearch , FuzzySearchParams } from './fuzzySearch'
12
+ import { GrepSearch , GrepSearchParams } from './grepSearch'
12
13
13
14
export const FsToolsServer : Server = ( { workspace, logging, agent, lsp } ) => {
14
15
const fsReadTool = new FsRead ( { workspace, lsp, logging } )
15
16
const fsWriteTool = new FsWrite ( { workspace, lsp, logging } )
16
17
const listDirectoryTool = new ListDirectory ( { workspace, logging, lsp } )
17
18
const fuzzySearchTool = new FuzzySearch ( { workspace, lsp, logging } )
19
+ const grepSearchTool = new GrepSearch ( { workspace, logging, lsp } )
18
20
19
21
agent . addTool ( fsReadTool . getSpec ( ) , async ( input : FsReadParams ) => {
20
22
await fsReadTool . validate ( input )
@@ -36,6 +38,11 @@ export const FsToolsServer: Server = ({ workspace, logging, agent, lsp }) => {
36
38
return await fuzzySearchTool . invoke ( input , token )
37
39
} )
38
40
41
+ agent . addTool ( grepSearchTool . getSpec ( ) , async ( input : GrepSearchParams , token ?: CancellationToken ) => {
42
+ await grepSearchTool . validate ( input )
43
+ return await grepSearchTool . invoke ( input , token )
44
+ } )
45
+
39
46
return ( ) => { }
40
47
}
41
48
0 commit comments