@oxecli/oxe 1.0.80 → 1.0.82
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/cli.js +2 -2
- package/dist/engine.js +3 -0
- package/dist/ui.js +6 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -376,7 +376,7 @@ export class CLI {
|
|
|
376
376
|
const budget = max_context_tokens - context_overhead_margin;
|
|
377
377
|
const pct = Math.max(0, Math.min(100, Math.round(((budget - used) / budget) * 100)));
|
|
378
378
|
const [input, spans] = await askBottomPrompt("You", "❯", this.promptHistory, {
|
|
379
|
-
left: "\x1b[
|
|
379
|
+
left: "\x1b[90mPress \x1b[1;36mesc\x1b[0m\x1b[90m to interrupt\x1b[0m",
|
|
380
380
|
right: `\x1b[1;36m${pct}%\x1b[0m \x1b[90muntil auto-compact\x1b[0m`,
|
|
381
381
|
});
|
|
382
382
|
if (!input.trim())
|
|
@@ -445,7 +445,7 @@ export class CLI {
|
|
|
445
445
|
}
|
|
446
446
|
if (err?.message === "interrupt") {
|
|
447
447
|
const wasActive = queryStarted || engine.inQuery;
|
|
448
|
-
if (wasActive && !engine.queryHasOutput) {
|
|
448
|
+
if (wasActive && !engine.queryHasOutput && !engine.queryCalledTool) {
|
|
449
449
|
process.stdout.write(aiMarkdown("What else can I help you with?") + "\n");
|
|
450
450
|
}
|
|
451
451
|
engine.inQuery = false;
|
package/dist/engine.js
CHANGED
|
@@ -49,6 +49,7 @@ export class InferenceEngine {
|
|
|
49
49
|
activeAbort = null;
|
|
50
50
|
interrupted = false;
|
|
51
51
|
queryHasOutput = false;
|
|
52
|
+
queryCalledTool = false;
|
|
52
53
|
temperature;
|
|
53
54
|
storedResponseIds = [];
|
|
54
55
|
constructor(config) {
|
|
@@ -425,6 +426,7 @@ export class InferenceEngine {
|
|
|
425
426
|
this.workRows = 0;
|
|
426
427
|
this.interrupted = false;
|
|
427
428
|
this.queryHasOutput = false;
|
|
429
|
+
this.queryCalledTool = false;
|
|
428
430
|
this.activeAbort = new AbortController();
|
|
429
431
|
hideCursor();
|
|
430
432
|
inputItems.push({
|
|
@@ -576,6 +578,7 @@ export class InferenceEngine {
|
|
|
576
578
|
}
|
|
577
579
|
for (const c of calls) {
|
|
578
580
|
this.workActive = false;
|
|
581
|
+
this.queryCalledTool = true;
|
|
579
582
|
const started = toolCallLabel(c.name, c.arguments);
|
|
580
583
|
// Print the tool label the instant the command starts, then show a
|
|
581
584
|
// "⎿ Working..." dots line that swaps to the real result in place.
|
package/dist/ui.js
CHANGED
|
@@ -571,7 +571,7 @@ export class Spinner {
|
|
|
571
571
|
}, 300);
|
|
572
572
|
}
|
|
573
573
|
writeDots(initial) {
|
|
574
|
-
const dots =
|
|
574
|
+
const dots = DOT_FRAMES[this.dotsFrame];
|
|
575
575
|
if (initial) {
|
|
576
576
|
process.stdout.write("\r" + this.dotsText + dots + "\r");
|
|
577
577
|
}
|
|
@@ -969,8 +969,11 @@ export function renderBufferWithCursor(buffer, pasteSpans, prefix, label, cursor
|
|
|
969
969
|
if (hints && (hints.left || hints.right)) {
|
|
970
970
|
const left = hints.left ?? "";
|
|
971
971
|
const right = hints.right ?? "";
|
|
972
|
-
|
|
973
|
-
|
|
972
|
+
// Inset the hint row inside the box (box spans columns 0..boxW-1): a
|
|
973
|
+
// leading space gives left-edge padding, and the right hint ends one
|
|
974
|
+
// column before the box's right border for the same padding.
|
|
975
|
+
const gap = Math.max(1, boxW - 2 - plainLen(left) - plainLen(right));
|
|
976
|
+
lines.push(" " + left + " ".repeat(gap) + right);
|
|
974
977
|
totalRows += 1;
|
|
975
978
|
}
|
|
976
979
|
const frame = lines.join("\n");
|