11import type { ToolSet } from "ai" ;
22import { createExecTool , type ExecToolOptions , type ExecWorkspaceLike } from "./exec.js" ;
3- import { createDeleteTool , type DeleteToolOptions } from "./fs/delete.js" ;
3+ import { createDeleteTool } from "./fs/delete.js" ;
44import { createEditTool , type EditToolOptions } from "./fs/edit.js" ;
5- import { createFindTool , type FindToolOptions } from "./fs/find.js" ;
6- import { createGrepTool , type GrepToolOptions } from "./fs/grep.js" ;
5+ import { createFindTool } from "./fs/find.js" ;
6+ import { createGrepTool } from "./fs/grep.js" ;
77import { createListTool } from "./fs/list.js" ;
88import { createReadTool , type ReadToolOptions } from "./fs/read.js" ;
99import { type WorkspaceLike as FileWorkspaceLike , WorkspaceFileStore } from "./fs/store.js" ;
@@ -17,9 +17,6 @@ export interface CreateAIToolsOptions {
1717 read ?: Omit < ReadToolOptions , "store" > ;
1818 write ?: Omit < WriteToolOptions , "store" > ;
1919 edit ?: Omit < EditToolOptions , "store" > ;
20- find ?: Omit < FindToolOptions , "workspace" > ;
21- grep ?: Omit < GrepToolOptions , "workspace" > ;
22- delete ?: Omit < DeleteToolOptions , "store" > ;
2320 shell ?: Omit < ExecToolOptions , "workspace" > ;
2421}
2522
@@ -28,15 +25,15 @@ export function createAITools(options: CreateAIToolsOptions): ToolSet {
2825 const tools : ToolSet = {
2926 read : createReadTool ( { store, ...options . read } ) ,
3027 ls : createListTool ( { workspace : options . workspace } ) ,
31- find : createFindTool ( { workspace : options . workspace , ... options . find } ) ,
32- grep : createGrepTool ( { workspace : options . workspace , ... options . grep } ) ,
28+ find : createFindTool ( { workspace : options . workspace } ) ,
29+ grep : createGrepTool ( { workspace : options . workspace } ) ,
3330 } ;
3431
3532 if ( options . readonly === true ) return tools ;
3633
3734 tools . write = createWriteTool ( { store, ...options . write } ) ;
3835 tools . edit = createEditTool ( { store, ...options . edit } ) ;
39- tools . delete = createDeleteTool ( { store, ... options . delete } ) ;
36+ tools . delete = createDeleteTool ( { store } ) ;
4037
4138 if ( options . shell !== undefined ) {
4239 tools . exec = createExecTool ( {
0 commit comments