diff options
Diffstat (limited to 'modules/core/module-aiassist.js')
| -rw-r--r-- | modules/core/module-aiassist.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js index 8f8a60c..f77ec61 100644 --- a/modules/core/module-aiassist.js +++ b/modules/core/module-aiassist.js @@ -665,17 +665,19 @@ RULES: } // Validator: check safe tool results for consistency if (safeResults.length > 0 && pendingText) { - const om = this.terminal.ollamaManager; + const om = this.terminal.ollamaManager; if (om && om.validatorEnabled && om.validatorModel) { - let anyInvalid = false; + let invalidTools = []; for (const { fn, toolResult } of safeResults) { const valid = await om.validateToolResult(fn.name, fn.arguments, toolResult, pendingText || ''); if (!valid && !this._cancelled) { - anyInvalid = true; + invalidTools.push(fn.name); this.terminal.print('š Validator: ' + fn.name + ' result ā AI note may not match (logged)', 'info'); - // Just log it ā don't force retry (cloud models get 400 on retry) } } + if (invalidTools.length > 0) { + pendingText += '\n\nā ļø **Validator flagged** ' + invalidTools.join(', ') + ' ā the AI analysis may not match what was returned. Use `ai-ignore` to dismiss and proceed.'; + } } } if (pendingText) { |