@robinpath/cli 1.84.0 → 1.85.0
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.mjs +10 -20
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -18598,7 +18598,7 @@ function getNativeModules() {
|
|
|
18598
18598
|
import { join as join3, basename as basename2 } from "node:path";
|
|
18599
18599
|
import { homedir as homedir2, platform as platform2 } from "node:os";
|
|
18600
18600
|
import { existsSync as existsSync2 } from "node:fs";
|
|
18601
|
-
var CLI_VERSION = true ? "1.
|
|
18601
|
+
var CLI_VERSION = true ? "1.85.0" : "1.85.0";
|
|
18602
18602
|
var FLAG_QUIET = false;
|
|
18603
18603
|
var FLAG_VERBOSE = false;
|
|
18604
18604
|
var FLAG_AUTO_ACCEPT = false;
|
|
@@ -24332,9 +24332,9 @@ function InputArea({ onSubmit, placeholder }) {
|
|
|
24332
24332
|
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: cmd.padEnd(14) }),
|
|
24333
24333
|
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: desc })
|
|
24334
24334
|
] }, cmd)) }),
|
|
24335
|
-
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "column",
|
|
24336
|
-
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "\u2500".repeat(
|
|
24337
|
-
/* @__PURE__ */ jsx2(Box2, { paddingX:
|
|
24335
|
+
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
24336
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "\u2500".repeat(Math.max(process.stdout.columns || 80, 40)) }),
|
|
24337
|
+
/* @__PURE__ */ jsx2(Box2, { paddingX: 2, flexDirection: "column", children: empty ? /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24338
24338
|
"> ",
|
|
24339
24339
|
placeholder
|
|
24340
24340
|
] }) : lines.map((line, i) => /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
@@ -24342,20 +24342,9 @@ function InputArea({ onSubmit, placeholder }) {
|
|
|
24342
24342
|
line,
|
|
24343
24343
|
i === lines.length - 1 ? /* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "\u258E" }) : null
|
|
24344
24344
|
] }, i)) }),
|
|
24345
|
-
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "\u2500".repeat(
|
|
24345
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "\u2500".repeat(Math.max(process.stdout.columns || 80, 40)) })
|
|
24346
24346
|
] }),
|
|
24347
|
-
/* @__PURE__ */ jsx2(Box2, {
|
|
24348
|
-
/* @__PURE__ */ jsx2(Text2, { color: "gray", children: "enter" }),
|
|
24349
|
-
" send ",
|
|
24350
|
-
/* @__PURE__ */ jsx2(Text2, { color: "gray", children: "\\" }),
|
|
24351
|
-
" newline ",
|
|
24352
|
-
/* @__PURE__ */ jsx2(Text2, { color: "gray", children: "/" }),
|
|
24353
|
-
" commands ",
|
|
24354
|
-
/* @__PURE__ */ jsx2(Text2, { color: "gray", children: "tab" }),
|
|
24355
|
-
" complete ",
|
|
24356
|
-
/* @__PURE__ */ jsx2(Text2, { color: "gray", children: "@/" }),
|
|
24357
|
-
" files"
|
|
24358
|
-
] }) })
|
|
24347
|
+
/* @__PURE__ */ jsx2(Box2, { paddingX: 2, children: /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "enter send \xB7 \\ newline \xB7 / commands \xB7 @/ files" }) })
|
|
24359
24348
|
] });
|
|
24360
24349
|
}
|
|
24361
24350
|
function ChatApp({ engine }) {
|
|
@@ -24480,9 +24469,10 @@ var ReplEngine = class {
|
|
|
24480
24469
|
}
|
|
24481
24470
|
updateStatus() {
|
|
24482
24471
|
const m = this.model.includes("/") ? this.model.split("/").pop() : this.model;
|
|
24483
|
-
const
|
|
24484
|
-
|
|
24485
|
-
this.
|
|
24472
|
+
const parts = [m || "default"];
|
|
24473
|
+
if (this.usage.totalTokens > 0) parts.push(`${this.usage.totalTokens.toLocaleString()} tokens`);
|
|
24474
|
+
if (this.usage.cost > 0) parts.push(`$${this.usage.cost.toFixed(4)}`);
|
|
24475
|
+
this.ui?.setStatus(parts.join(" \xB7 "));
|
|
24486
24476
|
}
|
|
24487
24477
|
exit() {
|
|
24488
24478
|
if (this.conversationMessages.length > 1) saveSession(this.sessionId, this.sessionName, this.conversationMessages, this.usage);
|