@robinpath/cli 1.88.0 → 1.89.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 +56 -10
- 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.89.0" : "1.89.0";
|
|
18602
18602
|
var FLAG_QUIET = false;
|
|
18603
18603
|
var FLAG_VERBOSE = false;
|
|
18604
18604
|
var FLAG_AUTO_ACCEPT = false;
|
|
@@ -24251,7 +24251,7 @@ function Markdown({ children }) {
|
|
|
24251
24251
|
}
|
|
24252
24252
|
|
|
24253
24253
|
// src/ink-repl.tsx
|
|
24254
|
-
import { platform as platform7 } from "node:os";
|
|
24254
|
+
import { homedir as homedir8, platform as platform7 } from "node:os";
|
|
24255
24255
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
24256
24256
|
import { existsSync as existsSync11, readFileSync as readFileSync10, writeFileSync as writeFileSync6 } from "node:fs";
|
|
24257
24257
|
import { join as join12 } from "node:path";
|
|
@@ -24273,7 +24273,7 @@ var COMMANDS = {
|
|
|
24273
24273
|
"/shell": "Switch shell",
|
|
24274
24274
|
"/help": "All commands"
|
|
24275
24275
|
};
|
|
24276
|
-
function InputArea({ onSubmit, placeholder }) {
|
|
24276
|
+
function InputArea({ onSubmit, placeholder, statusText }) {
|
|
24277
24277
|
const [value, setValue] = useState("");
|
|
24278
24278
|
const { exit } = useApp();
|
|
24279
24279
|
const matchingCommands = useMemo(() => {
|
|
@@ -24346,7 +24346,10 @@ function InputArea({ onSubmit, placeholder }) {
|
|
|
24346
24346
|
] }, i)) }),
|
|
24347
24347
|
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "\u2500".repeat(Math.max(process.stdout.columns || 80, 40)) })
|
|
24348
24348
|
] }),
|
|
24349
|
-
/* @__PURE__ */
|
|
24349
|
+
/* @__PURE__ */ jsxs2(Box2, { paddingX: 2, justifyContent: "space-between", children: [
|
|
24350
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "/ for commands" }),
|
|
24351
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: statusText || "" })
|
|
24352
|
+
] })
|
|
24350
24353
|
] });
|
|
24351
24354
|
}
|
|
24352
24355
|
function TrustPrompt({ cwd, onAccept, onReject }) {
|
|
@@ -24449,7 +24452,6 @@ function ChatApp({ engine }) {
|
|
|
24449
24452
|
setStreaming("");
|
|
24450
24453
|
engine.updateStatus();
|
|
24451
24454
|
}, [engine]);
|
|
24452
|
-
const isFirst = messages.length === 0;
|
|
24453
24455
|
if (!trusted) {
|
|
24454
24456
|
return /* @__PURE__ */ jsx2(
|
|
24455
24457
|
TrustPrompt,
|
|
@@ -24470,8 +24472,52 @@ function ChatApp({ engine }) {
|
|
|
24470
24472
|
}
|
|
24471
24473
|
);
|
|
24472
24474
|
}
|
|
24475
|
+
const modelName = engine.model.includes("/") ? engine.model.split("/").pop() : engine.model;
|
|
24476
|
+
const cwdShort = process.cwd().replace(homedir8(), "~");
|
|
24477
|
+
const isFirst = messages.length === 0;
|
|
24473
24478
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingY: 1, children: [
|
|
24474
|
-
/* @__PURE__ */
|
|
24479
|
+
isFirst && !loading ? /* @__PURE__ */ jsxs2(Box2, { borderStyle: "round", borderColor: "gray", marginBottom: 1, paddingX: 2, paddingY: 1, children: [
|
|
24480
|
+
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", width: "50%", children: [
|
|
24481
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " }),
|
|
24482
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, children: " Welcome to RobinPath!" }),
|
|
24483
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " }),
|
|
24484
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
24485
|
+
" ",
|
|
24486
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u25C6" }),
|
|
24487
|
+
" ",
|
|
24488
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: modelName })
|
|
24489
|
+
] }),
|
|
24490
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
24491
|
+
" ",
|
|
24492
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: cwdShort })
|
|
24493
|
+
] }),
|
|
24494
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " })
|
|
24495
|
+
] }),
|
|
24496
|
+
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", width: "50%", children: [
|
|
24497
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, children: "Tips" }),
|
|
24498
|
+
/* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24499
|
+
"Type ",
|
|
24500
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "/" }),
|
|
24501
|
+
" to see all commands"
|
|
24502
|
+
] }),
|
|
24503
|
+
/* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24504
|
+
"Use ",
|
|
24505
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "@/file" }),
|
|
24506
|
+
" to include files"
|
|
24507
|
+
] }),
|
|
24508
|
+
/* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24509
|
+
"Use ",
|
|
24510
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "\\" }),
|
|
24511
|
+
" at end for multiline"
|
|
24512
|
+
] }),
|
|
24513
|
+
/* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24514
|
+
"Type ",
|
|
24515
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "exit" }),
|
|
24516
|
+
" to quit"
|
|
24517
|
+
] })
|
|
24518
|
+
] })
|
|
24519
|
+
] }) : null,
|
|
24520
|
+
!isFirst || loading ? /* @__PURE__ */ jsx2(Box2, { marginBottom: 1, paddingX: 1, children: /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
24475
24521
|
/* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u25C6" }),
|
|
24476
24522
|
" ",
|
|
24477
24523
|
/* @__PURE__ */ jsx2(Text2, { bold: true, children: "RobinPath" }),
|
|
@@ -24480,7 +24526,7 @@ function ChatApp({ engine }) {
|
|
|
24480
24526
|
"v",
|
|
24481
24527
|
CLI_VERSION
|
|
24482
24528
|
] })
|
|
24483
|
-
] }) }),
|
|
24529
|
+
] }) }) : null,
|
|
24484
24530
|
/* @__PURE__ */ jsx2(Static, { items: messages, children: (msg) => /* @__PURE__ */ jsx2(Box2, { paddingX: 1, marginBottom: msg.text.startsWith("\u276F") ? 0 : 1, flexDirection: "column", children: msg.text.startsWith("\u276F") ? /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
24485
24531
|
/* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u276F" }),
|
|
24486
24532
|
/* @__PURE__ */ jsx2(Text2, { bold: true, children: msg.text.slice(1) })
|
|
@@ -24495,10 +24541,10 @@ function ChatApp({ engine }) {
|
|
|
24495
24541
|
InputArea,
|
|
24496
24542
|
{
|
|
24497
24543
|
onSubmit: handleSubmit,
|
|
24498
|
-
placeholder: "Message RobinPath..."
|
|
24544
|
+
placeholder: "Message RobinPath...",
|
|
24545
|
+
statusText: status
|
|
24499
24546
|
}
|
|
24500
|
-
)
|
|
24501
|
-
status ? /* @__PURE__ */ jsx2(Box2, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: status }) }) : null
|
|
24547
|
+
)
|
|
24502
24548
|
] });
|
|
24503
24549
|
}
|
|
24504
24550
|
var ReplEngine = class {
|