@robinpath/cli 2.8.0 → 2.9.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 +9 -7
- 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 ? "2.
|
|
18601
|
+
var CLI_VERSION = true ? "2.9.0" : "2.9.0";
|
|
18602
18602
|
var FLAG_QUIET = false;
|
|
18603
18603
|
var FLAG_VERBOSE = false;
|
|
18604
18604
|
var FLAG_AUTO_ACCEPT = false;
|
|
@@ -24134,7 +24134,7 @@ ${resultSummary}`
|
|
|
24134
24134
|
|
|
24135
24135
|
// src/ink-repl.tsx
|
|
24136
24136
|
import { useState, useCallback, useEffect, useMemo } from "react";
|
|
24137
|
-
import { render, Box as Box2, Text as Text2,
|
|
24137
|
+
import { render, Box as Box2, Text as Text2, useInput, useApp } from "ink";
|
|
24138
24138
|
import InkSpinner from "ink-spinner";
|
|
24139
24139
|
|
|
24140
24140
|
// src/ui/Markdown.tsx
|
|
@@ -24509,7 +24509,8 @@ function ChatApp({ engine }) {
|
|
|
24509
24509
|
setLoading,
|
|
24510
24510
|
setStatus,
|
|
24511
24511
|
setShowModelPicker,
|
|
24512
|
-
addMessage: (text, dim) => setMessages((p) => [...p, { id: ++nextId, text, dim }])
|
|
24512
|
+
addMessage: (text, dim) => setMessages((p) => [...p, { id: ++nextId, text, dim }]),
|
|
24513
|
+
clearMessages: () => setMessages([])
|
|
24513
24514
|
};
|
|
24514
24515
|
engine.updateStatus();
|
|
24515
24516
|
}, []);
|
|
@@ -24520,7 +24521,7 @@ function ChatApp({ engine }) {
|
|
|
24520
24521
|
}
|
|
24521
24522
|
if (text.startsWith("/")) {
|
|
24522
24523
|
const result = await engine.handleSlashCommand(text);
|
|
24523
|
-
if (result) setMessages((p) => [...p, { id: ++nextId, text: result, dim: true }]);
|
|
24524
|
+
if (result && result.trim()) setMessages((p) => [...p, { id: ++nextId, text: result, dim: true }]);
|
|
24524
24525
|
engine.updateStatus();
|
|
24525
24526
|
return;
|
|
24526
24527
|
}
|
|
@@ -24594,7 +24595,7 @@ function ChatApp({ engine }) {
|
|
|
24594
24595
|
] })
|
|
24595
24596
|
] })
|
|
24596
24597
|
] }) : null,
|
|
24597
|
-
|
|
24598
|
+
messages.map((msg) => /* @__PURE__ */ jsx2(Box2, { paddingX: 1, marginBottom: msg.text.startsWith("\u276F") ? 0 : 1, flexDirection: "column", children: msg.text.startsWith("\u276F") ? /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
24598
24599
|
/* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u276F" }),
|
|
24599
24600
|
/* @__PURE__ */ jsx2(Text2, { bold: true, children: msg.text.slice(1) })
|
|
24600
24601
|
] }) : msg.text.includes("\u23BF") && msg.text.includes("Write") ? /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
@@ -24603,7 +24604,7 @@ function ChatApp({ engine }) {
|
|
|
24603
24604
|
] }) : msg.text.includes("\u23BF") && msg.text.includes("\u2717") ? /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
24604
24605
|
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: msg.text.split("\n")[0] }),
|
|
24605
24606
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "red", color: "white", children: msg.text.split("\n").slice(1).join("\n") })
|
|
24606
|
-
] }) : msg.text.includes("\u23BF") ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : msg.dim ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : /* @__PURE__ */ jsx2(Markdown, { children: msg.text }) }, msg.id)
|
|
24607
|
+
] }) : msg.text.includes("\u23BF") ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : msg.dim ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : /* @__PURE__ */ jsx2(Markdown, { children: msg.text }) }, msg.id)),
|
|
24607
24608
|
showModelPicker ? /* @__PURE__ */ jsx2(
|
|
24608
24609
|
ModelSelector,
|
|
24609
24610
|
{
|
|
@@ -24700,7 +24701,8 @@ var ReplEngine = class {
|
|
|
24700
24701
|
}
|
|
24701
24702
|
if (text === "/clear") {
|
|
24702
24703
|
this.conversationMessages.length = 0;
|
|
24703
|
-
|
|
24704
|
+
this.ui?.clearMessages();
|
|
24705
|
+
return "";
|
|
24704
24706
|
}
|
|
24705
24707
|
if (text === "/compact") {
|
|
24706
24708
|
if (this.conversationMessages.length > 12) {
|