@oxecli/oxe 1.0.94 → 1.0.95

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 +18 -2
  2. package/package.json +1 -1
package/dist/engine.js CHANGED
@@ -49,6 +49,10 @@ export class InferenceEngine {
49
49
  queryHasOutput = false;
50
50
  queryCalledTool = false;
51
51
  temperature;
52
+ /** True once a "Worked for …" line has been committed during the current
53
+ * query, so subsequent tool iterations don't pile up duplicate working
54
+ * blocks. The total worked time is summarized in the final footer. */
55
+ workedCommitted = false;
52
56
  storedResponseIds = [];
53
57
  constructor(config) {
54
58
  this.modelName = config["model_name"];
@@ -151,10 +155,18 @@ export class InferenceEngine {
151
155
  let sawReasoning = false;
152
156
  let status = null;
153
157
  let thinkingStart = null;
154
- dockTransientStart();
158
+ // Only the first API pass in a query shows the "Working…" spinner and a
159
+ // committed "Worked for …" block. Subsequent tool iterations run silently
160
+ // (the tool labels/results already give feedback) so duplicate working
161
+ // blocks never stack; the total worked time lands in the final footer.
162
+ const showWorkSpinner = !this.workedCommitted;
163
+ if (showWorkSpinner)
164
+ dockTransientStart();
155
165
  const workStatus = new Spinner();
156
166
  const workingStarted = Date.now();
157
- workStatus.startWithRender(() => `Working ${tickDuration((Date.now() - workingStarted) / 1000)}`);
167
+ if (showWorkSpinner) {
168
+ workStatus.startWithRender(() => `Working ${tickDuration((Date.now() - workingStarted) / 1000)}`);
169
+ }
158
170
  let workingReported = false;
159
171
  let response = null;
160
172
  let etype = null;
@@ -169,6 +181,9 @@ export class InferenceEngine {
169
181
  workingReported = true;
170
182
  const elapsed = (Date.now() - workingStarted) / 1000;
171
183
  const t = tickDuration(elapsed);
184
+ if (!showWorkSpinner)
185
+ return;
186
+ this.workedCommitted = true;
172
187
  story.push({ type: "worked", text: `Worked for ${t}` });
173
188
  dockReplaceTransient(mutedMarkdown(`Worked for ${t}`) + "\n");
174
189
  };
@@ -399,6 +414,7 @@ export class InferenceEngine {
399
414
  this.interrupted = false;
400
415
  this.queryHasOutput = false;
401
416
  this.queryCalledTool = false;
417
+ this.workedCommitted = false;
402
418
  this.activeAbort = new AbortController();
403
419
  hideCursor();
404
420
  inputItems.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.94",
3
+ "version": "1.0.95",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },