( setAppState: SetAppState, sessionId: string, )
| 68 | * Used by ask.tsx, execAgentHook.ts, and background verification. |
| 69 | */ |
| 70 | export function registerStructuredOutputEnforcement( |
| 71 | setAppState: SetAppState, |
| 72 | sessionId: string, |
| 73 | ): void { |
| 74 | addFunctionHook( |
| 75 | setAppState, |
| 76 | sessionId, |
| 77 | 'Stop', |
| 78 | '', // No matcher - applies to all stops |
| 79 | messages => hasSuccessfulToolCall(messages, SYNTHETIC_OUTPUT_TOOL_NAME), |
| 80 | `You MUST call the ${SYNTHETIC_OUTPUT_TOOL_NAME} tool to complete this request. Call this tool now.`, |
| 81 | { timeout: 5000 }, |
| 82 | ) |
| 83 | } |
| 84 |
no test coverage detected