Skip to content

Commit 11c8a18

Browse files
committed
BOX-137: fixes
1 parent 641c0ee commit 11c8a18

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/sdk/src/client.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ function toBackendAgentOptions(
8888
}
8989

9090
function resolveToolCallId(parsed: Record<string, unknown>): string | undefined {
91-
const id = parsed.tool_call_id ?? parsed.tool_use_id ?? parsed.toolCallId ?? parsed.id;
92-
return typeof id === "string" ? id : undefined;
91+
if (typeof parsed.tool_call_id === "string") return parsed.tool_call_id;
92+
if (typeof parsed.tool_use_id === "string") return parsed.tool_use_id;
93+
if (typeof parsed.toolCallId === "string") return parsed.toolCallId;
94+
if (typeof parsed.id === "string") return parsed.id;
95+
return undefined;
9396
}
9497

9598
/**

0 commit comments

Comments
 (0)