my-durable 0.0.52 → 0.0.53
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/apps/dpi-tui/src/app.ts +16 -7
- package/package.json +1 -1
package/apps/dpi-tui/src/app.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
ProcessTerminal,
|
|
9
9
|
TuiAltScreen,
|
|
10
10
|
matchesKey,
|
|
11
|
+
truncateToWidth,
|
|
11
12
|
type Component,
|
|
12
13
|
type OverlayHandle,
|
|
13
14
|
type TuiInputListenerResult,
|
|
@@ -599,6 +600,7 @@ export class App {
|
|
|
599
600
|
else if (data === "m") this.beginInput("message", "follow-up ❯ ");
|
|
600
601
|
else if (data === "]" || matchesKey(data, "tab")) this.cycleTab(1);
|
|
601
602
|
else if (data === "[" || matchesKey(data, "shift+tab")) this.cycleTab(-1);
|
|
603
|
+
else if (data === "t") this.cycleTab(1); // t = tabs, same walk as ]
|
|
602
604
|
else if (/^[1-9]$/.test(data)) this.jump(Number(data));
|
|
603
605
|
// No catch-all: a stray letter used to jump views or open the composer with
|
|
604
606
|
// itself as the first character. herdr and piggery both require an explicit
|
|
@@ -1259,9 +1261,9 @@ export class App {
|
|
|
1259
1261
|
const rows = [
|
|
1260
1262
|
`${c.accent("▲")} ${c.bold("dpi keymap (herdr template)")}`,
|
|
1261
1263
|
"",
|
|
1262
|
-
`${c.accent("j k ↑ ↓")} move/scroll ${c.accent("1-
|
|
1263
|
-
`${c.accent("↵")} open ${c.accent("g N L")}
|
|
1264
|
-
`${c.accent("[ ]")}
|
|
1264
|
+
`${c.accent("j k ↑ ↓")} move/scroll ${c.accent("1-4")} views: net/herd/agent/log`,
|
|
1265
|
+
`${c.accent("↵")} open ${c.accent("g N L")} same views, aliases`,
|
|
1266
|
+
`${c.accent("[ ] t")} agent tabs ${c.accent("m")} message (enter sends)`,
|
|
1265
1267
|
`${c.accent("esc")} back/interrupt ${c.accent("i")} interrupt ≠ kill`,
|
|
1266
1268
|
`${c.accent("F")} fork ${c.accent("c")} compact context`,
|
|
1267
1269
|
`${c.accent("y")} thinking level ${c.accent("x")} reset (y/n confirm)`,
|
|
@@ -1300,9 +1302,13 @@ export class App {
|
|
|
1300
1302
|
|
|
1301
1303
|
private panelLine(width: number, content: string, active: boolean): string {
|
|
1302
1304
|
const inner = width - 4;
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1305
|
+
// Visible-width clip + pad, not raw length: the theme's truecolor spans
|
|
1306
|
+
// add ~19 invisible raw chars each, so raw slicing ate the overlay's
|
|
1307
|
+
// right column at every width (help's "views: net/herd/agent/log" never
|
|
1308
|
+
// rendered). truncateToWidth counts ANSI-stripped columns, keeps the
|
|
1309
|
+
// spans, closes any cut style and pads to exactly `inner` — the line can
|
|
1310
|
+
// never exceed the panel. Same helper views.ts already trusts.
|
|
1311
|
+
const padded = truncateToWidth(content, inner, "", true);
|
|
1306
1312
|
return `${c.muted(box.v)} ${active ? c.inverse(padded) : padded} ${c.muted(box.v)}`;
|
|
1307
1313
|
}
|
|
1308
1314
|
|
|
@@ -1332,7 +1338,10 @@ function place(panel: string[], width: number, height: number, x: number, y: num
|
|
|
1332
1338
|
panel.forEach((line, index) => {
|
|
1333
1339
|
const row = y + index;
|
|
1334
1340
|
if (row < 0 || row >= height) return;
|
|
1335
|
-
|
|
1341
|
+
// Visible columns again: raw slicing could cut an escape mid-sequence and
|
|
1342
|
+
// drop the right border; truncateToWidth clips safely and pads the row
|
|
1343
|
+
// to exactly the screen width.
|
|
1344
|
+
out[row] = rep(" ", x) + truncateToWidth(line, Math.max(0, width - x), "", true);
|
|
1336
1345
|
});
|
|
1337
1346
|
return out;
|
|
1338
1347
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-durable",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|