@oh-my-pi/pi-tui 18.13.1 → 18.13.2
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 +20 -1
- package/dist/types/chrome/context-map.d.ts +15 -0
- package/dist/types/chrome/context-presentation.d.ts +48 -0
- package/dist/types/chrome/context-view-model.d.ts +77 -0
- package/dist/types/overlays/advisor-config.d.ts +6 -0
- package/dist/types/overlays/ask-dialog.d.ts +9 -2
- package/dist/types/overlays/context-viewer-format.d.ts +42 -0
- package/dist/types/overlays/context-viewer-overview.d.ts +70 -0
- package/dist/types/overlays/context-viewer.d.ts +25 -0
- package/dist/types/overlays/hook-input.d.ts +1 -0
- package/dist/types/overlays/running-subagent-badge.d.ts +7 -1
- package/dist/types/status-line/context-usage.d.ts +15 -30
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/tools/ask.d.ts +2 -0
- package/dist/types/tools/fetch.d.ts +1 -0
- package/dist/types/tools/github.d.ts +3 -0
- package/dist/types/tools/read.d.ts +3 -0
- package/dist/types/tools/wait.d.ts +6 -0
- package/dist/types/tui.d.ts +2 -0
- package/package.json +9 -9
- package/src/chrome/context-map.ts +62 -0
- package/src/chrome/context-presentation.ts +26 -0
- package/src/chrome/context-view-model.ts +73 -0
- package/src/components/editor.ts +23 -0
- package/src/components/markdown.ts +14 -2
- package/src/overlays/advisor-config.ts +9 -2
- package/src/overlays/ask-dialog.ts +55 -15
- package/src/overlays/context-viewer-format.ts +145 -0
- package/src/overlays/context-viewer-overview.ts +381 -0
- package/src/overlays/context-viewer.ts +728 -0
- package/src/overlays/hook-input.ts +2 -0
- package/src/overlays/running-subagent-badge.ts +12 -1
- package/src/render/output-pane.ts +3 -3
- package/src/status-line/context-usage.ts +56 -580
- package/src/theme/symbols.ts +16 -0
- package/src/tools/ask.ts +2 -0
- package/src/tools/bash.ts +5 -23
- package/src/tools/fetch.ts +1 -0
- package/src/tools/github.ts +23 -3
- package/src/tools/read.ts +3 -1
- package/src/tools/wait.ts +6 -0
- package/src/tui.ts +23 -3
|
@@ -21,6 +21,7 @@ export interface HookInputOptions {
|
|
|
21
21
|
tui?: TUI;
|
|
22
22
|
timeout?: number;
|
|
23
23
|
onTimeout?: () => void;
|
|
24
|
+
secret?: boolean;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/** Terminal-only key legend under the field; a native terminal puts the keys in the buttons' tooltips. */
|
|
@@ -84,6 +85,7 @@ export class HookInputComponent extends OverlayPanel {
|
|
|
84
85
|
|
|
85
86
|
this.#field = new TextFormField({
|
|
86
87
|
theme: formTheme,
|
|
88
|
+
secret: opts?.secret ?? false,
|
|
87
89
|
empty: "submit",
|
|
88
90
|
onSubmit: value => this.#onSubmitCallback(value),
|
|
89
91
|
onCancel: () => this.#onCancelCallback(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AgentHubRegistry, MAIN_AGENT_ID } from "./agent-hub-types";
|
|
2
2
|
|
|
3
3
|
export interface RunningSubagentRegistrySource<T extends AgentHubRegistry = AgentHubRegistry> {
|
|
4
4
|
agentRegistry: T;
|
|
@@ -17,3 +17,14 @@ export function getRunningSubagentBadgeAgentIds(registry: AgentHubRegistry): str
|
|
|
17
17
|
.filter(ref => ref.kind === "sub" && ref.status === "running")
|
|
18
18
|
.map(ref => ref.id);
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Agents the Agent Hub roster can show (every registry ref but the main
|
|
23
|
+
* session), whatever their status: finished, parked and killed subagents
|
|
24
|
+
* stay inspectable after the last one stops running.
|
|
25
|
+
*/
|
|
26
|
+
export function getInspectableSubagentCount(registry: AgentHubRegistry): number {
|
|
27
|
+
let count = 0;
|
|
28
|
+
for (const ref of registry.list()) if (ref.id !== MAIN_AGENT_ID) count++;
|
|
29
|
+
return count;
|
|
30
|
+
}
|
|
@@ -296,8 +296,8 @@ export class OutputPane implements Component {
|
|
|
296
296
|
* *without* the pane hearing about it, and every one of them shapes the
|
|
297
297
|
* content:
|
|
298
298
|
*
|
|
299
|
-
* - `
|
|
300
|
-
* the inner `Text` render.
|
|
299
|
+
* - `contentWidth` — the wrapping width that feeds the visual cap as well
|
|
300
|
+
* as the inner `Text` render: `width` minus both horizontal paddings.
|
|
301
301
|
* - `widthConfigEpoch` — the width-affecting runtime configuration (the
|
|
302
302
|
* Hangul compatibility-Jamo width), which `visibleWidth` — and so the
|
|
303
303
|
* visual cap — depends on.
|
|
@@ -317,7 +317,7 @@ export class OutputPane implements Component {
|
|
|
317
317
|
render(width: number): readonly string[] {
|
|
318
318
|
const paddingX = getPaddingX(this.#options.paddingX ?? 0);
|
|
319
319
|
const contentWidth = Math.max(1, width - paddingX * 2);
|
|
320
|
-
const content = this.#memo.get([...this.#renderDeps(),
|
|
320
|
+
const content = this.#memo.get([...this.#renderDeps(), contentWidth], () => {
|
|
321
321
|
const formatted = formatOutputPaneLines(
|
|
322
322
|
{
|
|
323
323
|
...this.#options,
|