@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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@wahack/pi-coding-agent",
4
- "version": "15.11.1",
4
+ "version": "15.11.3",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -72,6 +72,7 @@
72
72
  },
73
73
  "files": [
74
74
  "src",
75
+ "stubs",
75
76
  "dist/cli.js",
76
77
  "dist/*.node",
77
78
  "scripts",
@@ -1,4 +1,4 @@
1
- import { matchesKey, replaceTabs, ScrollView, Text, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { matchesKey, replaceTabs, ScrollView, Text, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import type { Theme } from "../modes/theme/theme";
3
3
  import { formatElapsed, formatNum, isBetter } from "./helpers";
4
4
  import { currentResults, findBaselineMetric, findBaselineRunNumber, findBaselineSecondary } from "./state";
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import type { AutocompleteItem } from './stubs/tui/index.ts';
3
+ import type { AutocompleteItem } from '../../stubs/tui/index.ts'
4
4
  import { logger, prompt } from "@oh-my-pi/pi-utils";
5
5
  import type { ExtensionContext, ExtensionFactory } from "../extensibility/extensions";
6
6
  import * as git from "../utils/git";
@@ -1,6 +1,6 @@
1
1
  import * as path from "node:path";
2
2
 
3
- import { Text } from './stubs/tui/index.ts';
3
+ import { Text } from '../../stubs/tui/index.ts'
4
4
  import * as z from "zod/v4";
5
5
  import type { ToolDefinition } from "../../extensibility/extensions";
6
6
  import type { Theme } from "../../modes/theme/theme";
@@ -1,7 +1,7 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
 
4
- import { Text } from './stubs/tui/index.ts';
4
+ import { Text } from '../../stubs/tui/index.ts'
5
5
  import * as z from "zod/v4";
6
6
  import type { ToolDefinition } from "../../extensibility/extensions";
7
7
  import type { Theme } from "../../modes/theme/theme";
@@ -1,6 +1,6 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { Text } from './stubs/tui/index.ts';
3
+ import { Text } from '../../stubs/tui/index.ts'
4
4
  import { formatBytes } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import { executeBash } from "../../exec/bash-executor";
@@ -1,4 +1,4 @@
1
- import { Text } from './stubs/tui/index.ts';
1
+ import { Text } from '../../stubs/tui/index.ts'
2
2
  import * as z from "zod/v4";
3
3
  import type { ToolDefinition } from "../../extensibility/extensions";
4
4
  import type { Theme } from "../../modes/theme/theme";
@@ -9,7 +9,7 @@ import * as net from "node:net";
9
9
  import * as path from "node:path";
10
10
  import * as tls from "node:tls";
11
11
  import * as zlib from "node:zlib";
12
- import { PtySession } from './stubs/natives/index.ts';
12
+ import { PtySession } from '../../stubs/natives/index.ts'
13
13
  import xterm from "@xterm/headless";
14
14
 
15
15
  const DEFAULT_PROXY_HOST = "127.0.0.1";
@@ -13,7 +13,7 @@ import type {
13
13
  } from "@oh-my-pi/pi-ai";
14
14
  import { streamSimple } from "@oh-my-pi/pi-ai";
15
15
  import type { CanonicalModelVariant } from "@oh-my-pi/pi-catalog/identity";
16
- import { replaceTabs, truncateToWidth } from './stubs/tui/index.ts';
16
+ import { replaceTabs, truncateToWidth } from '../../stubs/tui/index.ts'
17
17
  import { formatDuration, getProjectDir } from "@oh-my-pi/pi-utils";
18
18
  import chalk from "chalk";
19
19
  import { type CanonicalModelQueryOptions, ModelRegistry } from "../config/model-registry";
@@ -8,7 +8,7 @@
8
8
  * having to provoke each state through a live agent session.
9
9
  */
10
10
  import type { AgentTool } from "@oh-my-pi/pi-agent-core";
11
- import type { TUI } from './stubs/tui/index.ts';
11
+ import type { TUI } from '../../stubs/tui/index.ts'
12
12
  import { getProjectDir } from "@oh-my-pi/pi-utils";
13
13
  import { Settings } from "../config/settings";
14
14
  import { ToolExecutionComponent } from "../modes/components/tool-execution";
@@ -4,7 +4,7 @@
4
4
  * Handles `omp grep` subcommand for testing grep tool on Windows.
5
5
  */
6
6
  import * as path from "node:path";
7
- import { GrepOutputMode, grep } from './stubs/natives/index.ts';
7
+ import { GrepOutputMode, grep } from '../../stubs/natives/index.ts'
8
8
  import { APP_NAME } from "@oh-my-pi/pi-utils";
9
9
  import chalk from "chalk";
10
10
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import type { Api, Model } from "@oh-my-pi/pi-ai";
5
5
  import { getSupportedEfforts } from "@oh-my-pi/pi-catalog/model-thinking";
6
- import { fuzzyFilter } from './stubs/tui/index.ts';
6
+ import { fuzzyFilter } from '../../stubs/tui/index.ts'
7
7
  import { formatNumber } from "@oh-my-pi/pi-utils";
8
8
  import type { ModelRegistry } from "../config/model-registry";
9
9
  import { discoverAndLoadExtensions, loadExtensions } from "../extensibility/extensions";
@@ -1,4 +1,4 @@
1
- import { ProcessTerminal, TUI } from './stubs/tui/index.ts';
1
+ import { ProcessTerminal, TUI } from '../../stubs/tui/index.ts'
2
2
  import { logger } from "@oh-my-pi/pi-utils";
3
3
  import { SessionSelectorComponent } from "../modes/components/session-selector";
4
4
  import { HistoryStorage } from "../session/history-storage";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import * as path from "node:path";
7
7
  import { createInterface } from "node:readline/promises";
8
- import { Shell } from './stubs/natives/index.ts';
8
+ import { Shell } from '../../stubs/natives/index.ts'
9
9
  import { APP_NAME, getProjectDir } from "@oh-my-pi/pi-utils";
10
10
  import chalk from "chalk";
11
11
  import { Settings } from "../config/settings";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Test grep tool.
3
3
  */
4
- import { GrepOutputMode } from './stubs/natives/index.ts';
4
+ import { GrepOutputMode } from '../../stubs/natives/index.ts'
5
5
  import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
6
6
  import { type GrepCommandArgs, runGrepCommand } from "../cli/grep-cli";
7
7
  import { initTheme } from "../modes/theme/theme";
@@ -1,6 +1,6 @@
1
1
  import { INTENT_FIELD, type ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
2
  import type { Api, Model } from "@oh-my-pi/pi-ai";
3
- import { Markdown } from './stubs/tui/index.ts';
3
+ import { Markdown } from '../../stubs/tui/index.ts'
4
4
  import { prompt } from "@oh-my-pi/pi-utils";
5
5
  import chalk from "chalk";
6
6
  import typesDescriptionPrompt from "../../commit/prompts/types-description.md" with { type: "text" };
@@ -1,14 +1,12 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import {
4
- type Keybinding,
3
+ import { type Keybinding,
5
4
  type KeybindingDefinitions,
6
5
  type KeybindingsConfig,
7
6
  type KeyId,
8
7
  setKeybindings,
9
8
  TUI_KEYBINDINGS,
10
- KeybindingsManager as TuiKeybindingsManager,
11
- } from './stubs/tui/index.ts';
9
+ KeybindingsManager as TuiKeybindingsManager, } from '../../stubs/tui/index.ts'
12
10
  import { getAgentDir, isEnoent, logger } from "@oh-my-pi/pi-utils";
13
11
  import { YAML } from "bun";
14
12
 
@@ -56,7 +54,7 @@ interface AppKeybindings {
56
54
 
57
55
  export type AppKeybinding = keyof AppKeybindings;
58
56
 
59
- declare module './stubs/tui/index.ts' {
57
+ declare module '../../stubs/tui/index.ts' {
60
58
  interface Keybindings extends AppKeybindings {}
61
59
  }
62
60
 
@@ -22,7 +22,7 @@ import { buildModelProviderPriorityRank } from "@oh-my-pi/pi-catalog/identity";
22
22
  import { clampThinkingLevelForModel } from "@oh-my-pi/pi-catalog/model-thinking";
23
23
  import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
24
24
  import { DEFAULT_MODEL_PER_PROVIDER } from "@oh-my-pi/pi-catalog/provider-models";
25
- import { fuzzyMatch } from './stubs/tui/index.ts';
25
+ import { fuzzyMatch } from '../../stubs/tui/index.ts'
26
26
  import { logger } from "@oh-my-pi/pi-utils";
27
27
  import chalk from "chalk";
28
28
  import MODEL_PRIO from "../priority.json" with { type: "json" };
@@ -4,7 +4,7 @@
4
4
  * Note: command execution is async to avoid blocking the TUI.
5
5
  */
6
6
 
7
- import { executeShell } from './stubs/natives/index.ts';
7
+ import { executeShell } from '../../stubs/natives/index.ts'
8
8
 
9
9
  /** Cache for successful shell command results (persists for process lifetime). */
10
10
  const commandResultCache = new Map<string, string>();
@@ -5,9 +5,8 @@
5
5
  */
6
6
  import * as fs from "node:fs/promises";
7
7
  import * as url from "node:url";
8
- import { getWorkProfile } from './stubs/natives/index.ts';
9
- import {
10
- Container,
8
+ import { getWorkProfile } from '../../stubs/natives/index.ts'
9
+ import { Container,
11
10
  isNotificationSuppressed,
12
11
  Loader,
13
12
  type SelectItem,
@@ -15,8 +14,7 @@ import {
15
14
  Spacer,
16
15
  TERMINAL,
17
16
  type TerminalNotification,
18
- Text,
19
- } from './stubs/tui/index.ts';
17
+ Text, } from '../../stubs/tui/index.ts'
20
18
  import { getSessionsDir } from "@oh-my-pi/pi-utils";
21
19
  import { DynamicBorder } from "../modes/components/dynamic-border";
22
20
  import { TranscriptBlock } from "../modes/components/transcript-container";
@@ -1,12 +1,10 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  extractPrintableText,
4
3
  matchesKey,
5
4
  padding,
6
5
  replaceTabs,
7
6
  truncateToWidth,
8
- visibleWidth,
9
- } from './stubs/tui/index.ts';
7
+ visibleWidth, } from '../../stubs/tui/index.ts'
10
8
  import { sanitizeText } from "@oh-my-pi/pi-utils";
11
9
  import { theme } from "../modes/theme/theme";
12
10
  import { copyToClipboard } from "../utils/clipboard";
@@ -14,8 +14,7 @@
14
14
  * protocols, each of which decodes a standard PNG.
15
15
  */
16
16
  import * as zlib from "node:zlib";
17
- import {
18
- type Component,
17
+ import { type Component,
19
18
  Container,
20
19
  encodeTextSized,
21
20
  Image,
@@ -25,8 +24,7 @@ import {
25
24
  Spacer,
26
25
  TERMINAL,
27
26
  Text,
28
- type TextSizingScale,
29
- } from './stubs/tui/index.ts';
27
+ type TextSizingScale, } from '../../stubs/tui/index.ts'
30
28
  import { DynamicBorder } from "../modes/components/dynamic-border";
31
29
  import { theme } from "../modes/theme/theme";
32
30
 
@@ -1,12 +1,10 @@
1
- import {
2
- type Component,
1
+ import { type Component,
3
2
  matchesKey,
4
3
  padding,
5
4
  replaceTabs,
6
5
  ScrollView,
7
6
  truncateToWidth,
8
- visibleWidth,
9
- } from './stubs/tui/index.ts';
7
+ visibleWidth, } from '../../stubs/tui/index.ts'
10
8
  import { sanitizeText } from "@oh-my-pi/pi-utils";
11
9
  import { theme } from "../modes/theme/theme";
12
10
  import { copyToClipboard } from "../utils/clipboard";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import * as fs from "node:fs/promises";
7
7
  import * as path from "node:path";
8
- import type { WorkProfile } from './stubs/natives/index.ts';
8
+ import type { WorkProfile } from '../../stubs/natives/index.ts'
9
9
  import { APP_NAME, getLogPath, getLogsDir, getReportsDir, isEnoent } from "@oh-my-pi/pi-utils";
10
10
  import type { CpuProfile, HeapSnapshot } from "./profiler";
11
11
  import { collectSystemInfo, sanitizeEnv } from "./system-info";
@@ -6,14 +6,12 @@
6
6
  * scrollback/erase strategy, and the live geometry — the details that decide
7
7
  * which escape sequences the renderer emits.
8
8
  */
9
- import {
10
- getCellDimensions,
9
+ import { getCellDimensions,
11
10
  ImageProtocol,
12
11
  isOsc99Supported,
13
12
  NotifyProtocol,
14
13
  TERMINAL,
15
- TERMINAL_ID,
16
- } from './stubs/tui/index.ts';
14
+ TERMINAL_ID, } from '../../stubs/tui/index.ts'
17
15
 
18
16
  /** Live values the debug view reads off the running TUI, not the static capability table. */
19
17
  export interface TerminalRuntimeState {
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as os from "node:os";
3
3
  import * as path from "node:path";
4
4
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
5
- import { FileType, glob } from './stubs/natives/index.ts';
5
+ import { FileType, glob } from '../../stubs/natives/index.ts'
6
6
  import {
7
7
  CONFIG_DIR_NAME,
8
8
  getConfigDirName,
@@ -6,7 +6,7 @@
6
6
  * the requested line (or `null` when none can be resolved).
7
7
  */
8
8
  import type { BlockResolver } from "@oh-my-pi/hashline";
9
- import { blockRangeAt } from './stubs/natives/index.ts';
9
+ import { blockRangeAt } from '../../stubs/natives/index.ts'
10
10
 
11
11
  /**
12
12
  * `blockRangeAt` runs a full synchronous tree-sitter parse of `text` per
@@ -6,7 +6,7 @@
6
6
  * existing consumers see one stable surface.
7
7
  */
8
8
 
9
- import { padding } from './stubs/tui/index.ts';
9
+ import { padding } from '../../stubs/tui/index.ts'
10
10
 
11
11
  export {
12
12
  type BomResult,
@@ -3,8 +3,8 @@
3
3
  */
4
4
 
5
5
  import { HL_FILE_PREFIX, HL_FILE_SUFFIX } from "@oh-my-pi/hashline";
6
- import type { Component } from './stubs/tui/index.ts';
7
- import { sliceWithWidth, visibleWidth, wrapTextWithAnsi } from './stubs/tui/index.ts';
6
+ import type { Component } from '../../stubs/tui/index.ts'
7
+ import { sliceWithWidth, visibleWidth, wrapTextWithAnsi } from '../../stubs/tui/index.ts'
8
8
  import { sanitizeText } from "@oh-my-pi/pi-utils";
9
9
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
10
10
  import type { FileDiagnosticsResult } from "../lsp";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import * as fs from "node:fs/promises";
7
7
  import { ExponentialYield } from "@oh-my-pi/pi-agent-core/utils/yield";
8
- import { executeShell, type MinimizerOptions, Shell, type ShellRunResult } from './stubs/natives/index.ts';
8
+ import { executeShell, type MinimizerOptions, Shell, type ShellRunResult } from '../../stubs/natives/index.ts'
9
9
  import { isExecutable, type ShellConfig } from "@oh-my-pi/pi-utils/procmgr";
10
10
  import { Settings, type ShellMinimizerSettings } from "../config/settings";
11
11
  import { OutputSink } from "../session/streaming-output";
@@ -6,7 +6,7 @@
6
6
  * injected as a system reminder, and the request is retried.
7
7
  */
8
8
  import * as path from "node:path";
9
- import { AstMatchStrictness, astMatch } from './stubs/natives/index.ts';
9
+ import { AstMatchStrictness, astMatch } from '../../stubs/natives/index.ts'
10
10
  import { logger } from "@oh-my-pi/pi-utils";
11
11
  import type { Rule } from "../capability/rule";
12
12
  import type { TtsrSettings } from "../config/settings";
@@ -13,7 +13,7 @@ import type {
13
13
  } from "@oh-my-pi/pi-agent-core";
14
14
  import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
15
15
  import type { FetchImpl, Model, Static, TSchema } from "@oh-my-pi/pi-ai";
16
- import type { Component } from './stubs/tui/index.ts';
16
+ import type { Component } from '../../stubs/tui/index.ts'
17
17
  import type { Rule } from "../../capability/rule";
18
18
  import type { ModelRegistry } from "../../config/model-registry";
19
19
  import type { Settings } from "../../config/settings";
@@ -7,7 +7,7 @@ import * as path from "node:path";
7
7
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
8
8
  import type { ImageContent, Model, TextContent, TSchema } from "@oh-my-pi/pi-ai";
9
9
  import * as PiCodingAgent from "@oh-my-pi/pi-coding-agent";
10
- import type { KeyId } from './stubs/tui/index.ts';
10
+ import type { KeyId } from '../../stubs/tui/index.ts'
11
11
  import { hasFsCode, isEacces, isEnoent, logger } from "@oh-my-pi/pi-utils";
12
12
  import * as Zod from "zod/v4";
13
13
  import { type ExtensionModule, extensionModuleCapability } from "../../capability/extension-module";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
5
5
  import type { CredentialDisabledEvent, ImageContent, Model, ProviderResponseMetadata } from "@oh-my-pi/pi-ai";
6
- import type { KeyId } from './stubs/tui/index.ts';
6
+ import type { KeyId } from '../../stubs/tui/index.ts'
7
7
  import { logger } from "@oh-my-pi/pi-utils";
8
8
  import type { ModelRegistry } from "../../config/model-registry";
9
9
  import type { MemoryRuntimeContext } from "../../memory-backend";
@@ -31,7 +31,7 @@ import type {
31
31
  } from "@oh-my-pi/pi-ai";
32
32
  import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
33
33
  import type * as piCodingAgent from "@oh-my-pi/pi-coding-agent";
34
- import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from './stubs/tui/index.ts';
34
+ import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from '../../stubs/tui/index.ts'
35
35
  import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
36
36
  import type * as Zod from "zod/v4";
37
37
  import type { KeybindingsManager } from "../../config/keybindings";
@@ -1,5 +1,5 @@
1
1
  import type { ImageContent, Message, Model, TextContent } from "@oh-my-pi/pi-ai";
2
- import type { Component, TUI } from './stubs/tui/index.ts';
2
+ import type { Component, TUI } from '../../stubs/tui/index.ts'
3
3
  import type { ModelRegistry } from "../../config/model-registry";
4
4
  import type { EditToolDetails } from "../../edit";
5
5
  import type { ExecOptions, ExecResult } from "../../exec/exec";
@@ -1,4 +1,4 @@
1
- import type { AutocompleteItem } from './stubs/tui/index.ts';
1
+ import type { AutocompleteItem } from '../../stubs/tui/index.ts'
2
2
  import { parseFrontmatter, prompt } from "@oh-my-pi/pi-utils";
3
3
  import { slashCommandCapability } from "../capability/slash-command";
4
4
  import { appendInlineArgsFallback, templateUsesInlineArgPlaceholders } from "../config/prompt-templates";
@@ -1,6 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from './stubs/tui/index.ts';
3
- import { Text } from './stubs/tui/index.ts';
2
+ import type { Component } from '../../stubs/tui/index.ts'
3
+ import { Text } from '../../stubs/tui/index.ts'
4
4
  import { formatNumber, prompt } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
package/src/lsp/render.ts CHANGED
@@ -8,8 +8,8 @@
8
8
  * - Collapsible/expandable views
9
9
  */
10
10
  import type { RenderResultOptions } from "@oh-my-pi/pi-agent-core";
11
- import { type HighlightColors, highlightCode as nativeHighlightCode, supportsLanguage } from './stubs/natives/index.ts';
12
- import { type Component, Text } from './stubs/tui/index.ts';
11
+ import { type HighlightColors, highlightCode as nativeHighlightCode, supportsLanguage } from '../../stubs/natives/index.ts'
12
+ import { type Component, Text } from '../../stubs/tui/index.ts'
13
13
  import { getLanguageFromPath, type Theme } from "../modes/theme/theme";
14
14
  import {
15
15
  formatExpandHint,
package/src/mcp/render.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * Provides structured display of MCP tool calls and results,
5
5
  * showing args and output in JSON tree format similar to task tool.
6
6
  */
7
- import type { Component } from './stubs/tui/index.ts';
8
- import { Text } from './stubs/tui/index.ts';
7
+ import type { Component } from '../../stubs/tui/index.ts'
8
+ import { Text } from '../../stubs/tui/index.ts'
9
9
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
10
10
  import type { Theme } from "../modes/theme/theme";
11
11
  import {
@@ -17,8 +17,7 @@
17
17
  import * as fs from "node:fs/promises";
18
18
  import * as path from "node:path";
19
19
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
20
- import {
21
- type Component,
20
+ import { type Component,
22
21
  Container,
23
22
  Editor,
24
23
  extractPrintableText,
@@ -32,8 +31,7 @@ import {
32
31
  Text,
33
32
  truncateToWidth,
34
33
  visibleWidth,
35
- wrapTextWithAnsi,
36
- } from './stubs/tui/index.ts';
34
+ wrapTextWithAnsi, } from '../../stubs/tui/index.ts'
37
35
  import { isEnoent, prompt } from "@oh-my-pi/pi-utils";
38
36
  import { YAML } from "bun";
39
37
  import { getConfigDirs } from "../../config";
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import * as fs from "node:fs";
17
17
  import type { ToolResultMessage } from "@oh-my-pi/pi-ai";
18
- import { Container, Editor, Markdown, type MarkdownTheme, matchesKey, ScrollView } from './stubs/tui/index.ts';
18
+ import { Container, Editor, Markdown, type MarkdownTheme, matchesKey, ScrollView } from '../../stubs/tui/index.ts'
19
19
  import { formatAge, formatDuration, formatNumber, logger } from "@oh-my-pi/pi-utils";
20
20
  import type { KeyId } from "../../config/keybindings";
21
21
  import { IrcBus } from "../../irc/bus";
@@ -1,5 +1,5 @@
1
1
  import type { AssistantMessage, ImageContent, Usage } from "@oh-my-pi/pi-ai";
2
- import { Container, Image, type ImageBudget, ImageProtocol, Markdown, Spacer, TERMINAL, Text } from './stubs/tui/index.ts';
2
+ import { Container, Image, type ImageBudget, ImageProtocol, Markdown, Spacer, TERMINAL, Text } from '../../stubs/tui/index.ts'
3
3
  import { formatNumber } from "@oh-my-pi/pi-utils";
4
4
  import { settings } from "../../config/settings";
5
5
  import type { AssistantThinkingRenderer } from "../../extensibility/extensions/types";
@@ -2,8 +2,7 @@
2
2
  * Component for displaying bash command execution with streaming output.
3
3
  */
4
4
 
5
- import {
6
- Container,
5
+ import { Container,
7
6
  Ellipsis,
8
7
  ImageProtocol,
9
8
  type Loader,
@@ -11,8 +10,7 @@ import {
11
10
  Text,
12
11
  type TUI,
13
12
  truncateToWidth,
14
- visibleWidth,
15
- } from './stubs/tui/index.ts';
13
+ visibleWidth, } from '../../stubs/tui/index.ts'
16
14
  import { sanitizeText } from "@oh-my-pi/pi-utils";
17
15
  import { theme } from "../../modes/theme/theme";
18
16
  import type { TruncationMeta } from "../../tools/output-meta";
@@ -1,4 +1,4 @@
1
- import { CancellableLoader, Container, Spacer, Text, type TUI } from './stubs/tui/index.ts';
1
+ import { CancellableLoader, Container, Spacer, Text, type TUI } from '../../stubs/tui/index.ts'
2
2
  import type { Theme } from "../../modes/theme/theme";
3
3
  import { DynamicBorder } from "./dynamic-border";
4
4
 
@@ -1,4 +1,4 @@
1
- import { Box, Markdown, Spacer, Text } from './stubs/tui/index.ts';
1
+ import { Box, Markdown, Spacer, Text } from '../../stubs/tui/index.ts'
2
2
  import { getMarkdownTheme, theme } from "../../modes/theme/theme";
3
3
  import type { BranchSummaryMessage } from "../../session/messages";
4
4
 
@@ -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";
@@ -1,4 +1,4 @@
1
- import { Container } from './stubs/tui/index.ts';
1
+ import { Container } from '../../stubs/tui/index.ts'
2
2
 
3
3
  /**
4
4
  * Capabilities a mounted {@link ChatBlock} may use against its host transcript.
@@ -1,4 +1,4 @@
1
- import { Box, type Component, Markdown } from './stubs/tui/index.ts';
1
+ import { Box, type Component, Markdown } from '../../stubs/tui/index.ts'
2
2
  import { getMarkdownTheme, theme } from "../../modes/theme/theme";
3
3
  import type { CompactionSummaryMessage } from "../../session/messages";
4
4
 
@@ -1,4 +1,4 @@
1
- import { type Component, matchesKey, padding, Text, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { type Component, matchesKey, padding, Text, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import { replaceTabs } from "../../tools/render-utils";
3
3
  import { highlightCode, theme } from "../theme/theme";
4
4
  import type { CopyTarget } from "../utils/copy-targets";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Reusable countdown timer for dialog components.
3
3
  */
4
- import type { TUI } from './stubs/tui/index.ts';
4
+ import type { TUI } from '../../stubs/tui/index.ts'
5
5
 
6
6
  export class CountdownTimer {
7
7
  #intervalId: NodeJS.Timeout | undefined;
@@ -1,4 +1,4 @@
1
- import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from './stubs/tui/index.ts';
1
+ import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from '../../stubs/tui/index.ts'
2
2
  import type { AppKeybinding } from "../../config/keybindings";
3
3
  import { imageReferenceHyperlink, PLACEHOLDER_REGEX, renderPlaceholders } from "../image-references";
4
4
  import { highlightMagicKeywords } from "../magic-keywords";
@@ -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 { MessageRenderer } from "../../extensibility/extensions/types";
4
4
  import { theme } from "../../modes/theme/theme";
5
5
  import type { CustomMessage } from "../../session/messages";
@@ -1,4 +1,4 @@
1
- import type { Component } from './stubs/tui/index.ts';
1
+ import type { Component } from '../../stubs/tui/index.ts'
2
2
  import { theme } from "../../modes/theme/theme";
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Container, Spacer, Text } from './stubs/tui/index.ts';
1
+ import { Container, Spacer, Text } from '../../stubs/tui/index.ts'
2
2
  import { getPreviewLines, TRUNCATE_LENGTHS } from "../../tools/render-utils";
3
3
  import { theme } from "../theme/theme";
4
4
  import { DynamicBorder } from "./dynamic-border";