@oxecli/oxe 1.0.96 → 1.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.js +11 -9
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -155,11 +155,12 @@ export class InferenceEngine {
|
|
|
155
155
|
let sawReasoning = false;
|
|
156
156
|
let status = null;
|
|
157
157
|
let thinkingStart = null;
|
|
158
|
-
// A "Worked for …" block is committed once per working phase.
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
//
|
|
158
|
+
// A "Worked for …" block is committed once per working phase. The flag is
|
|
159
|
+
// reset whenever a tool call runs (in the tool loop below), which is the
|
|
160
|
+
// only way a later phase can begin — the loop only continues after a tool
|
|
161
|
+
// call. So unlimited working blocks can appear, but never two in a row
|
|
162
|
+
// without a tool call in between. An answer ends the query. The total
|
|
163
|
+
// worked time also lands in the final footer.
|
|
163
164
|
const showWorkSpinner = !this.workedCommitted;
|
|
164
165
|
if (showWorkSpinner)
|
|
165
166
|
dockTransientStart();
|
|
@@ -184,10 +185,7 @@ export class InferenceEngine {
|
|
|
184
185
|
const t = tickDuration(elapsed);
|
|
185
186
|
if (!showWorkSpinner)
|
|
186
187
|
return;
|
|
187
|
-
|
|
188
|
-
// call) may commit a fresh block; the per-streamOnce guard above keeps
|
|
189
|
-
// the current phase from duplicating.
|
|
190
|
-
this.workedCommitted = false;
|
|
188
|
+
this.workedCommitted = true;
|
|
191
189
|
story.push({ type: "worked", text: `Worked for ${t}` });
|
|
192
190
|
dockReplaceTransient(mutedMarkdown(`Worked for ${t}`) + "\n");
|
|
193
191
|
};
|
|
@@ -555,6 +553,10 @@ export class InferenceEngine {
|
|
|
555
553
|
dockAppendContent(summary() + "\n");
|
|
556
554
|
return;
|
|
557
555
|
}
|
|
556
|
+
// A successful turn (text or tool call) after a retry must not leave the
|
|
557
|
+
// cut-off retry prompts in the transcript — they'd pollute the context of
|
|
558
|
+
// later turns. Drop them now that the retry produced real output.
|
|
559
|
+
dropRetryPrompts(conversation, inputItems, retryPrompts);
|
|
558
560
|
if (!calls.length) {
|
|
559
561
|
story.push({ type: "footer", text: footerText() });
|
|
560
562
|
attachFooter(conversation);
|