@robinpath/cli 1.98.0 → 2.0.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +12 -15
  2. 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.98.0" : "1.98.0";
18601
+ var CLI_VERSION = true ? "2.0.0" : "2.0.0";
18602
18602
  var FLAG_QUIET = false;
18603
18603
  var FLAG_VERBOSE = false;
18604
18604
  var FLAG_AUTO_ACCEPT = false;
@@ -24582,16 +24582,6 @@ function ChatApp({ engine }) {
24582
24582
  ] })
24583
24583
  ] })
24584
24584
  ] }) : null,
24585
- !isFirst || loading ? /* @__PURE__ */ jsx2(Box2, { marginBottom: 1, paddingX: 1, children: /* @__PURE__ */ jsxs2(Text2, { children: [
24586
- /* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u25C6" }),
24587
- " ",
24588
- /* @__PURE__ */ jsx2(Text2, { bold: true, children: "RobinPath" }),
24589
- " ",
24590
- /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
24591
- "v",
24592
- CLI_VERSION
24593
- ] })
24594
- ] }) }) : null,
24595
24585
  /* @__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: [
24596
24586
  /* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u276F" }),
24597
24587
  /* @__PURE__ */ jsx2(Text2, { bold: true, children: msg.text.slice(1) })
@@ -24787,20 +24777,23 @@ Type / to see available commands.`;
24787
24777
  const activeProvider = this.resolveProvider(activeKey);
24788
24778
  for (let loop = 0; loop < 5; loop++) {
24789
24779
  let fullText = "";
24780
+ let lastUpdate = 0;
24790
24781
  const result = await fetchBrainStream(
24791
24782
  loop === 0 ? expanded : this.conversationMessages[this.conversationMessages.length - 1].content,
24792
24783
  {
24793
24784
  onToken: (delta) => {
24794
24785
  if (delta === "\x1B[RETRY]") {
24795
24786
  fullText = "";
24787
+ lastUpdate = 0;
24796
24788
  ui?.setStreaming("");
24797
24789
  return;
24798
24790
  }
24799
24791
  fullText += delta;
24792
+ const now = Date.now();
24793
+ if (now - lastUpdate < 100) return;
24794
+ lastUpdate = now;
24800
24795
  const clean = fullText.replace(/<memory>[\s\S]*?<\/memory>/g, "").replace(/<cmd>[\s\S]*?<\/cmd>/g, "").replace(/\n{3,}/g, "\n\n").trim();
24801
- const hasOpenCmd = fullText.includes("<cmd>") && !fullText.endsWith("</cmd>") && (fullText.match(/<cmd>/g) || []).length > (fullText.match(/<\/cmd>/g) || []).length;
24802
- const display = hasOpenCmd ? clean + "\n\nPreparing commands..." : clean;
24803
- ui?.setStreaming(display);
24796
+ ui?.setStreaming(clean);
24804
24797
  },
24805
24798
  conversationHistory: this.conversationMessages.slice(0, -1),
24806
24799
  provider: activeProvider,
@@ -24809,6 +24802,10 @@ Type / to see available commands.`;
24809
24802
  cliContext: this.cliContext
24810
24803
  }
24811
24804
  );
24805
+ if (fullText) {
24806
+ const finalClean = fullText.replace(/<memory>[\s\S]*?<\/memory>/g, "").replace(/<cmd>[\s\S]*?<\/cmd>/g, "").replace(/\n{3,}/g, "\n\n").trim();
24807
+ ui?.setStreaming(finalClean);
24808
+ }
24812
24809
  if (!result) {
24813
24810
  finalResponse = "\u26A0 No internet connection. Check your network and try again.";
24814
24811
  break;
@@ -24840,8 +24837,8 @@ Type / to see available commands.`;
24840
24837
  break;
24841
24838
  }
24842
24839
  ui?.setStreaming("");
24843
- await new Promise((r) => setTimeout(r, 50));
24844
24840
  if (cleaned) ui?.addMessage(cleaned);
24841
+ await new Promise((r) => setTimeout(r, 100));
24845
24842
  const cmdResults = [];
24846
24843
  for (const cmd of commands) {
24847
24844
  const preview = cmd.split("\n")[0].slice(0, 80);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinpath/cli",
3
- "version": "1.98.0",
3
+ "version": "2.0.0",
4
4
  "description": "AI-powered scripting CLI — automate anything from your terminal",
5
5
  "type": "module",
6
6
  "license": "MIT",