@wahack/pi-coding-agent 15.11.4 → 15.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +28 -5
- package/src/autoresearch/dashboard.ts +1 -1
- package/src/autoresearch/index.ts +1 -1
- package/src/autoresearch/tools/init-experiment.ts +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/autoresearch/tools/run-experiment.ts +1 -1
- package/src/autoresearch/tools/update-notes.ts +1 -1
- package/src/cli/claude-trace-cli.ts +1 -1
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli/gallery-fixtures/shell.ts +1 -1
- package/src/cli/grep-cli.ts +1 -1
- package/src/cli/list-models.ts +1 -1
- package/src/cli/session-picker.ts +1 -1
- package/src/cli/shell-cli.ts +1 -1
- package/src/cli/update-cli.ts +1 -1
- package/src/commands/grep.ts +1 -1
- package/src/commit/agentic/agent.ts +1 -1
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-resolver.ts +1 -1
- package/src/config/resolve-config-value.ts +1 -1
- package/src/debug/index.ts +2 -2
- package/src/debug/log-viewer.ts +1 -1
- package/src/debug/protocol-probe.ts +1 -1
- package/src/debug/raw-sse.ts +1 -1
- package/src/debug/report-bundle.ts +1 -1
- package/src/debug/terminal-info.ts +1 -1
- package/src/discovery/helpers.ts +1 -1
- package/src/edit/hashline/block-resolver.ts +1 -1
- package/src/edit/normalize.ts +1 -1
- package/src/edit/renderer.ts +2 -2
- package/src/exec/bash-executor.ts +1 -1
- package/src/export/ttsr.ts +1 -1
- package/src/extensibility/custom-tools/types.ts +1 -1
- package/src/extensibility/extensions/loader.ts +1 -1
- package/src/extensibility/extensions/runner.ts +1 -1
- package/src/extensibility/extensions/types.ts +1 -1
- package/src/extensibility/hooks/types.ts +1 -1
- package/src/extensibility/slash-commands.ts +1 -1
- package/src/goals/tools/goal-tool.ts +2 -2
- package/src/index.ts +1 -1
- package/src/lite.ts +10 -0
- package/src/lsp/render.ts +2 -2
- package/src/mcp/render.ts +2 -2
- package/src/modes/components/agent-dashboard.ts +1 -1
- package/src/modes/components/agent-hub.ts +1 -1
- package/src/modes/components/assistant-message.ts +1 -1
- package/src/modes/components/bash-execution.ts +1 -1
- package/src/modes/components/bordered-loader.ts +1 -1
- package/src/modes/components/branch-summary-message.ts +1 -1
- package/src/modes/components/btw-panel.ts +1 -1
- package/src/modes/components/chat-block.ts +1 -1
- package/src/modes/components/compaction-summary-message.ts +1 -1
- package/src/modes/components/copy-selector.ts +1 -1
- package/src/modes/components/countdown-timer.ts +1 -1
- package/src/modes/components/custom-editor.ts +1 -1
- package/src/modes/components/custom-message.ts +2 -2
- package/src/modes/components/dynamic-border.ts +1 -1
- package/src/modes/components/error-banner.ts +1 -1
- package/src/modes/components/eval-execution.ts +1 -1
- package/src/modes/components/execution-shared.ts +1 -1
- package/src/modes/components/extensions/extension-dashboard.ts +1 -1
- package/src/modes/components/extensions/extension-list.ts +1 -1
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/extensions/state-manager.ts +1 -1
- package/src/modes/components/footer.ts +1 -1
- package/src/modes/components/history-search.ts +1 -1
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-input.ts +1 -1
- package/src/modes/components/hook-message.ts +2 -2
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/keybinding-hints.ts +1 -1
- package/src/modes/components/late-diagnostics-message.ts +1 -1
- package/src/modes/components/login-dialog.ts +1 -1
- package/src/modes/components/mcp-add-wizard.ts +1 -1
- package/src/modes/components/message-frame.ts +2 -2
- package/src/modes/components/model-selector.ts +1 -1
- package/src/modes/components/oauth-selector.ts +1 -1
- package/src/modes/components/omfg-panel.ts +1 -1
- package/src/modes/components/overlay-box.ts +1 -1
- package/src/modes/components/plan-review-overlay.ts +1 -1
- package/src/modes/components/plugin-selector.ts +1 -1
- package/src/modes/components/plugin-settings.ts +1 -1
- package/src/modes/components/queue-mode-selector.ts +1 -1
- package/src/modes/components/read-tool-group.ts +2 -2
- package/src/modes/components/session-selector.ts +1 -1
- package/src/modes/components/settings-defs.ts +1 -1
- package/src/modes/components/settings-selector.ts +1 -1
- package/src/modes/components/show-images-selector.ts +1 -1
- package/src/modes/components/skill-message.ts +2 -2
- package/src/modes/components/status-line/component.ts +1 -1
- package/src/modes/components/status-line/segments.ts +1 -1
- package/src/modes/components/theme-selector.ts +1 -1
- package/src/modes/components/thinking-selector.ts +1 -1
- package/src/modes/components/tiny-title-download-progress.ts +1 -1
- package/src/modes/components/todo-reminder.ts +1 -1
- package/src/modes/components/tool-execution.ts +1 -1
- package/src/modes/components/transcript-container.ts +1 -1
- package/src/modes/components/tree-selector.ts +1 -1
- package/src/modes/components/ttsr-notification.ts +1 -1
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +1 -1
- package/src/modes/components/visual-truncate.ts +1 -1
- package/src/modes/components/welcome.ts +1 -1
- package/src/modes/controllers/command-controller-shared.ts +1 -1
- package/src/modes/controllers/command-controller.ts +1 -1
- package/src/modes/controllers/event-controller.ts +1 -1
- package/src/modes/controllers/extension-ui-controller.ts +2 -2
- package/src/modes/controllers/input-controller.ts +1 -1
- package/src/modes/controllers/mcp-command-controller.ts +1 -1
- package/src/modes/controllers/selector-controller.ts +2 -2
- package/src/modes/controllers/streaming-reveal.ts +1 -1
- package/src/modes/emoji-autocomplete.ts +1 -1
- package/src/modes/index.ts +1 -1
- package/src/modes/interactive-mode.ts +2 -2
- package/src/modes/internal-url-autocomplete.ts +1 -1
- package/src/modes/prompt-action-autocomplete.ts +1 -1
- package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
- package/src/modes/setup-wizard/scenes/outro.ts +1 -1
- package/src/modes/setup-wizard/scenes/providers.ts +1 -1
- package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
- package/src/modes/setup-wizard/scenes/splash.ts +1 -1
- package/src/modes/setup-wizard/scenes/theme.ts +1 -1
- package/src/modes/setup-wizard/scenes/types.ts +1 -1
- package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
- package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
- package/src/modes/shared.ts +1 -1
- package/src/modes/theme/theme.ts +3 -3
- package/src/modes/types.ts +1 -1
- package/src/modes/utils/context-usage.ts +1 -1
- package/src/modes/utils/keybinding-matchers.ts +1 -1
- package/src/modes/utils/ui-helpers.ts +1 -1
- package/src/sdk.ts +1 -1
- package/src/session/agent-session.ts +1 -1
- package/src/session/session-manager.ts +1 -1
- package/src/task/render.ts +2 -2
- package/src/task/subprocess-tool-registry.ts +1 -1
- package/src/task/worktree.ts +1 -1
- package/src/tools/ask.ts +1 -1
- package/src/tools/ast-edit.ts +3 -3
- package/src/tools/ast-grep.ts +3 -3
- package/src/tools/bash-command-fixup.ts +1 -1
- package/src/tools/bash-interactive.ts +2 -2
- package/src/tools/bash.ts +2 -2
- package/src/tools/browser/attach.ts +1 -1
- package/src/tools/browser/render.ts +2 -2
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval-render.ts +2 -2
- package/src/tools/fetch.ts +2 -2
- package/src/tools/find.ts +3 -3
- package/src/tools/fs-cache-invalidation.ts +1 -1
- package/src/tools/gh-renderer.ts +1 -1
- package/src/tools/inspect-image-renderer.ts +2 -2
- package/src/tools/irc.ts +1 -1
- package/src/tools/job.ts +2 -2
- package/src/tools/memory-render.ts +2 -2
- package/src/tools/read.ts +3 -3
- package/src/tools/render-utils.ts +5 -5
- package/src/tools/renderers.ts +1 -1
- package/src/tools/resolve.ts +2 -2
- package/src/tools/review.ts +2 -2
- package/src/tools/search-tool-bm25.ts +2 -2
- package/src/tools/search.ts +3 -3
- package/src/tools/ssh.ts +1 -1
- package/src/tools/todo.ts +2 -2
- package/src/tools/write.ts +1 -1
- package/src/tui/code-cell.ts +1 -1
- package/src/tui/hyperlink.ts +1 -1
- package/src/tui/output-block.ts +2 -2
- package/src/tui/tree-list.ts +1 -1
- package/src/tui/utils.ts +2 -2
- package/src/utils/block-context.ts +1 -1
- package/src/utils/clipboard.ts +2 -2
- package/src/web/search/render.ts +2 -2
- package/src/workspace-tree.ts +1 -1
- package/stubs/natives/index.ts +50 -2
- package/stubs/tui/index.ts +51 -4
- package/src/stubs/natives/index.ts +0 -814
- package/src/stubs/natives/package.json +0 -7
- package/src/stubs/tui/index.ts +0 -282
- package/src/stubs/tui/package.json +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from '
|
|
1
|
+
import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from '#stubs/tui'
|
|
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 '
|
|
2
|
-
import { Box, Container } from '
|
|
1
|
+
import type { Component } from '#stubs/tui'
|
|
2
|
+
import { Box, Container } from '#stubs/tui'
|
|
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 { Container, Spacer, Text } from '
|
|
1
|
+
import { Container, Spacer, Text } from '#stubs/tui'
|
|
2
2
|
import { getPreviewLines, TRUNCATE_LENGTHS } from "../../tools/render-utils";
|
|
3
3
|
import { theme } from "../theme/theme";
|
|
4
4
|
import { DynamicBorder } from "./dynamic-border";
|
|
@@ -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 '
|
|
6
|
+
import { Container, type Loader, Text, type TUI } from '#stubs/tui'
|
|
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 '
|
|
10
|
+
import { type Component, Container, Loader, Text, type TUI } from '#stubs/tui'
|
|
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";
|
|
@@ -19,7 +19,7 @@ import { type Component,
|
|
|
19
19
|
Text,
|
|
20
20
|
truncateToWidth,
|
|
21
21
|
visibleWidth,
|
|
22
|
-
wrapTextWithAnsi, } from '
|
|
22
|
+
wrapTextWithAnsi, } from '#stubs/tui'
|
|
23
23
|
import { Settings } from "../../../config/settings";
|
|
24
24
|
import { DynamicBorder } from "../../../modes/components/dynamic-border";
|
|
25
25
|
import { theme } from "../../../modes/theme/theme";
|
|
@@ -11,7 +11,7 @@ import { type Component,
|
|
|
11
11
|
padding,
|
|
12
12
|
ScrollView,
|
|
13
13
|
truncateToWidth,
|
|
14
|
-
visibleWidth, } from '
|
|
14
|
+
visibleWidth, } from '#stubs/tui'
|
|
15
15
|
import { isProviderEnabled } from "../../../discovery";
|
|
16
16
|
import { theme } from "../../../modes/theme/theme";
|
|
17
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 '
|
|
7
|
+
import { type Component, truncateToWidth, wrapTextWithAnsi } from '#stubs/tui'
|
|
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 '
|
|
6
|
+
import { fuzzyMatch } from '#stubs/tui'
|
|
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 '
|
|
5
|
+
import { type Component, padding, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
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";
|
|
@@ -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 '
|
|
9
|
+
import { Container, Editor, matchesKey, Spacer, Text, type TUI } from '#stubs/tui'
|
|
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 '
|
|
4
|
+
import { Container, Input, Markdown, matchesKey, Spacer, Text, type TUI } from '#stubs/tui'
|
|
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 '
|
|
2
|
-
import { Box, Container } from '
|
|
1
|
+
import type { Component } from '#stubs/tui'
|
|
2
|
+
import { Box, Container } from '#stubs/tui'
|
|
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";
|
|
@@ -17,7 +17,7 @@ import { Container,
|
|
|
17
17
|
type TUI,
|
|
18
18
|
truncateToWidth,
|
|
19
19
|
visibleWidth,
|
|
20
|
-
wrapTextWithAnsi, } from '
|
|
20
|
+
wrapTextWithAnsi, } from '#stubs/tui'
|
|
21
21
|
import { getMarkdownTheme, type ThemeColor, theme } from "../../modes/theme/theme";
|
|
22
22
|
import {
|
|
23
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 '
|
|
4
|
+
import { getKeybindings, type Keybinding, type KeyId } from '#stubs/tui'
|
|
5
5
|
import type { AppKeybinding, KeybindingsManager } from "../../config/keybindings";
|
|
6
6
|
import { theme } from "../../modes/theme/theme";
|
|
7
7
|
|
|
@@ -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 '
|
|
2
|
+
import { Container, getKeybindings, Input, Spacer, Text, type TUI } from '#stubs/tui'
|
|
3
3
|
import { theme } from "../../modes/theme/theme";
|
|
4
4
|
import { openPath } from "../../utils/open";
|
|
5
5
|
import { DynamicBorder } from "./dynamic-border";
|
|
@@ -10,7 +10,7 @@ import { Container,
|
|
|
10
10
|
Spacer,
|
|
11
11
|
Text,
|
|
12
12
|
TruncatedText,
|
|
13
|
-
truncateToWidth, } from '
|
|
13
|
+
truncateToWidth, } from '#stubs/tui'
|
|
14
14
|
import { getMCPConfigPath, getProjectDir } from "@oh-my-pi/pi-utils";
|
|
15
15
|
import { validateServerName } from "../../mcp/config-writer";
|
|
16
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 '
|
|
13
|
-
import { Markdown, Spacer, Text } from '
|
|
12
|
+
import type { Box, Component } from '#stubs/tui'
|
|
13
|
+
import { Markdown, Spacer, Text } from '#stubs/tui'
|
|
14
14
|
import { getMarkdownTheme, type Theme, theme } from "../../modes/theme/theme";
|
|
15
15
|
|
|
16
16
|
/** Message shape consumed by the shared frame. */
|
|
@@ -13,7 +13,7 @@ import { Container,
|
|
|
13
13
|
TabBar,
|
|
14
14
|
Text,
|
|
15
15
|
type TUI,
|
|
16
|
-
visibleWidth, } from '
|
|
16
|
+
visibleWidth, } from '#stubs/tui'
|
|
17
17
|
import { formatNumber } from "@oh-my-pi/pi-utils";
|
|
18
18
|
import type { ModelRegistry } from "../../config/model-registry";
|
|
19
19
|
import { getModelMatchPreferences, resolveModelRoleValue } from "../../config/model-resolver";
|
|
@@ -6,7 +6,7 @@ import { Container,
|
|
|
6
6
|
matchesKey,
|
|
7
7
|
ScrollView,
|
|
8
8
|
Spacer,
|
|
9
|
-
TruncatedText, } from '
|
|
9
|
+
TruncatedText, } from '#stubs/tui'
|
|
10
10
|
import { theme } from "../../modes/theme/theme";
|
|
11
11
|
import { matchesSelectCancel, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
|
|
12
12
|
import type { AuthStorage, CredentialOriginKind } from "../../session/auth-storage";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, Container, Markdown, Spacer, Text, type TUI } from '
|
|
1
|
+
import { type Component, Container, Markdown, Spacer, Text, type TUI } from '#stubs/tui'
|
|
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 '
|
|
6
|
+
import { padding, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
7
7
|
import { theme } from "../theme/theme";
|
|
8
8
|
|
|
9
9
|
/** Pad or truncate a (possibly ANSI-styled) string to exactly `width` columns. */
|
|
@@ -24,7 +24,7 @@ import { type Component,
|
|
|
24
24
|
matchesKey,
|
|
25
25
|
ScrollView,
|
|
26
26
|
truncateToWidth,
|
|
27
|
-
visibleWidth, } from '
|
|
27
|
+
visibleWidth, } from '#stubs/tui'
|
|
28
28
|
import { getMarkdownTheme, theme } from "../theme/theme";
|
|
29
29
|
import {
|
|
30
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 '
|
|
7
|
+
import { Container, type SelectItem, SelectList } from '#stubs/tui'
|
|
8
8
|
import { getSelectListTheme } from "../theme/theme";
|
|
9
9
|
import { DynamicBorder } from "./dynamic-border";
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ import { Container,
|
|
|
15
15
|
type SettingItem,
|
|
16
16
|
SettingsList,
|
|
17
17
|
Spacer,
|
|
18
|
-
Text, } from '
|
|
18
|
+
Text, } from '#stubs/tui'
|
|
19
19
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
20
20
|
import { clearPluginRootsAndCaches, resolveOrDefaultProjectRegistryPath } from "../../discovery/helpers";
|
|
21
21
|
import { PluginManager } from "../../extensibility/plugins/manager";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
-
import type { Component } from '
|
|
3
|
-
import { Container, Text } from '
|
|
2
|
+
import type { Component } from '#stubs/tui'
|
|
3
|
+
import { Container, Text } from '#stubs/tui'
|
|
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";
|
|
@@ -9,7 +9,7 @@ import { type Component,
|
|
|
9
9
|
Spacer,
|
|
10
10
|
Text,
|
|
11
11
|
truncateToWidth,
|
|
12
|
-
visibleWidth, } from '
|
|
12
|
+
visibleWidth, } from '#stubs/tui'
|
|
13
13
|
import { formatBytes } from "@oh-my-pi/pi-utils";
|
|
14
14
|
import { theme } from "../../modes/theme/theme";
|
|
15
15
|
import { matchesAppInterrupt, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TextContent } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import type { Component } from '
|
|
3
|
-
import { Box, Container, Markdown, Spacer, Text } from '
|
|
2
|
+
import type { Component } from '#stubs/tui'
|
|
3
|
+
import { Box, Container, Markdown, Spacer, Text } from '#stubs/tui'
|
|
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 '
|
|
5
|
+
import { type Component, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
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 '
|
|
4
|
+
import { TERMINAL } from '#stubs/tui'
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import type { Effort } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { Container, type SelectItem, SelectList } from '
|
|
2
|
+
import { Container, type SelectItem, SelectList } from '#stubs/tui'
|
|
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 '
|
|
1
|
+
import { type Component, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
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";
|
|
@@ -10,7 +10,7 @@ import { Box,
|
|
|
10
10
|
Spacer,
|
|
11
11
|
TERMINAL,
|
|
12
12
|
Text,
|
|
13
|
-
type TUI, } from '
|
|
13
|
+
type TUI, } from '#stubs/tui'
|
|
14
14
|
import { getProjectDir, logger, sanitizeText } from "@oh-my-pi/pi-utils";
|
|
15
15
|
import { EDIT_MODE_STRATEGIES, type EditMode, type PerFileDiffPreview } from "../../edit";
|
|
16
16
|
import type { Theme } from "../../modes/theme/theme";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from '
|
|
1
|
+
import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from '#stubs/tui'
|
|
2
2
|
|
|
3
3
|
const kSnapshot = Symbol("transcript.liveDiffSnapshot");
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ import { type Component,
|
|
|
9
9
|
Spacer,
|
|
10
10
|
Text,
|
|
11
11
|
TruncatedText,
|
|
12
|
-
truncateToWidth, } from '
|
|
12
|
+
truncateToWidth, } from '#stubs/tui'
|
|
13
13
|
import type { TreeFilterMode } from "../../config/settings-schema";
|
|
14
14
|
import { theme } from "../../modes/theme/theme";
|
|
15
15
|
import { matchesAppInterrupt, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
|
|
@@ -6,7 +6,7 @@ import { type Component,
|
|
|
6
6
|
ScrollView,
|
|
7
7
|
Spacer,
|
|
8
8
|
Text,
|
|
9
|
-
truncateToWidth, } from '
|
|
9
|
+
truncateToWidth, } from '#stubs/tui'
|
|
10
10
|
import { theme } from "../../modes/theme/theme";
|
|
11
11
|
import { matchesSelectCancel, matchesSelectDown, matchesSelectUp } from "../../modes/utils/keybinding-matchers";
|
|
12
12
|
import { DynamicBorder } from "./dynamic-border";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, Markdown } from '
|
|
1
|
+
import { Container, Markdown } from '#stubs/tui'
|
|
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 '
|
|
5
|
+
import { Text } from '#stubs/tui'
|
|
6
6
|
|
|
7
7
|
export interface VisualTruncateResult {
|
|
8
8
|
/** The visual lines to display */
|
|
@@ -4,7 +4,7 @@ import { type Component,
|
|
|
4
4
|
TERMINAL,
|
|
5
5
|
truncateToWidth,
|
|
6
6
|
visibleWidth,
|
|
7
|
-
wrapTextWithAnsi, } from '
|
|
7
|
+
wrapTextWithAnsi, } from '#stubs/tui'
|
|
8
8
|
import { APP_NAME } from "@oh-my-pi/pi-utils";
|
|
9
9
|
import { theme } from "../../modes/theme/theme";
|
|
10
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 '
|
|
10
|
+
import { Text } from '#stubs/tui'
|
|
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 '
|
|
12
|
+
import { Loader, Markdown, padding, Spacer, Text, visibleWidth } from '#stubs/tui'
|
|
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 '
|
|
4
|
+
import { type Component, Loader, TERMINAL } from '#stubs/tui'
|
|
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 '
|
|
2
|
-
import { Container, Spacer, Text } from '
|
|
1
|
+
import type { Component, OverlayHandle, TUI } from '#stubs/tui'
|
|
2
|
+
import { Container, Spacer, Text } from '#stubs/tui'
|
|
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 '
|
|
3
|
+
import type { AutocompleteProvider, SlashCommand } from '#stubs/tui'
|
|
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 '
|
|
7
|
+
import { type Component, replaceTabs, Spacer, Text } from '#stubs/tui'
|
|
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 '
|
|
6
|
-
import { Input, Loader, Spacer, Text } from '
|
|
5
|
+
import type { Component, OverlayHandle } from '#stubs/tui'
|
|
6
|
+
import { Input, Loader, Spacer, Text } from '#stubs/tui'
|
|
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 '
|
|
2
|
+
import { getSegmenter } from '#stubs/tui'
|
|
3
3
|
import type { AssistantMessageComponent } from "../components/assistant-message";
|
|
4
4
|
|
|
5
5
|
export const STREAMING_REVEAL_FRAME_MS = 1000 / 30;
|
package/src/modes/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ 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 '
|
|
17
|
+
import type { Component, EditorTheme, LoaderMessageColorFn, OverlayHandle, SlashCommand } from '#stubs/tui'
|
|
18
18
|
import { Container,
|
|
19
19
|
clearRenderCache,
|
|
20
20
|
Loader,
|
|
@@ -25,7 +25,7 @@ import { Container,
|
|
|
25
25
|
TERMINAL,
|
|
26
26
|
Text,
|
|
27
27
|
TUI,
|
|
28
|
-
visibleWidth, } from '
|
|
28
|
+
visibleWidth, } from '#stubs/tui'
|
|
29
29
|
import {
|
|
30
30
|
APP_NAME,
|
|
31
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 '
|
|
9
|
+
import type { AutocompleteItem } from '#stubs/tui'
|
|
10
10
|
import { InternalUrlRouter } from "../internal-urls/router";
|
|
11
11
|
|
|
12
12
|
/** Upper bound on candidates surfaced in the dropdown. */
|
|
@@ -2,7 +2,7 @@ import { type AutocompleteItem,
|
|
|
2
2
|
type AutocompleteProvider,
|
|
3
3
|
CombinedAutocompleteProvider,
|
|
4
4
|
getKeybindings,
|
|
5
|
-
type SlashCommand, } from '
|
|
5
|
+
type SlashCommand, } from '#stubs/tui'
|
|
6
6
|
import { formatKeyHints, type KeybindingsManager } from "../config/keybindings";
|
|
7
7
|
import { isSettingsInitialized, settings } from "../config/settings";
|
|
8
8
|
import { applyEmojiCompletion, getEmojiSuggestions, isEmojiPrefix, tryEmojiInlineReplace } from "./emoji-autocomplete";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SelectItem, SelectList } from '
|
|
1
|
+
import { type SelectItem, SelectList } from '#stubs/tui'
|
|
2
2
|
import { getSelectListTheme, type SymbolPreset, setSymbolPreset, theme } from "../../theme/theme";
|
|
3
3
|
import type { SetupScene, SetupSceneController, SetupSceneHost } from "./types";
|
|
4
4
|
|