mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 21:21:10 +00:00
refactor: remove redundant tool handler conversions
This commit is contained in:
@@ -536,9 +536,9 @@ export function handleToolExecutionStart(
|
||||
};
|
||||
|
||||
const continueToolExecutionStart = () => {
|
||||
const rawToolName = String(evt.toolName);
|
||||
const rawToolName = evt.toolName;
|
||||
const toolName = normalizeToolName(rawToolName);
|
||||
const toolCallId = String(evt.toolCallId);
|
||||
const toolCallId = evt.toolCallId;
|
||||
const args = evt.args;
|
||||
const runId = ctx.params.runId;
|
||||
|
||||
@@ -673,8 +673,8 @@ export function handleToolExecutionUpdate(
|
||||
partialResult?: unknown;
|
||||
},
|
||||
) {
|
||||
const toolName = normalizeToolName(String(evt.toolName));
|
||||
const toolCallId = String(evt.toolCallId);
|
||||
const toolName = normalizeToolName(evt.toolName);
|
||||
const toolCallId = evt.toolCallId;
|
||||
const partial = evt.partialResult;
|
||||
const sanitized = sanitizeToolResult(partial);
|
||||
emitAgentEvent({
|
||||
@@ -752,10 +752,10 @@ export async function handleToolExecutionEnd(
|
||||
result?: unknown;
|
||||
},
|
||||
) {
|
||||
const toolName = normalizeToolName(String(evt.toolName));
|
||||
const toolCallId = String(evt.toolCallId);
|
||||
const toolName = normalizeToolName(evt.toolName);
|
||||
const toolCallId = evt.toolCallId;
|
||||
const runId = ctx.params.runId;
|
||||
const isError = Boolean(evt.isError);
|
||||
const isError = evt.isError;
|
||||
const result = evt.result;
|
||||
const isToolError = isError || isToolResultError(result);
|
||||
const sanitizedResult = sanitizeToolResult(result);
|
||||
|
||||
Reference in New Issue
Block a user