@robinpath/cli 2.1.0 → 2.2.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 +20 -16
  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.1.0" : "2.1.0";
18601
+ var CLI_VERSION = true ? "2.2.0" : "2.2.0";
18602
18602
  var FLAG_QUIET = false;
18603
18603
  var FLAG_VERBOSE = false;
18604
18604
  var FLAG_AUTO_ACCEPT = false;
@@ -24531,6 +24531,12 @@ 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)
24534
24540
  ] }) : msg.dim ? /* @__PURE__ */ jsx2(Text2, { dimColor: true, wrap: "wrap", children: msg.text }) : /* @__PURE__ */ jsx2(Markdown, { children: msg.text }) }, msg.id) }),
24535
24541
  showModelPicker ? /* @__PURE__ */ jsx2(
24536
24542
  ModelSelector,
@@ -24784,26 +24790,24 @@ Type / to see available commands.`;
24784
24790
  await new Promise((r) => setTimeout(r, 100));
24785
24791
  const cmdResults = [];
24786
24792
  for (const cmd of commands) {
24787
- const preview = cmd.split("\n")[0].slice(0, 80);
24788
- ui?.addMessage(`$ ${preview}${cmd.includes("\n") ? " ..." : ""}`, true);
24793
+ const firstLine = cmd.split("\n")[0].slice(0, 60);
24789
24794
  const r = await executeShellCommand(cmd);
24790
24795
  cmdResults.push({ command: cmd, stdout: r.stdout || "", stderr: r.stderr || "", exitCode: r.exitCode });
24791
- if (r.exitCode === 0 && r.stdout?.trim()) {
24792
- const lines = r.stdout.trim().split("\n");
24793
- if (lines.length <= 15) {
24794
- ui?.addMessage(lines.join("\n"), true);
24796
+ if (r.exitCode === 0) {
24797
+ const output = (r.stdout || "").trim();
24798
+ if (output) {
24799
+ 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
24804
  } else {
24796
- ui?.addMessage(
24797
- `${lines.slice(0, 5).join("\n")}
24798
- ... (${lines.length - 10} lines hidden)
24799
- ${lines.slice(-5).join("\n")}`,
24800
- true
24801
- );
24805
+ ui?.addMessage(`\u2713 ${firstLine}`, true);
24802
24806
  }
24803
- } else if (r.exitCode !== 0) {
24804
- ui?.addMessage(`exit ${r.exitCode}: ${(r.stderr || "").slice(0, 200)}`, true);
24805
24807
  } else {
24806
- ui?.addMessage("done", true);
24808
+ const errLine = (r.stderr || "").trim().split("\n")[0].slice(0, 80);
24809
+ ui?.addMessage(`\u2717 ${firstLine}
24810
+ ${errLine}`, true);
24807
24811
  }
24808
24812
  }
24809
24813
  const summary = cmdResults.map((r) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinpath/cli",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "AI-powered scripting CLI — automate anything from your terminal",
5
5
  "type": "module",
6
6
  "license": "MIT",