@oxecli/oxe 1.0.71 → 1.0.72
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 +5 -25
- package/dist/config.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { loadOrPrompt, default_reasoning_effort,
|
|
4
|
+
import { loadOrPrompt, default_reasoning_effort, max_action_chars, max_resume_history_items, runtimeOsSummary, } from "./config.js";
|
|
5
5
|
import { InferenceEngine, estimateTokens } from "./engine.js";
|
|
6
6
|
import { saveSession, loadSession, listSessions, nextSessionId, conversationLabel, COMMAND_HELP, stripOrphanCalls, toolOutputFailed, } from "./sessions.js";
|
|
7
7
|
import { clearScreen, enableAnsi, askBottomPrompt, userDisplayText, aiMarkdown, mutedMarkdown, messageText, formatToolAction, truncateEllipsis, renderPanel, renderTableString, enableRawStdin, disableRawStdin, waitRawKey, } from "./ui.js";
|
|
@@ -24,31 +24,11 @@ export class CLI {
|
|
|
24
24
|
this.renderHeader();
|
|
25
25
|
this.config = null;
|
|
26
26
|
}
|
|
27
|
-
renderHeader(
|
|
27
|
+
renderHeader() {
|
|
28
28
|
const version = packageInfo.version ?? "unknown";
|
|
29
|
-
const
|
|
30
|
-
const centeredCell = (value, render) => {
|
|
31
|
-
const left = Math.max(0, Math.floor((cellWidth - value.length) / 2));
|
|
32
|
-
const right = Math.max(0, cellWidth - value.length - left);
|
|
33
|
-
return " ".repeat(left) + render + " ".repeat(right);
|
|
34
|
-
};
|
|
35
|
-
const labelCell = (label) => {
|
|
36
|
-
return centeredCell(label, `[dim]${label}[/dim]`);
|
|
37
|
-
};
|
|
38
|
-
const valueCell = (value, color) => {
|
|
39
|
-
return centeredCell(value, `[bold ${color}]${value}[/bold ${color}]`);
|
|
40
|
-
};
|
|
41
|
-
const description = "A focused terminal workspace for building and shipping software.";
|
|
29
|
+
const description = "A focused terminal workspace for building and shipping.";
|
|
42
30
|
renderPanel("[bold white]Terminal Coding Agent[/bold white]\n" +
|
|
43
31
|
`[dim]${description}[/dim]\n\n` +
|
|
44
|
-
labelCell("") +
|
|
45
|
-
labelCell("Model") +
|
|
46
|
-
labelCell("Status") +
|
|
47
|
-
"\n" +
|
|
48
|
-
valueCell("", "cyan") +
|
|
49
|
-
valueCell(model, "cyan") +
|
|
50
|
-
valueCell("Ready", "green") +
|
|
51
|
-
"\n\n" +
|
|
52
32
|
`[dim]Environment: ${runtimeOsSummary()}[/dim]`, `\x1b[1;37mOxe\x1b[90m \x1b[1;36mv${version}\x1b[90m`, "Type /help for commands · Ctrl+C to interrupt", false, "90", "left");
|
|
53
33
|
}
|
|
54
34
|
saveSession(engine) {
|
|
@@ -370,7 +350,7 @@ export class CLI {
|
|
|
370
350
|
this.sessionId = sid;
|
|
371
351
|
engine.reasoningEffort = String(rec["reasoning_effort"] ?? default_reasoning_effort);
|
|
372
352
|
clearScreen();
|
|
373
|
-
this.renderHeader(
|
|
353
|
+
this.renderHeader();
|
|
374
354
|
process.stdout.write("\n");
|
|
375
355
|
process.stdout.write(`\x1b[90mResumed:\x1b[0m \x1b[1m${truncateLabel(rec["label"])}\x1b[0m\n`);
|
|
376
356
|
process.stdout.write(`\x1b[90m(${this.inputItems.length} items · ${estimateTokens(this.inputItems).toLocaleString()} tokens)\x1b[0m\n\n`);
|
|
@@ -409,7 +389,7 @@ export class CLI {
|
|
|
409
389
|
this.story = [];
|
|
410
390
|
this.sessionId = null;
|
|
411
391
|
clearScreen();
|
|
412
|
-
this.renderHeader(
|
|
392
|
+
this.renderHeader();
|
|
413
393
|
continue;
|
|
414
394
|
}
|
|
415
395
|
if (lower.startsWith("/resume")) {
|
package/dist/config.js
CHANGED
|
@@ -156,7 +156,7 @@ export async function loadOrPrompt() {
|
|
|
156
156
|
process.stdout.write("\n");
|
|
157
157
|
renderPanel("[bold white]Oxe Desktop Authentication[/bold white]\n\n" +
|
|
158
158
|
`[dim]Only valid Oxe API keys (starting with [bold cyan]${OXE_KEY_PREFIX}[/bold cyan])\n` +
|
|
159
|
-
"generated on your Oxe dashboard are authorized
|
|
159
|
+
"generated on your Oxe dashboard are authorized.\n\n" +
|
|
160
160
|
"Get your key at: [bold underline]http://localhost:5173/dashboard/api-keys[/bold underline][/dim]", "Oxe Cloud Access", "", false, "90", "left");
|
|
161
161
|
process.stdout.write("\n");
|
|
162
162
|
api_key = await promptApiKey("Enter Oxe API Key: ");
|