@robinpath/cli 2.2.0 → 2.3.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 -17
  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 ? "2.2.0" : "2.2.0";
18601
+ var CLI_VERSION = true ? "2.3.0" : "2.3.0";
18602
18602
  var FLAG_QUIET = false;
18603
18603
  var FLAG_VERBOSE = false;
18604
18604
  var FLAG_AUTO_ACCEPT = false;
@@ -24531,13 +24531,7 @@ function ChatApp({ engine }) {
24531
24531
  /* @__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: [
24532
24532
  /* @__PURE__ */ jsx2(Text2, { color: "cyan", bold: true, children: "\u276F" }),
24533
24533
  /* @__PURE__ */ jsx2(Text2, { bold: true, children: msg.text.slice(1) })
24534
- ] }) : msg.text.startsWith("\u2713") ? /* @__PURE__ */ jsxs2(Text2, { dimColor: true, children: [
24535
- /* @__PURE__ */ jsx2(Text2, { color: "green", children: "\u2713" }),
24536
- msg.text.slice(1)
24537
- ] }) : msg.text.startsWith("\u2717") ? /* @__PURE__ */ jsxs2(Text2, { children: [
24538
- /* @__PURE__ */ jsx2(Text2, { color: "red", children: "\u2717" }),
24539
- msg.text.slice(1)
24540
- ] }) : msg.dim ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : /* @__PURE__ */ jsx2(Markdown, { children: msg.text }) }, msg.id) }),
24534
+ ] }) : 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) }),
24541
24535
  showModelPicker ? /* @__PURE__ */ jsx2(
24542
24536
  ModelSelector,
24543
24537
  {
@@ -24790,24 +24784,25 @@ Type / to see available commands.`;
24790
24784
  await new Promise((r) => setTimeout(r, 100));
24791
24785
  const cmdResults = [];
24792
24786
  for (const cmd of commands) {
24793
- const firstLine = cmd.split("\n")[0].slice(0, 60);
24787
+ const firstLine = cmd.split("\n")[0].slice(0, 70);
24788
+ const isMultiline = cmd.includes("\n");
24794
24789
  const r = await executeShellCommand(cmd);
24795
24790
  cmdResults.push({ command: cmd, stdout: r.stdout || "", stderr: r.stderr || "", exitCode: r.exitCode });
24796
24791
  if (r.exitCode === 0) {
24797
24792
  const output = (r.stdout || "").trim();
24798
24793
  if (output) {
24799
24794
  const lines = output.split("\n");
24800
- const short = lines.length <= 3 ? output : lines.slice(0, 3).join("\n") + `
24801
- (${lines.length - 3} more lines)`;
24802
- ui?.addMessage(`\u2713 ${firstLine}
24803
- ${short}`, true);
24795
+ const preview = lines.length <= 4 ? lines.map((l) => ` ${l}`).join("\n") : lines.slice(0, 3).map((l) => ` ${l}`).join("\n") + `
24796
+ \u2026 ${lines.length - 3} more lines`;
24797
+ ui?.addMessage(` \u23BF Execute(${firstLine}${isMultiline ? " \u2026" : ""})
24798
+ ${preview}`, true);
24804
24799
  } else {
24805
- ui?.addMessage(`\u2713 ${firstLine}`, true);
24800
+ ui?.addMessage(` \u23BF Execute(${firstLine}${isMultiline ? " \u2026" : ""})`, true);
24806
24801
  }
24807
24802
  } else {
24808
- const errLine = (r.stderr || "").trim().split("\n")[0].slice(0, 80);
24809
- ui?.addMessage(`\u2717 ${firstLine}
24810
- ${errLine}`, true);
24803
+ const errLine = (r.stderr || "").trim().split("\n")[0].slice(0, 70);
24804
+ ui?.addMessage(` \u23BF Execute(${firstLine}${isMultiline ? " \u2026" : ""})
24805
+ \u2717 ${errLine}`, true);
24811
24806
  }
24812
24807
  }
24813
24808
  const summary = cmdResults.map((r) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinpath/cli",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "AI-powered scripting CLI — automate anything from your terminal",
5
5
  "type": "module",
6
6
  "license": "MIT",