@oh-my-pi/pi-tui 18.12.5 → 18.12.6
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
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.12.6] - 2026-10-21
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- In Tern, centered sheets (`/context`, reports, keyboard shortcuts, BTW history, session info, the pause screen) fill the pane when it is narrower than 100 columns instead of floating with margins ([#16676](https://github.com/can1357/oh-my-pi/pull/16676) by [@H4vC](https://github.com/H4vC))
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed the `/agents` and `/models` hubs in Tern squeezing the left sidebar as long lines (such as a streaming new-agent draft) widen the body pane
|
|
14
|
+
|
|
5
15
|
## [18.12.4] - 2026-10-20
|
|
6
16
|
|
|
7
17
|
### Added
|
|
@@ -10,6 +10,8 @@ import type { TspProps, TspSpan, TspText } from "@oh-my-pi/pi-wire";
|
|
|
10
10
|
import { type KeyName } from "../key-hint-format.js";
|
|
11
11
|
import { type Keybinding } from "../keybindings.js";
|
|
12
12
|
import type { NativeChild, NativeNode } from "./node.js";
|
|
13
|
+
/** Below this many columns a centered sheet fills the pane instead of floating with margins. */
|
|
14
|
+
export declare const NARROW_SHEET_COLS = 100;
|
|
13
15
|
/** One footer hint: the keys that trigger it and what it does. */
|
|
14
16
|
export interface NativeHint {
|
|
15
17
|
/** Key ids (`"ctrl+o"`, `"escape"`); alternatives render side by side. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "18.12.
|
|
4
|
+
"version": "18.12.6",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": {
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"gen:glyphs": "bun scripts/gen-glyphs.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@oh-my-pi/omptype": "18.12.
|
|
45
|
-
"@oh-my-pi/pi-agent-core": "18.12.
|
|
46
|
-
"@oh-my-pi/pi-ai": "18.12.
|
|
47
|
-
"@oh-my-pi/pi-catalog": "18.12.
|
|
48
|
-
"@oh-my-pi/pi-natives": "18.12.
|
|
49
|
-
"@oh-my-pi/pi-utils": "18.12.
|
|
50
|
-
"@oh-my-pi/pi-wire": "18.12.
|
|
51
|
-
"@oh-my-pi/snapcompact": "18.12.
|
|
44
|
+
"@oh-my-pi/omptype": "18.12.6",
|
|
45
|
+
"@oh-my-pi/pi-agent-core": "18.12.6",
|
|
46
|
+
"@oh-my-pi/pi-ai": "18.12.6",
|
|
47
|
+
"@oh-my-pi/pi-catalog": "18.12.6",
|
|
48
|
+
"@oh-my-pi/pi-natives": "18.12.6",
|
|
49
|
+
"@oh-my-pi/pi-utils": "18.12.6",
|
|
50
|
+
"@oh-my-pi/pi-wire": "18.12.6",
|
|
51
|
+
"@oh-my-pi/snapcompact": "18.12.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"kitty-vt-wasm": "^0.2.0"
|
package/src/native/backend.ts
CHANGED
|
@@ -54,6 +54,7 @@ import { getNativeBlob, type NativeBlob } from "./blobs";
|
|
|
54
54
|
import { node } from "./describe";
|
|
55
55
|
import { encodeTspJson, encodeTspMessage, type TspHello, TspReader, splitTspMessage } from "./encode";
|
|
56
56
|
import type { DescribeContext, NativeChild, NativeNode, NativeSurface, NativeUiEvent } from "./node";
|
|
57
|
+
import { NARROW_SHEET_COLS } from "./overlay";
|
|
57
58
|
import { nativeComponentId, Reconciler } from "./reconcile";
|
|
58
59
|
import { setNativeRendering } from "./state";
|
|
59
60
|
|
|
@@ -939,7 +940,12 @@ export class NativeBackend {
|
|
|
939
940
|
if (overlay.component.nativeSheet?.(this.#cx)) return overlay.component;
|
|
940
941
|
const own = overlay.component.nativeOverlay;
|
|
941
942
|
const anchor = own?.anchor ?? overlayAnchor(overlay.options);
|
|
942
|
-
|
|
943
|
+
let size = own?.size ?? overlaySize(overlay.options, this.#cx.cols);
|
|
944
|
+
// A centered sheet in a narrow pane fills it instead of floating with margins: `lg`, and a component's own `md`
|
|
945
|
+
// sheet (an undeclared `md` is a generic dialog sized from its options).
|
|
946
|
+
if (anchor === "center" && this.#cx.cols < NARROW_SHEET_COLS && (size === "lg" || own?.size === "md")) {
|
|
947
|
+
size = "full";
|
|
948
|
+
}
|
|
943
949
|
const modal = overlay.focused || overlay.options?.fullscreen === true;
|
|
944
950
|
const role = own?.role;
|
|
945
951
|
const head = own?.head;
|
package/src/native/overlay.ts
CHANGED
|
@@ -12,6 +12,9 @@ import { getKeybindings, type Keybinding } from "../keybindings";
|
|
|
12
12
|
import { card, kbd, list, node, row, span, text } from "./describe";
|
|
13
13
|
import type { NativeChild, NativeNode } from "./node";
|
|
14
14
|
|
|
15
|
+
/** Below this many columns a centered sheet fills the pane instead of floating with margins. */
|
|
16
|
+
export const NARROW_SHEET_COLS = 100;
|
|
17
|
+
|
|
15
18
|
/** One footer hint: the keys that trigger it and what it does. */
|
|
16
19
|
export interface NativeHint {
|
|
17
20
|
/** Key ids (`"ctrl+o"`, `"escape"`); alternatives render side by side. */
|
|
@@ -1583,7 +1583,8 @@ export class AgentsHubComponent implements Component {
|
|
|
1583
1583
|
} else {
|
|
1584
1584
|
children.push(...this.#describeList());
|
|
1585
1585
|
}
|
|
1586
|
-
|
|
1586
|
+
// Zero basis: the body takes the space left of the sidebar instead of sizing to its widest line.
|
|
1587
|
+
return node("col", { gap: "sm", grow: 1, basis: 0, min: { w: 0 } }, children, "body");
|
|
1587
1588
|
}
|
|
1588
1589
|
|
|
1589
1590
|
#statusSpans(): TspSpan[] {
|
|
@@ -96,7 +96,8 @@ export function describeHubSidebar<TEntry extends SidebarEntry<string>>(
|
|
|
96
96
|
),
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
// The sidebar keeps its width: a body line wider than the pane must not squeeze it.
|
|
100
|
+
return node("list", { selected: selectedId, shrink: 0 }, items, key);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
/**
|
|
@@ -3046,7 +3046,8 @@ export class ModelHubComponent implements Component {
|
|
|
3046
3046
|
this.#browser,
|
|
3047
3047
|
);
|
|
3048
3048
|
}
|
|
3049
|
-
|
|
3049
|
+
// Zero basis: the body takes the space left of the sidebar instead of sizing to its widest line.
|
|
3050
|
+
return node("col", { gap: "sm", grow: 1, basis: 0, min: { w: 0 } }, children, "body");
|
|
3050
3051
|
}
|
|
3051
3052
|
|
|
3052
3053
|
#describeStatus(): NativeNode {
|