@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.
Files changed (2) hide show
  1. package/dist/engine.js +11 -9
  2. 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. Each phase is
159
- // interrupted (and the flag reset) by either real answer text or a tool
160
- // call, so unlimited working blocks can appearbut never two in a row
161
- // without an answer or tool call in between. The total worked time also
162
- // lands in the final footer.
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 beginthe 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
- // Reset immediately so a later working phase (after an answer or a tool
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },