pi-cc-extensions 0.8.12 → 0.8.13

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.
@@ -628,14 +628,22 @@ function isFixedEditorAtBottom(tui: any): boolean {
628
628
  const visibleLines = Array.isArray(tui?.previousLines) ? tui.previousLines : [];
629
629
  if (visibleLines.length === 0) return true;
630
630
  const width = Math.max(1, Number(tui?.terminal?.columns) || 80);
631
- const rootLines = renderFixedScrollableRoot(tui, width);
632
- if (rootLines.length <= visibleLines.length) return true;
633
- const tail = rootLines.slice(-visibleLines.length);
634
- return tail.every(
635
- (line, index) =>
636
- stripTerminalSequences(String(line)) ===
637
- stripTerminalSequences(String(visibleLines[index] ?? "")),
631
+ const rootLines = renderFixedScrollableRoot(tui, width).map((line) =>
632
+ stripTerminalSequences(String(line)),
638
633
  );
634
+ while (rootLines.length > 0 && rootLines[rootLines.length - 1] === "") rootLines.pop();
635
+ if (rootLines.length === 0) return true;
636
+
637
+ // previousLines contains both the scrollable root and Zentui's fixed cluster.
638
+ // Locate the root tail within that full frame instead of requiring it to be
639
+ // the frame suffix; otherwise status/editor/footer rows keep the button alive.
640
+ const visible = visibleLines.map((line: unknown) => stripTerminalSequences(String(line)));
641
+ const matchLength = Math.min(3, rootLines.length);
642
+ const expected = rootLines.slice(-matchLength);
643
+ for (let end = matchLength; end <= visible.length; end++) {
644
+ if (expected.every((line, index) => line === visible[end - matchLength + index])) return true;
645
+ }
646
+ return false;
639
647
  }
640
648
 
641
649
  function hideScrollButton(tui: any): void {
@@ -895,7 +903,7 @@ function renderScrollButton(width: number, theme: any): string[] {
895
903
  pendingScrollMessages > 0
896
904
  ? `${pendingScrollMessages} new message${pendingScrollMessages === 1 ? "" : "s"}`
897
905
  : "Back to bottom";
898
- const label = theme.fg("accent", `[ ↓ ${messageText} · ${shortcut} · click ]`);
906
+ const label = theme.fg("accent", `[ ↓ ${messageText} · ${shortcut} ]`);
899
907
  const leftPad = Math.max(0, Math.floor((width - visibleWidth(label)) / 2));
900
908
  return [`${" ".repeat(leftPad)}${truncateToWidth(label, width, "…")}`];
901
909
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cc-extensions",
3
- "version": "0.8.12",
3
+ "version": "0.8.13",
4
4
  "description": "A Pi productivity suite with Claude Code-style UI, structured questionnaires, context inspection, and agent/session references",
5
5
  "type": "module",
6
6
  "keywords": [