@oh-my-pi/pi-coding-agent 6.9.69 → 8.0.0
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/CHANGELOG.md +219 -51
- package/README.md +1 -1
- package/docs/hooks.md +2 -2
- package/docs/sdk.md +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/package.json +10 -10
- package/scripts/format-prompts.ts +143 -0
- package/scripts/generate-template.ts +1 -1
- package/src/cli/args.ts +3 -3
- 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 +3 -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/{core → config}/keybindings.ts +1 -1
- package/src/{core → config}/model-registry.ts +8 -1
- package/src/{core → config}/model-resolver.ts +3 -3
- package/src/{core → config}/prompt-templates.ts +2 -2
- package/src/{core → config}/settings-manager.ts +6 -6
- package/src/{core/cursor/exec-bridge.ts → cursor.ts} +4 -4
- package/src/discovery/agents-md.ts +4 -4
- package/src/discovery/builtin.ts +17 -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 +9 -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/{core/tools/exa → exa}/company.ts +2 -3
- package/src/{core/tools/exa → exa}/index.ts +2 -2
- package/src/{core/tools/exa → exa}/linkedin.ts +2 -3
- package/src/{core/tools/exa → exa}/mcp-client.ts +2 -2
- package/src/{core/tools/exa → exa}/render.ts +3 -3
- package/src/{core/tools/exa → exa}/researcher.ts +1 -1
- package/src/{core/tools/exa → exa}/search.ts +2 -10
- package/src/{core/tools/exa → exa}/websets.ts +1 -1
- package/src/{core → exec}/bash-executor.ts +23 -7
- package/src/{core → export}/custom-share.ts +1 -1
- package/src/{core/export-html → export/html}/index.ts +3 -3
- package/src/{core → export}/ttsr.ts +2 -2
- package/src/{core → extensibility}/custom-commands/bundled/review/index.ts +4 -4
- package/src/{core → extensibility}/custom-commands/loader.ts +3 -3
- package/src/{core → extensibility}/custom-commands/types.ts +1 -1
- package/src/{core → extensibility}/custom-tools/loader.ts +9 -9
- package/src/{core → extensibility}/custom-tools/types.ts +6 -6
- package/src/{core → extensibility}/custom-tools/wrapper.ts +1 -1
- package/src/{core → extensibility}/extensions/loader.ts +8 -8
- package/src/{core → extensibility}/extensions/runner.ts +3 -3
- package/src/{core → extensibility}/extensions/types.ts +15 -15
- package/src/{core → extensibility}/extensions/wrapper.ts +1 -1
- package/src/{core → extensibility}/hooks/index.ts +1 -1
- package/src/{core → extensibility}/hooks/loader.ts +7 -7
- package/src/{core → extensibility}/hooks/runner.ts +4 -4
- package/src/{core → extensibility}/hooks/types.ts +9 -9
- package/src/{core → extensibility}/plugins/doctor.ts +1 -1
- package/src/{core → extensibility}/plugins/installer.ts +2 -3
- package/src/{core → extensibility}/plugins/paths.ts +1 -1
- package/src/{core → extensibility}/skills.ts +8 -48
- package/src/{core → extensibility}/slash-commands.ts +6 -6
- package/src/index.ts +127 -128
- package/src/internal-urls/agent-protocol.ts +126 -0
- package/src/internal-urls/artifact-protocol.ts +93 -0
- package/src/internal-urls/index.ts +28 -0
- package/src/internal-urls/json-query.ts +126 -0
- package/src/internal-urls/router.ts +69 -0
- package/src/internal-urls/rule-protocol.ts +56 -0
- package/src/internal-urls/skill-protocol.ts +112 -0
- package/src/internal-urls/types.ts +48 -0
- package/src/{core/python-executor.ts → ipy/executor.ts} +74 -13
- package/src/{core/python-gateway-coordinator.ts → ipy/gateway-coordinator.ts} +40 -270
- package/src/{core/python-kernel.ts → ipy/kernel.ts} +38 -10
- package/src/{core/python-prelude.py → ipy/prelude.py} +201 -8
- package/src/ipy/prelude.ts +3 -0
- package/src/{core/tools/lsp → lsp}/client.ts +7 -6
- package/src/{core/tools/lsp → lsp}/clients/biome-client.ts +1 -1
- package/src/{core/tools/lsp → lsp}/clients/index.ts +1 -1
- package/src/{core/tools/lsp → lsp}/clients/lsp-linter-client.ts +4 -4
- package/src/{core/tools/lsp → lsp}/config.ts +1 -1
- package/src/{core/tools/lsp → lsp}/index.ts +29 -17
- package/src/{core/tools/lsp → lsp}/render.ts +2 -2
- package/src/{core/tools/lsp → lsp}/types.ts +14 -16
- package/src/{core/tools/lsp → lsp}/utils.ts +1 -1
- package/src/main.ts +12 -12
- package/src/{core/mcp → mcp}/config.ts +8 -8
- package/src/{core/mcp → mcp}/loader.ts +5 -6
- package/src/{core/mcp → mcp}/manager.ts +2 -2
- package/src/{core/mcp → mcp}/tool-bridge.ts +35 -6
- package/src/{core/mcp → mcp}/tool-cache.ts +1 -1
- package/src/{core/mcp → mcp}/transports/http.ts +7 -1
- package/src/{core/mcp → mcp}/transports/stdio.ts +1 -1
- package/src/{core/mcp → mcp}/types.ts +1 -1
- package/src/migrations.ts +2 -2
- package/src/modes/{interactive/components → components}/armin.ts +1 -1
- package/src/modes/{interactive/components → components}/assistant-message.ts +1 -1
- package/src/modes/{interactive/components → components}/bash-execution.ts +37 -29
- package/src/modes/{interactive/components → components}/bordered-loader.ts +1 -1
- package/src/modes/{interactive/components → components}/branch-summary-message.ts +2 -2
- package/src/modes/{interactive/components → components}/compaction-summary-message.ts +2 -2
- package/src/modes/{interactive/components → components}/custom-message.ts +3 -3
- package/src/modes/{interactive/components → components}/diff.ts +1 -1
- package/src/modes/{interactive/components → components}/dynamic-border.ts +1 -1
- package/src/modes/{interactive/components → components}/extensions/extension-dashboard.ts +3 -3
- package/src/modes/{interactive/components → components}/extensions/extension-list.ts +2 -2
- package/src/modes/{interactive/components → components}/extensions/inspector-panel.ts +1 -1
- package/src/modes/{interactive/components → components}/extensions/state-manager.ts +11 -17
- package/src/modes/{interactive/components → components}/extensions/types.ts +1 -1
- package/src/modes/{interactive/components → components}/footer.ts +3 -3
- package/src/modes/{interactive/components → components}/history-search.ts +2 -2
- package/src/modes/{interactive/components → components}/hook-editor.ts +1 -1
- package/src/modes/{interactive/components → components}/hook-input.ts +1 -1
- package/src/modes/{interactive/components → components}/hook-message.ts +3 -3
- package/src/modes/{interactive/components → components}/hook-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/keybinding-hints.ts +2 -2
- package/src/modes/{interactive/components → components}/login-dialog.ts +1 -1
- package/src/modes/{interactive/components → components}/model-selector.ts +5 -5
- package/src/modes/{interactive/components → components}/oauth-selector.ts +2 -2
- package/src/modes/{interactive/components → components}/plugin-settings.ts +3 -3
- package/src/modes/{interactive/components → components}/python-execution.ts +35 -24
- package/src/modes/{interactive/components → components}/queue-mode-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/read-tool-group.ts +2 -2
- package/src/modes/{interactive/components → components}/session-selector.ts +3 -3
- package/src/modes/{interactive/components → components}/settings-defs.ts +2 -2
- package/src/modes/{interactive/components → components}/settings-selector.ts +2 -2
- package/src/modes/{interactive/components → components}/show-images-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/status-line/segments.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line/separators.ts +1 -1
- package/src/modes/{interactive/components → components}/status-line/types.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line-segment-editor.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line.ts +3 -3
- package/src/modes/{interactive/components → components}/theme-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/thinking-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/todo-display.ts +3 -4
- package/src/modes/{interactive/components → components}/todo-reminder.ts +2 -2
- package/src/modes/{interactive/components → components}/tool-execution.ts +8 -8
- package/src/modes/{interactive/components → components}/tree-selector.ts +3 -3
- package/src/modes/{interactive/components → components}/ttsr-notification.ts +2 -2
- package/src/modes/{interactive/components → components}/user-message-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/user-message.ts +1 -1
- package/src/modes/{interactive/components → components}/welcome.ts +2 -2
- package/src/modes/{interactive/controllers → controllers}/command-controller.ts +381 -30
- package/src/modes/{interactive/controllers → controllers}/event-controller.ts +9 -9
- package/src/modes/{interactive/controllers → controllers}/extension-ui-controller.ts +8 -8
- package/src/modes/{interactive/controllers → controllers}/input-controller.ts +61 -13
- package/src/modes/{interactive/controllers → controllers}/selector-controller.ts +16 -16
- package/src/modes/index.ts +1 -1
- package/src/modes/{interactive/interactive-mode.ts → interactive-mode.ts} +20 -15
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/rpc/rpc-client.ts +3 -3
- package/src/modes/rpc/rpc-mode.ts +3 -3
- package/src/modes/rpc/rpc-types.ts +3 -3
- package/src/modes/{interactive/theme → theme}/theme.ts +1 -1
- package/src/modes/{interactive/types.ts → types.ts} +10 -10
- package/src/modes/{interactive/utils → utils}/ui-helpers.ts +20 -27
- package/src/{core/tools/patch → patch}/applicator.ts +1 -1
- package/src/{core/tools/patch → patch}/diff.ts +1 -1
- package/src/{core/tools/patch → patch}/index.ts +31 -36
- package/src/{core/tools/patch → patch}/shared.ts +9 -6
- package/src/prompts/agents/explore.md +83 -46
- package/src/prompts/agents/init.md +9 -4
- package/src/prompts/agents/plan.md +8 -7
- package/src/prompts/agents/reviewer.md +36 -18
- package/src/prompts/agents/task.md +4 -4
- package/src/prompts/compaction/branch-summary-preamble.md +0 -1
- package/src/prompts/review-request.md +0 -1
- package/src/prompts/system/custom-system-prompt.md +2 -14
- package/src/prompts/system/file-operations.md +0 -2
- package/src/prompts/system/system-prompt.md +182 -171
- package/src/prompts/system/web-search.md +26 -0
- package/src/prompts/tools/ask.md +31 -24
- package/src/prompts/tools/bash.md +20 -17
- package/src/prompts/tools/calculator.md +9 -5
- package/src/prompts/tools/fetch.md +16 -0
- package/src/prompts/tools/find.md +15 -5
- package/src/prompts/tools/gemini-image.md +21 -6
- package/src/prompts/tools/grep.md +28 -12
- package/src/prompts/tools/lsp.md +35 -14
- package/src/prompts/tools/patch.md +39 -41
- package/src/prompts/tools/python.md +59 -77
- package/src/prompts/tools/read.md +23 -22
- package/src/prompts/tools/replace.md +19 -12
- package/src/prompts/tools/ssh.md +21 -28
- package/src/prompts/tools/task.md +54 -44
- package/src/prompts/tools/todo-write.md +52 -163
- package/src/prompts/tools/web-search.md +16 -9
- package/src/prompts/tools/write.md +13 -2
- package/src/{core/sdk.ts → sdk.ts} +65 -34
- package/src/{core → session}/agent-session.ts +157 -41
- package/src/{core → session}/agent-storage.ts +2 -2
- package/src/session/artifacts.ts +110 -0
- package/src/{core → session}/auth-storage.ts +525 -203
- package/src/{core → session}/compaction/branch-summarization.ts +5 -5
- package/src/{core → session}/compaction/compaction.ts +6 -6
- package/src/{core → session}/compaction/utils.ts +3 -3
- package/src/{core → session}/history-storage.ts +1 -1
- package/src/{core → session}/messages.ts +6 -8
- package/src/{core → session}/session-manager.ts +2 -2
- package/src/{core → session}/storage-migration.ts +2 -2
- package/src/session/streaming-output.ts +177 -0
- package/src/{core/ssh → ssh}/connection-manager.ts +1 -1
- package/src/{core/ssh → ssh}/ssh-executor.ts +19 -4
- package/src/{core/ssh → ssh}/sshfs-mount.ts +1 -1
- package/src/{core/system-prompt.ts → system-prompt.ts} +8 -37
- package/src/{core/tools/task → task}/agents.ts +8 -8
- package/src/{core/tools/task → task}/commands.ts +5 -6
- package/src/{core/tools/task → task}/discovery.ts +3 -3
- package/src/{core/tools/task → task}/executor.ts +34 -44
- package/src/{core/tools/task → task}/index.ts +206 -50
- package/src/{core/tools/task → task}/render.ts +80 -23
- package/src/{core/tools/task → task}/subprocess-tool-registry.ts +1 -1
- package/src/task/template.ts +47 -0
- package/src/{core/tools/task → task}/types.ts +19 -27
- package/src/{core/tools/task → task}/worker-protocol.ts +8 -4
- package/src/{core/tools/task → task}/worker.ts +34 -29
- package/src/task/worktree.ts +166 -0
- package/src/{core/tools → tools}/ask.ts +13 -21
- package/src/{core/tools → tools}/bash-interceptor.ts +1 -1
- package/src/{core/tools → tools}/bash.ts +61 -63
- package/src/{core/tools → tools}/calculator.ts +4 -4
- package/src/{core/tools → tools}/complete.ts +1 -1
- package/src/{core/tools → tools}/context.ts +2 -2
- package/src/{core/tools/web-fetch.ts → tools/fetch.ts} +97 -76
- package/src/{core/tools → tools}/find.ts +96 -107
- package/src/{core/tools → tools}/gemini-image.ts +420 -29
- package/src/{core/tools → tools}/grep.ts +155 -164
- package/src/{core/tools → tools}/index.ts +63 -56
- package/src/tools/list-limit.ts +40 -0
- package/src/{core/tools → tools}/ls.ts +44 -35
- package/src/{core/tools → tools}/notebook.ts +3 -3
- package/src/tools/output-meta.ts +443 -0
- package/src/tools/output-utils.ts +63 -0
- package/src/{core/tools → tools}/python.ts +106 -89
- package/src/tools/read.ts +882 -0
- package/src/{core/tools → tools}/render-utils.ts +1 -1
- package/src/{core/tools → tools}/renderers.ts +8 -10
- package/src/{core/tools → tools}/review.ts +2 -2
- package/src/{core/tools → tools}/ssh.ts +56 -59
- package/src/{core/tools → tools}/todo-write.ts +12 -23
- package/src/tools/tool-errors.ts +95 -0
- package/src/tools/tool-result.ts +92 -0
- package/src/{core/tools → tools}/truncate.ts +2 -2
- package/src/{core/tools → tools}/write.ts +15 -13
- package/src/utils/changelog.ts +1 -1
- package/src/{core → utils}/file-mentions.ts +4 -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/{core → utils}/title-generator.ts +4 -4
- package/src/utils/tools-manager.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/choosealicense.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/twitter.ts +3 -2
- package/src/{core/tools/web-scrapers → web/scrapers}/types.ts +4 -2
- package/src/{core/tools/web-scrapers → web/scrapers}/utils.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/youtube.ts +14 -13
- package/src/{core/tools/web-search → web/search}/auth.ts +4 -4
- package/src/{core/tools/web-search → web/search}/index.ts +22 -71
- package/src/{core/tools/web-search → web/search}/providers/anthropic.ts +7 -10
- package/src/{core/tools/web-search → web/search}/providers/exa.ts +2 -2
- package/src/{core/tools/web-search → web/search}/providers/perplexity.ts +4 -16
- package/src/{core/tools/web-search → web/search}/render.ts +3 -3
- package/scripts/migrate-sessions.sh +0 -93
- package/src/core/index.ts +0 -56
- package/src/core/python-prelude.ts +0 -3
- package/src/core/ssh-executor.ts +0 -5
- package/src/core/streaming-output.ts +0 -115
- package/src/core/tools/output.ts +0 -519
- package/src/core/tools/read.ts +0 -717
- package/src/core/tools/task/template.ts +0 -37
- package/src/prompts/tools/output.md +0 -47
- package/src/prompts/tools/web-fetch.md +0 -9
- /package/src/{core/tools/exa → exa}/types.ts +0 -0
- /package/src/{core → exec}/exec.ts +0 -0
- /package/src/{core/export-html → export/html}/template.css +0 -0
- /package/src/{core/export-html → export/html}/template.generated.ts +0 -0
- /package/src/{core/export-html → export/html}/template.html +0 -0
- /package/src/{core/export-html → export/html}/template.js +0 -0
- /package/src/{core/export-html → export/html}/template.macro.ts +0 -0
- /package/src/{core/export-html → export/html}/vendor/highlight.min.js +0 -0
- /package/src/{core/export-html → export/html}/vendor/marked.min.js +0 -0
- /package/src/{core → extensibility}/custom-commands/index.ts +0 -0
- /package/src/{core → extensibility}/custom-tools/index.ts +0 -0
- /package/src/{core → extensibility}/extensions/index.ts +0 -0
- /package/src/{core → extensibility}/hooks/tool-wrapper.ts +0 -0
- /package/src/{core → extensibility}/plugins/index.ts +0 -0
- /package/src/{core → extensibility}/plugins/loader.ts +0 -0
- /package/src/{core → extensibility}/plugins/manager.ts +0 -0
- /package/src/{core → extensibility}/plugins/parser.ts +0 -0
- /package/src/{core → extensibility}/plugins/types.ts +0 -0
- /package/src/{core/python-modules.ts → ipy/modules.ts} +0 -0
- /package/src/{core/tools/lsp → lsp}/defaults.json +0 -0
- /package/src/{core/tools/lsp → lsp}/edits.ts +0 -0
- /package/src/{core/tools/lsp → lsp}/lspmux.ts +0 -0
- /package/src/{core/tools/lsp → lsp}/rust-analyzer.ts +0 -0
- /package/src/{core/mcp → mcp}/client.ts +0 -0
- /package/src/{core/mcp → mcp}/index.ts +0 -0
- /package/src/{core/mcp → mcp}/json-rpc.ts +0 -0
- /package/src/{core/mcp → mcp}/transports/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/countdown-timer.ts +0 -0
- /package/src/modes/{interactive/components → components}/custom-editor.ts +0 -0
- /package/src/modes/{interactive/components → components}/extensions/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/status-line/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/status-line/presets.ts +0 -0
- /package/src/modes/{interactive/components → components}/visual-truncate.ts +0 -0
- /package/src/modes/{interactive/theme → theme}/dark.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/alabaster.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/amethyst.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/anthracite.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/basalt.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/birch.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-abyss.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-arctic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-aurora.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-catppuccin.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cavern.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-copper.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cosmos.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cyberpunk.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-dracula.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-eclipse.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-ember.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-equinox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-forest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-github.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-gruvbox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-lavender.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-lunar.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-midnight.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-monochrome.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-monokai.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-nebula.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-nord.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-ocean.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-one.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-rainforest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-reef.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-retro.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-rose-pine.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-sakura.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-slate.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-solarized.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-solstice.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-starfall.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-sunset.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-swamp.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-synthwave.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-taiga.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-terminal.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-tokyo-night.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-tundra.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-twilight.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-volcanic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/graphite.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/index.ts +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-arctic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-aurora-day.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-canyon.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-catppuccin.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-cirrus.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-coral.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-cyberpunk.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-dawn.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-dunes.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-eucalyptus.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-forest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-frost.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-github.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-glacier.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-gruvbox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-haze.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-honeycomb.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-lagoon.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-lavender.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-meadow.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-mint.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-monochrome.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-ocean.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-one.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-opal.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-orchard.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-paper.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-prism.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-retro.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-sand.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-savanna.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-solarized.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-soleil.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-sunset.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-synthwave.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-tokyo-night.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-wetland.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-zenith.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/limestone.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/mahogany.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/marble.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/obsidian.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/onyx.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/pearl.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/porcelain.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/quartz.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/sandstone.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/titanium.json +0 -0
- /package/src/modes/{interactive/theme → theme}/light.json +0 -0
- /package/src/modes/{interactive/theme → theme}/theme-schema.json +0 -0
- /package/src/{core/tools/patch → patch}/fuzzy.ts +0 -0
- /package/src/{core/tools/patch → patch}/normalize.ts +0 -0
- /package/src/{core/tools/patch → patch}/normative.ts +0 -0
- /package/src/{core/tools/patch → patch}/parser.ts +0 -0
- /package/src/{core/tools/patch → patch}/types.ts +0 -0
- /package/src/{core → session}/compaction/index.ts +0 -0
- /package/src/{core → session}/session-storage.ts +0 -0
- /package/src/{core/tools/task → task}/name-generator.ts +0 -0
- /package/src/{core/tools/task → task}/omp-command.ts +0 -0
- /package/src/{core/tools/task → task}/parallel.ts +0 -0
- /package/src/{core/tools → tools}/jtd-to-json-schema.ts +0 -0
- /package/src/{core/tools → tools}/path-utils.ts +0 -0
- /package/src/{core → utils}/event-bus.ts +0 -0
- /package/src/{core → utils}/frontmatter.ts +0 -0
- /package/src/{core → utils}/terminal-notify.ts +0 -0
- /package/src/{core → utils}/timings.ts +0 -0
- /package/src/{core → utils}/utils.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/artifacthub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/arxiv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/aur.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/biorxiv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/bluesky.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/brew.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/cheatsh.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/chocolatey.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/cisa-kev.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/clojars.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/coingecko.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/crates-io.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/crossref.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/devto.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/discogs.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/discourse.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/dockerhub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/fdroid.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/firefox-addons.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/flathub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/github-gist.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/github.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/gitlab.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/go-pkg.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hackage.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hackernews.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hex.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/huggingface.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/iacr.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/index.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/jetbrains-marketplace.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/lemmy.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/lobsters.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/mastodon.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/maven.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/mdn.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/metacpan.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/musicbrainz.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/npm.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/nuget.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/nvd.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/ollama.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/open-vsx.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/opencorporates.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/openlibrary.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/orcid.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/osv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/packagist.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pub-dev.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pubmed.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pypi.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rawg.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/readthedocs.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/reddit.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/repology.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rfc.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rubygems.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/searchcode.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/sec-edgar.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/semantic-scholar.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/snapcraft.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/sourcegraph.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/spdx.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/spotify.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/stackoverflow.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/terraform.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/tldr.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/vimeo.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/vscode-marketplace.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/w3c.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/wikidata.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/wikipedia.ts +0 -0
- /package/src/{core/tools/web-search → web/search}/types.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TextContent } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
3
3
|
import { Box, Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
4
|
-
import type { HookMessageRenderer } from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import type { HookMessageRenderer } from "$c/extensibility/hooks/types";
|
|
5
|
+
import { getMarkdownTheme, theme } from "$c/modes/theme/theme";
|
|
6
|
+
import type { HookMessage } from "$c/session/messages";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Component that renders a custom message entry from hooks.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Container, matchesKey, Spacer, Text, type TUI } from "@oh-my-pi/pi-tui";
|
|
7
|
-
import { theme } from "
|
|
7
|
+
import { theme } from "$c/modes/theme/theme";
|
|
8
8
|
import { CountdownTimer } from "./countdown-timer";
|
|
9
9
|
import { DynamicBorder } from "./dynamic-border";
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { type EditorAction, getEditorKeybindings, type KeyId } from "@oh-my-pi/pi-tui";
|
|
6
|
-
import type { AppAction, KeybindingsManager } from "
|
|
7
|
-
import { theme } from "
|
|
6
|
+
import type { AppAction, KeybindingsManager } from "$c/config/keybindings";
|
|
7
|
+
import { theme } from "$c/modes/theme/theme";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Format keys array as display string (e.g., ["ctrl+c", "escape"] -> "ctrl+c/escape").
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getOAuthProviders } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { Container, getEditorKeybindings, Input, Spacer, Text, type TUI } from "@oh-my-pi/pi-tui";
|
|
3
3
|
import { $ } from "bun";
|
|
4
|
-
import { theme } from "
|
|
4
|
+
import { theme } from "$c/modes/theme/theme";
|
|
5
5
|
import { DynamicBorder } from "./dynamic-border";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
type TUI,
|
|
12
12
|
visibleWidth,
|
|
13
13
|
} from "@oh-my-pi/pi-tui";
|
|
14
|
-
import type { ModelRegistry } from "
|
|
15
|
-
import { parseModelString } from "
|
|
16
|
-
import type { SettingsManager } from "
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import type { ModelRegistry } from "$c/config/model-registry";
|
|
15
|
+
import { parseModelString } from "$c/config/model-resolver";
|
|
16
|
+
import type { SettingsManager } from "$c/config/settings-manager";
|
|
17
|
+
import { type ThemeColor, theme } from "$c/modes/theme/theme";
|
|
18
|
+
import { fuzzyFilter } from "$c/utils/fuzzy";
|
|
19
19
|
import { DynamicBorder } from "./dynamic-border";
|
|
20
20
|
|
|
21
21
|
function makeInvertedBadge(label: string, color: ThemeColor): string {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getOAuthProviders, type OAuthProviderInfo } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { Container, matchesKey, Spacer, TruncatedText } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import { theme } from "$c/modes/theme/theme";
|
|
4
|
+
import type { AuthStorage } from "$c/session/auth-storage";
|
|
5
5
|
import { DynamicBorder } from "./dynamic-border";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
Spacer,
|
|
19
19
|
Text,
|
|
20
20
|
} from "@oh-my-pi/pi-tui";
|
|
21
|
-
import { PluginManager } from "
|
|
22
|
-
import type { InstalledPlugin, PluginSettingSchema } from "
|
|
23
|
-
import { getSelectListTheme, getSettingsListTheme, theme } from "
|
|
21
|
+
import { PluginManager } from "$c/extensibility/plugins/manager";
|
|
22
|
+
import type { InstalledPlugin, PluginSettingSchema } from "$c/extensibility/plugins/types";
|
|
23
|
+
import { getSelectListTheme, getSettingsListTheme, theme } from "$c/modes/theme/theme";
|
|
24
24
|
import { DynamicBorder } from "./dynamic-border";
|
|
25
25
|
|
|
26
26
|
// =============================================================================
|
|
@@ -5,13 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { Container, Loader, Spacer, Text, type TUI } from "@oh-my-pi/pi-tui";
|
|
7
7
|
import stripAnsi from "strip-ansi";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type TruncationResult,
|
|
12
|
-
truncateTail,
|
|
13
|
-
} from "../../../core/tools/truncate";
|
|
14
|
-
import { getSymbolTheme, highlightCode, theme } from "../theme/theme";
|
|
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";
|
|
15
11
|
import { DynamicBorder } from "./dynamic-border";
|
|
16
12
|
import { truncateToVisualLines } from "./visual-truncate";
|
|
17
13
|
|
|
@@ -23,8 +19,7 @@ export class PythonExecutionComponent extends Container {
|
|
|
23
19
|
private status: "running" | "complete" | "cancelled" | "error" = "running";
|
|
24
20
|
private exitCode: number | undefined = undefined;
|
|
25
21
|
private loader: Loader;
|
|
26
|
-
private
|
|
27
|
-
private fullOutputPath?: string;
|
|
22
|
+
private truncation?: TruncationMeta;
|
|
28
23
|
private expanded = false;
|
|
29
24
|
private contentContainer: Container;
|
|
30
25
|
private excludeFromContext: boolean;
|
|
@@ -77,7 +72,7 @@ export class PythonExecutionComponent extends Container {
|
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
appendOutput(chunk: string): void {
|
|
80
|
-
const clean =
|
|
75
|
+
const clean = this.normalizeOutput(chunk);
|
|
81
76
|
|
|
82
77
|
const newLines = clean.split("\n");
|
|
83
78
|
if (this.outputLines.length > 0 && newLines.length > 0) {
|
|
@@ -93,8 +88,7 @@ export class PythonExecutionComponent extends Container {
|
|
|
93
88
|
setComplete(
|
|
94
89
|
exitCode: number | undefined,
|
|
95
90
|
cancelled: boolean,
|
|
96
|
-
|
|
97
|
-
fullOutputPath?: string,
|
|
91
|
+
options?: { output?: string; truncation?: TruncationMeta },
|
|
98
92
|
): void {
|
|
99
93
|
this.exitCode = exitCode;
|
|
100
94
|
this.status = cancelled
|
|
@@ -102,21 +96,17 @@ export class PythonExecutionComponent extends Container {
|
|
|
102
96
|
: exitCode !== 0 && exitCode !== undefined && exitCode !== null
|
|
103
97
|
? "error"
|
|
104
98
|
: "complete";
|
|
105
|
-
this.
|
|
106
|
-
|
|
99
|
+
this.truncation = options?.truncation;
|
|
100
|
+
if (options?.output !== undefined) {
|
|
101
|
+
this.setOutput(options.output);
|
|
102
|
+
}
|
|
107
103
|
|
|
108
104
|
this.loader.stop();
|
|
109
105
|
this.updateDisplay();
|
|
110
106
|
}
|
|
111
107
|
|
|
112
108
|
private updateDisplay(): void {
|
|
113
|
-
const
|
|
114
|
-
const contextTruncation = truncateTail(fullOutput, {
|
|
115
|
-
maxLines: DEFAULT_MAX_LINES,
|
|
116
|
-
maxBytes: DEFAULT_MAX_BYTES,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const availableLines = contextTruncation.content ? contextTruncation.content.split("\n") : [];
|
|
109
|
+
const availableLines = this.outputLines;
|
|
120
110
|
const previewLogicalLines = availableLines.slice(-PREVIEW_LINES);
|
|
121
111
|
const hiddenLineCount = availableLines.length - previewLogicalLines.length;
|
|
122
112
|
|
|
@@ -159,9 +149,21 @@ export class PythonExecutionComponent extends Container {
|
|
|
159
149
|
statusParts.push(theme.fg("error", `(exit ${this.exitCode})`));
|
|
160
150
|
}
|
|
161
151
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
152
|
+
if (this.truncation) {
|
|
153
|
+
const warnings: string[] = [];
|
|
154
|
+
if (this.truncation.artifactId) {
|
|
155
|
+
warnings.push(`Full output: artifact://${this.truncation.artifactId}`);
|
|
156
|
+
}
|
|
157
|
+
if (this.truncation.truncatedBy === "lines") {
|
|
158
|
+
warnings.push(
|
|
159
|
+
`Truncated: showing ${this.truncation.outputLines} of ${this.truncation.totalLines} lines`,
|
|
160
|
+
);
|
|
161
|
+
} else {
|
|
162
|
+
warnings.push(
|
|
163
|
+
`Truncated: ${this.truncation.outputLines} lines shown (${formatSize(this.truncation.outputBytes)} limit)`,
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
statusParts.push(theme.fg("warning", warnings.join(". ")));
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
if (statusParts.length > 0) {
|
|
@@ -170,6 +172,15 @@ export class PythonExecutionComponent extends Container {
|
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
|
|
175
|
+
private normalizeOutput(text: string): string {
|
|
176
|
+
return stripAnsi(text).replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
private setOutput(output: string): void {
|
|
180
|
+
const clean = this.normalizeOutput(output);
|
|
181
|
+
this.outputLines = clean ? clean.split("\n") : [];
|
|
182
|
+
}
|
|
183
|
+
|
|
173
184
|
getOutput(): string {
|
|
174
185
|
return this.outputLines.join("\n");
|
|
175
186
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
2
2
|
import { Container, Text } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 = {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
truncateToWidth,
|
|
9
9
|
visibleWidth,
|
|
10
10
|
} from "@oh-my-pi/pi-tui";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
/**
|
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
StatusLineSeparatorStyle,
|
|
21
21
|
SymbolPreset,
|
|
22
22
|
WebSearchProviderOption,
|
|
23
|
-
} from "
|
|
23
|
+
} from "$c/config/settings-manager";
|
|
24
24
|
import { getPreset } from "./status-line/presets";
|
|
25
25
|
|
|
26
26
|
// Setting value types
|
|
@@ -307,7 +307,7 @@ export const SETTINGS_DEFS: SettingDef[] = [
|
|
|
307
307
|
tab: "tools",
|
|
308
308
|
type: "boolean",
|
|
309
309
|
label: "Edit patch mode",
|
|
310
|
-
description: "Use codex-style apply-patch format instead of
|
|
310
|
+
description: "Use codex-style apply-patch format instead of old_text/new_text for edits",
|
|
311
311
|
get: (sm) => sm.getEditPatchMode(),
|
|
312
312
|
set: (sm, v) => sm.setEditPatchMode(v),
|
|
313
313
|
},
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
type TabBarTheme,
|
|
13
13
|
Text,
|
|
14
14
|
} from "@oh-my-pi/pi-tui";
|
|
15
|
-
import type { SettingsManager, StatusLineSettings } from "
|
|
16
|
-
import { getSelectListTheme, getSettingsListTheme, theme } from "
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { hostname as osHostname } from "node:os";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { theme } from "$c/modes/theme/theme";
|
|
3
|
+
import { shortenPath } from "$c/tools/render-utils";
|
|
4
4
|
import type { RenderedSegment, SegmentContext, StatusLineSegment, StatusLineSegmentId } from "./types";
|
|
5
5
|
|
|
6
6
|
export type { SegmentContext } from "./types";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AgentSession } from "../../../../core/agent-session";
|
|
2
1
|
import type {
|
|
3
2
|
StatusLinePreset,
|
|
4
3
|
StatusLineSegmentId,
|
|
5
4
|
StatusLineSegmentOptions,
|
|
6
5
|
StatusLineSeparatorStyle,
|
|
7
6
|
StatusLineSettings,
|
|
8
|
-
} from "
|
|
7
|
+
} from "$c/config/settings-manager";
|
|
8
|
+
import type { AgentSession } from "$c/session/agent-session";
|
|
9
9
|
|
|
10
10
|
// Re-export types from settings-manager (single source of truth)
|
|
11
11
|
export type {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { Container, matchesKey } from "@oh-my-pi/pi-tui";
|
|
13
|
-
import type { StatusLineSegmentId } from "
|
|
14
|
-
import { theme } from "
|
|
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
|
|
@@ -3,9 +3,9 @@ import { type Component, truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui"
|
|
|
3
3
|
import { $ } from "bun";
|
|
4
4
|
import { type FSWatcher, watch } from "fs";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
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
1
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { getAvailableThemes, getSelectListTheme } from "
|
|
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
2
|
import { Container, type SelectItem, SelectList } from "@oh-my-pi/pi-tui";
|
|
3
|
-
import { getSelectListTheme } from "
|
|
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
2
|
import { Text } from "@oh-my-pi/pi-tui";
|
|
3
3
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
4
|
-
import { theme } from "
|
|
5
|
-
import type { TodoItem } from "
|
|
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
|
|
|
@@ -80,8 +80,7 @@ export class TodoDisplayComponent {
|
|
|
80
80
|
text = theme.fg("success", `${prefix}${checkbox} ${theme.strikethrough(todo.content)}`);
|
|
81
81
|
} else if (todo.status === "in_progress") {
|
|
82
82
|
checkbox = theme.checkbox.unchecked;
|
|
83
|
-
|
|
84
|
-
text = theme.fg("accent", `${prefix}${checkbox} ${displayText}`);
|
|
83
|
+
text = theme.fg("accent", `${prefix}${checkbox} ${todo.content}`);
|
|
85
84
|
} else {
|
|
86
85
|
checkbox = theme.checkbox.unchecked;
|
|
87
86
|
text = theme.fg("dim", `${prefix}${checkbox} ${todo.content}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box, Container, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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.
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
type TUI,
|
|
12
12
|
} from "@oh-my-pi/pi-tui";
|
|
13
13
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
14
|
-
import {
|
|
15
|
-
import { computeEditDiff, computePatchDiff, type EditDiffError, type EditDiffResult } from "
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
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
20
|
import { renderDiff } from "./diff";
|
|
21
21
|
|
|
22
22
|
// Preview line limit for bash when not expanded
|
|
@@ -223,8 +223,8 @@ export class ToolExecutionComponent extends Container {
|
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
const oldText = this.args?.
|
|
227
|
-
const newText = this.args?.
|
|
226
|
+
const oldText = this.args?.old_text;
|
|
227
|
+
const newText = this.args?.new_text;
|
|
228
228
|
const all = this.args?.all;
|
|
229
229
|
|
|
230
230
|
// Need all three params to compute diff
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
TruncatedText,
|
|
9
9
|
truncateToWidth,
|
|
10
10
|
} from "@oh-my-pi/pi-tui";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
1
|
import { Box, Container, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import type { Rule } from "
|
|
3
|
-
import { theme } from "
|
|
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
1
|
import { type Component, Container, matchesKey, Spacer, Text, truncateToWidth } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { theme } from "
|
|
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
1
|
import { type Component, truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui";
|
|
2
|
-
import { APP_NAME } from "
|
|
3
|
-
import { theme } from "
|
|
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;
|