@yusukeshib/pi-babysit 0.6.8 → 0.6.9
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.
- package/README.md +3 -2
- package/index.ts +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,8 +85,9 @@ 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
|
|
89
|
-
|
|
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,
|
|
90
91
|
its RPC worker launch argv (bold, readable text rather than a copy-paste shell
|
|
91
92
|
command), and up to 20 output lines. Opening another row closes the previous
|
|
92
93
|
one. A session with no available output shows an explicit placeholder when
|
package/index.ts
CHANGED
|
@@ -2411,10 +2411,13 @@ 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) => {
|
|
2415
|
+
lines.push(truncateToWidth(text, Math.max(0, width), ""));
|
|
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
|
+
};
|
|
2418
2421
|
const pushSession = (session: WidgetSessionDisplay) => {
|
|
2419
2422
|
const expanded = session.expandable && expandedSessionIds.has(session.id);
|
|
2420
2423
|
const tail = session.tail.slice(
|
|
@@ -2431,9 +2434,9 @@ export function createWidgetComponent(
|
|
|
2431
2434
|
}
|
|
2432
2435
|
};
|
|
2433
2436
|
if (!expanded && details[0]?.startsWith("task: ")) {
|
|
2434
|
-
|
|
2437
|
+
pushWrapped(`${session.header} ${details[0].slice(6)}`, target);
|
|
2435
2438
|
} else if (!expanded && details.length) {
|
|
2436
|
-
|
|
2439
|
+
pushWrapped(`${session.header} ${details[0]}`, target);
|
|
2437
2440
|
for (const detail of details.slice(1)) pushDetail(detail);
|
|
2438
2441
|
} else if (!expanded && tail.length === 1) {
|
|
2439
2442
|
push(`${session.header} ${tail[0]}`, target);
|
|
@@ -3513,7 +3516,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
3513
3516
|
...(meta?.task ? [`task: ${escapeCommandForDisplay(meta.task)}`] : []),
|
|
3514
3517
|
...(meta?.launchCommand ? [theme.bold(escapeCommandForDisplay(readableLaunchCommand(meta.launchCommand)))] : []),
|
|
3515
3518
|
]
|
|
3516
|
-
: meta?.command ? [theme.bold(
|
|
3519
|
+
: meta?.command ? [theme.bold(escapeCommandForDisplay(meta.command))] : [];
|
|
3517
3520
|
if (session.state === "running") {
|
|
3518
3521
|
const state: WidgetSessionState = isSubagent && progressById.get(id)?.done ? "idle" : "running";
|
|
3519
3522
|
return {
|