@wahack/pi-coding-agent 15.11.2 → 15.11.4

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 (173) hide show
  1. package/package.json +1 -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-commands/loader.ts +1 -1
  33. package/src/extensibility/custom-tools/loader.ts +2 -2
  34. package/src/extensibility/custom-tools/types.ts +1 -1
  35. package/src/extensibility/extensions/loader.ts +2 -2
  36. package/src/extensibility/extensions/runner.ts +1 -1
  37. package/src/extensibility/extensions/types.ts +2 -2
  38. package/src/extensibility/hooks/loader.ts +1 -1
  39. package/src/extensibility/hooks/types.ts +1 -1
  40. package/src/extensibility/plugins/legacy-pi-compat.ts +1 -1
  41. package/src/extensibility/slash-commands.ts +1 -1
  42. package/src/goals/tools/goal-tool.ts +2 -2
  43. package/src/lsp/render.ts +2 -2
  44. package/src/mcp/render.ts +2 -2
  45. package/src/modes/components/agent-dashboard.ts +2 -4
  46. package/src/modes/components/agent-hub.ts +1 -1
  47. package/src/modes/components/assistant-message.ts +1 -1
  48. package/src/modes/components/bash-execution.ts +2 -4
  49. package/src/modes/components/bordered-loader.ts +1 -1
  50. package/src/modes/components/branch-summary-message.ts +1 -1
  51. package/src/modes/components/btw-panel.ts +1 -1
  52. package/src/modes/components/chat-block.ts +1 -1
  53. package/src/modes/components/compaction-summary-message.ts +1 -1
  54. package/src/modes/components/copy-selector.ts +1 -1
  55. package/src/modes/components/countdown-timer.ts +1 -1
  56. package/src/modes/components/custom-editor.ts +1 -1
  57. package/src/modes/components/custom-message.ts +2 -2
  58. package/src/modes/components/dynamic-border.ts +1 -1
  59. package/src/modes/components/error-banner.ts +1 -1
  60. package/src/modes/components/eval-execution.ts +1 -1
  61. package/src/modes/components/execution-shared.ts +1 -1
  62. package/src/modes/components/extensions/extension-dashboard.ts +2 -4
  63. package/src/modes/components/extensions/extension-list.ts +2 -4
  64. package/src/modes/components/extensions/inspector-panel.ts +1 -1
  65. package/src/modes/components/extensions/state-manager.ts +1 -1
  66. package/src/modes/components/footer.ts +1 -1
  67. package/src/modes/components/history-search.ts +2 -4
  68. package/src/modes/components/hook-editor.ts +1 -1
  69. package/src/modes/components/hook-input.ts +1 -1
  70. package/src/modes/components/hook-message.ts +2 -2
  71. package/src/modes/components/hook-selector.ts +2 -4
  72. package/src/modes/components/keybinding-hints.ts +1 -1
  73. package/src/modes/components/late-diagnostics-message.ts +1 -1
  74. package/src/modes/components/login-dialog.ts +1 -1
  75. package/src/modes/components/mcp-add-wizard.ts +2 -4
  76. package/src/modes/components/message-frame.ts +2 -2
  77. package/src/modes/components/model-selector.ts +2 -4
  78. package/src/modes/components/oauth-selector.ts +2 -4
  79. package/src/modes/components/omfg-panel.ts +1 -1
  80. package/src/modes/components/overlay-box.ts +1 -1
  81. package/src/modes/components/plan-review-overlay.ts +2 -4
  82. package/src/modes/components/plugin-selector.ts +1 -1
  83. package/src/modes/components/plugin-settings.ts +2 -4
  84. package/src/modes/components/queue-mode-selector.ts +1 -1
  85. package/src/modes/components/read-tool-group.ts +2 -2
  86. package/src/modes/components/session-selector.ts +2 -4
  87. package/src/modes/components/settings-defs.ts +1 -1
  88. package/src/modes/components/settings-selector.ts +2 -4
  89. package/src/modes/components/show-images-selector.ts +1 -1
  90. package/src/modes/components/skill-message.ts +2 -2
  91. package/src/modes/components/status-line/component.ts +1 -1
  92. package/src/modes/components/status-line/segments.ts +1 -1
  93. package/src/modes/components/theme-selector.ts +1 -1
  94. package/src/modes/components/thinking-selector.ts +1 -1
  95. package/src/modes/components/tiny-title-download-progress.ts +1 -1
  96. package/src/modes/components/todo-reminder.ts +1 -1
  97. package/src/modes/components/tool-execution.ts +2 -4
  98. package/src/modes/components/transcript-container.ts +1 -1
  99. package/src/modes/components/tree-selector.ts +2 -4
  100. package/src/modes/components/ttsr-notification.ts +1 -1
  101. package/src/modes/components/user-message-selector.ts +2 -4
  102. package/src/modes/components/user-message.ts +1 -1
  103. package/src/modes/components/visual-truncate.ts +1 -1
  104. package/src/modes/components/welcome.ts +2 -4
  105. package/src/modes/controllers/command-controller-shared.ts +1 -1
  106. package/src/modes/controllers/command-controller.ts +1 -1
  107. package/src/modes/controllers/event-controller.ts +1 -1
  108. package/src/modes/controllers/extension-ui-controller.ts +2 -2
  109. package/src/modes/controllers/input-controller.ts +1 -1
  110. package/src/modes/controllers/mcp-command-controller.ts +1 -1
  111. package/src/modes/controllers/selector-controller.ts +2 -2
  112. package/src/modes/controllers/streaming-reveal.ts +1 -1
  113. package/src/modes/emoji-autocomplete.ts +1 -1
  114. package/src/modes/interactive-mode.ts +3 -5
  115. package/src/modes/internal-url-autocomplete.ts +1 -1
  116. package/src/modes/prompt-action-autocomplete.ts +2 -4
  117. package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
  118. package/src/modes/setup-wizard/scenes/outro.ts +1 -1
  119. package/src/modes/setup-wizard/scenes/providers.ts +1 -1
  120. package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
  121. package/src/modes/setup-wizard/scenes/splash.ts +1 -1
  122. package/src/modes/setup-wizard/scenes/theme.ts +1 -1
  123. package/src/modes/setup-wizard/scenes/types.ts +1 -1
  124. package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
  125. package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
  126. package/src/modes/shared.ts +1 -1
  127. package/src/modes/theme/theme.ts +3 -5
  128. package/src/modes/types.ts +1 -1
  129. package/src/modes/utils/context-usage.ts +1 -1
  130. package/src/modes/utils/keybinding-matchers.ts +1 -1
  131. package/src/modes/utils/ui-helpers.ts +1 -1
  132. package/src/session/agent-session.ts +1 -1
  133. package/src/session/session-manager.ts +1 -1
  134. package/src/task/render.ts +2 -2
  135. package/src/task/subprocess-tool-registry.ts +1 -1
  136. package/src/task/worktree.ts +1 -1
  137. package/src/tools/ask.ts +1 -1
  138. package/src/tools/ast-edit.ts +3 -3
  139. package/src/tools/ast-grep.ts +3 -3
  140. package/src/tools/bash-command-fixup.ts +1 -1
  141. package/src/tools/bash-interactive.ts +3 -5
  142. package/src/tools/bash.ts +2 -2
  143. package/src/tools/browser/attach.ts +1 -1
  144. package/src/tools/browser/render.ts +2 -2
  145. package/src/tools/debug.ts +1 -1
  146. package/src/tools/eval-render.ts +2 -2
  147. package/src/tools/fetch.ts +2 -2
  148. package/src/tools/find.ts +3 -3
  149. package/src/tools/fs-cache-invalidation.ts +1 -1
  150. package/src/tools/gh-renderer.ts +1 -1
  151. package/src/tools/inspect-image-renderer.ts +2 -2
  152. package/src/tools/irc.ts +1 -1
  153. package/src/tools/job.ts +2 -2
  154. package/src/tools/memory-render.ts +2 -2
  155. package/src/tools/read.ts +3 -3
  156. package/src/tools/render-utils.ts +5 -5
  157. package/src/tools/renderers.ts +1 -1
  158. package/src/tools/resolve.ts +2 -2
  159. package/src/tools/review.ts +2 -2
  160. package/src/tools/search-tool-bm25.ts +2 -2
  161. package/src/tools/search.ts +3 -3
  162. package/src/tools/ssh.ts +1 -1
  163. package/src/tools/todo.ts +2 -2
  164. package/src/tools/write.ts +1 -1
  165. package/src/tui/code-cell.ts +1 -1
  166. package/src/tui/hyperlink.ts +1 -1
  167. package/src/tui/output-block.ts +2 -2
  168. package/src/tui/tree-list.ts +1 -1
  169. package/src/tui/utils.ts +2 -2
  170. package/src/utils/block-context.ts +1 -1
  171. package/src/utils/clipboard.ts +2 -2
  172. package/src/web/search/render.ts +2 -2
  173. package/src/workspace-tree.ts +1 -1
@@ -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";
@@ -2,8 +2,8 @@ import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
2
  import { PASTE_CODE_LOGIN_PROVIDERS } from "@oh-my-pi/pi-ai";
3
3
  import { getOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
4
4
  import type { OAuthProvider } from "@oh-my-pi/pi-ai/oauth/types";
5
- import type { Component, OverlayHandle } from './stubs/tui/index.ts';
6
- import { Input, Loader, Spacer, Text } from './stubs/tui/index.ts';
5
+ import type { Component, OverlayHandle } from '../../stubs/tui/index.ts'
6
+ import { Input, Loader, Spacer, Text } from '../../stubs/tui/index.ts'
7
7
  import { getAgentDbPath, getProjectDir, normalizePathForComparison } from "@oh-my-pi/pi-utils";
8
8
  import { formatModelSelectorValue } from "../../config/model-resolver";
9
9
  import { getRoleInfo } from "../../config/model-roles";
@@ -1,5 +1,5 @@
1
1
  import type { AssistantMessage } from "@oh-my-pi/pi-ai";
2
- import { getSegmenter } from './stubs/tui/index.ts';
2
+ import { getSegmenter } from '../../stubs/tui/index.ts'
3
3
  import type { AssistantMessageComponent } from "../components/assistant-message";
4
4
 
5
5
  export const STREAMING_REVEAL_FRAME_MS = 1000 / 30;
@@ -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 buckets from "./data/emojis.json" with { type: "json" };
3
3
 
4
4
  // Bucket layout: `{ "<first-char>": [["<name>", "<emoji>"], ...] }`, with each
@@ -14,9 +14,8 @@ import {
14
14
  import type { CompactionOutcome } from "@oh-my-pi/pi-agent-core/compaction";
15
15
  import type { AssistantMessage, ImageContent, Message, Model, UsageReport } from "@oh-my-pi/pi-ai";
16
16
  import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
17
- import type { Component, EditorTheme, LoaderMessageColorFn, OverlayHandle, SlashCommand } from './stubs/tui/index.ts';
18
- import {
19
- Container,
17
+ import type { Component, EditorTheme, LoaderMessageColorFn, OverlayHandle, SlashCommand } from '../../stubs/tui/index.ts'
18
+ import { Container,
20
19
  clearRenderCache,
21
20
  Loader,
22
21
  Markdown,
@@ -26,8 +25,7 @@ import {
26
25
  TERMINAL,
27
26
  Text,
28
27
  TUI,
29
- visibleWidth,
30
- } from './stubs/tui/index.ts';
28
+ visibleWidth, } from '../../stubs/tui/index.ts'
31
29
  import {
32
30
  APP_NAME,
33
31
  adjustHsv,
@@ -6,7 +6,7 @@
6
6
  * TUI editor (`packages/tui/src/components/editor.ts`); the editor fires the
7
7
  * popup, this module decides whether there are candidates to show.
8
8
  */
9
- import type { AutocompleteItem } from './stubs/tui/index.ts';
9
+ import type { AutocompleteItem } from '../../stubs/tui/index.ts'
10
10
  import { InternalUrlRouter } from "../internal-urls/router";
11
11
 
12
12
  /** Upper bound on candidates surfaced in the dropdown. */
@@ -1,10 +1,8 @@
1
- import {
2
- type AutocompleteItem,
1
+ import { type AutocompleteItem,
3
2
  type AutocompleteProvider,
4
3
  CombinedAutocompleteProvider,
5
4
  getKeybindings,
6
- type SlashCommand,
7
- } from './stubs/tui/index.ts';
5
+ type SlashCommand, } from '../../stubs/tui/index.ts'
8
6
  import { formatKeyHints, type KeybindingsManager } from "../config/keybindings";
9
7
  import { isSettingsInitialized, settings } from "../config/settings";
10
8
  import { applyEmojiCompletion, getEmojiSuggestions, isEmojiPrefix, tryEmojiInlineReplace } from "./emoji-autocomplete";
@@ -1,4 +1,4 @@
1
- import { type SelectItem, SelectList } from './stubs/tui/index.ts';
1
+ import { type SelectItem, SelectList } from '../../stubs/tui/index.ts'
2
2
  import { getSelectListTheme, type SymbolPreset, setSymbolPreset, theme } from "../../theme/theme";
3
3
  import type { SetupScene, SetupSceneController, SetupSceneHost } from "./types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { padding, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import { gradientLogo, PI_LOGO } from "../../components/welcome";
3
3
  import { theme } from "../../theme/theme";
4
4
  import { renderStarfield, SETUP_TICK_MS } from "./splash";
@@ -1,4 +1,4 @@
1
- import { TabBar } from './stubs/tui/index.ts';
1
+ import { TabBar } from '../../stubs/tui/index.ts'
2
2
  import { getTabBarTheme } from "../../shared";
3
3
  import { SignInTab } from "./sign-in";
4
4
  import type { SetupScene, SetupSceneController, SetupSceneHost, SetupTab } from "./types";
@@ -1,7 +1,7 @@
1
1
  import type { AuthStorage } from "@oh-my-pi/pi-ai";
2
2
  import { PASTE_CODE_LOGIN_PROVIDERS } from "@oh-my-pi/pi-ai";
3
3
  import type { OAuthProvider } from "@oh-my-pi/pi-ai/oauth/types";
4
- import { Input, matchesKey, wrapTextWithAnsi } from './stubs/tui/index.ts';
4
+ import { Input, matchesKey, wrapTextWithAnsi } from '../../stubs/tui/index.ts'
5
5
  import { getAgentDbPath } from "@oh-my-pi/pi-utils";
6
6
  import { OAuthSelectorComponent } from "../../components/oauth-selector";
7
7
  import { theme } from "../../theme/theme";
@@ -1,4 +1,4 @@
1
- import { padding, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import { gradientEscape, gradientLogo, PI_LOGO, type ShineConfig } from "../../components/welcome";
3
3
  import { theme } from "../../theme/theme";
4
4
 
@@ -1,4 +1,4 @@
1
- import { padding, type SelectItem, SelectList, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { padding, type SelectItem, SelectList, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import {
3
3
  enableAutoTheme,
4
4
  getAvailableThemes,
@@ -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 type { InteractiveModeContext } from "../../types";
3
3
 
4
4
  export type SetupSceneResult = "done" | "skipped";
@@ -1,4 +1,4 @@
1
- import { type SelectItem, SelectList, truncateToWidth } from './stubs/tui/index.ts';
1
+ import { type SelectItem, SelectList, truncateToWidth } from '../../stubs/tui/index.ts'
2
2
  import { SETTINGS_SCHEMA } from "../../../config/settings-schema";
3
3
  import { getSearchProvider, setPreferredSearchProvider } from "../../../web/search/provider";
4
4
  import { isSearchProviderPreference, type SearchProviderId } from "../../../web/search/types";
@@ -1,4 +1,4 @@
1
- import { type Component, matchesKey, padding, truncateToWidth, visibleWidth } from './stubs/tui/index.ts';
1
+ import { type Component, matchesKey, padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import { APP_NAME } from "@oh-my-pi/pi-utils";
3
3
  import { gradientLogo, PI_LOGO } from "../components/welcome";
4
4
  import { theme } from "../theme/theme";
@@ -1,5 +1,5 @@
1
1
  import { stripVTControlCharacters } from "node:util";
2
- import type { TabBarTheme } from './stubs/tui/index.ts';
2
+ import type { TabBarTheme } from '../../stubs/tui/index.ts'
3
3
  import { theme } from "./theme/theme";
4
4
 
5
5
  // ═══════════════════════════════════════════════════════════════════════════
@@ -2,14 +2,12 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
4
4
  import type { Effort } from "@oh-my-pi/pi-ai";
5
- import {
6
- detectMacOSAppearance,
5
+ import { detectMacOSAppearance,
7
6
  MacAppearanceObserver,
8
7
  type HighlightColors as NativeHighlightColors,
9
8
  highlightCode as nativeHighlightCode,
10
- supportsLanguage as nativeSupportsLanguage,
11
- } from './stubs/natives/index.ts';
12
- import type { EditorTheme, MarkdownTheme, SelectListTheme, SymbolTheme } from './stubs/tui/index.ts';
9
+ supportsLanguage as nativeSupportsLanguage, } from '../../stubs/natives/index.ts'
10
+ import type { EditorTheme, MarkdownTheme, SelectListTheme, SymbolTheme } from '../../stubs/tui/index.ts'
13
11
  import { adjustHsv, colorLuma, getCustomThemesDir, isEnoent, logger, relativeLuminance } from "@oh-my-pi/pi-utils";
14
12
  import chalk from "chalk";
15
13
  import { LRUCache } from "lru-cache/raw";
@@ -1,7 +1,7 @@
1
1
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
2
2
  import type { CompactionOutcome } from "@oh-my-pi/pi-agent-core/compaction";
3
3
  import type { AssistantMessage, ImageContent, Message, UsageReport } from "@oh-my-pi/pi-ai";
4
- import type { Component, Container, EditorTheme, Loader, Spacer, Text, TUI } from './stubs/tui/index.ts';
4
+ import type { Component, Container, EditorTheme, Loader, Spacer, Text, TUI } from '../../stubs/tui/index.ts'
5
5
  import type { KeybindingsManager } from "../config/keybindings";
6
6
  import type { Settings } from "../config/settings";
7
7
  import type {
@@ -1,7 +1,7 @@
1
1
  import type { CompactionSettings } from "@oh-my-pi/pi-agent-core/compaction";
2
2
  import { effectiveReserveTokens, estimateTokens, resolveThresholdTokens } from "@oh-my-pi/pi-agent-core/compaction";
3
3
  import type { Model } from "@oh-my-pi/pi-ai";
4
- import { countTokens } from './stubs/natives/index.ts';
4
+ import { countTokens } from '../../stubs/natives/index.ts'
5
5
  import { formatNumber } from "@oh-my-pi/pi-utils";
6
6
  import type { Skill } from "../../extensibility/skills";
7
7
  import type { AgentSession } from "../../session/agent-session";
@@ -1,4 +1,4 @@
1
- import { getKeybindings, matchesKey } from './stubs/tui/index.ts';
1
+ import { getKeybindings, matchesKey } from '../../stubs/tui/index.ts'
2
2
 
3
3
  /**
4
4
  * Match the coding-agent interrupt key.
@@ -1,6 +1,6 @@
1
1
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
2
2
  import type { AssistantMessage, ImageContent, Message } from "@oh-my-pi/pi-ai";
3
- import { type Component, Spacer, Text, TruncatedText } from './stubs/tui/index.ts';
3
+ import { type Component, Spacer, Text, TruncatedText } from '../../stubs/tui/index.ts'
4
4
  import { settings } from "../../config/settings";
5
5
  import { getFileSnapshotStore } from "../../edit/file-snapshot-store";
6
6
  import { AssistantMessageComponent } from "../../modes/components/assistant-message";
@@ -94,7 +94,7 @@ import {
94
94
  } from "@oh-my-pi/pi-ai";
95
95
  import { getSupportedEfforts } from "@oh-my-pi/pi-catalog/model-thinking";
96
96
  import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
97
- import { countTokens, MacOSPowerAssertion } from './stubs/natives/index.ts';
97
+ import { countTokens, MacOSPowerAssertion } from '../../stubs/natives/index.ts'
98
98
  import {
99
99
  extractRetryHint,
100
100
  getAgentDbPath,
@@ -11,7 +11,7 @@ import type {
11
11
  TextContent,
12
12
  Usage,
13
13
  } from "@oh-my-pi/pi-ai";
14
- import { getTerminalId } from './stubs/tui/index.ts';
14
+ import { getTerminalId } from '../../stubs/tui/index.ts'
15
15
  import {
16
16
  getBlobsDir,
17
17
  getAgentDir as getDefaultAgentDir,
@@ -5,8 +5,8 @@
5
5
  * task execution in the terminal UI.
6
6
  */
7
7
  import path from "node:path";
8
- import type { Component } from './stubs/tui/index.ts';
9
- import { Container, Markdown, Text } from './stubs/tui/index.ts';
8
+ import type { Component } from '../../stubs/tui/index.ts'
9
+ import { Container, Markdown, Text } from '../../stubs/tui/index.ts'
10
10
  import { formatNumber } from "@oh-my-pi/pi-utils";
11
11
  import { settings } from "../config/settings";
12
12
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -6,7 +6,7 @@
6
6
  * - Trigger subprocess termination on completion
7
7
  * - Provide custom rendering for realtime/final display
8
8
  */
9
- import type { Component } from './stubs/tui/index.ts';
9
+ import type { Component } from '../../stubs/tui/index.ts'
10
10
  import type { Theme } from "../modes/theme/theme";
11
11
 
12
12
  /** Event from subprocess tool execution (parsed from JSONL) */
@@ -2,7 +2,7 @@ import type { Dirent } from "node:fs";
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as os from "node:os";
4
4
  import * as path from "node:path";
5
- import * as natives from './stubs/natives/index.ts';
5
+ import * as natives from '../../stubs/natives/index.ts';
6
6
  import { getWorktreeDir, hashPath, logger, Snowflake } from "@oh-my-pi/pi-utils";
7
7
  import * as git from "../utils/git";
8
8
  import { mapWithConcurrencyLimit } from "./parallel";
package/src/tools/ask.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
19
- import { type Component, Markdown, type MarkdownTheme, renderInlineMarkdown, TERMINAL, Text } from './stubs/tui/index.ts';
19
+ import { type Component, Markdown, type MarkdownTheme, renderInlineMarkdown, TERMINAL, Text } from '../../stubs/tui/index.ts'
20
20
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
21
21
  import * as z from "zod/v4";
22
22
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -1,9 +1,9 @@
1
1
  import * as path from "node:path";
2
2
  import { formatHashlineHeader } from "@oh-my-pi/hashline";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import { type AstReplaceChange, type AstReplaceFileChange, astEdit } from './stubs/natives/index.ts';
5
- import type { Component } from './stubs/tui/index.ts';
6
- import { replaceTabs, Text } from './stubs/tui/index.ts';
4
+ import { type AstReplaceChange, type AstReplaceFileChange, astEdit } from '../../stubs/natives/index.ts'
5
+ import type { Component } from '../../stubs/tui/index.ts'
6
+ import { replaceTabs, Text } from '../../stubs/tui/index.ts'
7
7
  import { $envpos, prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import { canonicalSnapshotKey, getFileSnapshotStore } from "../edit/file-snapshot-store";
@@ -1,9 +1,9 @@
1
1
  import * as path from "node:path";
2
2
  import { formatHashlineHeader } from "@oh-my-pi/hashline";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import { type AstFindMatch, astGrep } from './stubs/natives/index.ts';
5
- import type { Component } from './stubs/tui/index.ts';
6
- import { Text } from './stubs/tui/index.ts';
4
+ import { type AstFindMatch, astGrep } from '../../stubs/natives/index.ts'
5
+ import type { Component } from '../../stubs/tui/index.ts'
6
+ import { Text } from '../../stubs/tui/index.ts'
7
7
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import { recordFileSnapshot } from "../edit/file-snapshot-store";
@@ -19,7 +19,7 @@
19
19
  * `pi_shell::fixup`, driven by the real `brush-parser` AST. This module is a
20
20
  * thin sync wrapper plus user-facing notice formatting.
21
21
  */
22
- import { applyBashFixups as nativeApplyBashFixups } from './stubs/natives/index.ts';
22
+ import { applyBashFixups as nativeApplyBashFixups } from '../../stubs/natives/index.ts'
23
23
 
24
24
  export interface BashFixupResult {
25
25
  /** Possibly-rewritten command. */
@@ -1,15 +1,13 @@
1
1
  import type { AgentToolContext } from "@oh-my-pi/pi-agent-core";
2
- import { type PtyRunResult, PtySession } from './stubs/natives/index.ts';
3
- import {
4
- type Component,
2
+ import { type PtyRunResult, PtySession } from '../../stubs/natives/index.ts'
3
+ import { type Component,
5
4
  extractPrintableText,
6
5
  matchesKey,
7
6
  padding,
8
7
  parseKey,
9
8
  parseKittySequence,
10
9
  truncateToWidth,
11
- visibleWidth,
12
- } from './stubs/tui/index.ts';
10
+ visibleWidth, } from '../../stubs/tui/index.ts'
13
11
  import { sanitizeText } from "@oh-my-pi/pi-utils";
14
12
  import type * as XtermModule from "@xterm/headless";
15
13
  import type { Terminal as XtermTerminalType } from "@xterm/headless";
package/src/tools/bash.ts CHANGED
@@ -6,8 +6,8 @@ import type {
6
6
  AgentToolUpdateCallback,
7
7
  ToolApprovalDecision,
8
8
  } from "@oh-my-pi/pi-agent-core";
9
- import type { Component } from './stubs/tui/index.ts';
10
- import { ImageProtocol, TERMINAL } from './stubs/tui/index.ts';
9
+ import type { Component } from '../../stubs/tui/index.ts'
10
+ import { ImageProtocol, TERMINAL } from '../../stubs/tui/index.ts'
11
11
  import { getProjectDir, isEnoent, logger, prompt } from "@oh-my-pi/pi-utils";
12
12
  import * as z from "zod/v4";
13
13
  import { type BashResult, executeBash } from "../exec/bash-executor";
@@ -1,5 +1,5 @@
1
1
  import * as net from "node:net";
2
- import { Process, ProcessStatus } from './stubs/natives/index.ts';
2
+ import { Process, ProcessStatus } from '../../stubs/natives/index.ts'
3
3
  import type { Browser, Page } from "puppeteer-core";
4
4
  import { ToolError, throwIfAborted } from "../tool-errors";
5
5
 
@@ -5,8 +5,8 @@
5
5
  * cell with status icon, optional output, and expand/collapse handling. `open`
6
6
  * and `close` actions render as compact status lines.
7
7
  */
8
- import type { Component } from './stubs/tui/index.ts';
9
- import { Text } from './stubs/tui/index.ts';
8
+ import type { Component } from '../../stubs/tui/index.ts'
9
+ import { Text } from '../../stubs/tui/index.ts'
10
10
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
11
11
  import type { Theme } from "../../modes/theme/theme";
12
12
  import { Hasher, isFramedBlockComponent, markFramedBlockComponent, renderCodeCell, renderStatusLine } from "../../tui";
@@ -7,7 +7,7 @@ import type {
7
7
  RenderResultOptions,
8
8
  ToolApprovalDecision,
9
9
  } from "@oh-my-pi/pi-agent-core";
10
- import { type Component, Text } from './stubs/tui/index.ts';
10
+ import { type Component, Text } from '../../stubs/tui/index.ts'
11
11
  import { isEnoent, prompt } from "@oh-my-pi/pi-utils";
12
12
  import * as z from "zod/v4";
13
13
  import {
@@ -8,8 +8,8 @@
8
8
  * is still initializing, which previously crashed module load with a TDZ
9
9
  * `Cannot access 'evalToolRenderer' before initialization`.
10
10
  */
11
- import type { Component } from './stubs/tui/index.ts';
12
- import { Markdown, Text } from './stubs/tui/index.ts';
11
+ import type { Component } from '../../stubs/tui/index.ts'
12
+ import { Markdown, Text } from '../../stubs/tui/index.ts'
13
13
  import { formatNumber } from "@oh-my-pi/pi-utils";
14
14
  import { settings } from "../config/settings";
15
15
  import type { EvalCellResult, EvalLanguage, EvalStatusEvent, EvalToolDetails } from "../eval/types";
@@ -4,8 +4,8 @@ import * as os from "node:os";
4
4
  import * as path from "node:path";
5
5
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
6
6
  import type { FetchImpl, ImageContent, TextContent } from "@oh-my-pi/pi-ai";
7
- import { htmlToMarkdown } from './stubs/natives/index.ts';
8
- import { type Component, Text } from './stubs/tui/index.ts';
7
+ import { htmlToMarkdown } from '../../stubs/natives/index.ts'
8
+ import { type Component, Text } from '../../stubs/tui/index.ts'
9
9
  import { $which, ptree, truncate } from "@oh-my-pi/pi-utils";
10
10
  import { LRUCache } from "lru-cache/raw";
11
11
  import type { Settings } from "../config/settings";
package/src/tools/find.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import * as natives from './stubs/natives/index.ts';
5
- import type { Component } from './stubs/tui/index.ts';
6
- import { Text } from './stubs/tui/index.ts';
4
+ import * as natives from '../../stubs/natives/index.ts';
5
+ import type { Component } from '../../stubs/tui/index.ts'
6
+ import { Text } from '../../stubs/tui/index.ts'
7
7
  import { formatGroupedPaths, isEnoent, prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -1,4 +1,4 @@
1
- import { invalidateFsScanCache } from './stubs/natives/index.ts';
1
+ import { invalidateFsScanCache } from '../../stubs/natives/index.ts'
2
2
 
3
3
  /**
4
4
  * Invalidate shared filesystem scan caches after a content write/update.
@@ -1,4 +1,4 @@
1
- import { type Component, padding, Text, visibleWidth } from './stubs/tui/index.ts';
1
+ import { type Component, padding, Text, visibleWidth } from '../../stubs/tui/index.ts'
2
2
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
3
3
  import type { Theme, ThemeColor } from "../modes/theme/theme";
4
4
  import { framedBlock, renderStatusLine } from "../tui";
@@ -1,5 +1,5 @@
1
- import type { Component } from './stubs/tui/index.ts';
2
- import { Text } from './stubs/tui/index.ts';
1
+ import type { Component } from '../../stubs/tui/index.ts'
2
+ import { Text } from '../../stubs/tui/index.ts'
3
3
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
4
4
  import type { Theme } from "../modes/theme/theme";
5
5
  import { framedBlock, renderStatusLine } from "../tui";
package/src/tools/irc.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
13
- import { type Component, Text } from './stubs/tui/index.ts';
13
+ import { type Component, Text } from '../../stubs/tui/index.ts'
14
14
  import { formatAge, formatDuration, prompt } from "@oh-my-pi/pi-utils";
15
15
  import * as z from "zod/v4";
16
16
  import type { Settings } from "../config/settings";
package/src/tools/job.ts CHANGED
@@ -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 { prompt } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { AsyncJob, AsyncJobManager } from "../async";
@@ -9,8 +9,8 @@
9
9
  * a status line with a couple of dim bullets reads far cleaner than boxing a
10
10
  * one-line memory note.
11
11
  */
12
- import type { Component } from './stubs/tui/index.ts';
13
- import { Text } from './stubs/tui/index.ts';
12
+ import type { Component } from '../../stubs/tui/index.ts'
13
+ import { Text } from '../../stubs/tui/index.ts'
14
14
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
15
15
  import type { Theme } from "../modes/theme/theme";
16
16
  import { Ellipsis, renderStatusLine, truncateToWidth } from "../tui";
package/src/tools/read.ts CHANGED
@@ -4,9 +4,9 @@ import * as path from "node:path";
4
4
  import { formatHashlineHeader, formatNumberedLine, formatNumberedLines } from "@oh-my-pi/hashline";
5
5
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
6
6
  import type { ImageContent, TextContent } from "@oh-my-pi/pi-ai";
7
- import { glob, type SummaryResult, summarizeCode } from './stubs/natives/index.ts';
8
- import type { Component } from './stubs/tui/index.ts';
9
- import { Text } from './stubs/tui/index.ts';
7
+ import { glob, type SummaryResult, summarizeCode } from '../../stubs/natives/index.ts'
8
+ import type { Component } from '../../stubs/tui/index.ts'
9
+ import { Text } from '../../stubs/tui/index.ts'
10
10
  import { getRemoteDir, logger, prompt, readImageMetadata, untilAborted } from "@oh-my-pi/pi-utils";
11
11
  import * as z from "zod/v4";
12
12
  import {
@@ -8,9 +8,9 @@
8
8
  import * as os from "node:os";
9
9
  import * as path from "node:path";
10
10
  import type { ToolCallContext } from "@oh-my-pi/pi-agent-core";
11
- import type { Ellipsis } from './stubs/natives/index.ts';
12
- import type { Component } from './stubs/tui/index.ts';
13
- import { getKeybindings, replaceTabs, truncateToWidth } from './stubs/tui/index.ts';
11
+ import type { Ellipsis } from '../../stubs/natives/index.ts'
12
+ import type { Component } from '../../stubs/tui/index.ts'
13
+ import { getKeybindings, replaceTabs, truncateToWidth } from '../../stubs/tui/index.ts'
14
14
  import { pluralize } from "@oh-my-pi/pi-utils";
15
15
  import { formatKeyHints, type KeyId } from "../config/keybindings";
16
16
  import { settings } from "../config/settings";
@@ -18,8 +18,8 @@ import type { Theme } from "../modes/theme/theme";
18
18
  import { Hasher } from "../tui/utils";
19
19
  import { formatDimensionNote, type ResizedImage } from "../utils/image-resize";
20
20
 
21
- export { Ellipsis } from './stubs/natives/index.ts';
22
- export { replaceTabs, truncateToWidth, wrapTextWithAnsi } from './stubs/tui/index.ts';
21
+ export { Ellipsis } from '../../stubs/natives/index.ts';
22
+ export { replaceTabs, truncateToWidth, wrapTextWithAnsi } from '../../stubs/tui/index.ts';
23
23
 
24
24
  // =============================================================================
25
25
  // Standardized Display Constants
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * These provide rich visualization for tool calls and results in the TUI.
5
5
  */
6
- import type { Component } from './stubs/tui/index.ts';
6
+ import type { Component } from '../../stubs/tui/index.ts'
7
7
  import { editToolRenderer } from "../edit/renderer";
8
8
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
9
9
  import { goalToolRenderer } from "../goals/tools/goal-tool";
@@ -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 { prompt, untilAborted } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -9,8 +9,8 @@
9
9
 
10
10
  import path from "node:path";
11
11
  import type { AgentTool } from "@oh-my-pi/pi-agent-core";
12
- import type { Component } from './stubs/tui/index.ts';
13
- import { Container, Text } from './stubs/tui/index.ts';
12
+ import type { Component } from '../../stubs/tui/index.ts'
13
+ import { Container, Text } from '../../stubs/tui/index.ts'
14
14
  import { isRecord } from "@oh-my-pi/pi-utils";
15
15
  import * as z from "zod/v4";
16
16
  import type { Theme, ThemeColor } from "../modes/theme/theme";
@@ -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 { 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";