@tintinweb/pi-subagents 0.2.6 → 0.2.7
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 +6 -0
- package/package.json +1 -1
- package/src/ui/agent-widget.ts +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.7] - 2026-03-08
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Widget crash in narrow terminals** — agent widget lines were not truncated to terminal width, causing `doRender` to throw when the tmux pane was narrower than the rendered content. All widget lines are now truncated using `truncateToWidth()` with the actual terminal column count.
|
|
12
|
+
|
|
8
13
|
## [0.2.6] - 2026-03-07
|
|
9
14
|
|
|
10
15
|
### Added
|
|
@@ -125,6 +130,7 @@ Initial release.
|
|
|
125
130
|
- **Thinking level** — per-agent extended thinking control
|
|
126
131
|
- **`/agent` and `/agents` commands**
|
|
127
132
|
|
|
133
|
+
[0.2.7]: https://github.com/tintinweb/pi-subagents/compare/v0.2.6...v0.2.7
|
|
128
134
|
[0.2.6]: https://github.com/tintinweb/pi-subagents/compare/v0.2.5...v0.2.6
|
|
129
135
|
[0.2.5]: https://github.com/tintinweb/pi-subagents/compare/v0.2.4...v0.2.5
|
|
130
136
|
[0.2.4]: https://github.com/tintinweb/pi-subagents/compare/v0.2.3...v0.2.4
|
package/package.json
CHANGED
package/src/ui/agent-widget.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Uses the callback form of setWidget for themed rendering.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { truncateToWidth } from "@mariozechner/pi-tui";
|
|
8
9
|
import type { AgentManager } from "../agent-manager.js";
|
|
9
10
|
import type { SubagentType } from "../types.js";
|
|
10
11
|
import { getConfig } from "../agent-types.js";
|
|
@@ -262,17 +263,19 @@ export class AgentWidget {
|
|
|
262
263
|
this.widgetFrame++;
|
|
263
264
|
const frame = SPINNER[this.widgetFrame % SPINNER.length];
|
|
264
265
|
|
|
265
|
-
this.uiCtx.setWidget("agents", (
|
|
266
|
+
this.uiCtx.setWidget("agents", (tui, theme) => {
|
|
267
|
+
const w = tui.terminal.columns;
|
|
268
|
+
const truncate = (line: string) => truncateToWidth(line, w);
|
|
266
269
|
const headingColor = hasActive ? "accent" : "dim";
|
|
267
270
|
const headingIcon = hasActive ? "●" : "○";
|
|
268
|
-
const lines: string[] = [theme.fg(headingColor, headingIcon) + " " + theme.fg(headingColor, "Agents")];
|
|
271
|
+
const lines: string[] = [truncate(theme.fg(headingColor, headingIcon) + " " + theme.fg(headingColor, "Agents"))];
|
|
269
272
|
|
|
270
273
|
// --- Finished agents (shown first, dimmed) ---
|
|
271
274
|
for (let i = 0; i < finished.length; i++) {
|
|
272
275
|
const a = finished[i];
|
|
273
276
|
const isLast = !hasActive && i === finished.length - 1;
|
|
274
277
|
const connector = isLast ? "└─" : "├─";
|
|
275
|
-
lines.push(theme.fg("dim", connector) + " " + this.renderFinishedLine(a, theme));
|
|
278
|
+
lines.push(truncate(theme.fg("dim", connector) + " " + this.renderFinishedLine(a, theme)));
|
|
276
279
|
}
|
|
277
280
|
|
|
278
281
|
// --- Running agents ---
|
|
@@ -299,14 +302,14 @@ export class AgentWidget {
|
|
|
299
302
|
|
|
300
303
|
const activity = bg ? describeActivity(bg.activeTools, bg.responseText) : "thinking…";
|
|
301
304
|
|
|
302
|
-
lines.push(theme.fg("dim", connector) + ` ${theme.fg("accent", frame)} ${theme.bold(name)} ${theme.fg("muted", a.description)} ${theme.fg("dim", "·")} ${theme.fg("dim", statsText)}`);
|
|
305
|
+
lines.push(truncate(theme.fg("dim", connector) + ` ${theme.fg("accent", frame)} ${theme.bold(name)} ${theme.fg("muted", a.description)} ${theme.fg("dim", "·")} ${theme.fg("dim", statsText)}`));
|
|
303
306
|
const indent = isLast ? " " : "│ ";
|
|
304
|
-
lines.push(theme.fg("dim", indent) + theme.fg("dim", ` ⎿ ${activity}`));
|
|
307
|
+
lines.push(truncate(theme.fg("dim", indent) + theme.fg("dim", ` ⎿ ${activity}`)));
|
|
305
308
|
}
|
|
306
309
|
|
|
307
310
|
// --- Queued agents (collapsed) ---
|
|
308
311
|
if (queued.length > 0) {
|
|
309
|
-
lines.push(theme.fg("dim", "└─") + ` ${theme.fg("muted", "◦")} ${theme.fg("dim", `${queued.length} queued`)}`);
|
|
312
|
+
lines.push(truncate(theme.fg("dim", "└─") + ` ${theme.fg("muted", "◦")} ${theme.fg("dim", `${queued.length} queued`)}`));
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
return { render: () => lines, invalidate: () => {} };
|