Skip to content

Commit f43948d

Browse files
committed
feedback
1 parent d13b6f3 commit f43948d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

js/ai/src/tool.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,14 @@ export function restartTool(
413413
toolRequest: stripUndefinedProps({
414414
name: interrupt.toolRequest.name,
415415
ref: interrupt.toolRequest.ref,
416-
input: replaceInput || interrupt.toolRequest.input,
416+
input: replaceInput ?? interrupt.toolRequest.input,
417417
}),
418418
metadata: stripUndefinedProps({
419419
...interrupt.metadata,
420-
resumed: resumedMetadata || true,
420+
resumed: resumedMetadata ?? true,
421421
// annotate the original input if replacing it
422-
replacedInput: replaceInput ? interrupt.toolRequest.input : undefined,
422+
replacedInput:
423+
replaceInput !== undefined ? interrupt.toolRequest.input : undefined,
423424
}),
424425
};
425426
}
@@ -447,7 +448,7 @@ export function respondTool(
447448
output: responseData,
448449
}),
449450
metadata: stripUndefinedProps({
450-
interruptResponse: options?.metadata || true,
451+
interruptResponse: options?.metadata ?? true,
451452
}),
452453
};
453454
}

0 commit comments

Comments
 (0)