Skip to content

Commit f2b8d65

Browse files
committed
refactor: rename variables for clarity in ToolBase class execution flow
1 parent d4edb12 commit f2b8d65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/tool.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,18 @@ export abstract class ToolBase {
485485
noRedaction: true,
486486
});
487487

488-
const result = await this.execute(args, { signal });
489-
const finalResult = await this.appendUIResource(result);
488+
const toolCallResult = await this.execute(args, { signal });
489+
const result = await this.appendUIResource(toolCallResult);
490490

491-
this.emitToolEvent(args, { startTime, result: finalResult });
491+
this.emitToolEvent(args, { startTime, result });
492492

493493
this.session.logger.debug({
494494
id: LogId.toolExecute,
495495
context: "tool",
496496
message: `Executed tool ${this.name}`,
497497
noRedaction: true,
498498
});
499-
return finalResult;
499+
return result;
500500
} catch (error: unknown) {
501501
this.session.logger.error({
502502
id: LogId.toolExecuteFailure,

0 commit comments

Comments
 (0)