aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-aiassist.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-06-01 06:00:39 +0200
committerAgando <roduccomm@gmail.com>2026-06-01 06:00:39 +0200
commit6aed9c9e0252b0c8f681a358e5a8707271454137 (patch)
tree332a29a515c87c2295355cf81f18b818cfbaa846 /modules/core/module-aiassist.js
parent7cc82d2d32e44ab1c5b7d042d5522d036d9aa0be (diff)
auto: 2026-06-01_06:00 changes
Diffstat (limited to 'modules/core/module-aiassist.js')
-rw-r--r--modules/core/module-aiassist.js10
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) {