diff options
| author | Adam Malczewski <[email protected]> | 2026-05-27 17:22:52 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-27 17:22:52 +0900 |
| commit | da57842686ebfd157396551fc76d0c18f7676335 (patch) | |
| tree | 31caa165c9c6188ee7fa27663ec832a13f6a7ac2 /packages/api/tests | |
| parent | 399e1509b93b9f3c56142f94b8fb2c30c2dedb2f (diff) | |
| download | dispatch-da57842686ebfd157396551fc76d0c18f7676335.tar.gz dispatch-da57842686ebfd157396551fc76d0c18f7676335.zip | |
feat: tool-output truncation+spill, read_file pagination, read_file_slice, symlink-safe path resolution
Diffstat (limited to 'packages/api/tests')
| -rw-r--r-- | packages/api/tests/agent-manager.test.ts | 9 | ||||
| -rw-r--r-- | packages/api/tests/routes.test.ts | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/packages/api/tests/agent-manager.test.ts b/packages/api/tests/agent-manager.test.ts index b426c4e..a1f2d75 100644 --- a/packages/api/tests/agent-manager.test.ts +++ b/packages/api/tests/agent-manager.test.ts @@ -35,6 +35,15 @@ vi.mock("@dispatch/core", () => ({ execute: async () => "mock file content", }; }, + createReadFileSliceTool(_wd: string): ToolDefinition { + return { + name: "read_file_slice", + description: "read a char slice of a single line", + parameters: { _type: "z.ZodObject", shape: {} } as unknown as ToolDefinition["parameters"], + execute: async () => "mock slice", + }; + }, + clearSpillForTab(_tabId: string) {}, createWriteFileTool(_wd: string): ToolDefinition { return { name: "write_file", diff --git a/packages/api/tests/routes.test.ts b/packages/api/tests/routes.test.ts index c3c7eaa..69a6676 100644 --- a/packages/api/tests/routes.test.ts +++ b/packages/api/tests/routes.test.ts @@ -36,6 +36,15 @@ vi.mock("@dispatch/core", () => ({ execute: async () => "mock file content", }; }, + createReadFileSliceTool(_wd: string): ToolDefinition { + return { + name: "read_file_slice", + description: "read a char slice of a single line", + parameters: { _type: "z.ZodObject", shape: {} } as unknown as ToolDefinition["parameters"], + execute: async () => "mock slice", + }; + }, + clearSpillForTab(_tabId: string) {}, createWriteFileTool(_wd: string): ToolDefinition { return { name: "write_file", |
