@wahack/pi-coding-agent 15.11.1 → 15.11.3

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 (174) hide show
  1. package/package.json +2 -1
  2. package/src/autoresearch/dashboard.ts +1 -1
  3. package/src/autoresearch/index.ts +1 -1
  4. package/src/autoresearch/tools/init-experiment.ts +1 -1
  5. package/src/autoresearch/tools/log-experiment.ts +1 -1
  6. package/src/autoresearch/tools/run-experiment.ts +1 -1
  7. package/src/autoresearch/tools/update-notes.ts +1 -1
  8. package/src/cli/claude-trace-cli.ts +1 -1
  9. package/src/cli/dry-balance-cli.ts +1 -1
  10. package/src/cli/gallery-cli.ts +1 -1
  11. package/src/cli/grep-cli.ts +1 -1
  12. package/src/cli/list-models.ts +1 -1
  13. package/src/cli/session-picker.ts +1 -1
  14. package/src/cli/shell-cli.ts +1 -1
  15. package/src/commands/grep.ts +1 -1
  16. package/src/commit/agentic/agent.ts +1 -1
  17. package/src/config/keybindings.ts +3 -5
  18. package/src/config/model-resolver.ts +1 -1
  19. package/src/config/resolve-config-value.ts +1 -1
  20. package/src/debug/index.ts +3 -5
  21. package/src/debug/log-viewer.ts +2 -4
  22. package/src/debug/protocol-probe.ts +2 -4
  23. package/src/debug/raw-sse.ts +2 -4
  24. package/src/debug/report-bundle.ts +1 -1
  25. package/src/debug/terminal-info.ts +2 -4
  26. package/src/discovery/helpers.ts +1 -1
  27. package/src/edit/hashline/block-resolver.ts +1 -1
  28. package/src/edit/normalize.ts +1 -1
  29. package/src/edit/renderer.ts +2 -2
  30. package/src/exec/bash-executor.ts +1 -1
  31. package/src/export/ttsr.ts +1 -1
  32. package/src/extensibility/custom-tools/types.ts +1 -1
  33. package/src/extensibility/extensions/loader.ts +1 -1
  34. package/src/extensibility/extensions/runner.ts +1 -1
  35. package/src/extensibility/extensions/types.ts +1 -1
  36. package/src/extensibility/hooks/types.ts +1 -1
  37. package/src/extensibility/slash-commands.ts +1 -1
  38. package/src/goals/tools/goal-tool.ts +2 -2
  39. package/src/lsp/render.ts +2 -2
  40. package/src/mcp/render.ts +2 -2
  41. package/src/modes/components/agent-dashboard.ts +2 -4
  42. package/src/modes/components/agent-hub.ts +1 -1
  43. package/src/modes/components/assistant-message.ts +1 -1
  44. package/src/modes/components/bash-execution.ts +2 -4
  45. package/src/modes/components/bordered-loader.ts +1 -1
  46. package/src/modes/components/branch-summary-message.ts +1 -1
  47. package/src/modes/components/btw-panel.ts +1 -1
  48. package/src/modes/components/chat-block.ts +1 -1
  49. package/src/modes/components/compaction-summary-message.ts +1 -1
  50. package/src/modes/components/copy-selector.ts +1 -1
  51. package/src/modes/components/countdown-timer.ts +1 -1
  52. package/src/modes/components/custom-editor.ts +1 -1
  53. package/src/modes/components/custom-message.ts +2 -2
  54. package/src/modes/components/dynamic-border.ts +1 -1
  55. package/src/modes/components/error-banner.ts +1 -1
  56. package/src/modes/components/eval-execution.ts +1 -1
  57. package/src/modes/components/execution-shared.ts +1 -1
  58. package/src/modes/components/extensions/extension-dashboard.ts +2 -4
  59. package/src/modes/components/extensions/extension-list.ts +2 -4
  60. package/src/modes/components/extensions/inspector-panel.ts +1 -1
  61. package/src/modes/components/extensions/state-manager.ts +1 -1
  62. package/src/modes/components/footer.ts +1 -1
  63. package/src/modes/components/history-search.ts +2 -4
  64. package/src/modes/components/hook-editor.ts +1 -1
  65. package/src/modes/components/hook-input.ts +1 -1
  66. package/src/modes/components/hook-message.ts +2 -2
  67. package/src/modes/components/hook-selector.ts +2 -4
  68. package/src/modes/components/keybinding-hints.ts +1 -1
  69. package/src/modes/components/late-diagnostics-message.ts +1 -1
  70. package/src/modes/components/login-dialog.ts +1 -1
  71. package/src/modes/components/mcp-add-wizard.ts +2 -4
  72. package/src/modes/components/message-frame.ts +2 -2
  73. package/src/modes/components/model-selector.ts +2 -4
  74. package/src/modes/components/oauth-selector.ts +2 -4
  75. package/src/modes/components/omfg-panel.ts +1 -1
  76. package/src/modes/components/overlay-box.ts +1 -1
  77. package/src/modes/components/plan-review-overlay.ts +2 -4
  78. package/src/modes/components/plugin-selector.ts +1 -1
  79. package/src/modes/components/plugin-settings.ts +2 -4
  80. package/src/modes/components/queue-mode-selector.ts +1 -1
  81. package/src/modes/components/read-tool-group.ts +2 -2
  82. package/src/modes/components/session-selector.ts +2 -4
  83. package/src/modes/components/settings-defs.ts +1 -1
  84. package/src/modes/components/settings-selector.ts +2 -4
  85. package/src/modes/components/show-images-selector.ts +1 -1
  86. package/src/modes/components/skill-message.ts +2 -2
  87. package/src/modes/components/status-line/component.ts +1 -1
  88. package/src/modes/components/status-line/segments.ts +1 -1
  89. package/src/modes/components/theme-selector.ts +1 -1
  90. package/src/modes/components/thinking-selector.ts +1 -1
  91. package/src/modes/components/tiny-title-download-progress.ts +1 -1
  92. package/src/modes/components/todo-reminder.ts +1 -1
  93. package/src/modes/components/tool-execution.ts +2 -4
  94. package/src/modes/components/transcript-container.ts +1 -1
  95. package/src/modes/components/tree-selector.ts +2 -4
  96. package/src/modes/components/ttsr-notification.ts +1 -1
  97. package/src/modes/components/user-message-selector.ts +2 -4
  98. package/src/modes/components/user-message.ts +1 -1
  99. package/src/modes/components/visual-truncate.ts +1 -1
  100. package/src/modes/components/welcome.ts +2 -4
  101. package/src/modes/controllers/command-controller-shared.ts +1 -1
  102. package/src/modes/controllers/command-controller.ts +1 -1
  103. package/src/modes/controllers/event-controller.ts +1 -1
  104. package/src/modes/controllers/extension-ui-controller.ts +2 -2
  105. package/src/modes/controllers/input-controller.ts +1 -1
  106. package/src/modes/controllers/mcp-command-controller.ts +1 -1
  107. package/src/modes/controllers/selector-controller.ts +2 -2
  108. package/src/modes/controllers/streaming-reveal.ts +1 -1
  109. package/src/modes/emoji-autocomplete.ts +1 -1
  110. package/src/modes/index.ts +1 -1
  111. package/src/modes/interactive-mode.ts +3 -5
  112. package/src/modes/internal-url-autocomplete.ts +1 -1
  113. package/src/modes/prompt-action-autocomplete.ts +2 -4
  114. package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
  115. package/src/modes/setup-wizard/scenes/outro.ts +1 -1
  116. package/src/modes/setup-wizard/scenes/providers.ts +1 -1
  117. package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
  118. package/src/modes/setup-wizard/scenes/splash.ts +1 -1
  119. package/src/modes/setup-wizard/scenes/theme.ts +1 -1
  120. package/src/modes/setup-wizard/scenes/types.ts +1 -1
  121. package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
  122. package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
  123. package/src/modes/shared.ts +1 -1
  124. package/src/modes/theme/theme.ts +3 -5
  125. package/src/modes/types.ts +1 -1
  126. package/src/modes/utils/context-usage.ts +1 -1
  127. package/src/modes/utils/keybinding-matchers.ts +1 -1
  128. package/src/modes/utils/ui-helpers.ts +1 -1
  129. package/src/session/agent-session.ts +1 -1
  130. package/src/session/session-manager.ts +1 -1
  131. package/src/task/render.ts +2 -2
  132. package/src/task/subprocess-tool-registry.ts +1 -1
  133. package/src/task/worktree.ts +1 -1
  134. package/src/tools/ask.ts +1 -1
  135. package/src/tools/ast-edit.ts +3 -3
  136. package/src/tools/ast-grep.ts +3 -3
  137. package/src/tools/bash-command-fixup.ts +1 -1
  138. package/src/tools/bash-interactive.ts +3 -5
  139. package/src/tools/bash.ts +2 -2
  140. package/src/tools/browser/attach.ts +1 -1
  141. package/src/tools/browser/render.ts +2 -2
  142. package/src/tools/debug.ts +1 -1
  143. package/src/tools/eval-render.ts +2 -2
  144. package/src/tools/fetch.ts +2 -2
  145. package/src/tools/find.ts +3 -3
  146. package/src/tools/fs-cache-invalidation.ts +1 -1
  147. package/src/tools/gh-renderer.ts +1 -1
  148. package/src/tools/inspect-image-renderer.ts +2 -2
  149. package/src/tools/irc.ts +1 -1
  150. package/src/tools/job.ts +2 -2
  151. package/src/tools/memory-render.ts +2 -2
  152. package/src/tools/read.ts +3 -3
  153. package/src/tools/render-utils.ts +5 -5
  154. package/src/tools/renderers.ts +1 -1
  155. package/src/tools/resolve.ts +2 -2
  156. package/src/tools/review.ts +2 -2
  157. package/src/tools/search-tool-bm25.ts +2 -2
  158. package/src/tools/search.ts +3 -3
  159. package/src/tools/ssh.ts +1 -1
  160. package/src/tools/todo.ts +2 -2
  161. package/src/tools/write.ts +1 -1
  162. package/src/tui/code-cell.ts +1 -1
  163. package/src/tui/hyperlink.ts +1 -1
  164. package/src/tui/output-block.ts +2 -2
  165. package/src/tui/tree-list.ts +1 -1
  166. package/src/tui/utils.ts +2 -2
  167. package/src/utils/block-context.ts +1 -1
  168. package/src/utils/clipboard.ts +2 -2
  169. package/src/web/search/render.ts +2 -2
  170. package/src/workspace-tree.ts +1 -1
  171. package/stubs/natives/index.ts +814 -0
  172. package/stubs/natives/package.json +7 -0
  173. package/stubs/tui/index.ts +282 -0
  174. package/stubs/tui/package.json +7 -0
@@ -3,7 +3,7 @@
3
3
  * Shares the same kernel session as the agent's eval tool.
4
4
  */
5
5
 
6
- import { Container, type Loader, Text, type TUI } from './stubs/tui/index.ts';
6
+ import { Container, type Loader, Text, type TUI } from '../../stubs/tui/index.ts'
7
7
  import { sanitizeText } from "@oh-my-pi/pi-utils";
8
8
  import { highlightCode, theme } from "../../modes/theme/theme";
9
9
  import type { TruncationMeta } from "../../tools/output-meta";
@@ -7,7 +7,7 @@
7
7
  * stay in their respective files.
8
8
  */
9
9
 
10
- import { type Component, Container, Loader, Text, type TUI } from './stubs/tui/index.ts';
10
+ import { type Component, Container, Loader, Text, type TUI } from '../../stubs/tui/index.ts'
11
11
  import { getSymbolTheme, theme } from "../../modes/theme/theme";
12
12
  import { formatTruncationMetaNotice, type TruncationMeta } from "../../tools/output-meta";
13
13
  import { DynamicBorder } from "./dynamic-border";
@@ -11,8 +11,7 @@
11
11
  * - Space: Toggle selected item (or master switch)
12
12
  * - Esc: Close dashboard (clears search first if active)
13
13
  */
14
- import {
15
- type Component,
14
+ import { type Component,
16
15
  Container,
17
16
  matchesKey,
18
17
  padding,
@@ -20,8 +19,7 @@ import {
20
19
  Text,
21
20
  truncateToWidth,
22
21
  visibleWidth,
23
- wrapTextWithAnsi,
24
- } from './stubs/tui/index.ts';
22
+ wrapTextWithAnsi, } from '../../stubs/tui/index.ts'
25
23
  import { Settings } from "../../../config/settings";
26
24
  import { DynamicBorder } from "../../../modes/components/dynamic-border";
27
25
  import { theme } from "../../../modes/theme/theme";
@@ -5,15 +5,13 @@
5
5
  * that toggles the entire provider. All items below are dimmed when the
6
6
  * master switch is off.
7
7
  */
8
- import {
9
- type Component,
8
+ import { type Component,
10
9
  extractPrintableText,
11
10
  matchesKey,
12
11
  padding,
13
12
  ScrollView,
14
13
  truncateToWidth,
15
- visibleWidth,
16
- } from './stubs/tui/index.ts';
14
+ visibleWidth, } from '../../stubs/tui/index.ts'
17
15
  import { isProviderEnabled } from "../../../discovery";
18
16
  import { theme } from "../../../modes/theme/theme";
19
17
  import { matchesSelectDown, matchesSelectUp } from "../../utils/keybinding-matchers";
@@ -4,7 +4,7 @@
4
4
  * Shows name, description, origin, status, and kind-specific preview.
5
5
  */
6
6
  import * as os from "node:os";
7
- import { type Component, truncateToWidth, wrapTextWithAnsi } from './stubs/tui/index.ts';
7
+ import { type Component, truncateToWidth, wrapTextWithAnsi } from '../../stubs/tui/index.ts'
8
8
  import { theme } from "../../../modes/theme/theme";
9
9
  import { shortenPath } from "../../../tools/render-utils";
10
10
  import type { Extension, ExtensionState } from "./types";
@@ -3,7 +3,7 @@
3
3
  * Handles data loading, tree building, filtering, and toggle persistence.
4
4
  */
5
5
  import * as path from "node:path";
6
- import { fuzzyMatch } from './stubs/tui/index.ts';
6
+ import { fuzzyMatch } from '../../stubs/tui/index.ts'
7
7
  import { logger } from "@oh-my-pi/pi-utils";
8
8
  import type { ContextFile } from "../../../capability/context-file";
9
9
  import type { ExtensionModule } from "../../../capability/extension-module";
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { stripVTControlCharacters } from "node:util";
4
4
  import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
5
- import { type Component, padding, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
5
+ import { type Component, padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
6
6
  import { formatNumber, getProjectDir } from "@oh-my-pi/pi-utils";
7
7
  import { theme } from "../../modes/theme/theme";
8
8
  import type { AgentSession } from "../../session/agent-session";
@@ -1,5 +1,4 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  Container,
4
3
  Ellipsis,
5
4
  Input,
@@ -9,8 +8,7 @@ import {
9
8
  Spacer,
10
9
  Text,
11
10
  truncateToWidth,
12
- visibleWidth,
13
- } from './stubs/tui/index.ts';
11
+ visibleWidth, } from '../../stubs/tui/index.ts'
14
12
  import { theme } from "../../modes/theme/theme";
15
13
  import {
16
14
  matchesAppInterrupt,
@@ -6,7 +6,7 @@
6
6
  * - Default (hook): Enter inserts newline, Ctrl+Enter submits, bordered popup
7
7
  * - Prompt-style (ask): Enter submits, Shift+Enter inserts newline, legacy ask chrome
8
8
  */
9
- import { Container, Editor, matchesKey, Spacer, Text, type TUI } from './stubs/tui/index.ts';
9
+ import { Container, Editor, matchesKey, Spacer, Text, type TUI } from '../../stubs/tui/index.ts'
10
10
  import { getEditorTheme, theme } from "../../modes/theme/theme";
11
11
  import { matchesAppExternalEditor, matchesAppInterrupt } from "../../modes/utils/keybinding-matchers";
12
12
  import { getEditorCommand, openInEditor } from "../../utils/external-editor";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Simple text input component for hooks.
3
3
  */
4
- import { Container, Input, Markdown, matchesKey, Spacer, Text, type TUI } from './stubs/tui/index.ts';
4
+ import { Container, Input, Markdown, matchesKey, Spacer, Text, type TUI } from '../../stubs/tui/index.ts'
5
5
  import { getMarkdownTheme, theme } from "../../modes/theme/theme";
6
6
  import { matchesAppInterrupt } from "../../modes/utils/keybinding-matchers";
7
7
  import { CountdownTimer } from "./countdown-timer";
@@ -1,5 +1,5 @@
1
- import type { Component } from './stubs/tui/index.ts';
2
- import { Box, Container } from './stubs/tui/index.ts';
1
+ import type { Component } from '../../stubs/tui/index.ts'
2
+ import { Box, Container } from '../../stubs/tui/index.ts'
3
3
  import type { HookMessageRenderer } from "../../extensibility/hooks/types";
4
4
  import { theme } from "../../modes/theme/theme";
5
5
  import type { HookMessage } from "../../session/messages";
@@ -2,8 +2,7 @@
2
2
  * Generic selector component for hooks.
3
3
  * Displays a list of string options with keyboard navigation.
4
4
  */
5
- import {
6
- Container,
5
+ import { Container,
7
6
  Ellipsis,
8
7
  extractPrintableText,
9
8
  fuzzyFilter,
@@ -18,8 +17,7 @@ import {
18
17
  type TUI,
19
18
  truncateToWidth,
20
19
  visibleWidth,
21
- wrapTextWithAnsi,
22
- } from './stubs/tui/index.ts';
20
+ wrapTextWithAnsi, } from '../../stubs/tui/index.ts'
23
21
  import { getMarkdownTheme, type ThemeColor, theme } from "../../modes/theme/theme";
24
22
  import {
25
23
  matchesAppExternalEditor,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Utilities for formatting keybinding hints in the UI.
3
3
  */
4
- import { getKeybindings, type Keybinding, type KeyId } from './stubs/tui/index.ts';
4
+ import { getKeybindings, type Keybinding, type KeyId } from '../../stubs/tui/index.ts'
5
5
  import type { AppKeybinding, KeybindingsManager } from "../../config/keybindings";
6
6
  import { theme } from "../../modes/theme/theme";
7
7
 
@@ -1,4 +1,4 @@
1
- import { Container, Text } from './stubs/tui/index.ts';
1
+ import { Container, Text } from '../../stubs/tui/index.ts'
2
2
  import { formatDiagnostics } from "../../tools/render-utils";
3
3
  import { getLanguageFromPath, theme } from "../theme/theme";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { getOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
2
- import { Container, getKeybindings, Input, Spacer, Text, type TUI } from './stubs/tui/index.ts';
2
+ import { Container, getKeybindings, Input, Spacer, Text, type TUI } from '../../stubs/tui/index.ts'
3
3
  import { theme } from "../../modes/theme/theme";
4
4
  import { openPath } from "../../utils/open";
5
5
  import { DynamicBorder } from "./dynamic-border";
@@ -3,16 +3,14 @@
3
3
  *
4
4
  * Interactive multi-step wizard for adding MCP servers.
5
5
  */
6
- import {
7
- Container,
6
+ import { Container,
8
7
  Input,
9
8
  matchesKey,
10
9
  replaceTabs,
11
10
  Spacer,
12
11
  Text,
13
12
  TruncatedText,
14
- truncateToWidth,
15
- } from './stubs/tui/index.ts';
13
+ truncateToWidth, } from '../../stubs/tui/index.ts'
16
14
  import { getMCPConfigPath, getProjectDir } from "@oh-my-pi/pi-utils";
17
15
  import { validateServerName } from "../../mcp/config-writer";
18
16
  import { analyzeAuthError, discoverOAuthEndpoints } from "../../mcp/oauth-discovery";
@@ -9,8 +9,8 @@
9
9
  */
10
10
 
11
11
  import type { TextContent } from "@oh-my-pi/pi-ai";
12
- import type { Box, Component } from './stubs/tui/index.ts';
13
- import { Markdown, Spacer, Text } from './stubs/tui/index.ts';
12
+ import type { Box, Component } from '../../stubs/tui/index.ts'
13
+ import { Markdown, Spacer, Text } from '../../stubs/tui/index.ts'
14
14
  import { getMarkdownTheme, type Theme, theme } from "../../modes/theme/theme";
15
15
 
16
16
  /** Message shape consumed by the shared frame. */
@@ -2,8 +2,7 @@ import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
2
  import type { Model } from "@oh-my-pi/pi-ai";
3
3
  import { getSupportedEfforts } from "@oh-my-pi/pi-catalog/model-thinking";
4
4
  import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
5
- import {
6
- Container,
5
+ import { Container,
7
6
  fuzzyFilter,
8
7
  getKeybindings,
9
8
  Input,
@@ -14,8 +13,7 @@ import {
14
13
  TabBar,
15
14
  Text,
16
15
  type TUI,
17
- visibleWidth,
18
- } from './stubs/tui/index.ts';
16
+ visibleWidth, } from '../../stubs/tui/index.ts'
19
17
  import { formatNumber } from "@oh-my-pi/pi-utils";
20
18
  import type { ModelRegistry } from "../../config/model-registry";
21
19
  import { getModelMatchPreferences, resolveModelRoleValue } from "../../config/model-resolver";
@@ -1,14 +1,12 @@
1
1
  import { getOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
2
2
  import type { OAuthProviderInfo } from "@oh-my-pi/pi-ai/oauth/types";
3
- import {
4
- Container,
3
+ import { Container,
5
4
  extractPrintableText,
6
5
  fuzzyFilter,
7
6
  matchesKey,
8
7
  ScrollView,
9
8
  Spacer,
10
- TruncatedText,
11
- } from './stubs/tui/index.ts';
9
+ TruncatedText, } from '../../stubs/tui/index.ts'
12
10
  import { theme } from "../../modes/theme/theme";
13
11
  import { matchesSelectCancel, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
14
12
  import type { AuthStorage, CredentialOriginKind } from "../../session/auth-storage";
@@ -1,4 +1,4 @@
1
- import { type Component, Container, Markdown, Spacer, Text, type TUI } from './stubs/tui/index.ts';
1
+ import { type Component, Container, Markdown, Spacer, Text, type TUI } from '../../stubs/tui/index.ts'
2
2
  import { replaceTabs } from "../../tools/render-utils";
3
3
  import { getMarkdownTheme, theme } from "../theme/theme";
4
4
  import { DynamicBorder } from "./dynamic-border";
@@ -3,7 +3,7 @@
3
3
  * plan-review overlay, …). Every helper paints with `theme.boxSharp` glyphs and
4
4
  * the `border`/`accent` theme colors so all outlined overlays read identically.
5
5
  */
6
- import { padding, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
6
+ import { padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
7
7
  import { theme } from "../theme/theme";
8
8
 
9
9
  /** Pad or truncate a (possibly ANSI-styled) string to exactly `width` columns. */
@@ -16,8 +16,7 @@
16
16
  * ↑/↓ select options, Enter confirms, ←/→ drives the slider when there is no
17
17
  * sidebar, g/G + PgUp/PgDn scroll, and the external-editor key opens the plan.
18
18
  */
19
- import {
20
- type Component,
19
+ import { type Component,
21
20
  Ellipsis,
22
21
  Input,
23
22
  Markdown,
@@ -25,8 +24,7 @@ import {
25
24
  matchesKey,
26
25
  ScrollView,
27
26
  truncateToWidth,
28
- visibleWidth,
29
- } from './stubs/tui/index.ts';
27
+ visibleWidth, } from '../../stubs/tui/index.ts'
30
28
  import { getMarkdownTheme, theme } from "../theme/theme";
31
29
  import {
32
30
  matchesAppExternalEditor,
@@ -4,7 +4,7 @@
4
4
  * Shows available plugins from all configured marketplaces in a SelectList.
5
5
  * Selecting a plugin triggers installation. Esc cancels.
6
6
  */
7
- import { Container, type SelectItem, SelectList } from './stubs/tui/index.ts';
7
+ import { Container, type SelectItem, SelectList } from '../../stubs/tui/index.ts'
8
8
  import { getSelectListTheme } from "../theme/theme";
9
9
  import { DynamicBorder } from "./dynamic-border";
10
10
 
@@ -8,16 +8,14 @@
8
8
  * - Feature toggles
9
9
  * - Config value editor
10
10
  */
11
- import {
12
- Container,
11
+ import { Container,
13
12
  Input,
14
13
  type SelectItem,
15
14
  SelectList,
16
15
  type SettingItem,
17
16
  SettingsList,
18
17
  Spacer,
19
- Text,
20
- } from './stubs/tui/index.ts';
18
+ Text, } from '../../stubs/tui/index.ts'
21
19
  import { logger } from "@oh-my-pi/pi-utils";
22
20
  import { clearPluginRootsAndCaches, resolveOrDefaultProjectRegistryPath } from "../../discovery/helpers";
23
21
  import { PluginManager } from "../../extensibility/plugins/manager";
@@ -1,4 +1,4 @@
1
- import { Container, type SelectItem, SelectList } from './stubs/tui/index.ts';
1
+ import { Container, type SelectItem, SelectList } from '../../stubs/tui/index.ts'
2
2
  import { getSelectListTheme } from "../../modes/theme/theme";
3
3
  import { DynamicBorder } from "./dynamic-border";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import * as path from "node:path";
2
- import type { Component } from './stubs/tui/index.ts';
3
- import { Container, Text } from './stubs/tui/index.ts';
2
+ import type { Component } from '../../stubs/tui/index.ts'
3
+ import { Container, Text } from '../../stubs/tui/index.ts'
4
4
  import { InternalUrlRouter } from "../../internal-urls";
5
5
  import { getLanguageFromPath, theme } from "../../modes/theme/theme";
6
6
  import { parseLineRanges, selectorLineRanges, splitPathAndSel } from "../../tools/path-utils";
@@ -1,5 +1,4 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  Container,
4
3
  fuzzyMatch,
5
4
  Input,
@@ -10,8 +9,7 @@ import {
10
9
  Spacer,
11
10
  Text,
12
11
  truncateToWidth,
13
- visibleWidth,
14
- } from './stubs/tui/index.ts';
12
+ visibleWidth, } from '../../stubs/tui/index.ts'
15
13
  import { formatBytes } from "@oh-my-pi/pi-utils";
16
14
  import { theme } from "../../modes/theme/theme";
17
15
  import { matchesAppInterrupt, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
@@ -8,7 +8,7 @@
8
8
  * (or `options: "runtime"` for runtime-injected lists like themes).
9
9
  */
10
10
 
11
- import { TERMINAL } from './stubs/tui/index.ts';
11
+ import { TERMINAL } from '../../stubs/tui/index.ts'
12
12
  import { Settings } from "../../config/settings";
13
13
  import {
14
14
  type AnyUiMetadata,
@@ -1,7 +1,6 @@
1
1
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
2
  import type { Effort } from "@oh-my-pi/pi-ai";
3
- import {
4
- Container,
3
+ import { Container,
5
4
  Input,
6
5
  matchesKey,
7
6
  type SelectItem,
@@ -11,8 +10,7 @@ import {
11
10
  Spacer,
12
11
  type Tab,
13
12
  TabBar,
14
- Text,
15
- } from './stubs/tui/index.ts';
13
+ Text, } from '../../stubs/tui/index.ts'
16
14
  import { getDefault, type SettingPath, settings } from "../../config/settings";
17
15
  import type {
18
16
  SettingTab,
@@ -1,4 +1,4 @@
1
- import { Container, type SelectItem, SelectList } from './stubs/tui/index.ts';
1
+ import { Container, type SelectItem, SelectList } from '../../stubs/tui/index.ts'
2
2
  import { getSelectListTheme } from "../../modes/theme/theme";
3
3
  import { DynamicBorder } from "./dynamic-border";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import type { TextContent } from "@oh-my-pi/pi-ai";
2
- import type { Component } from './stubs/tui/index.ts';
3
- import { Box, Container, Markdown, Spacer, Text } from './stubs/tui/index.ts';
2
+ import type { Component } from '../../stubs/tui/index.ts'
3
+ import { Box, Container, Markdown, Spacer, Text } from '../../stubs/tui/index.ts'
4
4
  import { getMarkdownTheme, theme } from "../../modes/theme/theme";
5
5
  import type { CustomMessage, SkillPromptDetails } from "../../session/messages";
6
6
 
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
4
4
  import { estimateTokens } from "@oh-my-pi/pi-agent-core/compaction";
5
- import { type Component, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
5
+ import { type Component, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
6
6
  import { formatCount, getProjectDir } from "@oh-my-pi/pi-utils";
7
7
  import { $ } from "bun";
8
8
  import { settings } from "../../../config/settings";
@@ -1,7 +1,7 @@
1
1
  import * as os from "node:os";
2
2
  import * as path from "node:path";
3
3
  import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
4
- import { TERMINAL } from './stubs/tui/index.ts';
4
+ import { TERMINAL } from '../../stubs/tui/index.ts'
5
5
  import { formatDuration, formatNumber, getProjectDir, pathIsWithin, relativePathWithinRoot } from "@oh-my-pi/pi-utils";
6
6
  import { type ThemeColor, theme } from "../../../modes/theme/theme";
7
7
  import { shortenPath } from "../../../tools/render-utils";
@@ -1,4 +1,4 @@
1
- import { Container, type SelectItem, SelectList } from './stubs/tui/index.ts';
1
+ import { Container, type SelectItem, SelectList } from '../../stubs/tui/index.ts'
2
2
  import { getSelectListTheme } from "../../modes/theme/theme";
3
3
  import { DynamicBorder } from "./dynamic-border";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import type { Effort } from "@oh-my-pi/pi-ai";
2
- import { Container, type SelectItem, SelectList } from './stubs/tui/index.ts';
2
+ import { Container, type SelectItem, SelectList } from '../../stubs/tui/index.ts'
3
3
  import { getSelectListTheme } from "../../modes/theme/theme";
4
4
  import { getThinkingLevelMetadata } from "../../thinking";
5
5
  import { DynamicBorder } from "./dynamic-border";
@@ -1,4 +1,4 @@
1
- import { type Component, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { type Component, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import { formatBytes } from "@oh-my-pi/pi-utils";
3
3
  import { getTinyTitleModelSpec, type TinyTitleLocalModelKey } from "../../tiny/models";
4
4
  import type { TinyTitleProgressEvent } from "../../tiny/title-protocol";
@@ -1,4 +1,4 @@
1
- import { Box, Container, Spacer, Text } from './stubs/tui/index.ts';
1
+ import { Box, Container, Spacer, Text } from '../../stubs/tui/index.ts'
2
2
  import { theme } from "../../modes/theme/theme";
3
3
  import type { TodoItem } from "../../tools/todo";
4
4
 
@@ -1,7 +1,6 @@
1
1
  import type { SnapshotStore } from "@oh-my-pi/hashline";
2
2
  import type { AgentTool } from "@oh-my-pi/pi-agent-core";
3
- import {
4
- Box,
3
+ import { Box,
5
4
  type Component,
6
5
  Container,
7
6
  getImageDimensions,
@@ -11,8 +10,7 @@ import {
11
10
  Spacer,
12
11
  TERMINAL,
13
12
  Text,
14
- type TUI,
15
- } from './stubs/tui/index.ts';
13
+ type TUI, } from '../../stubs/tui/index.ts'
16
14
  import { getProjectDir, logger, sanitizeText } from "@oh-my-pi/pi-utils";
17
15
  import { EDIT_MODE_STRATEGIES, type EditMode, type PerFileDiffPreview } from "../../edit";
18
16
  import type { Theme } from "../../modes/theme/theme";
@@ -1,4 +1,4 @@
1
- import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from './stubs/tui/index.ts';
1
+ import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from '../../stubs/tui/index.ts'
2
2
 
3
3
  const kSnapshot = Symbol("transcript.liveDiffSnapshot");
4
4
 
@@ -1,6 +1,5 @@
1
1
  import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
- import {
3
- type Component,
2
+ import { type Component,
4
3
  Container,
5
4
  extractPrintableText,
6
5
  fuzzyMatch,
@@ -10,8 +9,7 @@ import {
10
9
  Spacer,
11
10
  Text,
12
11
  TruncatedText,
13
- truncateToWidth,
14
- } from './stubs/tui/index.ts';
12
+ truncateToWidth, } from '../../stubs/tui/index.ts'
15
13
  import type { TreeFilterMode } from "../../config/settings-schema";
16
14
  import { theme } from "../../modes/theme/theme";
17
15
  import { matchesAppInterrupt, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
@@ -1,4 +1,4 @@
1
- import { Box, Container, Spacer, Text } from './stubs/tui/index.ts';
1
+ import { Box, Container, Spacer, Text } from '../../stubs/tui/index.ts'
2
2
  import type { Rule } from "../../capability/rule";
3
3
  import { theme } from "../../modes/theme/theme";
4
4
 
@@ -1,5 +1,4 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  Container,
4
3
  extractPrintableText,
5
4
  fuzzyFilter,
@@ -7,8 +6,7 @@ import {
7
6
  ScrollView,
8
7
  Spacer,
9
8
  Text,
10
- truncateToWidth,
11
- } from './stubs/tui/index.ts';
9
+ truncateToWidth, } from '../../stubs/tui/index.ts'
12
10
  import { theme } from "../../modes/theme/theme";
13
11
  import { matchesSelectCancel, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
14
12
  import { DynamicBorder } from "./dynamic-border";
@@ -1,4 +1,4 @@
1
- import { Container, Markdown } from './stubs/tui/index.ts';
1
+ import { Container, Markdown } from '../../stubs/tui/index.ts'
2
2
  import { getMarkdownTheme, theme } from "../../modes/theme/theme";
3
3
  import { imageReferenceHyperlink, renderPlaceholders } from "../image-references";
4
4
  import { highlightMagicKeywords } from "../magic-keywords";
@@ -2,7 +2,7 @@
2
2
  * Shared utility for truncating text to visual lines (accounting for line wrapping).
3
3
  * Used by both tool-execution.ts and bash-execution.ts for consistent behavior.
4
4
  */
5
- import { Text } from './stubs/tui/index.ts';
5
+ import { Text } from '../../stubs/tui/index.ts'
6
6
 
7
7
  export interface VisualTruncateResult {
8
8
  /** The visual lines to display */
@@ -1,12 +1,10 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  padding,
4
3
  replaceTabs,
5
4
  TERMINAL,
6
5
  truncateToWidth,
7
6
  visibleWidth,
8
- wrapTextWithAnsi,
9
- } from './stubs/tui/index.ts';
7
+ wrapTextWithAnsi, } from '../../stubs/tui/index.ts'
10
8
  import { APP_NAME } from "@oh-my-pi/pi-utils";
11
9
  import { theme } from "../../modes/theme/theme";
12
10
  import tipsText from "./tips.txt" with { type: "text" };
@@ -7,7 +7,7 @@
7
7
  * wording, and add-flow logic stay in the per-controller files because they
8
8
  * diverge in workflow.
9
9
  */
10
- import { Text } from './stubs/tui/index.ts';
10
+ import { Text } from '../../stubs/tui/index.ts'
11
11
  import type { SourceMeta } from "../../capability/types";
12
12
  import { shortenPath } from "../../tools/render-utils";
13
13
  import { DynamicBorder } from "../components/dynamic-border";
@@ -9,7 +9,7 @@ import {
9
9
  type UsageLimit,
10
10
  type UsageReport,
11
11
  } from "@oh-my-pi/pi-ai";
12
- import { Loader, Markdown, padding, Spacer, Text, visibleWidth } from './stubs/tui/index.ts';
12
+ import { Loader, Markdown, padding, Spacer, Text, visibleWidth } from '../../stubs/tui/index.ts'
13
13
  import { formatDuration, Snowflake } from "@oh-my-pi/pi-utils";
14
14
  import { $ } from "bun";
15
15
  import { shouldEnableAppendOnlyContext } from "../../config/append-only-context-mode";
@@ -1,7 +1,7 @@
1
1
  import { INTENT_FIELD } from "@oh-my-pi/pi-agent-core";
2
2
  import { calculatePromptTokens } from "@oh-my-pi/pi-agent-core/compaction/compaction";
3
3
  import type { AssistantMessage, ImageContent } from "@oh-my-pi/pi-ai";
4
- import { type Component, Loader, TERMINAL } from './stubs/tui/index.ts';
4
+ import { type Component, Loader, TERMINAL } from '../../stubs/tui/index.ts'
5
5
  import { settings } from "../../config/settings";
6
6
  import { getFileSnapshotStore } from "../../edit/file-snapshot-store";
7
7
  import { AssistantMessageComponent } from "../../modes/components/assistant-message";
@@ -1,5 +1,5 @@
1
- import type { Component, OverlayHandle, TUI } from './stubs/tui/index.ts';
2
- import { Container, Spacer, Text } from './stubs/tui/index.ts';
1
+ import type { Component, OverlayHandle, TUI } from '../../stubs/tui/index.ts'
2
+ import { Container, Spacer, Text } from '../../stubs/tui/index.ts'
3
3
  import { KeybindingsManager } from "../../config/keybindings";
4
4
  import type {
5
5
  CompactOptions,
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs/promises";
2
2
  import type { ImageContent } from "@oh-my-pi/pi-ai";
3
- import type { AutocompleteProvider, SlashCommand } from './stubs/tui/index.ts';
3
+ import type { AutocompleteProvider, SlashCommand } from '../../stubs/tui/index.ts'
4
4
  import { $env, logger, sanitizeText } from "@oh-my-pi/pi-utils";
5
5
  import { getRoleInfo } from "../../config/model-roles";
6
6
  import { isSettingsInitialized, settings } from "../../config/settings";
@@ -4,7 +4,7 @@
4
4
  * Handles /mcp subcommands for managing MCP servers.
5
5
  */
6
6
  import * as path from "node:path";
7
- import { type Component, replaceTabs, Spacer, Text } from './stubs/tui/index.ts';
7
+ import { type Component, replaceTabs, Spacer, Text } from '../../stubs/tui/index.ts'
8
8
  import { getMCPConfigPath, getProjectDir } from "@oh-my-pi/pi-utils";
9
9
  import type { SourceMeta } from "../../capability/types";
10
10
  import { analyzeAuthError, discoverOAuthEndpoints, MCPManager } from "../../mcp";