@pi-kaush/pi-tool-call-markers 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Compact multiline singleton calls into one width-safe summary after settlement, including timeout metadata, while preserving the full native call under Ctrl+O.
5
6
  - Compose capped in-progress rows before the Box paints its background, fixing elapsed tails leaking outside the tool background and restoring the block's bottom padding.
6
7
 
7
8
  - Render in-progress calls as a single header line (elapsed time inline for `bash`) that settles into the final summary at the same height, so the transcript flows downwards without jumping.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-kaush/pi-tool-call-markers",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Compact and group Pi tool calls, with a bundled extension for adjacent thinking blocks.",
5
5
  "license": "MIT",
6
6
  "author": "Kaushik Gopal",
package/src/index.ts CHANGED
@@ -574,17 +574,17 @@ function decorateSuccessfulCall(
574
574
  row.contentBox.children[0] = {
575
575
  render(width: number): string[] {
576
576
  const lines = original.render(width);
577
- const lineIndex = lines.findIndex(hasVisibleContent);
578
- if (lineIndex === -1) return lines;
579
- const line = lines[lineIndex];
577
+ const visibleLines = lines.filter(hasVisibleContent);
578
+ const line = visibleLines[0];
580
579
  if (line === undefined) return lines;
581
- const next = [...lines];
582
- next[lineIndex] = fitSummaryTail(
583
- trimRenderedLine(line),
584
- outcome,
585
- Math.max(1, width - BADGE_WIDTH),
586
- );
587
- return next;
580
+
581
+ const rendered = visibleLines.slice(0, 3).map(trimRenderedLine);
582
+ if (visibleLines.length > rendered.length)
583
+ rendered.push(theme.fg("muted", "…"));
584
+ const summary = rendered.join(theme.fg("muted", " · "));
585
+ return [
586
+ fitSummaryTail(summary, outcome, Math.max(1, width - BADGE_WIDTH)),
587
+ ];
588
588
  },
589
589
  invalidate() {
590
590
  original.invalidate();