@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.
Files changed (42) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/dist/types/chrome/context-map.d.ts +15 -0
  3. package/dist/types/chrome/context-presentation.d.ts +48 -0
  4. package/dist/types/chrome/context-view-model.d.ts +77 -0
  5. package/dist/types/overlays/advisor-config.d.ts +6 -0
  6. package/dist/types/overlays/ask-dialog.d.ts +9 -2
  7. package/dist/types/overlays/context-viewer-format.d.ts +42 -0
  8. package/dist/types/overlays/context-viewer-overview.d.ts +70 -0
  9. package/dist/types/overlays/context-viewer.d.ts +25 -0
  10. package/dist/types/overlays/hook-input.d.ts +1 -0
  11. package/dist/types/overlays/running-subagent-badge.d.ts +7 -1
  12. package/dist/types/status-line/context-usage.d.ts +15 -30
  13. package/dist/types/theme/symbols.d.ts +1 -1
  14. package/dist/types/tools/ask.d.ts +2 -0
  15. package/dist/types/tools/fetch.d.ts +1 -0
  16. package/dist/types/tools/github.d.ts +3 -0
  17. package/dist/types/tools/read.d.ts +3 -0
  18. package/dist/types/tools/wait.d.ts +6 -0
  19. package/dist/types/tui.d.ts +2 -0
  20. package/package.json +9 -9
  21. package/src/chrome/context-map.ts +62 -0
  22. package/src/chrome/context-presentation.ts +26 -0
  23. package/src/chrome/context-view-model.ts +73 -0
  24. package/src/components/editor.ts +23 -0
  25. package/src/components/markdown.ts +14 -2
  26. package/src/overlays/advisor-config.ts +9 -2
  27. package/src/overlays/ask-dialog.ts +55 -15
  28. package/src/overlays/context-viewer-format.ts +145 -0
  29. package/src/overlays/context-viewer-overview.ts +381 -0
  30. package/src/overlays/context-viewer.ts +728 -0
  31. package/src/overlays/hook-input.ts +2 -0
  32. package/src/overlays/running-subagent-badge.ts +12 -1
  33. package/src/render/output-pane.ts +3 -3
  34. package/src/status-line/context-usage.ts +56 -580
  35. package/src/theme/symbols.ts +16 -0
  36. package/src/tools/ask.ts +2 -0
  37. package/src/tools/bash.ts +5 -23
  38. package/src/tools/fetch.ts +1 -0
  39. package/src/tools/github.ts +23 -3
  40. package/src/tools/read.ts +3 -1
  41. package/src/tools/wait.ts +6 -0
  42. 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 { AgentHubRegistry } from "./agent-hub-types";
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
- * - `width` — the wrapping width, which feeds the visual cap as well as
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(), width], () => {
320
+ const content = this.#memo.get([...this.#renderDeps(), contentWidth], () => {
321
321
  const formatted = formatOutputPaneLines(
322
322
  {
323
323
  ...this.#options,