diff options
| author | Agando <roduccomm@gmail.com> | 2026-06-01 06:00:39 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-06-01 06:00:39 +0200 |
| commit | 6aed9c9e0252b0c8f681a358e5a8707271454137 (patch) | |
| tree | 332a29a515c87c2295355cf81f18b818cfbaa846 /modules/core/module-aiassist.js | |
| parent | 7cc82d2d32e44ab1c5b7d042d5522d036d9aa0be (diff) | |
auto: 2026-06-01_06:00 changes
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) { |