@robinpath/cli 1.97.0 → 1.99.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 +12 -6
- 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.99.0" : "1.99.0";
|
|
18602
18602
|
var FLAG_QUIET = false;
|
|
18603
18603
|
var FLAG_VERBOSE = false;
|
|
18604
18604
|
var FLAG_AUTO_ACCEPT = false;
|
|
@@ -24614,10 +24614,7 @@ function ChatApp({ engine }) {
|
|
|
24614
24614
|
},
|
|
24615
24615
|
onCancel: () => setShowModelPicker(false)
|
|
24616
24616
|
}
|
|
24617
|
-
) : loading ? /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", paddingX: 1, children: streaming ? /* @__PURE__ */
|
|
24618
|
-
/* @__PURE__ */ jsx2(Markdown, { children: streaming }),
|
|
24619
|
-
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: "\u258D" })
|
|
24620
|
-
] }) : /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24617
|
+
) : loading ? /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", paddingX: 1, children: streaming ? /* @__PURE__ */ jsx2(Text2, { wrap: "wrap", children: streaming }) : /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
|
|
24621
24618
|
/* @__PURE__ */ jsx2(InkSpinner, { type: "dots" }),
|
|
24622
24619
|
" Thinking"
|
|
24623
24620
|
] }) }) : /* @__PURE__ */ jsx2(
|
|
@@ -24790,16 +24787,21 @@ Type / to see available commands.`;
|
|
|
24790
24787
|
const activeProvider = this.resolveProvider(activeKey);
|
|
24791
24788
|
for (let loop = 0; loop < 5; loop++) {
|
|
24792
24789
|
let fullText = "";
|
|
24790
|
+
let lastUpdate = 0;
|
|
24793
24791
|
const result = await fetchBrainStream(
|
|
24794
24792
|
loop === 0 ? expanded : this.conversationMessages[this.conversationMessages.length - 1].content,
|
|
24795
24793
|
{
|
|
24796
24794
|
onToken: (delta) => {
|
|
24797
24795
|
if (delta === "\x1B[RETRY]") {
|
|
24798
24796
|
fullText = "";
|
|
24797
|
+
lastUpdate = 0;
|
|
24799
24798
|
ui?.setStreaming("");
|
|
24800
24799
|
return;
|
|
24801
24800
|
}
|
|
24802
24801
|
fullText += delta;
|
|
24802
|
+
const now = Date.now();
|
|
24803
|
+
if (now - lastUpdate < 100) return;
|
|
24804
|
+
lastUpdate = now;
|
|
24803
24805
|
const clean = fullText.replace(/<memory>[\s\S]*?<\/memory>/g, "").replace(/<cmd>[\s\S]*?<\/cmd>/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
24804
24806
|
ui?.setStreaming(clean);
|
|
24805
24807
|
},
|
|
@@ -24810,6 +24812,10 @@ Type / to see available commands.`;
|
|
|
24810
24812
|
cliContext: this.cliContext
|
|
24811
24813
|
}
|
|
24812
24814
|
);
|
|
24815
|
+
if (fullText) {
|
|
24816
|
+
const finalClean = fullText.replace(/<memory>[\s\S]*?<\/memory>/g, "").replace(/<cmd>[\s\S]*?<\/cmd>/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
24817
|
+
ui?.setStreaming(finalClean);
|
|
24818
|
+
}
|
|
24813
24819
|
if (!result) {
|
|
24814
24820
|
finalResponse = "\u26A0 No internet connection. Check your network and try again.";
|
|
24815
24821
|
break;
|
|
@@ -24841,8 +24847,8 @@ Type / to see available commands.`;
|
|
|
24841
24847
|
break;
|
|
24842
24848
|
}
|
|
24843
24849
|
ui?.setStreaming("");
|
|
24844
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
24845
24850
|
if (cleaned) ui?.addMessage(cleaned);
|
|
24851
|
+
await new Promise((r) => setTimeout(r, 100));
|
|
24846
24852
|
const cmdResults = [];
|
|
24847
24853
|
for (const cmd of commands) {
|
|
24848
24854
|
const preview = cmd.split("\n")[0].slice(0, 80);
|