@oh-my-pi/pi-coding-agent 8.0.2 → 8.0.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.
- package/package.json +7 -3
- package/src/cli/args.ts +2 -2
- package/src/cli/config-cli.ts +4 -4
- package/src/cli/file-processor.ts +3 -3
- package/src/cli/list-models.ts +2 -2
- package/src/cli/plugin-cli.ts +7 -3
- package/src/cli/session-picker.ts +2 -2
- package/src/cli/setup-cli.ts +2 -2
- package/src/cli/stats-cli.ts +1 -1
- package/src/cli/update-cli.ts +2 -2
- package/src/config/keybindings.ts +1 -1
- package/src/config/model-registry.ts +1 -1
- package/src/config/model-resolver.ts +1 -1
- package/src/config/prompt-templates.ts +2 -2
- package/src/config/settings-manager.ts +5 -5
- package/src/cursor.ts +1 -1
- package/src/discovery/agents-md.ts +4 -4
- package/src/discovery/builtin.ts +21 -17
- package/src/discovery/claude.ts +12 -12
- package/src/discovery/cline.ts +6 -6
- package/src/discovery/codex.ts +21 -21
- package/src/discovery/cursor.ts +9 -9
- package/src/discovery/gemini.ts +13 -9
- package/src/discovery/github.ts +6 -6
- package/src/discovery/helpers.ts +4 -4
- package/src/discovery/index.ts +16 -16
- package/src/discovery/mcp-json.ts +4 -4
- package/src/discovery/ssh.ts +4 -4
- package/src/discovery/vscode.ts +4 -4
- package/src/discovery/windsurf.ts +6 -6
- package/src/exa/company.ts +1 -1
- package/src/exa/index.ts +2 -2
- package/src/exa/linkedin.ts +1 -1
- package/src/exa/mcp-client.ts +2 -2
- package/src/exa/render.ts +6 -6
- package/src/exa/researcher.ts +1 -1
- package/src/exa/search.ts +1 -1
- package/src/exa/websets.ts +1 -1
- package/src/exec/bash-executor.ts +3 -3
- package/src/export/custom-share.ts +1 -1
- package/src/export/html/index.ts +3 -3
- package/src/export/ttsr.ts +2 -2
- package/src/extensibility/custom-commands/bundled/review/index.ts +4 -4
- package/src/extensibility/custom-commands/loader.ts +3 -3
- package/src/extensibility/custom-commands/types.ts +1 -1
- package/src/extensibility/custom-tools/loader.ts +9 -9
- package/src/extensibility/custom-tools/types.ts +6 -6
- package/src/extensibility/custom-tools/wrapper.ts +1 -1
- package/src/extensibility/extensions/loader.ts +8 -8
- package/src/extensibility/extensions/runner.ts +3 -3
- package/src/extensibility/extensions/types.ts +23 -17
- package/src/extensibility/extensions/wrapper.ts +1 -1
- package/src/extensibility/hooks/index.ts +1 -1
- package/src/extensibility/hooks/loader.ts +7 -7
- package/src/extensibility/hooks/runner.ts +4 -4
- package/src/extensibility/hooks/types.ts +16 -10
- package/src/extensibility/plugins/doctor.ts +1 -1
- package/src/extensibility/plugins/installer.ts +1 -1
- package/src/extensibility/plugins/paths.ts +1 -1
- package/src/extensibility/skills.ts +9 -6
- package/src/extensibility/slash-commands.ts +6 -6
- package/src/index.ts +7 -7
- package/src/internal-urls/rule-protocol.ts +1 -1
- package/src/internal-urls/skill-protocol.ts +1 -1
- package/src/ipy/executor.ts +3 -3
- package/src/ipy/gateway-coordinator.ts +3 -3
- package/src/ipy/kernel.ts +3 -3
- package/src/lsp/client.ts +1 -1
- package/src/lsp/clients/biome-client.ts +1 -1
- package/src/lsp/clients/index.ts +1 -1
- package/src/lsp/clients/lsp-linter-client.ts +4 -4
- package/src/lsp/config.ts +1 -1
- package/src/lsp/index.ts +6 -6
- package/src/lsp/render.ts +7 -2
- package/src/lsp/utils.ts +1 -1
- package/src/main.ts +1 -1
- package/src/mcp/config.ts +3 -3
- package/src/mcp/loader.ts +2 -2
- package/src/mcp/manager.ts +1 -1
- package/src/mcp/tool-bridge.ts +6 -2
- package/src/mcp/tool-cache.ts +1 -1
- package/src/mcp/transports/http.ts +1 -1
- package/src/mcp/transports/stdio.ts +1 -1
- package/src/migrations.ts +2 -2
- package/src/modes/components/armin.ts +1 -1
- package/src/modes/components/assistant-message.ts +1 -1
- package/src/modes/components/bash-execution.ts +3 -3
- package/src/modes/components/bordered-loader.ts +1 -1
- package/src/modes/components/branch-summary-message.ts +2 -2
- package/src/modes/components/compaction-summary-message.ts +2 -2
- package/src/modes/components/custom-message.ts +3 -3
- package/src/modes/components/diff.ts +1 -1
- package/src/modes/components/dynamic-border.ts +1 -1
- package/src/modes/components/extensions/extension-dashboard.ts +3 -3
- package/src/modes/components/extensions/extension-list.ts +2 -2
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/extensions/state-manager.ts +17 -11
- package/src/modes/components/extensions/types.ts +1 -1
- package/src/modes/components/footer.ts +3 -3
- package/src/modes/components/history-search.ts +2 -2
- 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 +3 -3
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/keybinding-hints.ts +2 -2
- package/src/modes/components/login-dialog.ts +1 -1
- package/src/modes/components/model-selector.ts +5 -5
- package/src/modes/components/oauth-selector.ts +2 -2
- package/src/modes/components/plugin-settings.ts +3 -3
- package/src/modes/components/python-execution.ts +3 -3
- 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 +3 -3
- package/src/modes/components/settings-defs.ts +2 -2
- package/src/modes/components/settings-selector.ts +2 -2
- package/src/modes/components/show-images-selector.ts +1 -1
- package/src/modes/components/status-line/segments.ts +2 -2
- package/src/modes/components/status-line/separators.ts +1 -1
- package/src/modes/components/status-line/types.ts +2 -2
- package/src/modes/components/status-line-segment-editor.ts +2 -2
- package/src/modes/components/status-line.ts +3 -3
- package/src/modes/components/theme-selector.ts +1 -1
- package/src/modes/components/thinking-selector.ts +1 -1
- package/src/modes/components/todo-display.ts +2 -2
- package/src/modes/components/todo-reminder.ts +2 -2
- package/src/modes/components/tool-execution.ts +11 -6
- package/src/modes/components/tree-selector.ts +3 -3
- package/src/modes/components/ttsr-notification.ts +2 -2
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +1 -1
- package/src/modes/components/welcome.ts +2 -2
- package/src/modes/controllers/command-controller.ts +15 -15
- package/src/modes/controllers/event-controller.ts +13 -9
- package/src/modes/controllers/extension-ui-controller.ts +17 -11
- package/src/modes/controllers/input-controller.ts +6 -6
- package/src/modes/controllers/selector-controller.ts +22 -16
- package/src/modes/interactive-mode.ts +12 -12
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/rpc/rpc-client.ts +3 -3
- package/src/modes/rpc/rpc-mode.ts +6 -3
- package/src/modes/rpc/rpc-types.ts +3 -3
- package/src/modes/theme/theme.ts +1 -1
- package/src/modes/types.ts +8 -8
- package/src/modes/utils/ui-helpers.ts +14 -14
- package/src/patch/applicator.ts +1 -1
- package/src/patch/diff.ts +1 -1
- package/src/patch/index.ts +8 -8
- package/src/patch/shared.ts +9 -9
- package/src/sdk.ts +19 -16
- package/src/session/agent-session.ts +27 -27
- package/src/session/agent-storage.ts +2 -2
- package/src/session/auth-storage.ts +1 -1
- package/src/session/compaction/branch-summarization.ts +7 -5
- package/src/session/compaction/compaction.ts +16 -6
- package/src/session/compaction/utils.ts +5 -3
- package/src/session/history-storage.ts +1 -1
- package/src/session/messages.ts +2 -2
- package/src/session/session-manager.ts +2 -2
- package/src/session/storage-migration.ts +2 -2
- package/src/session/streaming-output.ts +1 -1
- package/src/ssh/connection-manager.ts +1 -1
- package/src/ssh/ssh-executor.ts +1 -1
- package/src/ssh/sshfs-mount.ts +1 -1
- package/src/system-prompt.ts +14 -8
- package/src/task/agents.ts +8 -8
- package/src/task/commands.ts +5 -5
- package/src/task/discovery.ts +3 -3
- package/src/task/executor.ts +11 -11
- package/src/task/index.ts +4 -4
- package/src/task/render.ts +6 -6
- package/src/task/subprocess-tool-registry.ts +1 -1
- package/src/task/worker-protocol.ts +3 -3
- package/src/task/worker.ts +18 -13
- package/src/tools/ask.ts +4 -4
- package/src/tools/bash-interceptor.ts +4 -1
- package/src/tools/bash.ts +8 -8
- package/src/tools/calculator.ts +4 -4
- package/src/tools/complete.ts +1 -1
- package/src/tools/context.ts +2 -2
- package/src/tools/fetch.ts +11 -11
- package/src/tools/find.ts +7 -7
- package/src/tools/gemini-image.ts +6 -6
- package/src/tools/grep.ts +8 -8
- package/src/tools/index.ts +19 -19
- package/src/tools/list-limit.ts +1 -1
- package/src/tools/ls.ts +4 -4
- package/src/tools/notebook.ts +3 -3
- package/src/tools/output-meta.ts +3 -3
- package/src/tools/output-utils.ts +1 -1
- package/src/tools/python.ts +10 -10
- package/src/tools/read.ts +11 -11
- package/src/tools/render-utils.ts +1 -1
- package/src/tools/renderers.ts +6 -6
- package/src/tools/review.ts +2 -2
- package/src/tools/ssh.ts +12 -12
- package/src/tools/todo-write.ts +5 -5
- package/src/tools/tool-result.ts +3 -3
- package/src/tools/write.ts +11 -11
- package/src/utils/changelog.ts +1 -1
- package/src/utils/file-mentions.ts +9 -4
- package/src/utils/image-convert.ts +1 -1
- package/src/utils/image-resize.ts +1 -1
- package/src/utils/shell.ts +1 -1
- package/src/utils/title-generator.ts +4 -4
- package/src/utils/tools-manager.ts +1 -1
- package/src/web/scrapers/choosealicense.ts +1 -1
- package/src/web/scrapers/twitter.ts +1 -1
- package/src/web/scrapers/types.ts +1 -1
- package/src/web/scrapers/utils.ts +1 -1
- package/src/web/scrapers/youtube.ts +2 -2
- package/src/web/search/auth.ts +8 -4
- package/src/web/search/index.ts +19 -10
- package/src/web/search/providers/anthropic.ts +8 -3
- package/src/web/search/providers/exa.ts +2 -2
- package/src/web/search/providers/perplexity.ts +2 -2
- package/src/web/search/render.ts +5 -5
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Shares the same kernel session as the agent's Python tool.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { getSymbolTheme, highlightCode, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
7
|
+
import type { TruncationMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
|
|
8
|
+
import { formatSize } from "@oh-my-pi/pi-coding-agent/tools/truncate";
|
|
6
9
|
import { Container, Loader, Spacer, Text, type TUI } from "@oh-my-pi/pi-tui";
|
|
7
10
|
import stripAnsi from "strip-ansi";
|
|
8
|
-
import { getSymbolTheme, highlightCode, theme } from "$c/modes/theme/theme";
|
|
9
|
-
import type { TruncationMeta } from "$c/tools/output-meta";
|
|
10
|
-
import { formatSize } from "$c/tools/truncate";
|
|
11
11
|
import { DynamicBorder } from "./dynamic-border";
|
|
12
12
|
import { truncateToVisualLines } from "./visual-truncate";
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { getSelectListTheme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
2
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { getSelectListTheme } from "$c/modes/theme/theme";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
|
+
import { shortenPath } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
|
|
1
3
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
2
4
|
import { Container, Text } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import { theme } from "$c/modes/theme/theme";
|
|
4
|
-
import { shortenPath } from "$c/tools/render-utils";
|
|
5
5
|
import type { ToolExecutionHandle } from "./tool-execution";
|
|
6
6
|
|
|
7
7
|
type ReadRenderArgs = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
|
+
import type { SessionInfo } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
3
|
+
import { fuzzyFilter } from "@oh-my-pi/pi-coding-agent/utils/fuzzy";
|
|
1
4
|
import {
|
|
2
5
|
type Component,
|
|
3
6
|
Container,
|
|
@@ -8,9 +11,6 @@ import {
|
|
|
8
11
|
truncateToWidth,
|
|
9
12
|
visibleWidth,
|
|
10
13
|
} from "@oh-my-pi/pi-tui";
|
|
11
|
-
import { theme } from "$c/modes/theme/theme";
|
|
12
|
-
import type { SessionInfo } from "$c/session/session-manager";
|
|
13
|
-
import { fuzzyFilter } from "$c/utils/fuzzy";
|
|
14
14
|
import { DynamicBorder } from "./dynamic-border";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
12
|
-
import { getCapabilities } from "@oh-my-pi/pi-tui";
|
|
13
12
|
import type {
|
|
14
13
|
ImageProviderOption,
|
|
15
14
|
NotificationMethod,
|
|
@@ -20,7 +19,8 @@ import type {
|
|
|
20
19
|
StatusLineSeparatorStyle,
|
|
21
20
|
SymbolPreset,
|
|
22
21
|
WebSearchProviderOption,
|
|
23
|
-
} from "
|
|
22
|
+
} from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
23
|
+
import { getCapabilities } from "@oh-my-pi/pi-tui";
|
|
24
24
|
import { getPreset } from "./status-line/presets";
|
|
25
25
|
|
|
26
26
|
// Setting value types
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import type { SettingsManager, StatusLineSettings } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
3
|
+
import { getSelectListTheme, getSettingsListTheme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
4
|
import {
|
|
3
5
|
Container,
|
|
4
6
|
matchesKey,
|
|
@@ -12,8 +14,6 @@ import {
|
|
|
12
14
|
type TabBarTheme,
|
|
13
15
|
Text,
|
|
14
16
|
} from "@oh-my-pi/pi-tui";
|
|
15
|
-
import type { SettingsManager, StatusLineSettings } from "$c/config/settings-manager";
|
|
16
|
-
import { getSelectListTheme, getSettingsListTheme, theme } from "$c/modes/theme/theme";
|
|
17
17
|
import { DynamicBorder } from "./dynamic-border";
|
|
18
18
|
import { PluginSettingsComponent } from "./plugin-settings";
|
|
19
19
|
import { getSettingsForTab, type SettingDef } from "./settings-defs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { getSelectListTheme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
2
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { getSelectListTheme } from "$c/modes/theme/theme";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hostname as osHostname } from "node:os";
|
|
2
|
-
import { theme } from "
|
|
3
|
-
import { shortenPath } from "
|
|
2
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
3
|
+
import { shortenPath } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
|
|
4
4
|
import type { RenderedSegment, SegmentContext, StatusLineSegment, StatusLineSegmentId } from "./types";
|
|
5
5
|
|
|
6
6
|
export type { SegmentContext } from "./types";
|
|
@@ -4,8 +4,8 @@ import type {
|
|
|
4
4
|
StatusLineSegmentOptions,
|
|
5
5
|
StatusLineSeparatorStyle,
|
|
6
6
|
StatusLineSettings,
|
|
7
|
-
} from "
|
|
8
|
-
import type { AgentSession } from "
|
|
7
|
+
} from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
8
|
+
import type { AgentSession } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
9
9
|
|
|
10
10
|
// Re-export types from settings-manager (single source of truth)
|
|
11
11
|
export type {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* - Live preview shown in the actual status line above
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import type { StatusLineSegmentId } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
13
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
12
14
|
import { Container, matchesKey } from "@oh-my-pi/pi-tui";
|
|
13
|
-
import type { StatusLineSegmentId } from "$c/config/settings-manager";
|
|
14
|
-
import { theme } from "$c/modes/theme/theme";
|
|
15
15
|
import { ALL_SEGMENT_IDS } from "./status-line/segments";
|
|
16
16
|
|
|
17
17
|
// Segment display names and short descriptions
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AssistantMessage } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import type { StatusLineSegmentOptions, StatusLineSettings } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
3
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
4
|
+
import type { AgentSession } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
2
5
|
import { type Component, truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui";
|
|
3
6
|
import { $ } from "bun";
|
|
4
7
|
import { type FSWatcher, watch } from "fs";
|
|
5
8
|
import { dirname, join } from "path";
|
|
6
|
-
import type { StatusLineSegmentOptions, StatusLineSettings } from "$c/config/settings-manager";
|
|
7
|
-
import { theme } from "$c/modes/theme/theme";
|
|
8
|
-
import type { AgentSession } from "$c/session/agent-session";
|
|
9
9
|
import { getPreset } from "./status-line/presets";
|
|
10
10
|
import { renderSegment, type SegmentContext } from "./status-line/segments";
|
|
11
11
|
import { getSeparator } from "./status-line/separators";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { getAvailableThemes, getSelectListTheme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
2
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { getAvailableThemes, getSelectListTheme } from "$c/modes/theme/theme";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import { getSelectListTheme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
3
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import { getSelectListTheme } from "$c/modes/theme/theme";
|
|
4
4
|
import { DynamicBorder } from "./dynamic-border";
|
|
5
5
|
|
|
6
6
|
const LEVEL_DESCRIPTIONS: Record<ThinkingLevel, string> = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
3
|
+
import type { TodoItem } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
2
4
|
import { Text } from "@oh-my-pi/pi-tui";
|
|
3
5
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
4
|
-
import { theme } from "$c/modes/theme/theme";
|
|
5
|
-
import type { TodoItem } from "$c/modes/types";
|
|
6
6
|
|
|
7
7
|
const TODO_FILE_NAME = "todos.json";
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
|
+
import type { TodoItem } from "@oh-my-pi/pi-coding-agent/tools/todo-write";
|
|
1
3
|
import { Box, Container, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { theme } from "$c/modes/theme/theme";
|
|
3
|
-
import type { TodoItem } from "$c/tools/todo-write";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Component that renders a todo completion reminder notification.
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { AgentTool } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
3
|
+
import {
|
|
4
|
+
computeEditDiff,
|
|
5
|
+
computePatchDiff,
|
|
6
|
+
type EditDiffError,
|
|
7
|
+
type EditDiffResult,
|
|
8
|
+
} from "@oh-my-pi/pi-coding-agent/patch";
|
|
9
|
+
import { BASH_DEFAULT_PREVIEW_LINES } from "@oh-my-pi/pi-coding-agent/tools/bash";
|
|
10
|
+
import { PYTHON_DEFAULT_PREVIEW_LINES } from "@oh-my-pi/pi-coding-agent/tools/python";
|
|
11
|
+
import { toolRenderers } from "@oh-my-pi/pi-coding-agent/tools/renderers";
|
|
12
|
+
import { convertToPng } from "@oh-my-pi/pi-coding-agent/utils/image-convert";
|
|
2
13
|
import {
|
|
3
14
|
Box,
|
|
4
15
|
Container,
|
|
@@ -11,12 +22,6 @@ import {
|
|
|
11
22
|
type TUI,
|
|
12
23
|
} from "@oh-my-pi/pi-tui";
|
|
13
24
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
14
|
-
import { theme } from "$c/modes/theme/theme";
|
|
15
|
-
import { computeEditDiff, computePatchDiff, type EditDiffError, type EditDiffResult } from "$c/patch";
|
|
16
|
-
import { BASH_DEFAULT_PREVIEW_LINES } from "$c/tools/bash";
|
|
17
|
-
import { PYTHON_DEFAULT_PREVIEW_LINES } from "$c/tools/python";
|
|
18
|
-
import { toolRenderers } from "$c/tools/renderers";
|
|
19
|
-
import { convertToPng } from "$c/utils/image-convert";
|
|
20
25
|
import { renderDiff } from "./diff";
|
|
21
26
|
|
|
22
27
|
// Preview line limit for bash when not expanded
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
2
|
+
import type { SessionTreeNode } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
3
|
+
import { shortenPath } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
|
|
1
4
|
import {
|
|
2
5
|
type Component,
|
|
3
6
|
Container,
|
|
@@ -8,9 +11,6 @@ import {
|
|
|
8
11
|
TruncatedText,
|
|
9
12
|
truncateToWidth,
|
|
10
13
|
} from "@oh-my-pi/pi-tui";
|
|
11
|
-
import { theme } from "$c/modes/theme/theme";
|
|
12
|
-
import type { SessionTreeNode } from "$c/session/session-manager";
|
|
13
|
-
import { shortenPath } from "$c/tools/render-utils";
|
|
14
14
|
import { DynamicBorder } from "./dynamic-border";
|
|
15
15
|
|
|
16
16
|
/** Gutter info: position (displayIndent where connector was) and whether to show │ */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Rule } from "@oh-my-pi/pi-coding-agent/capability/rule";
|
|
2
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
3
|
import { Box, Container, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import type { Rule } from "$c/capability/rule";
|
|
3
|
-
import { theme } from "$c/modes/theme/theme";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Component that renders a TTSR (Time Traveling Stream Rules) notification.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
2
|
import { type Component, Container, matchesKey, Spacer, Text, truncateToWidth } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { theme } from "$c/modes/theme/theme";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border";
|
|
4
4
|
|
|
5
5
|
interface UserMessageItem {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { APP_NAME } from "@oh-my-pi/pi-coding-agent/config";
|
|
2
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
1
3
|
import { type Component, truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { APP_NAME } from "$c/config";
|
|
3
|
-
import { theme } from "$c/modes/theme/theme";
|
|
4
4
|
|
|
5
5
|
export interface RecentSession {
|
|
6
6
|
name: string;
|
|
@@ -2,24 +2,24 @@ import { mkdir, rm } from "node:fs/promises";
|
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import type { UsageLimit, UsageReport } from "@oh-my-pi/pi-ai";
|
|
5
|
+
import { getDebugLogPath } from "@oh-my-pi/pi-coding-agent/config";
|
|
6
|
+
import { loadCustomShare } from "@oh-my-pi/pi-coding-agent/export/custom-share";
|
|
7
|
+
import type { CompactOptions } from "@oh-my-pi/pi-coding-agent/extensibility/extensions/types";
|
|
8
|
+
import { getGatewayStatus } from "@oh-my-pi/pi-coding-agent/ipy/gateway-coordinator";
|
|
9
|
+
import { ArminComponent } from "@oh-my-pi/pi-coding-agent/modes/components/armin";
|
|
10
|
+
import { BashExecutionComponent } from "@oh-my-pi/pi-coding-agent/modes/components/bash-execution";
|
|
11
|
+
import { BorderedLoader } from "@oh-my-pi/pi-coding-agent/modes/components/bordered-loader";
|
|
12
|
+
import { DynamicBorder } from "@oh-my-pi/pi-coding-agent/modes/components/dynamic-border";
|
|
13
|
+
import { PythonExecutionComponent } from "@oh-my-pi/pi-coding-agent/modes/components/python-execution";
|
|
14
|
+
import { getMarkdownTheme, getSymbolTheme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
15
|
+
import type { InteractiveModeContext } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
16
|
+
import { createCompactionSummaryMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
|
|
17
|
+
import { outputMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
|
|
18
|
+
import { getChangelogPath, parseChangelog } from "@oh-my-pi/pi-coding-agent/utils/changelog";
|
|
19
|
+
import { copyToClipboard } from "@oh-my-pi/pi-coding-agent/utils/clipboard";
|
|
5
20
|
import { Loader, Markdown, Spacer, Text, visibleWidth } from "@oh-my-pi/pi-tui";
|
|
6
21
|
import { $ } from "bun";
|
|
7
22
|
import { nanoid } from "nanoid";
|
|
8
|
-
import { getDebugLogPath } from "$c/config";
|
|
9
|
-
import { loadCustomShare } from "$c/export/custom-share";
|
|
10
|
-
import type { CompactOptions } from "$c/extensibility/extensions/types";
|
|
11
|
-
import { getGatewayStatus } from "$c/ipy/gateway-coordinator";
|
|
12
|
-
import { ArminComponent } from "$c/modes/components/armin";
|
|
13
|
-
import { BashExecutionComponent } from "$c/modes/components/bash-execution";
|
|
14
|
-
import { BorderedLoader } from "$c/modes/components/bordered-loader";
|
|
15
|
-
import { DynamicBorder } from "$c/modes/components/dynamic-border";
|
|
16
|
-
import { PythonExecutionComponent } from "$c/modes/components/python-execution";
|
|
17
|
-
import { getMarkdownTheme, getSymbolTheme, theme } from "$c/modes/theme/theme";
|
|
18
|
-
import type { InteractiveModeContext } from "$c/modes/types";
|
|
19
|
-
import { createCompactionSummaryMessage } from "$c/session/messages";
|
|
20
|
-
import { outputMeta } from "$c/tools/output-meta";
|
|
21
|
-
import { getChangelogPath, parseChangelog } from "$c/utils/changelog";
|
|
22
|
-
import { copyToClipboard } from "$c/utils/clipboard";
|
|
23
23
|
|
|
24
24
|
export class CommandController {
|
|
25
25
|
constructor(private readonly ctx: InteractiveModeContext) {}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { AssistantMessageComponent } from "@oh-my-pi/pi-coding-agent/modes/components/assistant-message";
|
|
2
|
+
import { ReadToolGroupComponent } from "@oh-my-pi/pi-coding-agent/modes/components/read-tool-group";
|
|
3
|
+
import { TodoReminderComponent } from "@oh-my-pi/pi-coding-agent/modes/components/todo-reminder";
|
|
4
|
+
import { ToolExecutionComponent } from "@oh-my-pi/pi-coding-agent/modes/components/tool-execution";
|
|
5
|
+
import { TtsrNotificationComponent } from "@oh-my-pi/pi-coding-agent/modes/components/ttsr-notification";
|
|
6
|
+
import { getSymbolTheme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
7
|
+
import type { InteractiveModeContext, TodoItem } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
8
|
+
import type { AgentSessionEvent } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
9
|
+
import {
|
|
10
|
+
detectNotificationProtocol,
|
|
11
|
+
isNotificationSuppressed,
|
|
12
|
+
sendNotification,
|
|
13
|
+
} from "@oh-my-pi/pi-coding-agent/utils/terminal-notify";
|
|
1
14
|
import { Loader, Text } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { AssistantMessageComponent } from "$c/modes/components/assistant-message";
|
|
3
|
-
import { ReadToolGroupComponent } from "$c/modes/components/read-tool-group";
|
|
4
|
-
import { TodoReminderComponent } from "$c/modes/components/todo-reminder";
|
|
5
|
-
import { ToolExecutionComponent } from "$c/modes/components/tool-execution";
|
|
6
|
-
import { TtsrNotificationComponent } from "$c/modes/components/ttsr-notification";
|
|
7
|
-
import { getSymbolTheme, theme } from "$c/modes/theme/theme";
|
|
8
|
-
import type { InteractiveModeContext, TodoItem } from "$c/modes/types";
|
|
9
|
-
import type { AgentSessionEvent } from "$c/session/agent-session";
|
|
10
|
-
import { detectNotificationProtocol, isNotificationSuppressed, sendNotification } from "$c/utils/terminal-notify";
|
|
11
15
|
|
|
12
16
|
export class EventController {
|
|
13
17
|
private lastReadGroup: ReadToolGroupComponent | undefined = undefined;
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import { logger } from "@oh-my-pi/pi-utils";
|
|
4
|
-
import { KeybindingsManager } from "$c/config/keybindings";
|
|
1
|
+
import { KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
|
5
2
|
import type {
|
|
6
3
|
ExtensionActions,
|
|
7
4
|
ExtensionCommandContextActions,
|
|
8
5
|
ExtensionContextActions,
|
|
9
6
|
ExtensionError,
|
|
10
7
|
ExtensionUIContext,
|
|
11
|
-
} from "
|
|
12
|
-
import { HookEditorComponent } from "
|
|
13
|
-
import { HookInputComponent } from "
|
|
14
|
-
import { HookSelectorComponent } from "
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
} from "@oh-my-pi/pi-coding-agent/extensibility/extensions/index";
|
|
9
|
+
import { HookEditorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/hook-editor";
|
|
10
|
+
import { HookInputComponent } from "@oh-my-pi/pi-coding-agent/modes/components/hook-input";
|
|
11
|
+
import { HookSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/hook-selector";
|
|
12
|
+
import {
|
|
13
|
+
getAvailableThemesWithPaths,
|
|
14
|
+
getThemeByName,
|
|
15
|
+
setTheme,
|
|
16
|
+
type Theme,
|
|
17
|
+
theme,
|
|
18
|
+
} from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
19
|
+
import type { InteractiveModeContext } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
20
|
+
import { setTerminalTitle } from "@oh-my-pi/pi-coding-agent/utils/title-generator";
|
|
21
|
+
import type { Component, TUI } from "@oh-my-pi/pi-tui";
|
|
22
|
+
import { Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
23
|
+
import { logger } from "@oh-my-pi/pi-utils";
|
|
18
24
|
|
|
19
25
|
export class ExtensionUiController {
|
|
20
26
|
constructor(private ctx: InteractiveModeContext) {}
|
|
@@ -4,13 +4,13 @@ import { open, rm } from "node:fs/promises";
|
|
|
4
4
|
import * as os from "node:os";
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
7
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
8
|
+
import type { InteractiveModeContext } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
9
|
+
import type { AgentSessionEvent } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
10
|
+
import { readImageFromClipboard } from "@oh-my-pi/pi-coding-agent/utils/clipboard";
|
|
11
|
+
import { resizeImage } from "@oh-my-pi/pi-coding-agent/utils/image-resize";
|
|
12
|
+
import { generateSessionTitle, setTerminalTitle } from "@oh-my-pi/pi-coding-agent/utils/title-generator";
|
|
7
13
|
import { nanoid } from "nanoid";
|
|
8
|
-
import { theme } from "$c/modes/theme/theme";
|
|
9
|
-
import type { InteractiveModeContext } from "$c/modes/types";
|
|
10
|
-
import type { AgentSessionEvent } from "$c/session/agent-session";
|
|
11
|
-
import { readImageFromClipboard } from "$c/utils/clipboard";
|
|
12
|
-
import { resizeImage } from "$c/utils/image-resize";
|
|
13
|
-
import { generateSessionTitle, setTerminalTitle } from "$c/utils/title-generator";
|
|
14
14
|
|
|
15
15
|
interface Expandable {
|
|
16
16
|
setExpanded(expanded: boolean): void;
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { OAuthProvider } from "@oh-my-pi/pi-ai";
|
|
3
|
+
import { getAgentDbPath } from "@oh-my-pi/pi-coding-agent/config";
|
|
4
|
+
import { disableProvider, enableProvider } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
5
|
+
import { AssistantMessageComponent } from "@oh-my-pi/pi-coding-agent/modes/components/assistant-message";
|
|
6
|
+
import { ExtensionDashboard } from "@oh-my-pi/pi-coding-agent/modes/components/extensions";
|
|
7
|
+
import { HistorySearchComponent } from "@oh-my-pi/pi-coding-agent/modes/components/history-search";
|
|
8
|
+
import { ModelSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/model-selector";
|
|
9
|
+
import { OAuthSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/oauth-selector";
|
|
10
|
+
import { SessionSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/session-selector";
|
|
11
|
+
import { SettingsSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/settings-selector";
|
|
12
|
+
import { ToolExecutionComponent } from "@oh-my-pi/pi-coding-agent/modes/components/tool-execution";
|
|
13
|
+
import { TreeSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/tree-selector";
|
|
14
|
+
import { UserMessageSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/user-message-selector";
|
|
15
|
+
import {
|
|
16
|
+
getAvailableThemes,
|
|
17
|
+
getSymbolTheme,
|
|
18
|
+
setSymbolPreset,
|
|
19
|
+
setTheme,
|
|
20
|
+
theme,
|
|
21
|
+
} from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
22
|
+
import type { InteractiveModeContext } from "@oh-my-pi/pi-coding-agent/modes/types";
|
|
23
|
+
import { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
24
|
+
import { setPreferredImageProvider, setPreferredWebSearchProvider } from "@oh-my-pi/pi-coding-agent/tools/index";
|
|
3
25
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
4
26
|
import { Input, Loader, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
5
|
-
import { getAgentDbPath } from "$c/config";
|
|
6
|
-
import { disableProvider, enableProvider } from "$c/discovery";
|
|
7
|
-
import { AssistantMessageComponent } from "$c/modes/components/assistant-message";
|
|
8
|
-
import { ExtensionDashboard } from "$c/modes/components/extensions";
|
|
9
|
-
import { HistorySearchComponent } from "$c/modes/components/history-search";
|
|
10
|
-
import { ModelSelectorComponent } from "$c/modes/components/model-selector";
|
|
11
|
-
import { OAuthSelectorComponent } from "$c/modes/components/oauth-selector";
|
|
12
|
-
import { SessionSelectorComponent } from "$c/modes/components/session-selector";
|
|
13
|
-
import { SettingsSelectorComponent } from "$c/modes/components/settings-selector";
|
|
14
|
-
import { ToolExecutionComponent } from "$c/modes/components/tool-execution";
|
|
15
|
-
import { TreeSelectorComponent } from "$c/modes/components/tree-selector";
|
|
16
|
-
import { UserMessageSelectorComponent } from "$c/modes/components/user-message-selector";
|
|
17
|
-
import { getAvailableThemes, getSymbolTheme, setSymbolPreset, setTheme, theme } from "$c/modes/theme/theme";
|
|
18
|
-
import type { InteractiveModeContext } from "$c/modes/types";
|
|
19
|
-
import { SessionManager } from "$c/session/session-manager";
|
|
20
|
-
import { setPreferredImageProvider, setPreferredWebSearchProvider } from "$c/tools/index";
|
|
21
27
|
|
|
22
28
|
export class SelectorController {
|
|
23
29
|
constructor(private ctx: InteractiveModeContext) {}
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
8
8
|
import type { AssistantMessage, ImageContent, Message, UsageReport } from "@oh-my-pi/pi-ai";
|
|
9
|
+
import { KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
|
10
|
+
import type { SettingsManager } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
11
|
+
import type { ExtensionUIContext } from "@oh-my-pi/pi-coding-agent/extensibility/extensions/index";
|
|
12
|
+
import type { CompactOptions } from "@oh-my-pi/pi-coding-agent/extensibility/extensions/types";
|
|
13
|
+
import { loadSlashCommands } from "@oh-my-pi/pi-coding-agent/extensibility/slash-commands";
|
|
14
|
+
import type { AgentSession, AgentSessionEvent } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
15
|
+
import { HistoryStorage } from "@oh-my-pi/pi-coding-agent/session/history-storage";
|
|
16
|
+
import type { SessionContext, SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
17
|
+
import { getRecentSessions } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
18
|
+
import { setTerminalTitle } from "@oh-my-pi/pi-coding-agent/utils/title-generator";
|
|
9
19
|
import type { Component, Loader, SlashCommand } from "@oh-my-pi/pi-tui";
|
|
10
20
|
import {
|
|
11
21
|
CombinedAutocompleteProvider,
|
|
@@ -18,16 +28,6 @@ import {
|
|
|
18
28
|
} from "@oh-my-pi/pi-tui";
|
|
19
29
|
import { logger, postmortem } from "@oh-my-pi/pi-utils";
|
|
20
30
|
import chalk from "chalk";
|
|
21
|
-
import { KeybindingsManager } from "$c/config/keybindings";
|
|
22
|
-
import type { SettingsManager } from "$c/config/settings-manager";
|
|
23
|
-
import type { ExtensionUIContext } from "$c/extensibility/extensions/index";
|
|
24
|
-
import type { CompactOptions } from "$c/extensibility/extensions/types";
|
|
25
|
-
import { loadSlashCommands } from "$c/extensibility/slash-commands";
|
|
26
|
-
import type { AgentSession, AgentSessionEvent } from "$c/session/agent-session";
|
|
27
|
-
import { HistoryStorage } from "$c/session/history-storage";
|
|
28
|
-
import type { SessionContext, SessionManager } from "$c/session/session-manager";
|
|
29
|
-
import { getRecentSessions } from "$c/session/session-manager";
|
|
30
|
-
import { setTerminalTitle } from "$c/utils/title-generator";
|
|
31
31
|
import type { AssistantMessageComponent } from "./components/assistant-message";
|
|
32
32
|
import type { BashExecutionComponent } from "./components/bash-execution";
|
|
33
33
|
import { CustomEditor } from "./components/custom-editor";
|
|
@@ -124,7 +124,7 @@ export class InteractiveMode implements InteractiveModeContext {
|
|
|
124
124
|
private readonly changelogMarkdown: string | undefined;
|
|
125
125
|
public readonly lspServers: Array<{ name: string; status: "ready" | "error"; fileTypes: string[] }> | undefined =
|
|
126
126
|
undefined;
|
|
127
|
-
public mcpManager?: import("
|
|
127
|
+
public mcpManager?: import("@oh-my-pi/pi-coding-agent/mcp/index").MCPManager;
|
|
128
128
|
private readonly toolUiContextSetter: (uiContext: ExtensionUIContext, hasUI: boolean) => void;
|
|
129
129
|
|
|
130
130
|
private readonly commandController: CommandController;
|
|
@@ -140,7 +140,7 @@ export class InteractiveMode implements InteractiveModeContext {
|
|
|
140
140
|
changelogMarkdown: string | undefined = undefined,
|
|
141
141
|
setToolUIContext: (uiContext: ExtensionUIContext, hasUI: boolean) => void = () => {},
|
|
142
142
|
lspServers: Array<{ name: string; status: "ready" | "error"; fileTypes: string[] }> | undefined = undefined,
|
|
143
|
-
mcpManager?: import("
|
|
143
|
+
mcpManager?: import("@oh-my-pi/pi-coding-agent/mcp/index").MCPManager,
|
|
144
144
|
) {
|
|
145
145
|
this.session = session;
|
|
146
146
|
this.sessionManager = session.sessionManager;
|
package/src/modes/print-mode.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { AssistantMessage, ImageContent } from "@oh-my-pi/pi-ai";
|
|
10
|
-
import type { AgentSession } from "
|
|
10
|
+
import type { AgentSession } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Options for print mode.
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import type { AgentEvent, AgentMessage, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
8
8
|
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
9
|
+
import type { BashResult } from "@oh-my-pi/pi-coding-agent/exec/bash-executor";
|
|
10
|
+
import type { SessionStats } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
11
|
+
import type { CompactionResult } from "@oh-my-pi/pi-coding-agent/session/compaction/index";
|
|
9
12
|
import { createSanitizerStream, createSplitterStream, createTextDecoderStream, ptree } from "@oh-my-pi/pi-utils";
|
|
10
|
-
import type { BashResult } from "$c/exec/bash-executor";
|
|
11
|
-
import type { SessionStats } from "$c/session/agent-session";
|
|
12
|
-
import type { CompactionResult } from "$c/session/compaction/index";
|
|
13
13
|
import type { RpcCommand, RpcResponse, RpcSessionState } from "./rpc-types";
|
|
14
14
|
|
|
15
15
|
/** Distributive Omit that works with union types */
|
|
@@ -11,11 +11,14 @@
|
|
|
11
11
|
* - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
import type {
|
|
15
|
+
ExtensionUIContext,
|
|
16
|
+
ExtensionUIDialogOptions,
|
|
17
|
+
} from "@oh-my-pi/pi-coding-agent/extensibility/extensions/index";
|
|
18
|
+
import { type Theme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
19
|
+
import type { AgentSession } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
14
20
|
import { readLines } from "@oh-my-pi/pi-utils";
|
|
15
21
|
import { nanoid } from "nanoid";
|
|
16
|
-
import type { ExtensionUIContext, ExtensionUIDialogOptions } from "$c/extensibility/extensions/index";
|
|
17
|
-
import { type Theme, theme } from "$c/modes/theme/theme";
|
|
18
|
-
import type { AgentSession } from "$c/session/agent-session";
|
|
19
22
|
import type {
|
|
20
23
|
RpcCommand,
|
|
21
24
|
RpcExtensionUIRequest,
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import type { AgentMessage, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
9
9
|
import type { ImageContent, Model } from "@oh-my-pi/pi-ai";
|
|
10
|
-
import type { BashResult } from "
|
|
11
|
-
import type { SessionStats } from "
|
|
12
|
-
import type { CompactionResult } from "
|
|
10
|
+
import type { BashResult } from "@oh-my-pi/pi-coding-agent/exec/bash-executor";
|
|
11
|
+
import type { SessionStats } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
12
|
+
import type { CompactionResult } from "@oh-my-pi/pi-coding-agent/session/compaction/index";
|
|
13
13
|
|
|
14
14
|
// ============================================================================
|
|
15
15
|
// RPC Commands (stdin)
|
package/src/modes/theme/theme.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
+
import { getCustomThemesDir } from "@oh-my-pi/pi-coding-agent/config";
|
|
3
4
|
import type { EditorTheme, MarkdownTheme, SelectListTheme, SymbolTheme } from "@oh-my-pi/pi-tui";
|
|
4
5
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
5
6
|
import { type Static, Type } from "@sinclair/typebox";
|
|
6
7
|
import { TypeCompiler } from "@sinclair/typebox/compiler";
|
|
7
8
|
import chalk from "chalk";
|
|
8
9
|
import { highlight, supportsLanguage } from "cli-highlight";
|
|
9
|
-
import { getCustomThemesDir } from "$c/config";
|
|
10
10
|
// Embed theme JSON files at build time
|
|
11
11
|
import darkThemeJson from "./dark.json" with { type: "json" };
|
|
12
12
|
import { defaultThemes } from "./defaults";
|
package/src/modes/types.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { AssistantMessage, ImageContent, Message, UsageReport } from "@oh-my-pi/pi-ai";
|
|
3
|
+
import type { KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
|
4
|
+
import type { SettingsManager } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
5
|
+
import type { ExtensionUIContext } from "@oh-my-pi/pi-coding-agent/extensibility/extensions/index";
|
|
6
|
+
import type { CompactOptions } from "@oh-my-pi/pi-coding-agent/extensibility/extensions/types";
|
|
7
|
+
import type { MCPManager } from "@oh-my-pi/pi-coding-agent/mcp/index";
|
|
8
|
+
import type { AgentSession, AgentSessionEvent } from "@oh-my-pi/pi-coding-agent/session/agent-session";
|
|
9
|
+
import type { HistoryStorage } from "@oh-my-pi/pi-coding-agent/session/history-storage";
|
|
10
|
+
import type { SessionContext, SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
3
11
|
import type { Component, Container, Loader, Spacer, Text, TUI } from "@oh-my-pi/pi-tui";
|
|
4
|
-
import type { KeybindingsManager } from "$c/config/keybindings";
|
|
5
|
-
import type { SettingsManager } from "$c/config/settings-manager";
|
|
6
|
-
import type { ExtensionUIContext } from "$c/extensibility/extensions/index";
|
|
7
|
-
import type { CompactOptions } from "$c/extensibility/extensions/types";
|
|
8
|
-
import type { MCPManager } from "$c/mcp/index";
|
|
9
|
-
import type { AgentSession, AgentSessionEvent } from "$c/session/agent-session";
|
|
10
|
-
import type { HistoryStorage } from "$c/session/history-storage";
|
|
11
|
-
import type { SessionContext, SessionManager } from "$c/session/session-manager";
|
|
12
12
|
import type { AssistantMessageComponent } from "./components/assistant-message";
|
|
13
13
|
import type { BashExecutionComponent } from "./components/bash-execution";
|
|
14
14
|
import type { CustomEditor } from "./components/custom-editor";
|