@harrarz/pi-declutter-tool-calls 0.1.0 → 0.1.1
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 +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ pi install npm:@harrarz/pi-declutter-tool-calls
|
|
|
10
10
|
|
|
11
11
|
Migrating from the unscoped npm package? Remove it with `pi remove npm:pi-declutter-tool-calls` before installing the scoped package. Existing Git installs use the same repository and need no change.
|
|
12
12
|
|
|
13
|
-
Click a completed tool row to expand or collapse
|
|
13
|
+
Click a completed tool row to expand or collapse just that call. Regular Pi handles clicks and wheel scrolling through the Pi transcript without switching to fullscreen. In Ghostty, hold **Shift** while dragging to bypass mouse capture, then press **Cmd+C** to copy. Fullscreen uses Pi's own mouse handling. The active theme supplies row backgrounds; status text, line counts and errors are readable without color.
|
|
14
14
|
|
|
15
15
|
- **Edit:** changed lines appear in aligned Before/After panes with negative/positive backgrounds. Long lines wrap within their panes.
|
|
16
16
|
- **Bash:** simple pipelines get compact previews; shell constructs that cannot be split confidently keep their command preview. Heredocs such as `python3 - <<'PY'` collapse to an inline-script label. Expand to see captured output and command, including the script body. Pi's own capture limits still apply.
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -57,12 +57,15 @@ export function renderer(name: string): ToolRenderers {
|
|
|
57
57
|
if (!expanded) return empty;
|
|
58
58
|
if (diff && !ctx.isError) return { render: width => diffRows(diff, width, theme), invalidate() {} };
|
|
59
59
|
const blocks: string[] = [];
|
|
60
|
+
if (name === 'bash') {
|
|
61
|
+
const cmd = clean(str(args.command));
|
|
62
|
+
blocks.push(`${theme.fg('dim', 'Command' + (typeof args.timeout === 'number' ? ` · timeout ${args.timeout}s` : ''))}\n${cmd}`);
|
|
63
|
+
}
|
|
60
64
|
if (output) blocks.push(`${theme.fg('dim', 'Output')}\n${output}`);
|
|
61
65
|
if (name === 'bash') {
|
|
62
66
|
const cmd = clean(str(args.command));
|
|
63
67
|
const stages = bashPreview(cmd).stages;
|
|
64
68
|
if (stages.length) blocks.push(`${theme.fg('dim', 'Pipeline')}\n${stages.map((s,i) => (i ? '| ' : '') + s).join('\n')}`);
|
|
65
|
-
blocks.push(`${theme.fg('dim', 'Command' + (typeof args.timeout === 'number' ? ` · timeout ${args.timeout}s` : ''))}\n${cmd}`);
|
|
66
69
|
} else blocks.push(`${theme.fg('dim', 'Arguments')}\n${clean(JSON.stringify(args, null, 2))}`);
|
|
67
70
|
return new Text(blocks.join('\n\n'), 0, 0);
|
|
68
71
|
},
|