@esso0428/pi-subagents 0.17.25 → 0.17.26
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 +5 -0
- package/package.json +1 -1
- package/src/ui/agent-widget.ts +19 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.17.26] - 2026-10-02
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Drew the last agents roster row as `└─` when the roster overflows**: the branch fixup only ran on the path where every row fits, so a clipped or scrolled roster kept `├─` on its final visible entry. The bounded viewport also pads the body with blank lines, so the row is not at the end of the rendered output; both render paths now share a `markLastBranch()` helper that resolves the final visible row explicitly and also blanks the `│` continuation under it.
|
|
14
|
+
|
|
10
15
|
## [0.17.25] - 2026-10-02
|
|
11
16
|
|
|
12
17
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esso0428/pi-subagents",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.26",
|
|
4
4
|
"description": "A pi extension that brings smart Claude Code-style autonomous sub-agents to pi, with npm:pi-subagents-style JSON agent overrides.",
|
|
5
5
|
"author": "ESSO0428",
|
|
6
6
|
"repository": {
|
package/src/ui/agent-widget.ts
CHANGED
|
@@ -238,6 +238,21 @@ export function describeActivity(activeTools: Map<string, string>, responseText?
|
|
|
238
238
|
return "thinking…";
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Mark the final visible roster row as the tree's last branch.
|
|
243
|
+
*
|
|
244
|
+
* `bodyIndex` is the offset of that row's header line inside the assembled body,
|
|
245
|
+
* which is not simply `body.length - 1`: the bounded viewport pads the body
|
|
246
|
+
* with blank lines, and two-line rows carry a `│` continuation underneath.
|
|
247
|
+
*/
|
|
248
|
+
function markLastBranch(body: string[], bodyIndex: number): void {
|
|
249
|
+
const header = body[bodyIndex];
|
|
250
|
+
if (header === undefined) return;
|
|
251
|
+
body[bodyIndex] = header.replace("├─", "└─");
|
|
252
|
+
const continuation = body[bodyIndex + 1];
|
|
253
|
+
if (continuation?.includes("│ ")) body[bodyIndex + 1] = continuation.replace("│ ", " ");
|
|
254
|
+
}
|
|
255
|
+
|
|
241
256
|
// ---- Widget manager ----
|
|
242
257
|
|
|
243
258
|
export class AgentWidget {
|
|
@@ -631,11 +646,7 @@ export class AgentWidget {
|
|
|
631
646
|
for (const row of rows) lines.push(...row.lines);
|
|
632
647
|
if (rows.length > 0) {
|
|
633
648
|
const lastRow = rows[rows.length - 1];
|
|
634
|
-
|
|
635
|
-
lines[lastStart] = lines[lastStart].replace("├─", "└─");
|
|
636
|
-
if (lastRow.lines.length === 2) {
|
|
637
|
-
lines[lastStart + 1] = lines[lastStart + 1].replace("│ ", " ");
|
|
638
|
-
}
|
|
649
|
+
markLastBranch(lines, lines.length - lastRow.lines.length);
|
|
639
650
|
}
|
|
640
651
|
} else {
|
|
641
652
|
// Reserve one line for a directional overflow summary. The viewport is
|
|
@@ -675,8 +686,10 @@ export class AgentWidget {
|
|
|
675
686
|
|
|
676
687
|
let used = 0;
|
|
677
688
|
let end = start;
|
|
689
|
+
let lastRowLine = -1;
|
|
678
690
|
const visibleBody: string[] = [];
|
|
679
691
|
while (end < rows.length && used + heightAt(end) <= contentBudget) {
|
|
692
|
+
lastRowLine = visibleBody.length;
|
|
680
693
|
visibleBody.push(...rows[end].lines);
|
|
681
694
|
used += heightAt(end);
|
|
682
695
|
end++;
|
|
@@ -687,6 +700,7 @@ export class AgentWidget {
|
|
|
687
700
|
visibleBody.push(rows[start].lines[0]);
|
|
688
701
|
end = start + 1;
|
|
689
702
|
}
|
|
703
|
+
markLastBranch(visibleBody, lastRowLine);
|
|
690
704
|
|
|
691
705
|
const hiddenBefore = start;
|
|
692
706
|
const hiddenAfter = Math.max(0, rows.length - end);
|