@yusukeshib/pi-babysit 0.6.9 → 0.6.11

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 +5 -5
  2. package/index.ts +5 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -85,11 +85,11 @@ summary counts use `RUNNING` / `IDLE`, and every row is labeled
85
85
  Click the header to toggle to `babysits(n all)`, which also shows finished and failed
86
86
  sessions, and click again to return to running-only. Both modes show newest first,
87
87
  ten per page; `< 1/4 >` shows the current/total page when needed. Click the
88
- arrows to page. Collapsed rows show the complete command for processes and the
89
- complete task for agents, wrapping long text across lines rather than abbreviating
90
- it. Click an agent row for the task,
91
- its RPC worker launch argv (bold, readable text rather than a copy-paste shell
92
- command), and up to 20 output lines. Opening another row closes the previous
88
+ arrows to page. Collapsed rows occupy one line, previewing the command for
89
+ processes and the task for agents (with `…` when clipped). Click a row for the
90
+ complete wrapped command or task; agent rows also show their RPC worker launch
91
+ argv (bold, readable text rather than a copy-paste shell command), and up to 20
92
+ output lines. Opening another row closes the previous
93
93
  one. A session with no available output shows an explicit placeholder when
94
94
  expanded. Mouse clicks
95
95
  require fullscreen mode; `/babysit` works in regular mode. The displayed `age`
package/index.ts CHANGED
@@ -2411,13 +2411,10 @@ export function createWidgetComponent(
2411
2411
  render(width: number): string[] {
2412
2412
  const lines: string[] = [];
2413
2413
  targetByLine = [];
2414
- const push = (text: string, target?: Target) => {
2415
- lines.push(truncateToWidth(text, Math.max(0, width), ""));
2414
+ const push = (text: string, target?: Target, ellipsis = "") => {
2415
+ lines.push(truncateToWidth(text, Math.max(0, width), ellipsis));
2416
2416
  targetByLine.push(target);
2417
2417
  };
2418
- const pushWrapped = (text: string, target?: Target) => {
2419
- for (const line of wrapTextWithAnsi(text, Math.max(1, width))) push(line, target);
2420
- };
2421
2418
  const pushSession = (session: WidgetSessionDisplay) => {
2422
2419
  const expanded = session.expandable && expandedSessionIds.has(session.id);
2423
2420
  const tail = session.tail.slice(
@@ -2433,11 +2430,9 @@ export function createWidgetComponent(
2433
2430
  push(` ${text}`, target);
2434
2431
  }
2435
2432
  };
2436
- if (!expanded && details[0]?.startsWith("task: ")) {
2437
- pushWrapped(`${session.header} ${details[0].slice(6)}`, target);
2438
- } else if (!expanded && details.length) {
2439
- pushWrapped(`${session.header} ${details[0]}`, target);
2440
- for (const detail of details.slice(1)) pushDetail(detail);
2433
+ if (!expanded && details.length) {
2434
+ const preview = details[0].startsWith("task: ") ? details[0].slice(6) : details[0];
2435
+ push(`${session.header} ${preview}`, target, "…");
2441
2436
  } else if (!expanded && tail.length === 1) {
2442
2437
  push(`${session.header} ${tail[0]}`, target);
2443
2438
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yusukeshib/pi-babysit",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "description": "Run any shell command and pi subagents under babysit, with context-safe captured output.",
5
5
  "keywords": [
6
6
  "pi-package",