diff options
Diffstat (limited to 'src/domains/files.ts')
| -rw-r--r-- | src/domains/files.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/domains/files.ts b/src/domains/files.ts index cf9393e..4e0195d 100644 --- a/src/domains/files.ts +++ b/src/domains/files.ts @@ -109,6 +109,7 @@ export const uploadFileTool = defineBrowserTool({ "File path must be absolute and readable.", ], parameters: UploadArgs, + concurrency: "serialized", async handler(args, { client }): Promise<Result<ToolOk, ToolErr>> { const readable = await verifyReadable(args.filePath); if (!readable.success) return readable; @@ -160,6 +161,7 @@ export const downloadTool = defineBrowserTool({ "Affects all subsequent downloads on this browser.", ], parameters: DownloadArgs, + concurrency: "serialized", async handler(args, { client }): Promise<Result<ToolOk, ToolErr>> { try { await mkdir(args.downloadPath, { recursive: true }); @@ -205,6 +207,7 @@ export const printToPdfTool = defineBrowserTool({ promptSnippet: "Print the current page to PDF", promptGuidelines: ["Default output path is in tmpdir; pass outputPath to control."], parameters: PrintPdfArgs, + concurrency: "serialized", async handler(args, { client }): Promise<Result<ToolOk, ToolErr>> { const r = await client.session().call("Page.printToPDF", { printBackground: true, |
