@shunagent/shun 0.1.148 → 0.1.149

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 (3) hide show
  1. package/README.md +2 -6
  2. package/dist/cli.js +18 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -19,10 +19,7 @@ shun
19
19
  ```
20
20
 
21
21
  Alternatively, use `pnpm add -g @shunagent/shun` or `bun add -g @shunagent/shun`.
22
- The terminal app can run without Shun Desktop. Browser, PDF, and image-processing
23
- components download automatically when first needed and are reused from your
24
- local Shun profile. Basic conversations do not install these components.
25
- Standalone Browser Preview also downloads its testing browser on first use.
22
+ Shun TUI runs independently of Shun Desktop.
26
23
 
27
24
  ## Start a conversation
28
25
 
@@ -43,8 +40,7 @@ menu. `/connect` adds a connection, `/providers` manages connections, and `/mode
43
40
  chooses a model. `/new` starts a new conversation; `/resume` opens history.
44
41
 
45
42
  Answers stream as they arrive. Markdown and tables render in the terminal.
46
- Click an activity row to expand its details. Older messages appear in pages of
47
- 24; scroll up and click **Show earlier messages** to read more.
43
+ Click an activity row to expand its details. Scroll up and click **Show earlier messages** to read conversation history.
48
44
 
49
45
  Ctrl+C stops the current generation, cancels an open menu, or returns from a
50
46
  finished conversation to the welcome screen. At the welcome screen, press it
package/dist/cli.js CHANGED
@@ -7758,7 +7758,7 @@ const clean$1 = (text2) => stripTerminalSequences(text2).replace(/[\x00-\x1f\x7f
7758
7758
  const accent = (text2) => `\x1B[38;5;205m${text2}\x1B[0m`;
7759
7759
  const muted = (text2) => `\x1B[2m${text2}\x1B[0m`;
7760
7760
  const bold = (text2) => `\x1B[1m${text2}\x1B[0m`;
7761
- const version$1 = "0.1.148";
7761
+ const version$1 = "0.1.149";
7762
7762
  class WelcomeHeader {
7763
7763
  state = { title: "", model: "", workspace: "", running: false, compact: false, ready: false };
7764
7764
  update(state) {
@@ -7852,6 +7852,21 @@ ${output}` : ""}`;
7852
7852
  }
7853
7853
  return rows.join("\n");
7854
7854
  }
7855
+ function toolSummary(tools, width = 80) {
7856
+ const titles = tools.map((tool) => {
7857
+ const product = productToolPresentation(tool);
7858
+ if (product) return product.title;
7859
+ const running = tool.state === "running", failed = tool.state === "error";
7860
+ if (tool.name === "web_search") return running ? "Searching web" : failed ? "Web search failed" : "Searched web";
7861
+ if (tool.name === "web_read") return running ? "Reading web page" : failed ? "Web page read failed" : "Read web page";
7862
+ if (shellCommand(tool)) return running ? "Running command" : failed ? "Command failed" : "Command completed";
7863
+ return hostToolLabel(tool);
7864
+ });
7865
+ const unique = [...new Set(titles)];
7866
+ const summary = unique.slice(-2).join(" · ");
7867
+ const more = unique.length > 2 ? ` · +${unique.length - 2} more` : "";
7868
+ return clean(truncateToWidth(clean(summary + more).replace(/\s+/g, " "), Math.max(12, width - 6), "…"));
7869
+ }
7855
7870
  const require$1 = createRequire(import.meta.url);
7856
7871
  async function clipboardImage(load = nativeClipboard) {
7857
7872
  if (process.env.SSH_CONNECTION || process.env.SSH_TTY) throw Error("This remote terminal cannot read your local clipboard. Attach a file with /attach, or run Shun locally.");
@@ -8141,7 +8156,7 @@ async function runTui(call, options = {}) {
8141
8156
  row += heading.render(width).length;
8142
8157
  if (turn.tools?.length) {
8143
8158
  const expanded = expandedTurns.has(turn.id);
8144
- const toggle = new Text(dim(`${expanded ? "▾" : "▸"} ${turn.tools.length} ${turn.tools.length === 1 ? "operation" : "operations"} · ${expanded ? "Hide" : "Show"} details`), 1, 0);
8159
+ const toggle = new Text(dim(`${expanded ? "▾" : "▸"} ${toolSummary(turn.tools, width)}`), 1, 0);
8145
8160
  feed.addChild(toggle);
8146
8161
  const size = toggle.render(width).length;
8147
8162
  toolRows.push({ start: row, end: row + size, id: turn.id });
@@ -8742,7 +8757,7 @@ ${activeRun ? "Task continues running in Shun.\n" : ""}Resume this conversation:
8742
8757
  process.off("SIGTERM", onSignal);
8743
8758
  process.off("SIGINT", onSignal);
8744
8759
  }
8745
- const version = "0.1.148";
8760
+ const version = "0.1.149";
8746
8761
  const args = process.argv.slice(2);
8747
8762
  async function main() {
8748
8763
  if (args.includes("--version") || args.includes("-v")) {
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "mcp",
61
61
  "developer-tools"
62
62
  ],
63
- "version": "0.1.148"
63
+ "version": "0.1.149"
64
64
  }