fix(tools): close cancellation review gaps

This commit is contained in:
Tianyi Cui
2026-07-20 23:44:07 +08:00
parent 4311aaabb0
commit bd1805c637
7 changed files with 43 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ export function apply(ctx: Context) {
async execute(args, exec) {
// args is TYPED from the schema: { path: string; limit?: number }
// exec carries immutable identity + token; signal is the operational field
return [{ type: 'text', text: await readFile(args.path, 'utf8') }]
return [{ type: 'text', text: await readFile(args.path, { encoding: 'utf8', signal: exec.signal }) }]
},
}))
}