Skip to content

Commit 27b4253

Browse files
committed
computer: Remove empty tool option bags
1 parent f07059e commit 27b4253

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

  • packages/computer/src/tools

packages/computer/src/tools/ai.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { ToolSet } from "ai";
22
import { createExecTool, type ExecToolOptions, type ExecWorkspaceLike } from "./exec.js";
3-
import { createDeleteTool, type DeleteToolOptions } from "./fs/delete.js";
3+
import { createDeleteTool } from "./fs/delete.js";
44
import { 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";
77
import { createListTool } from "./fs/list.js";
88
import { createReadTool, type ReadToolOptions } from "./fs/read.js";
99
import { 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

Comments
 (0)