@juicesharp/rpiv-todo 1.18.2 → 1.19.0
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/package.json +2 -2
- package/todo-overlay.ts +18 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-todo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Pi extension. A todo list for the model, rendered as a live overlay that survives /reload and conversation compaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -64,6 +64,6 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@juicesharp/rpiv-config": "^1.
|
|
67
|
+
"@juicesharp/rpiv-config": "^1.19.0"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/todo-overlay.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Lifecycle controller for Pi's `setWidget` contract: factory-form
|
|
5
5
|
* registration in widgetContainerAbove, register-once + requestRender()
|
|
6
|
-
* refresh, 12-line collapse-not-scroll,
|
|
6
|
+
* refresh, 12-line collapse-not-scroll (plus a trailing spacer row, so the
|
|
7
|
+
* widget renders up to 13 lines), auto-hide when empty.
|
|
7
8
|
*
|
|
8
9
|
* Reads live state via `getState()` at render time — NEVER `replayFromBranch`
|
|
9
10
|
* from `tool_execution_end` (branch is stale; `message_end` runs after).
|
|
@@ -17,6 +18,8 @@ import { getState } from "./state/store.js";
|
|
|
17
18
|
import { formatOverlayTaskLine } from "./view/format.js";
|
|
18
19
|
|
|
19
20
|
const WIDGET_KEY = "rpiv-todos";
|
|
21
|
+
// Budget for content rows (heading + tasks/summary). The rendered widget is
|
|
22
|
+
// one line taller — withTrailingSpacer() appends a blank row below the panel.
|
|
20
23
|
const MAX_WIDGET_LINES = 12;
|
|
21
24
|
|
|
22
25
|
// English fallbacks for localized overlay chrome strings.
|
|
@@ -154,7 +157,7 @@ export class TodoOverlay {
|
|
|
154
157
|
if (layout.hiddenCompleted === 0 && layout.truncatedTail === 0) {
|
|
155
158
|
const last = lines.length - 1;
|
|
156
159
|
lines[last] = lines[last].replace("├─", "└─");
|
|
157
|
-
return lines;
|
|
160
|
+
return this.withTrailingSpacer(lines);
|
|
158
161
|
}
|
|
159
162
|
|
|
160
163
|
const totalHidden = layout.hiddenCompleted + layout.truncatedTail;
|
|
@@ -165,6 +168,19 @@ export class TodoOverlay {
|
|
|
165
168
|
const summary =
|
|
166
169
|
overflowParts.length > 0 ? `+${totalHidden} ${more} (${overflowParts.join(", ")})` : `+${totalHidden} ${more}`;
|
|
167
170
|
lines.push(truncate(`${theme.fg("dim", "└─")} ${theme.fg("dim", summary)}`));
|
|
171
|
+
return this.withTrailingSpacer(lines);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Append a trailing blank line so the overlay isn't flush against the
|
|
176
|
+
* editor box. Pi's host adds a leading spacer above the widget but none
|
|
177
|
+
* below, which leaves the last "└─" row (or the "+N more" summary) glued
|
|
178
|
+
* to the input box. The empty string gives the "Todos" panel a little
|
|
179
|
+
* breathing room.
|
|
180
|
+
*/
|
|
181
|
+
private withTrailingSpacer(lines: string[]): string[] {
|
|
182
|
+
if (lines.length === 0) return lines;
|
|
183
|
+
lines.push("");
|
|
168
184
|
return lines;
|
|
169
185
|
}
|
|
170
186
|
|