Skip to content

Commit

Permalink
feat(tool): create shallow copy of the input
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Nov 4, 2024
1 parent d218f8b commit 9182c44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tools/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ export abstract class Tool<
}

run(input: ToolInputRaw<this>, options?: TRunOptions): Promise<TOutput> {
input = shallowCopy(input);

return RunContext.enter(
this,
{ signal: options?.signal, params: [input, options] as const },
Expand Down

0 comments on commit 9182c44

Please sign in to comment.