mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-26 18:35:05 +00:00
fix: retain authentication diagnostics across empty stream blocks
This commit is contained in:
4 files changed
+31
-4
No files matched your search
@@ -308,7 +308,7 @@ function runTrial(trial, { workRoot, armSettingsByName, executable, model, maxTu
|
||||
providerMessage: stream.result && stream.result.is_error === true
|
||||
? String(stream.result.result || '').slice(0, 200)
|
||||
: !stream.result
|
||||
? String(stream.texts[stream.texts.length - 1] || '').slice(0, 200) || null
|
||||
? String([...stream.texts].reverse().find(text => text.trim() !== '') || '').slice(0, 200) || null
|
||||
: null,
|
||||
wallMs: Date.now() - started,
|
||||
passed: outcome.passed,
|
||||
|
||||
@@ -115,7 +115,8 @@ function runConversation({ cwd, stateDir, settingsPath, prompt, intent }, option
|
||||
// conversation rather than being graded as a finding.
|
||||
if (!stream.result || stream.result.is_error === true) {
|
||||
providerError = true;
|
||||
providerMessage = String((stream.result && stream.result.result) || finalText(stream) || '').slice(0, 200) || null;
|
||||
providerMessage = String((stream.result && stream.result.result)
|
||||
|| [...stream.texts].reverse().find(text => text.trim() !== '') || '').slice(0, 200) || null;
|
||||
}
|
||||
addUsage(usage, stream.result);
|
||||
denialsPerTurn.push(stream.gateDenials);
|
||||
|
||||
Reference in new issue
Block a user