fix: name test_run_script in the list of what yolo bypasses

This commit is contained in:
AlexRV12
2026-09-03 16:31:55 +02:00
parent dc8f760805
commit 3c6fcac509
3 changed files with 8 additions and 1 deletions
@@ -562,7 +562,7 @@
const yoloBypassedTools = $derived.by(() => {
return aiChatManager.tools
.filter((tool) => tool.requiresConfirmation === true)
.filter((tool) => tool.requiresConfirmation === true || tool.bypassedByAutoAccept === true)
.map((tool) => ({
name: tool.def.function.name,
// confirmationMessage may be a function of the call args, which we don't
@@ -3667,6 +3667,9 @@ export const globalTools: Tool<{}>[] = [
},
// No requiresConfirmation: like run_script, the argument form is the confirmation —
// but this one is auto-acceptable, so YOLO answers it and the model keeps iterating.
// Which is a decision made for the user, so the posture's own list has to name it.
bypassedByAutoAccept: true,
confirmationMessage: 'Run a test of a script',
streamingLabel: 'Preparing the test form...',
queuedLabel: (args) => `Test ${args?.path ?? 'the script'}`,
showDetails: true,
@@ -1147,6 +1147,10 @@ export interface Tool<T> {
* is true. */
refuseInPlanMode?: (p: { args: any; helpers: T }) => ToolRejection | undefined
requiresConfirmation?: boolean
/** The tool's own argument form is its confirmation, and the bypass posture answers that
* form — so no card is waited on, yet a decision is still being made for the user. The
* list of what the posture bypasses is built from both this and `requiresConfirmation`. */
bypassedByAutoAccept?: boolean
/** Header shown on the confirmation card before the tool runs. Pass a function
* to derive it from the parsed arguments (e.g. name the script being tested). */
confirmationMessage?: string | ((args: any) => string)