pi-ui-extend 0.1.1
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/README.md +307 -0
- package/bin/pix.mjs +219 -0
- package/dist/app/app.d.ts +96 -0
- package/dist/app/app.js +871 -0
- package/dist/app/blink-controller.d.ts +23 -0
- package/dist/app/blink-controller.js +82 -0
- package/dist/app/cli.d.ts +8 -0
- package/dist/app/cli.js +83 -0
- package/dist/app/clipboard.d.ts +1 -0
- package/dist/app/clipboard.js +24 -0
- package/dist/app/command-controller.d.ts +18 -0
- package/dist/app/command-controller.js +58 -0
- package/dist/app/command-host.d.ts +44 -0
- package/dist/app/command-host.js +1 -0
- package/dist/app/command-model-actions.d.ts +12 -0
- package/dist/app/command-model-actions.js +176 -0
- package/dist/app/command-navigation-actions.d.ts +19 -0
- package/dist/app/command-navigation-actions.js +267 -0
- package/dist/app/command-registry.d.ts +32 -0
- package/dist/app/command-registry.js +225 -0
- package/dist/app/command-runtime.d.ts +5 -0
- package/dist/app/command-runtime.js +32 -0
- package/dist/app/command-session-actions.d.ts +20 -0
- package/dist/app/command-session-actions.js +295 -0
- package/dist/app/constants.d.ts +52 -0
- package/dist/app/constants.js +103 -0
- package/dist/app/conversation-entry-renderer.d.ts +21 -0
- package/dist/app/conversation-entry-renderer.js +81 -0
- package/dist/app/conversation-shell-renderer.d.ts +5 -0
- package/dist/app/conversation-shell-renderer.js +43 -0
- package/dist/app/conversation-tool-renderer.d.ts +16 -0
- package/dist/app/conversation-tool-renderer.js +216 -0
- package/dist/app/conversation-viewport.d.ts +55 -0
- package/dist/app/conversation-viewport.js +252 -0
- package/dist/app/dcp-stats.d.ts +2 -0
- package/dist/app/dcp-stats.js +116 -0
- package/dist/app/editor-layout-renderer.d.ts +31 -0
- package/dist/app/editor-layout-renderer.js +211 -0
- package/dist/app/editor-panels.d.ts +4 -0
- package/dist/app/editor-panels.js +130 -0
- package/dist/app/extension-actions-controller.d.ts +22 -0
- package/dist/app/extension-actions-controller.js +60 -0
- package/dist/app/extension-event-bus.d.ts +3 -0
- package/dist/app/extension-event-bus.js +23 -0
- package/dist/app/extension-ui-controller.d.ts +57 -0
- package/dist/app/extension-ui-controller.js +532 -0
- package/dist/app/file-link-opener.d.ts +2 -0
- package/dist/app/file-link-opener.js +66 -0
- package/dist/app/file-links.d.ts +10 -0
- package/dist/app/file-links.js +117 -0
- package/dist/app/guards.d.ts +3 -0
- package/dist/app/guards.js +9 -0
- package/dist/app/icons.d.ts +37 -0
- package/dist/app/icons.js +97 -0
- package/dist/app/id.d.ts +1 -0
- package/dist/app/id.js +4 -0
- package/dist/app/image-click-targets.d.ts +5 -0
- package/dist/app/image-click-targets.js +32 -0
- package/dist/app/image-opener.d.ts +2 -0
- package/dist/app/image-opener.js +64 -0
- package/dist/app/input-action-controller.d.ts +47 -0
- package/dist/app/input-action-controller.js +209 -0
- package/dist/app/input-controller.d.ts +60 -0
- package/dist/app/input-controller.js +425 -0
- package/dist/app/input-paste-handler.d.ts +27 -0
- package/dist/app/input-paste-handler.js +146 -0
- package/dist/app/menu-items-controller.d.ts +32 -0
- package/dist/app/menu-items-controller.js +182 -0
- package/dist/app/message-content.d.ts +8 -0
- package/dist/app/message-content.js +115 -0
- package/dist/app/model-ref.d.ts +13 -0
- package/dist/app/model-ref.js +50 -0
- package/dist/app/model-usage-controller.d.ts +35 -0
- package/dist/app/model-usage-controller.js +99 -0
- package/dist/app/model-usage-status.d.ts +125 -0
- package/dist/app/model-usage-status.js +749 -0
- package/dist/app/mouse-controller.d.ts +182 -0
- package/dist/app/mouse-controller.js +968 -0
- package/dist/app/native-modifiers.d.ts +3 -0
- package/dist/app/native-modifiers.js +60 -0
- package/dist/app/nerd-font-controller.d.ts +11 -0
- package/dist/app/nerd-font-controller.js +90 -0
- package/dist/app/popup-action-controller.d.ts +44 -0
- package/dist/app/popup-action-controller.js +278 -0
- package/dist/app/popup-menu-controller.d.ts +183 -0
- package/dist/app/popup-menu-controller.js +1070 -0
- package/dist/app/prompt-enhancer-controller.d.ts +40 -0
- package/dist/app/prompt-enhancer-controller.js +215 -0
- package/dist/app/queued-message-controller.d.ts +62 -0
- package/dist/app/queued-message-controller.js +377 -0
- package/dist/app/render-controller.d.ts +41 -0
- package/dist/app/render-controller.js +378 -0
- package/dist/app/render-text.d.ts +19 -0
- package/dist/app/render-text.js +67 -0
- package/dist/app/request-history.d.ts +23 -0
- package/dist/app/request-history.js +131 -0
- package/dist/app/runtime.d.ts +39 -0
- package/dist/app/runtime.js +195 -0
- package/dist/app/screen-selection.d.ts +6 -0
- package/dist/app/screen-selection.js +9 -0
- package/dist/app/screen-styler.d.ts +34 -0
- package/dist/app/screen-styler.js +168 -0
- package/dist/app/scroll-controller.d.ts +51 -0
- package/dist/app/scroll-controller.js +207 -0
- package/dist/app/session-event-controller.d.ts +69 -0
- package/dist/app/session-event-controller.js +338 -0
- package/dist/app/session-history.d.ts +23 -0
- package/dist/app/session-history.js +164 -0
- package/dist/app/session-lifecycle-controller.d.ts +55 -0
- package/dist/app/session-lifecycle-controller.js +116 -0
- package/dist/app/session-search.d.ts +24 -0
- package/dist/app/session-search.js +215 -0
- package/dist/app/shell-command.d.ts +27 -0
- package/dist/app/shell-command.js +176 -0
- package/dist/app/shell-controller.d.ts +28 -0
- package/dist/app/shell-controller.js +124 -0
- package/dist/app/slash-commands.d.ts +6 -0
- package/dist/app/slash-commands.js +75 -0
- package/dist/app/startup-checks.d.ts +8 -0
- package/dist/app/startup-checks.js +59 -0
- package/dist/app/startup-info.d.ts +3 -0
- package/dist/app/startup-info.js +176 -0
- package/dist/app/status-controller.d.ts +35 -0
- package/dist/app/status-controller.js +105 -0
- package/dist/app/status-line-renderer.d.ts +68 -0
- package/dist/app/status-line-renderer.js +453 -0
- package/dist/app/subagents-files.d.ts +10 -0
- package/dist/app/subagents-files.js +193 -0
- package/dist/app/subagents-model.d.ts +23 -0
- package/dist/app/subagents-model.js +224 -0
- package/dist/app/subagents-widget-controller.d.ts +43 -0
- package/dist/app/subagents-widget-controller.js +311 -0
- package/dist/app/tab-line-renderer.d.ts +26 -0
- package/dist/app/tab-line-renderer.js +222 -0
- package/dist/app/tabs-controller.d.ts +100 -0
- package/dist/app/tabs-controller.js +885 -0
- package/dist/app/terminal-controller.d.ts +40 -0
- package/dist/app/terminal-controller.js +135 -0
- package/dist/app/terminal-edit-shortcuts.d.ts +23 -0
- package/dist/app/terminal-edit-shortcuts.js +138 -0
- package/dist/app/terminal-output-buffer.d.ts +20 -0
- package/dist/app/terminal-output-buffer.js +52 -0
- package/dist/app/toast-controller.d.ts +13 -0
- package/dist/app/toast-controller.js +40 -0
- package/dist/app/toast-renderer.d.ts +9 -0
- package/dist/app/toast-renderer.js +79 -0
- package/dist/app/todo-model.d.ts +22 -0
- package/dist/app/todo-model.js +179 -0
- package/dist/app/todo-widget-controller.d.ts +21 -0
- package/dist/app/todo-widget-controller.js +59 -0
- package/dist/app/tool-block-renderer.d.ts +26 -0
- package/dist/app/tool-block-renderer.js +439 -0
- package/dist/app/types.d.ts +550 -0
- package/dist/app/types.js +1 -0
- package/dist/app/update.d.ts +36 -0
- package/dist/app/update.js +315 -0
- package/dist/app/voice-controller.d.ts +52 -0
- package/dist/app/voice-controller.js +600 -0
- package/dist/app/workspace-actions-controller.d.ts +40 -0
- package/dist/app/workspace-actions-controller.js +215 -0
- package/dist/app/workspace-undo.d.ts +44 -0
- package/dist/app/workspace-undo.js +215 -0
- package/dist/config.d.ts +62 -0
- package/dist/config.js +527 -0
- package/dist/context-progress-bar.d.ts +17 -0
- package/dist/context-progress-bar.js +48 -0
- package/dist/default-pix-config.d.ts +1 -0
- package/dist/default-pix-config.js +375 -0
- package/dist/fuzzy.d.ts +23 -0
- package/dist/fuzzy.js +165 -0
- package/dist/input-editor-files.d.ts +15 -0
- package/dist/input-editor-files.js +62 -0
- package/dist/input-editor.d.ts +186 -0
- package/dist/input-editor.js +835 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +12 -0
- package/dist/markdown-format.d.ts +22 -0
- package/dist/markdown-format.js +542 -0
- package/dist/sdk.d.ts +3 -0
- package/dist/sdk.js +1 -0
- package/dist/syntax-highlight.d.ts +22 -0
- package/dist/syntax-highlight.js +528 -0
- package/dist/terminal-width.d.ts +6 -0
- package/dist/terminal-width.js +245 -0
- package/dist/theme.d.ts +56 -0
- package/dist/theme.js +118 -0
- package/dist/tool-renderers/apply-patch.d.ts +2 -0
- package/dist/tool-renderers/apply-patch.js +36 -0
- package/dist/tool-renderers/ast.d.ts +2 -0
- package/dist/tool-renderers/ast.js +5 -0
- package/dist/tool-renderers/compress.d.ts +2 -0
- package/dist/tool-renderers/compress.js +126 -0
- package/dist/tool-renderers/index.d.ts +3 -0
- package/dist/tool-renderers/index.js +44 -0
- package/dist/tool-renderers/question.d.ts +2 -0
- package/dist/tool-renderers/question.js +88 -0
- package/dist/tool-renderers/read.d.ts +2 -0
- package/dist/tool-renderers/read.js +36 -0
- package/dist/tool-renderers/repo.d.ts +2 -0
- package/dist/tool-renderers/repo.js +13 -0
- package/dist/tool-renderers/shell.d.ts +3 -0
- package/dist/tool-renderers/shell.js +27 -0
- package/dist/tool-renderers/skill.d.ts +2 -0
- package/dist/tool-renderers/skill.js +132 -0
- package/dist/tool-renderers/subagents.d.ts +2 -0
- package/dist/tool-renderers/subagents.js +51 -0
- package/dist/tool-renderers/todo.d.ts +2 -0
- package/dist/tool-renderers/todo.js +9 -0
- package/dist/tool-renderers/types.d.ts +42 -0
- package/dist/tool-renderers/types.js +1 -0
- package/dist/tool-renderers/utils.d.ts +31 -0
- package/dist/tool-renderers/utils.js +230 -0
- package/dist/tool-renderers/web.d.ts +3 -0
- package/dist/tool-renderers/web.js +9 -0
- package/dist/tool-renderers/write.d.ts +2 -0
- package/dist/tool-renderers/write.js +42 -0
- package/dist/ui.d.ts +56 -0
- package/dist/ui.js +94 -0
- package/docs/release.md +81 -0
- package/extensions/question/contract.ts +100 -0
- package/extensions/question/index.ts +34 -0
- package/extensions/question/render.ts +28 -0
- package/extensions/question/result.ts +86 -0
- package/extensions/question/tool-description.ts +11 -0
- package/extensions/question/tui.ts +629 -0
- package/extensions/question/types.ts +123 -0
- package/extensions/session-title/config.ts +169 -0
- package/extensions/session-title/index.ts +459 -0
- package/extensions/terminal-bell/index.ts +315 -0
- package/external/pi-tools-suite/README.md +242 -0
- package/external/pi-tools-suite/index.ts +1 -0
- package/external/pi-tools-suite/licenses/ollama-pi-web-search.MIT +21 -0
- package/external/pi-tools-suite/licenses/opencode-mystatus-MIT.txt +21 -0
- package/external/pi-tools-suite/package.json +53 -0
- package/external/pi-tools-suite/src/antigravity-auth/auth-store.ts +194 -0
- package/external/pi-tools-suite/src/antigravity-auth/commands.ts +80 -0
- package/external/pi-tools-suite/src/antigravity-auth/constants.ts +26 -0
- package/external/pi-tools-suite/src/antigravity-auth/headers.ts +20 -0
- package/external/pi-tools-suite/src/antigravity-auth/index.ts +104 -0
- package/external/pi-tools-suite/src/antigravity-auth/models.ts +86 -0
- package/external/pi-tools-suite/src/antigravity-auth/oauth.ts +305 -0
- package/external/pi-tools-suite/src/antigravity-auth/payload.ts +423 -0
- package/external/pi-tools-suite/src/antigravity-auth/status.ts +78 -0
- package/external/pi-tools-suite/src/antigravity-auth/stream.ts +302 -0
- package/external/pi-tools-suite/src/antigravity-auth/types.ts +113 -0
- package/external/pi-tools-suite/src/ast-grep/index.ts +6 -0
- package/external/pi-tools-suite/src/ast-grep/render.ts +70 -0
- package/external/pi-tools-suite/src/ast-grep/schema.ts +109 -0
- package/external/pi-tools-suite/src/ast-grep/tool.ts +345 -0
- package/external/pi-tools-suite/src/ast-grep/types.ts +55 -0
- package/external/pi-tools-suite/src/ast-grep/utils.ts +65 -0
- package/external/pi-tools-suite/src/async-subagents/async-subagents.sample.jsonc +222 -0
- package/external/pi-tools-suite/src/async-subagents/commands.ts +518 -0
- package/external/pi-tools-suite/src/async-subagents/constants.ts +11 -0
- package/external/pi-tools-suite/src/async-subagents/core/agent-strategy.ts +74 -0
- package/external/pi-tools-suite/src/async-subagents/core/attachment-bridge.ts +133 -0
- package/external/pi-tools-suite/src/async-subagents/core/cleanup.ts +66 -0
- package/external/pi-tools-suite/src/async-subagents/core/concurrency.ts +90 -0
- package/external/pi-tools-suite/src/async-subagents/core/config.ts +819 -0
- package/external/pi-tools-suite/src/async-subagents/core/log-limits.ts +166 -0
- package/external/pi-tools-suite/src/async-subagents/core/model-fallback.ts +133 -0
- package/external/pi-tools-suite/src/async-subagents/core/paths.ts +47 -0
- package/external/pi-tools-suite/src/async-subagents/core/pi-invocation.ts +35 -0
- package/external/pi-tools-suite/src/async-subagents/core/presets.ts +67 -0
- package/external/pi-tools-suite/src/async-subagents/core/process.ts +15 -0
- package/external/pi-tools-suite/src/async-subagents/core/prompt.ts +66 -0
- package/external/pi-tools-suite/src/async-subagents/core/registry.ts +224 -0
- package/external/pi-tools-suite/src/async-subagents/core/retry.ts +191 -0
- package/external/pi-tools-suite/src/async-subagents/core/routing.ts +259 -0
- package/external/pi-tools-suite/src/async-subagents/core/sessions.ts +138 -0
- package/external/pi-tools-suite/src/async-subagents/core/spawn.ts +688 -0
- package/external/pi-tools-suite/src/async-subagents/core/state.ts +281 -0
- package/external/pi-tools-suite/src/async-subagents/core/stop.ts +131 -0
- package/external/pi-tools-suite/src/async-subagents/core/structured-result.ts +237 -0
- package/external/pi-tools-suite/src/async-subagents/core/tool-guard.ts +34 -0
- package/external/pi-tools-suite/src/async-subagents/core/types.ts +150 -0
- package/external/pi-tools-suite/src/async-subagents/core/ultrawork-auto.ts +184 -0
- package/external/pi-tools-suite/src/async-subagents/core/utils.ts +11 -0
- package/external/pi-tools-suite/src/async-subagents/format.ts +41 -0
- package/external/pi-tools-suite/src/async-subagents/index.ts +422 -0
- package/external/pi-tools-suite/src/async-subagents/lib.ts +88 -0
- package/external/pi-tools-suite/src/async-subagents/live.ts +10 -0
- package/external/pi-tools-suite/src/async-subagents/polling.ts +83 -0
- package/external/pi-tools-suite/src/async-subagents/render.ts +230 -0
- package/external/pi-tools-suite/src/async-subagents/subagent-overlay.ts +77 -0
- package/external/pi-tools-suite/src/async-subagents/tasks.ts +120 -0
- package/external/pi-tools-suite/src/async-subagents/tools/cleanup.ts +99 -0
- package/external/pi-tools-suite/src/async-subagents/tools/result.ts +179 -0
- package/external/pi-tools-suite/src/async-subagents/tools/spawn.ts +372 -0
- package/external/pi-tools-suite/src/async-subagents/tools/status.ts +60 -0
- package/external/pi-tools-suite/src/async-subagents/tools/stop.ts +79 -0
- package/external/pi-tools-suite/src/async-subagents/tools/subagents.ts +152 -0
- package/external/pi-tools-suite/src/async-subagents/tools/wait.ts +67 -0
- package/external/pi-tools-suite/src/async-subagents/types.ts +45 -0
- package/external/pi-tools-suite/src/async-subagents/ui.ts +5 -0
- package/external/pi-tools-suite/src/compress/commands.ts +440 -0
- package/external/pi-tools-suite/src/compress/compress-tool.ts +368 -0
- package/external/pi-tools-suite/src/compress/compression-blocks.ts +524 -0
- package/external/pi-tools-suite/src/compress/config.ts +310 -0
- package/external/pi-tools-suite/src/compress/dcp-tui-filter.ts +498 -0
- package/external/pi-tools-suite/src/compress/index.ts +397 -0
- package/external/pi-tools-suite/src/compress/prompts.ts +269 -0
- package/external/pi-tools-suite/src/compress/pruner-candidates.ts +176 -0
- package/external/pi-tools-suite/src/compress/pruner-compression-blocks.ts +260 -0
- package/external/pi-tools-suite/src/compress/pruner-message-ids.ts +147 -0
- package/external/pi-tools-suite/src/compress/pruner-metadata.ts +268 -0
- package/external/pi-tools-suite/src/compress/pruner-nudge.ts +315 -0
- package/external/pi-tools-suite/src/compress/pruner-tools.ts +263 -0
- package/external/pi-tools-suite/src/compress/pruner-types.ts +25 -0
- package/external/pi-tools-suite/src/compress/pruner.ts +92 -0
- package/external/pi-tools-suite/src/compress/state.ts +486 -0
- package/external/pi-tools-suite/src/compress/ui.ts +308 -0
- package/external/pi-tools-suite/src/config.ts +176 -0
- package/external/pi-tools-suite/src/context-usage.ts +31 -0
- package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +355 -0
- package/external/pi-tools-suite/src/index.ts +46 -0
- package/external/pi-tools-suite/src/lib/lsp.ts +62 -0
- package/external/pi-tools-suite/src/lib/project.ts +42 -0
- package/external/pi-tools-suite/src/lib/tool-args.ts +137 -0
- package/external/pi-tools-suite/src/lsp/_shared/config.ts +156 -0
- package/external/pi-tools-suite/src/lsp/_shared/glob.ts +60 -0
- package/external/pi-tools-suite/src/lsp/_shared/output.ts +102 -0
- package/external/pi-tools-suite/src/lsp/_shared/paths.ts +138 -0
- package/external/pi-tools-suite/src/lsp/_shared/runner.ts +64 -0
- package/external/pi-tools-suite/src/lsp/_shared/template.ts +23 -0
- package/external/pi-tools-suite/src/lsp/_shared/trust.ts +116 -0
- package/external/pi-tools-suite/src/lsp/_shared/types.ts +98 -0
- package/external/pi-tools-suite/src/lsp/async.ts +29 -0
- package/external/pi-tools-suite/src/lsp/child-process.ts +81 -0
- package/external/pi-tools-suite/src/lsp/client.ts +340 -0
- package/external/pi-tools-suite/src/lsp/constants.ts +9 -0
- package/external/pi-tools-suite/src/lsp/diagnostics-store.ts +64 -0
- package/external/pi-tools-suite/src/lsp/documents.ts +24 -0
- package/external/pi-tools-suite/src/lsp/index.ts +31 -0
- package/external/pi-tools-suite/src/lsp/lsp-utils.ts +37 -0
- package/external/pi-tools-suite/src/lsp/manager.ts +190 -0
- package/external/pi-tools-suite/src/lsp/mutation-events.ts +78 -0
- package/external/pi-tools-suite/src/lsp/renderer.ts +1 -0
- package/external/pi-tools-suite/src/lsp/tool-result.ts +6 -0
- package/external/pi-tools-suite/src/lsp/tsserver.ts +107 -0
- package/external/pi-tools-suite/src/lsp/types.ts +15 -0
- package/external/pi-tools-suite/src/model-tools/apply-patch.ts +590 -0
- package/external/pi-tools-suite/src/model-tools/index.ts +430 -0
- package/external/pi-tools-suite/src/model-tools/path-utils.ts +6 -0
- package/external/pi-tools-suite/src/model-tools/tool-args.ts +11 -0
- package/external/pi-tools-suite/src/prompt-commands/index.ts +349 -0
- package/external/pi-tools-suite/src/repo-discovery/index.ts +384 -0
- package/external/pi-tools-suite/src/repo-discovery/project.ts +7 -0
- package/external/pi-tools-suite/src/startup-section.ts +13 -0
- package/external/pi-tools-suite/src/terminal-bell/index.ts +309 -0
- package/external/pi-tools-suite/src/todo/index.ts +201 -0
- package/external/pi-tools-suite/src/todo/state/auto-clear.ts +13 -0
- package/external/pi-tools-suite/src/todo/state/invariants.ts +21 -0
- package/external/pi-tools-suite/src/todo/state/persistence.ts +94 -0
- package/external/pi-tools-suite/src/todo/state/replay.ts +38 -0
- package/external/pi-tools-suite/src/todo/state/selectors.ts +49 -0
- package/external/pi-tools-suite/src/todo/state/state-reducer.ts +362 -0
- package/external/pi-tools-suite/src/todo/state/state.ts +18 -0
- package/external/pi-tools-suite/src/todo/state/store.ts +52 -0
- package/external/pi-tools-suite/src/todo/state/task-graph.ts +57 -0
- package/external/pi-tools-suite/src/todo/todo.ts +487 -0
- package/external/pi-tools-suite/src/todo/tool/response-envelope.ts +143 -0
- package/external/pi-tools-suite/src/todo/tool/types.ts +188 -0
- package/external/pi-tools-suite/src/todo/view/format.ts +18 -0
- package/external/pi-tools-suite/src/todo/view/labels.ts +13 -0
- package/external/pi-tools-suite/src/tool-descriptions.ts +369 -0
- package/external/pi-tools-suite/src/usage/index.ts +152 -0
- package/external/pi-tools-suite/src/usage/lib/copilot.ts +535 -0
- package/external/pi-tools-suite/src/usage/lib/google.ts +478 -0
- package/external/pi-tools-suite/src/usage/lib/openai.ts +268 -0
- package/external/pi-tools-suite/src/usage/lib/types.ts +114 -0
- package/external/pi-tools-suite/src/usage/lib/utils.ts +134 -0
- package/external/pi-tools-suite/src/usage/lib/zhipu.ts +228 -0
- package/external/pi-tools-suite/src/web-search/index.ts +397 -0
- package/package.json +89 -0
- package/skills/context7/SKILL.md +69 -0
- package/skills/context7/scripts/context7.sh +73 -0
- package/skills/handoff/SKILL.md +15 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +314 -0
- package/skills/pdf/forms.md +294 -0
- package/skills/pdf/reference.md +612 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/skills/pdf/scripts/create_validation_image.py +37 -0
- package/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/skills/playwright-cli/SKILL.md +388 -0
- package/skills/playwright-cli/references/element-attributes.md +23 -0
- package/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/skills/playwright-cli/references/request-mocking.md +87 -0
- package/skills/playwright-cli/references/running-code.md +241 -0
- package/skills/playwright-cli/references/session-management.md +225 -0
- package/skills/playwright-cli/references/spec-driven-testing.md +305 -0
- package/skills/playwright-cli/references/storage-state.md +275 -0
- package/skills/playwright-cli/references/test-generation.md +134 -0
- package/skills/playwright-cli/references/tracing.md +139 -0
- package/skills/playwright-cli/references/video-recording.md +143 -0
- package/skills/simplify/SKILL.md +51 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +247 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
package/dist/app/app.js
ADDED
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
import { THEMES } from "../theme.js";
|
|
2
|
+
import { InputEditor } from "../input-editor.js";
|
|
3
|
+
import { compileOutputFilterPatterns, loadPixConfig, outputFiltersRemoveDcpIdMetadataLine, resolveToolRule, } from "../config.js";
|
|
4
|
+
import { AppCommandController } from "./command-controller.js";
|
|
5
|
+
import { ConversationViewport } from "./conversation-viewport.js";
|
|
6
|
+
import { EditorLayoutRenderer } from "./editor-layout-renderer.js";
|
|
7
|
+
import { AppExtensionActionsController } from "./extension-actions-controller.js";
|
|
8
|
+
import { ExtensionUiController } from "./extension-ui-controller.js";
|
|
9
|
+
import { AppInputActionController } from "./input-action-controller.js";
|
|
10
|
+
import { AppInputController } from "./input-controller.js";
|
|
11
|
+
import { AppBlinkController } from "./blink-controller.js";
|
|
12
|
+
import { isRecord } from "./guards.js";
|
|
13
|
+
import { AppMenuItemsController } from "./menu-items-controller.js";
|
|
14
|
+
import { AppMouseController } from "./mouse-controller.js";
|
|
15
|
+
import { createId } from "./id.js";
|
|
16
|
+
import { NerdFontController } from "./nerd-font-controller.js";
|
|
17
|
+
import { AppPopupActionController } from "./popup-action-controller.js";
|
|
18
|
+
import { AppPopupMenuController } from "./popup-menu-controller.js";
|
|
19
|
+
import { AppPromptEnhancerController } from "./prompt-enhancer-controller.js";
|
|
20
|
+
import { AppQueuedMessageController } from "./queued-message-controller.js";
|
|
21
|
+
import { AppRequestHistory } from "./request-history.js";
|
|
22
|
+
import { AppRenderController } from "./render-controller.js";
|
|
23
|
+
import { createPixRuntime } from "./runtime.js";
|
|
24
|
+
import { ScreenStyler } from "./screen-styler.js";
|
|
25
|
+
import { AppScrollController } from "./scroll-controller.js";
|
|
26
|
+
import { searchResultScrollNeedles, searchResultTargetEntry } from "./session-search.js";
|
|
27
|
+
import { AppSessionLifecycleController } from "./session-lifecycle-controller.js";
|
|
28
|
+
import { AppShellController } from "./shell-controller.js";
|
|
29
|
+
import { runInteractiveShellCommand } from "./shell-command.js";
|
|
30
|
+
import { AppSessionEventController } from "./session-event-controller.js";
|
|
31
|
+
import { AppStatusController } from "./status-controller.js";
|
|
32
|
+
import { StatusLineRenderer } from "./status-line-renderer.js";
|
|
33
|
+
import { AppModelUsageController } from "./model-usage-controller.js";
|
|
34
|
+
import { AppWorkspaceActionsController } from "./workspace-actions-controller.js";
|
|
35
|
+
import { AppSubagentsWidgetController } from "./subagents-widget-controller.js";
|
|
36
|
+
import { AppTodoWidgetController } from "./todo-widget-controller.js";
|
|
37
|
+
import { AppTabsController } from "./tabs-controller.js";
|
|
38
|
+
import { TabLineRenderer } from "./tab-line-renderer.js";
|
|
39
|
+
import { AppTerminalController } from "./terminal-controller.js";
|
|
40
|
+
import { AppToastController } from "./toast-controller.js";
|
|
41
|
+
import { AppVoiceController } from "./voice-controller.js";
|
|
42
|
+
import { createIsolatedExtensionEventBus } from "./extension-event-bus.js";
|
|
43
|
+
import { setAppIconTheme } from "./icons.js";
|
|
44
|
+
const TERMINAL_BELL_ATTENTION_EVENT = "pix:terminal-bell:attention";
|
|
45
|
+
const SUBAGENTS_LIVE_STATE_EVENT = "pi-tools-suite:async-subagents:live-state";
|
|
46
|
+
const TODO_STATE_EVENT = "pi-tools-suite:todo:state";
|
|
47
|
+
export class PiUiExtendApp {
|
|
48
|
+
entries = [];
|
|
49
|
+
options;
|
|
50
|
+
theme;
|
|
51
|
+
blinkController;
|
|
52
|
+
screenStyler;
|
|
53
|
+
statusController;
|
|
54
|
+
statusLineRenderer;
|
|
55
|
+
modelUsageController;
|
|
56
|
+
tabsController;
|
|
57
|
+
tabLineRenderer;
|
|
58
|
+
editorLayoutRenderer;
|
|
59
|
+
renderController;
|
|
60
|
+
sessionLifecycle;
|
|
61
|
+
conversationViewport;
|
|
62
|
+
scrollController;
|
|
63
|
+
extensionUiController;
|
|
64
|
+
extensionActions;
|
|
65
|
+
pixConfig;
|
|
66
|
+
outputFilters;
|
|
67
|
+
suppressPendingDcpIdMetadata;
|
|
68
|
+
commandController;
|
|
69
|
+
inputActions;
|
|
70
|
+
inputController;
|
|
71
|
+
menuItems;
|
|
72
|
+
subagentsWidgetController;
|
|
73
|
+
todoWidgetController;
|
|
74
|
+
terminalController;
|
|
75
|
+
toastController;
|
|
76
|
+
nerdFontController;
|
|
77
|
+
popupActions;
|
|
78
|
+
promptEnhancer;
|
|
79
|
+
mouseController;
|
|
80
|
+
popupMenus;
|
|
81
|
+
voiceController;
|
|
82
|
+
sessionEvents;
|
|
83
|
+
shellController;
|
|
84
|
+
queuedMessages;
|
|
85
|
+
workspaceActions;
|
|
86
|
+
slashCommands;
|
|
87
|
+
toastNotifier = {
|
|
88
|
+
show: (message, kind = "info") => {
|
|
89
|
+
this.showToast(message, kind);
|
|
90
|
+
},
|
|
91
|
+
success: (message) => {
|
|
92
|
+
this.showToast(message, "success");
|
|
93
|
+
},
|
|
94
|
+
error: (message) => {
|
|
95
|
+
this.showToast(message, "error");
|
|
96
|
+
},
|
|
97
|
+
warning: (message) => {
|
|
98
|
+
this.showToast(message, "warning");
|
|
99
|
+
},
|
|
100
|
+
info: (message) => {
|
|
101
|
+
this.showToast(message, "info");
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
extensionShutdownHandler = () => { };
|
|
105
|
+
runtime;
|
|
106
|
+
inputEditor = new InputEditor();
|
|
107
|
+
requestHistory;
|
|
108
|
+
/** Shortcut: get/set the editor text as a plain string. */
|
|
109
|
+
get input() { return this.inputEditor.text; }
|
|
110
|
+
set input(value) { this.inputEditor.setText(value); }
|
|
111
|
+
running = false;
|
|
112
|
+
todoPanelExpanded = true;
|
|
113
|
+
subagentsPanelExpanded = true;
|
|
114
|
+
allThinkingExpanded = false;
|
|
115
|
+
superCompactTools = false;
|
|
116
|
+
voicePartialText;
|
|
117
|
+
resumeSessions = [];
|
|
118
|
+
resumeLoading = false;
|
|
119
|
+
constructor(options) {
|
|
120
|
+
this.options = options;
|
|
121
|
+
this.theme = THEMES[options.themeName];
|
|
122
|
+
const app = this;
|
|
123
|
+
this.blinkController = new AppBlinkController({
|
|
124
|
+
render: () => this.render(),
|
|
125
|
+
renderStatusLine: () => this.renderStatusLine(),
|
|
126
|
+
});
|
|
127
|
+
this.screenStyler = new ScreenStyler({
|
|
128
|
+
theme: this.theme,
|
|
129
|
+
cwd: this.options.cwd,
|
|
130
|
+
get mouseSelection() { return app.mouseController.mouseSelection; },
|
|
131
|
+
});
|
|
132
|
+
this.toastController = new AppToastController({
|
|
133
|
+
render: () => this.render(),
|
|
134
|
+
});
|
|
135
|
+
this.nerdFontController = new NerdFontController({
|
|
136
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
137
|
+
render: () => this.render(),
|
|
138
|
+
});
|
|
139
|
+
this.statusController = new AppStatusController({
|
|
140
|
+
cwd: this.options.cwd,
|
|
141
|
+
theme: this.theme,
|
|
142
|
+
blinkController: this.blinkController,
|
|
143
|
+
runtimeSession: () => this.runtime?.session,
|
|
144
|
+
});
|
|
145
|
+
this.modelUsageController = new AppModelUsageController({
|
|
146
|
+
runtimeSession: () => this.runtime?.session,
|
|
147
|
+
render: () => this.render(),
|
|
148
|
+
});
|
|
149
|
+
this.tabsController = new AppTabsController({
|
|
150
|
+
options: this.options,
|
|
151
|
+
blinkController: this.blinkController,
|
|
152
|
+
runtime: () => this.runtime,
|
|
153
|
+
createRuntimeForNewSession: () => createPixRuntime(newTabRuntimeOptions(this.options), { eventBus: this.createExtensionEventBus() }),
|
|
154
|
+
createRuntimeForSession: (sessionPath) => createPixRuntime({
|
|
155
|
+
...this.options,
|
|
156
|
+
noSession: false,
|
|
157
|
+
sessionPath,
|
|
158
|
+
}, { eventBus: this.createExtensionEventBus() }),
|
|
159
|
+
activateRuntime: (runtime) => this.activateRuntime(runtime),
|
|
160
|
+
disposeRuntime: (runtime) => this.terminalController.disposeRuntime(runtime),
|
|
161
|
+
isRunning: () => this.running,
|
|
162
|
+
setStatus: (status) => this.setStatus(status),
|
|
163
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
164
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
165
|
+
resetSessionView: () => this.resetSessionView(),
|
|
166
|
+
loadSessionHistory: () => this.loadSessionHistory(),
|
|
167
|
+
loadSessionHistoryAsync: (options) => this.loadSessionHistoryAsync(options),
|
|
168
|
+
syncUserSessionEntryMetadata: () => this.workspaceActions.syncUserSessionEntryMetadata(),
|
|
169
|
+
captureInputState: () => ({ text: this.inputEditor.text, cursor: this.inputEditor.cursor }),
|
|
170
|
+
restoreInputState: (state) => this.restoreTabInputState(state.text, state.cursor),
|
|
171
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
172
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
173
|
+
render: () => this.render(),
|
|
174
|
+
});
|
|
175
|
+
this.pixConfig = loadPixConfig();
|
|
176
|
+
setAppIconTheme(this.pixConfig.iconTheme.name);
|
|
177
|
+
this.promptEnhancer = new AppPromptEnhancerController({
|
|
178
|
+
runtime: () => this.runtime,
|
|
179
|
+
inputEditor: () => this.inputEditor,
|
|
180
|
+
activeInputTabId: () => this.tabsController.activeInputTabId(),
|
|
181
|
+
inputStateForTab: (tabId) => this.tabsController.inputStateForTab(tabId),
|
|
182
|
+
setInputStateForTab: (tabId, state) => this.tabsController.setInputStateForTab(tabId, state),
|
|
183
|
+
promptEnhancerConfig: () => this.pixConfig.promptEnhancer,
|
|
184
|
+
resetInputAfterProgrammaticEdit: () => this.resetInputAfterProgrammaticEdit(),
|
|
185
|
+
setStatus: (status) => this.setStatus(status),
|
|
186
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
187
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
188
|
+
toast: this.toastNotifier,
|
|
189
|
+
render: () => this.render(),
|
|
190
|
+
});
|
|
191
|
+
this.voiceController = new AppVoiceController({
|
|
192
|
+
insertTranscript: (text) => this.insertVoiceTranscript(text),
|
|
193
|
+
setPartialTranscript: (text) => this.setVoicePartialTranscript(text),
|
|
194
|
+
addSystemMessage: (message) => this.addVoiceSystemMessage(message),
|
|
195
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
196
|
+
render: () => this.render(),
|
|
197
|
+
}, this.pixConfig.dictation);
|
|
198
|
+
this.menuItems = new AppMenuItemsController({
|
|
199
|
+
runtime: () => this.runtime,
|
|
200
|
+
getBuiltinSlashCommands: () => this.slashCommands,
|
|
201
|
+
getEntries: () => this.entries,
|
|
202
|
+
getResumeSessions: () => this.resumeSessions,
|
|
203
|
+
});
|
|
204
|
+
this.popupMenus = new AppPopupMenuController({
|
|
205
|
+
theme: this.theme,
|
|
206
|
+
screenStyler: this.screenStyler,
|
|
207
|
+
get entries() { return app.entries; },
|
|
208
|
+
get session() { return app.runtime?.session; },
|
|
209
|
+
get resumeLoading() { return app.resumeLoading; },
|
|
210
|
+
get resumeSessionCount() { return app.resumeSessions.length; },
|
|
211
|
+
isRunning: () => this.running,
|
|
212
|
+
getInput: () => this.input,
|
|
213
|
+
setInput: (value) => this.setInput(value),
|
|
214
|
+
parseSlashInput: (text) => this.menuItems.parseSlashInput(text),
|
|
215
|
+
getSlashCommandMenuItems: (query) => this.menuItems.getSlashCommandMenuItems(query),
|
|
216
|
+
getModelMenuItems: (query) => this.menuItems.getModelMenuItems(query),
|
|
217
|
+
getThinkingMenuItems: (query) => this.menuItems.getThinkingMenuItems(query),
|
|
218
|
+
getResumeMenuItems: (query, limit) => this.menuItems.getResumeMenuItems(query, limit),
|
|
219
|
+
getUserMessageMenuItems: () => this.menuItems.getUserMessageMenuItems(),
|
|
220
|
+
getUserMessageJumpMenuItems: (query) => this.menuItems.getUserMessageJumpMenuItems(query),
|
|
221
|
+
getQueueMessageMenuItems: () => this.menuItems.getQueueMessageMenuItems(),
|
|
222
|
+
hasUserEntry: (entryId) => Boolean(this.findUserEntry(entryId)),
|
|
223
|
+
hasQueuedEntry: (entryId) => Boolean(this.queuedMessages.findQueuedEntry(entryId)),
|
|
224
|
+
setStatus: (status) => this.setStatus(status),
|
|
225
|
+
restoreSessionStatus: () => this.restoreSessionStatus(),
|
|
226
|
+
render: () => this.render(),
|
|
227
|
+
});
|
|
228
|
+
this.statusLineRenderer = new StatusLineRenderer({
|
|
229
|
+
theme: this.theme,
|
|
230
|
+
screenStyler: this.screenStyler,
|
|
231
|
+
get session() { return app.runtime?.session; },
|
|
232
|
+
modelColors: this.pixConfig.modelColors,
|
|
233
|
+
get sessionActivity() { return app.statusController.sessionActivity; },
|
|
234
|
+
get statusDotBright() { return app.statusController.statusDotBright; },
|
|
235
|
+
currentStatus: () => this.statusController.currentStatus(),
|
|
236
|
+
statusWorkspaceLabel: () => this.statusController.statusWorkspaceLabel(),
|
|
237
|
+
statusWorkspaceGitBranchLabel: () => this.statusController.statusWorkspaceGitBranchLabel(),
|
|
238
|
+
statusModelLabel: (session) => this.statusController.statusModelLabel(session),
|
|
239
|
+
statusThinkingLabel: (session) => this.statusController.statusThinkingLabel(session),
|
|
240
|
+
formatContextUsagePercent: (session) => this.statusController.formatContextUsagePercent(session),
|
|
241
|
+
roundedContextUsagePercent: (session) => this.statusController.roundedContextUsagePercent(session),
|
|
242
|
+
contextUsagePercentColor: (percent) => this.statusController.contextUsagePercentColor(percent),
|
|
243
|
+
modelUsageStatusLabel: () => this.modelUsageController.statusLabel(),
|
|
244
|
+
promptEnhancerStatusWidgetText: () => this.promptEnhancer.statusWidgetText(),
|
|
245
|
+
promptEnhancerStatusWidgetActive: () => this.promptEnhancer.statusWidgetActive(),
|
|
246
|
+
promptEnhancerStatusWidgetEnabled: () => this.promptEnhancer.statusWidgetEnabled(),
|
|
247
|
+
voiceStatusWidgetText: () => this.voiceController.statusWidgetText(),
|
|
248
|
+
voiceStatusWidgetActive: () => this.voiceController.statusWidgetActive(),
|
|
249
|
+
userMessageJumpMenuActive: () => this.popupMenus.directMenu === "user-message-jump",
|
|
250
|
+
allThinkingExpandedActive: () => this.allThinkingExpanded,
|
|
251
|
+
superCompactToolsActive: () => this.superCompactTools,
|
|
252
|
+
});
|
|
253
|
+
this.tabLineRenderer = new TabLineRenderer({
|
|
254
|
+
theme: this.theme,
|
|
255
|
+
screenStyler: this.screenStyler,
|
|
256
|
+
get tabs() { return app.tabsController.tabs(); },
|
|
257
|
+
});
|
|
258
|
+
this.extensionUiController = new ExtensionUiController({
|
|
259
|
+
theme: this.theme,
|
|
260
|
+
isRunning: () => this.running,
|
|
261
|
+
render: () => this.render(),
|
|
262
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
263
|
+
toastNotifier: this.toastNotifier,
|
|
264
|
+
menuController: this.popupMenus.menuController,
|
|
265
|
+
setStatus: (status) => this.setStatus(status),
|
|
266
|
+
restoreSessionStatus: () => this.restoreSessionStatus(),
|
|
267
|
+
setInput: (value) => this.setInput(value),
|
|
268
|
+
getInput: () => this.input,
|
|
269
|
+
get entries() { return app.entries; },
|
|
270
|
+
deleteConversationEntry: (entryId) => this.conversationViewport.deleteEntry(entryId),
|
|
271
|
+
});
|
|
272
|
+
this.extensionActions = new AppExtensionActionsController({
|
|
273
|
+
isRunning: () => this.running,
|
|
274
|
+
getInput: () => this.input,
|
|
275
|
+
setInput: (value) => this.setInput(value),
|
|
276
|
+
resetSessionView: () => this.resetSessionView(),
|
|
277
|
+
loadSessionHistory: () => this.loadSessionHistory(),
|
|
278
|
+
afterSessionReplacement: (message) => this.afterSessionReplacement(message),
|
|
279
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
280
|
+
setStatus: (status) => this.setStatus(status),
|
|
281
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
282
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
283
|
+
render: () => this.render(),
|
|
284
|
+
});
|
|
285
|
+
this.subagentsWidgetController = new AppSubagentsWidgetController({
|
|
286
|
+
cwd: this.options.cwd,
|
|
287
|
+
sessionFile: () => this.runtime?.session.sessionFile,
|
|
288
|
+
isRunning: () => this.running,
|
|
289
|
+
render: () => this.render(),
|
|
290
|
+
});
|
|
291
|
+
this.todoWidgetController = new AppTodoWidgetController({
|
|
292
|
+
sessionFile: () => this.runtime?.session.sessionFile,
|
|
293
|
+
isRunning: () => this.running,
|
|
294
|
+
render: () => this.render(),
|
|
295
|
+
});
|
|
296
|
+
this.workspaceActions = new AppWorkspaceActionsController({
|
|
297
|
+
entries: this.entries,
|
|
298
|
+
runtime: () => this.runtime,
|
|
299
|
+
findUserEntry: (entryId) => this.findUserEntry(entryId),
|
|
300
|
+
touchEntry: (entry) => this.touchEntry(entry),
|
|
301
|
+
resetSessionView: () => this.resetSessionView(),
|
|
302
|
+
loadSessionHistory: () => this.loadSessionHistory(),
|
|
303
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
304
|
+
setInput: (value) => this.setInput(value),
|
|
305
|
+
getInput: () => this.input,
|
|
306
|
+
setStatus: (status) => this.setStatus(status),
|
|
307
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
308
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
309
|
+
render: () => this.render(),
|
|
310
|
+
isRunning: () => this.running,
|
|
311
|
+
});
|
|
312
|
+
this.sessionEvents = new AppSessionEventController({
|
|
313
|
+
entries: this.entries,
|
|
314
|
+
runtime: () => this.runtime,
|
|
315
|
+
conversationViewport: () => this.conversationViewport,
|
|
316
|
+
isRunning: () => this.running,
|
|
317
|
+
render: () => this.render(),
|
|
318
|
+
setStatus: (status) => this.setStatus(status),
|
|
319
|
+
restoreSessionStatus: () => this.restoreSessionStatus(),
|
|
320
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
321
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
322
|
+
flushDeferredUserMessages: () => {
|
|
323
|
+
void this.queuedMessages.flushDeferredUserMessages();
|
|
324
|
+
},
|
|
325
|
+
updateQueuedMessageStatus: () => this.queuedMessages.updateQueuedMessageStatus(),
|
|
326
|
+
prepareWorkspaceMutation: (toolName, args) => this.workspaceActions.prepareWorkspaceMutation(toolName, args),
|
|
327
|
+
workspaceMutationFromToolExecution: (input) => this.workspaceActions.workspaceMutationFromToolExecution(input),
|
|
328
|
+
recordWorkspaceMutationForUserEntry: (entryId, mutation) => this.workspaceActions.recordWorkspaceMutationForUserEntry(entryId, mutation),
|
|
329
|
+
scheduleUserSessionEntryMetadataSync: () => this.workspaceActions.scheduleUserSessionEntryMetadataSync(),
|
|
330
|
+
toolDefaultExpanded: (toolName) => this.toolDefaultExpanded(toolName),
|
|
331
|
+
observeSubagentsToolResult: (toolName, details, options) => this.subagentsWidgetController.observeToolResult(toolName, details, options),
|
|
332
|
+
observeTodoToolResult: (toolName, details, isError) => this.todoWidgetController.observeToolResult(toolName, details, isError),
|
|
333
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
334
|
+
});
|
|
335
|
+
this.queuedMessages = new AppQueuedMessageController({
|
|
336
|
+
runtime: () => this.runtime,
|
|
337
|
+
requireRuntime: () => this.requireRuntime(),
|
|
338
|
+
visibleEntries: () => this.conversationViewport.entries(),
|
|
339
|
+
isRunning: () => this.running,
|
|
340
|
+
render: () => this.render(),
|
|
341
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
342
|
+
addSessionAbortedEntry: () => this.sessionEvents.addSessionAbortedEntry(),
|
|
343
|
+
setStatus: (status) => this.setStatus(status),
|
|
344
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
345
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
346
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
347
|
+
inputText: () => this.input,
|
|
348
|
+
resetRequestHistoryNavigation: () => this.requestHistory.resetNavigation(),
|
|
349
|
+
clearInput: () => this.inputEditor.clear(),
|
|
350
|
+
setInput: (value) => this.inputEditor.setText(value),
|
|
351
|
+
insertInput: (value) => this.inputEditor.insert(value),
|
|
352
|
+
attachImage: (data, mimeType) => this.inputEditor.attachImage(data, mimeType),
|
|
353
|
+
});
|
|
354
|
+
this.editorLayoutRenderer = new EditorLayoutRenderer({
|
|
355
|
+
theme: this.theme,
|
|
356
|
+
inputEditor: this.inputEditor,
|
|
357
|
+
get extensionWidgets() { return app.extensionUiController.widgets; },
|
|
358
|
+
get todoDetails() { return app.todoWidgetController.widgetDetails; },
|
|
359
|
+
get todoPanelExpanded() { return app.todoPanelExpanded; },
|
|
360
|
+
get subagentsPanelExpanded() { return app.subagentsPanelExpanded; },
|
|
361
|
+
get subagentsWidgetState() { return app.subagentsWidgetController.widgetState; },
|
|
362
|
+
get voicePartialText() { return app.voicePartialText; },
|
|
363
|
+
renderExtensionInputComponent: (width) => this.extensionUiController.renderActiveCustomUi(width),
|
|
364
|
+
extensionInputUsesEditor: () => this.extensionUiController.activeCustomUiUsesEditor(),
|
|
365
|
+
widgetTuiHandle: () => this.extensionUiController.widgetTuiHandle(),
|
|
366
|
+
createExtensionTheme: () => this.extensionUiController.createExtensionTheme(),
|
|
367
|
+
suppressExtensionWidget: (key) => this.extensionUiController.suppressWidget(key),
|
|
368
|
+
});
|
|
369
|
+
this.outputFilters = compileOutputFilterPatterns(this.pixConfig.outputFilters.patterns);
|
|
370
|
+
this.suppressPendingDcpIdMetadata = outputFiltersRemoveDcpIdMetadataLine(this.outputFilters);
|
|
371
|
+
this.conversationViewport = new ConversationViewport({
|
|
372
|
+
get entries() { return app.entries; },
|
|
373
|
+
get session() { return app.runtime?.session; },
|
|
374
|
+
get deferredUserMessages() { return app.queuedMessages.deferredUserMessages; },
|
|
375
|
+
get entryRenderVersions() { return app.sessionEvents.entryRenderVersions; },
|
|
376
|
+
get superCompactTools() { return app.superCompactTools; },
|
|
377
|
+
get allThinkingExpanded() { return app.allThinkingExpanded; },
|
|
378
|
+
cwd: this.options.cwd,
|
|
379
|
+
colors: this.theme.colors,
|
|
380
|
+
pixConfig: this.pixConfig,
|
|
381
|
+
outputFilters: this.outputFilters,
|
|
382
|
+
suppressPendingDcpIdMetadata: this.suppressPendingDcpIdMetadata,
|
|
383
|
+
hasDynamicConversationBlock: () => this.popupMenus.hasDynamicConversationBlock(),
|
|
384
|
+
isDynamicConversationBlock: (entry) => this.popupMenus.isDynamicConversationBlock(entry),
|
|
385
|
+
renderInlineUserMessageMenu: (entry, context) => this.popupMenus.renderInlineUserMessageMenu(entry, context),
|
|
386
|
+
});
|
|
387
|
+
this.scrollController = new AppScrollController({
|
|
388
|
+
conversationViewport: () => this.conversationViewport,
|
|
389
|
+
editorLayoutRenderer: () => this.editorLayoutRenderer,
|
|
390
|
+
terminalColumns: () => this.terminalColumns(),
|
|
391
|
+
terminalRows: () => this.terminalRows(),
|
|
392
|
+
tabPanelRows: (terminalRows) => this.tabsController.tabPanelRows(terminalRows),
|
|
393
|
+
render: () => this.render(),
|
|
394
|
+
});
|
|
395
|
+
this.commandController = new AppCommandController({
|
|
396
|
+
options: this.options,
|
|
397
|
+
runtime: () => this.runtime,
|
|
398
|
+
getInput: () => this.input,
|
|
399
|
+
setInput: (value) => this.setInput(value),
|
|
400
|
+
promptEnhancerModelRef: () => this.pixConfig.promptEnhancer.modelRef,
|
|
401
|
+
enhancePrompt: () => this.promptEnhancer.enhancePrompt(),
|
|
402
|
+
isRunning: () => this.running,
|
|
403
|
+
stop: () => this.stop(),
|
|
404
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
405
|
+
setStatus: (status) => this.setStatus(status),
|
|
406
|
+
toast: this.toastNotifier,
|
|
407
|
+
render: () => this.render(),
|
|
408
|
+
showMenu: (items, options) => this.popupMenus.menuController.show(items, options),
|
|
409
|
+
getModelMenuItems: (query) => this.menuItems.getModelMenuItems(query),
|
|
410
|
+
getThinkingMenuItems: (query) => this.menuItems.getThinkingMenuItems(query),
|
|
411
|
+
modelRef: (model) => this.menuItems.modelRef(model),
|
|
412
|
+
getFavoriteScopedModels: () => this.menuItems.getFavoriteScopedModels(),
|
|
413
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
414
|
+
resetSessionView: () => this.resetSessionView(),
|
|
415
|
+
loadSessionHistory: () => this.loadSessionHistory(),
|
|
416
|
+
afterSessionReplacement: (message) => this.afterSessionReplacement(message),
|
|
417
|
+
openDirectPopupMenu: (menu, options) => this.popupMenus.openDirectPopupMenu(menu, options),
|
|
418
|
+
getDirectPopupMenu: () => this.popupMenus.directMenu,
|
|
419
|
+
setDirectPopupMenu: (menu) => {
|
|
420
|
+
this.popupMenus.setDirectMenu(menu);
|
|
421
|
+
},
|
|
422
|
+
setDirectPopupMenuPreserveStatus: (preserveStatus) => {
|
|
423
|
+
this.popupMenus.setDirectPreserveStatus(preserveStatus);
|
|
424
|
+
},
|
|
425
|
+
getDirectPopupMenuQuery: () => this.popupMenus.directQuery,
|
|
426
|
+
setDirectPopupMenuQuery: (query) => {
|
|
427
|
+
this.popupMenus.setDirectQuery(query);
|
|
428
|
+
},
|
|
429
|
+
getResumeLoading: () => this.resumeLoading,
|
|
430
|
+
setResumeLoading: (loading) => {
|
|
431
|
+
this.resumeLoading = loading;
|
|
432
|
+
},
|
|
433
|
+
setResumeSessions: (sessions) => {
|
|
434
|
+
this.resumeSessions = sessions;
|
|
435
|
+
},
|
|
436
|
+
openResumeMenuWithQuery: (query) => {
|
|
437
|
+
this.popupMenus.openResumeMenuWithQuery(query);
|
|
438
|
+
},
|
|
439
|
+
closeResumeMenu: () => this.popupMenus.closeResumeMenu(),
|
|
440
|
+
openNewTab: () => this.tabsController.openNewTab(),
|
|
441
|
+
openSearchResultInNewTab: (result) => this.openSearchResultInNewTab(result),
|
|
442
|
+
});
|
|
443
|
+
this.popupActions = new AppPopupActionController({
|
|
444
|
+
runtime: () => this.runtime,
|
|
445
|
+
getBuiltinSlashCommands: () => this.slashCommands,
|
|
446
|
+
isRunning: () => this.running,
|
|
447
|
+
setInput: (value) => this.setInput(value),
|
|
448
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
449
|
+
setStatus: (status) => this.setStatus(status),
|
|
450
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
451
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
452
|
+
render: () => this.render(),
|
|
453
|
+
resetSessionView: () => this.resetSessionView(),
|
|
454
|
+
bindCurrentSession: () => this.bindCurrentSession(),
|
|
455
|
+
loadSessionHistory: () => this.loadSessionHistory(),
|
|
456
|
+
scrollToConversationEntry: (entryId) => this.scrollController.scrollToConversationEntry(entryId),
|
|
457
|
+
}, this.popupMenus, this.commandController, this.menuItems, this.queuedMessages, this.workspaceActions);
|
|
458
|
+
this.mouseController = new AppMouseController({
|
|
459
|
+
terminalColumns: () => this.terminalColumns(),
|
|
460
|
+
terminalRows: () => this.terminalRows(),
|
|
461
|
+
tabPanelRows: (terminalRows) => this.tabsController.tabPanelRows(terminalRows),
|
|
462
|
+
conversationViewport: () => this.conversationViewport,
|
|
463
|
+
editorLayoutRenderer: () => this.editorLayoutRenderer,
|
|
464
|
+
inputEditor: () => this.inputEditor,
|
|
465
|
+
resetRequestHistoryNavigation: () => this.requestHistory.resetNavigation(),
|
|
466
|
+
findEntry: (entryId) => this.findEntry(entryId),
|
|
467
|
+
touchEntry: (entry) => this.touchEntry(entry),
|
|
468
|
+
getTodoPanelExpanded: () => this.todoPanelExpanded,
|
|
469
|
+
setTodoPanelExpanded: (expanded) => {
|
|
470
|
+
this.todoPanelExpanded = expanded;
|
|
471
|
+
},
|
|
472
|
+
getSubagentsPanelExpanded: () => this.subagentsPanelExpanded,
|
|
473
|
+
setSubagentsPanelExpanded: (expanded) => {
|
|
474
|
+
this.subagentsPanelExpanded = expanded;
|
|
475
|
+
},
|
|
476
|
+
setStatus: (status) => this.setStatus(status),
|
|
477
|
+
runtimeSession: () => this.runtime?.session,
|
|
478
|
+
cwd: () => this.options.cwd,
|
|
479
|
+
enhancePrompt: () => this.promptEnhancer.enhancePrompt(),
|
|
480
|
+
openNewTab: () => {
|
|
481
|
+
void this.tabsController.openNewTab();
|
|
482
|
+
},
|
|
483
|
+
toggleVoiceRecording: () => {
|
|
484
|
+
void this.voiceController.toggleRecording();
|
|
485
|
+
},
|
|
486
|
+
toggleVoiceLanguage: () => {
|
|
487
|
+
void this.voiceController.toggleLanguage();
|
|
488
|
+
},
|
|
489
|
+
switchToTab: (tabId) => {
|
|
490
|
+
void this.tabsController.switchToTab(tabId);
|
|
491
|
+
},
|
|
492
|
+
closeTab: (tabId) => {
|
|
493
|
+
void this.tabsController.closeTab(tabId);
|
|
494
|
+
},
|
|
495
|
+
toastEntry: (toastId) => this.toastController.toast.entry(toastId),
|
|
496
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
497
|
+
dismissToast: (toastId) => this.toastController.dismissToast(toastId),
|
|
498
|
+
refreshModelUsageStatus: () => this.refreshModelUsageStatusFromClick(),
|
|
499
|
+
toggleAllThinkingExpanded: () => {
|
|
500
|
+
this.allThinkingExpanded = !this.allThinkingExpanded;
|
|
501
|
+
this.render();
|
|
502
|
+
},
|
|
503
|
+
toggleSuperCompactTools: () => {
|
|
504
|
+
this.superCompactTools = !this.superCompactTools;
|
|
505
|
+
this.render();
|
|
506
|
+
},
|
|
507
|
+
handleExtensionInputMouse: (event) => this.extensionUiController.handleCustomUiMouse(event),
|
|
508
|
+
render: () => this.render(),
|
|
509
|
+
}, this.popupMenus, this.popupActions, this.scrollController, this.commandController);
|
|
510
|
+
this.renderController = new AppRenderController({
|
|
511
|
+
isRunning: () => this.running && !this.terminalController.isSuspended(),
|
|
512
|
+
terminalColumns: () => this.terminalColumns(),
|
|
513
|
+
terminalRows: () => this.terminalRows(),
|
|
514
|
+
}, {
|
|
515
|
+
theme: this.theme,
|
|
516
|
+
screenStyler: this.screenStyler,
|
|
517
|
+
editorLayoutRenderer: this.editorLayoutRenderer,
|
|
518
|
+
scrollController: this.scrollController,
|
|
519
|
+
popupMenus: this.popupMenus,
|
|
520
|
+
mouseController: this.mouseController,
|
|
521
|
+
statusLineRenderer: this.statusLineRenderer,
|
|
522
|
+
tabLineRenderer: this.tabLineRenderer,
|
|
523
|
+
toastController: this.toastController,
|
|
524
|
+
voiceProgressOverlayText: () => this.voiceController.progressOverlayText(),
|
|
525
|
+
});
|
|
526
|
+
this.requestHistory = new AppRequestHistory({
|
|
527
|
+
noSession: this.options.noSession,
|
|
528
|
+
getInput: () => this.inputEditor.text,
|
|
529
|
+
setInput: (value) => this.inputEditor.setText(value),
|
|
530
|
+
resetInputMenuDismissals: () => this.popupMenus.resetInputMenuDismissals(),
|
|
531
|
+
render: () => this.render(),
|
|
532
|
+
});
|
|
533
|
+
this.shellController = new AppShellController({
|
|
534
|
+
cwd: this.options.cwd,
|
|
535
|
+
isRunning: () => this.running,
|
|
536
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
537
|
+
touchEntry: (entry) => this.touchEntry(entry),
|
|
538
|
+
setStatus: (status) => this.setStatus(status),
|
|
539
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
540
|
+
restoreSessionStatus: () => this.restoreSessionStatus(),
|
|
541
|
+
render: () => this.render(),
|
|
542
|
+
});
|
|
543
|
+
this.inputActions = new AppInputActionController({
|
|
544
|
+
runtime: () => this.runtime,
|
|
545
|
+
isRunning: () => this.running,
|
|
546
|
+
isSessionSwitching: () => this.tabsController.isSwitching(),
|
|
547
|
+
inputEditor: () => this.inputEditor,
|
|
548
|
+
requestHistory: () => this.requestHistory,
|
|
549
|
+
clearPersistedInputDraft: () => this.clearPersistedInputDraft(),
|
|
550
|
+
setStatus: (status) => this.setStatus(status),
|
|
551
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
552
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
553
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
554
|
+
addSessionAbortedEntry: () => this.sessionEvents.addSessionAbortedEntry(),
|
|
555
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
556
|
+
stopVoiceInput: () => this.voiceController.stopRecording(),
|
|
557
|
+
isShellCommandRunning: () => this.shellController.isRunning(),
|
|
558
|
+
runChatShellCommand: (command) => this.shellController.run(command),
|
|
559
|
+
sendShellInput: (text) => this.shellController.sendInput(text),
|
|
560
|
+
interruptShellCommand: () => this.shellController.interrupt(),
|
|
561
|
+
runInteractiveShellCommand: (command) => this.terminalController.runWithInteractiveTerminal(() => runInteractiveShellCommand(command, this.options.cwd)),
|
|
562
|
+
stop: () => this.stop(),
|
|
563
|
+
render: () => this.render(),
|
|
564
|
+
}, this.popupMenus, this.popupActions, this.queuedMessages);
|
|
565
|
+
this.inputController = new AppInputController({
|
|
566
|
+
inputEditor: this.inputEditor,
|
|
567
|
+
cwd: this.options.cwd,
|
|
568
|
+
handleExtensionTerminalInput: (data) => this.extensionUiController.handleTerminalInput(data),
|
|
569
|
+
extensionInputUsesEditor: () => this.extensionUiController.activeCustomUiUsesEditor(),
|
|
570
|
+
getInput: () => this.input,
|
|
571
|
+
getDirectPopupMenu: () => this.popupMenus.directMenu,
|
|
572
|
+
resetRequestHistoryNavigation: () => this.requestHistory.resetNavigation(),
|
|
573
|
+
resetInputMenuDismissals: () => this.popupMenus.resetInputMenuDismissals(),
|
|
574
|
+
render: () => this.render(),
|
|
575
|
+
moveActivePopupMenuSelection: (delta) => this.popupMenus.moveActivePopupMenuSelection(delta),
|
|
576
|
+
navigateRequestHistory: (delta) => this.requestHistory.navigate(delta),
|
|
577
|
+
scrollByLines: (delta) => this.scrollController.scrollByLines(delta),
|
|
578
|
+
scrollByPage: (delta) => this.scrollController.scrollByPage(delta),
|
|
579
|
+
handleMouse: (event) => this.mouseController.handleMouse(event),
|
|
580
|
+
handleEnter: () => this.inputActions.handleEnter(),
|
|
581
|
+
handleInterrupt: () => this.inputActions.handleInterrupt(),
|
|
582
|
+
handleEscape: () => this.inputActions.handleEscape(),
|
|
583
|
+
handleDirectPopupInput: (char) => this.popupMenus.handleDirectPopupInput(char),
|
|
584
|
+
autocompleteModel: () => this.popupMenus.autocompleteModel(),
|
|
585
|
+
autocompleteThinking: () => this.popupMenus.autocompleteThinking(),
|
|
586
|
+
autocompleteSlashCommand: () => this.popupMenus.autocompleteSlashCommand(),
|
|
587
|
+
toggleVoiceRecording: () => {
|
|
588
|
+
void this.voiceController.toggleRecording();
|
|
589
|
+
},
|
|
590
|
+
stop: () => this.stop(),
|
|
591
|
+
});
|
|
592
|
+
this.terminalController = new AppTerminalController({
|
|
593
|
+
isRunning: () => this.running,
|
|
594
|
+
setRunning: (running) => {
|
|
595
|
+
this.running = running;
|
|
596
|
+
},
|
|
597
|
+
runtime: () => this.runtime,
|
|
598
|
+
saveInputStateForQuit: () => this.tabsController.saveInputStateForQuit(),
|
|
599
|
+
disposeInactiveRuntimesForQuit: () => this.tabsController.disposeInactiveRuntimes((runtime) => this.terminalController.disposeRuntimeForQuit(runtime)),
|
|
600
|
+
render: () => this.render(),
|
|
601
|
+
handleInputChunk: (chunk) => this.inputController.handleChunk(chunk),
|
|
602
|
+
closeSdkMenuForStop: () => this.popupMenus.closeSdkMenu(undefined, { render: false, restoreStatus: false }),
|
|
603
|
+
clearToastTimers: () => this.clearToastTimers(),
|
|
604
|
+
stopBlinking: () => this.stopBlinking(),
|
|
605
|
+
stopSubagentsPolling: () => this.subagentsWidgetController.stopPolling(),
|
|
606
|
+
stopModelUsagePolling: () => this.modelUsageController.stopPolling(),
|
|
607
|
+
stopVoiceInput: () => this.voiceController.dispose(),
|
|
608
|
+
stopShellCommand: () => this.shellController.dispose(),
|
|
609
|
+
unsubscribeSession: () => {
|
|
610
|
+
this.sessionLifecycle.unsubscribeSession();
|
|
611
|
+
},
|
|
612
|
+
clearExtensionWidgets: () => this.extensionUiController.clearWidgets(),
|
|
613
|
+
resetRenderOutputBuffer: () => this.renderController.resetOutputBuffer(),
|
|
614
|
+
});
|
|
615
|
+
this.sessionLifecycle = new AppSessionLifecycleController({
|
|
616
|
+
options: this.options,
|
|
617
|
+
createRuntime: () => createPixRuntime(this.options, { eventBus: this.createExtensionEventBus() }),
|
|
618
|
+
entries: this.entries,
|
|
619
|
+
runtime: () => this.runtime,
|
|
620
|
+
setRuntime: (runtime) => {
|
|
621
|
+
this.runtime = runtime;
|
|
622
|
+
},
|
|
623
|
+
isRunning: () => this.running,
|
|
624
|
+
setRunning: (running) => {
|
|
625
|
+
this.running = running;
|
|
626
|
+
},
|
|
627
|
+
inputText: () => this.input,
|
|
628
|
+
setInput: (value) => this.setInput(value),
|
|
629
|
+
inputEditor: () => this.inputEditor,
|
|
630
|
+
enableTerminal: () => this.terminalController.enableTerminal(),
|
|
631
|
+
disposeRuntimeForQuit: (runtime) => this.terminalController.disposeRuntimeForQuit(runtime),
|
|
632
|
+
loadRequestHistory: () => this.requestHistory.load(),
|
|
633
|
+
startSubagentsPolling: () => this.subagentsWidgetController.startPolling(),
|
|
634
|
+
closeSdkMenuForBind: () => this.popupMenus.closeSdkMenu(undefined, { render: false, restoreStatus: false }),
|
|
635
|
+
clearExtensionWidgets: () => this.extensionUiController.clearWidgets(),
|
|
636
|
+
createExtensionUIContext: () => this.extensionUiController.createExtensionUIContext(),
|
|
637
|
+
extensionShutdownHandler: () => this.extensionShutdownHandler,
|
|
638
|
+
createExtensionCommandContextActions: (runtime) => this.extensionActions.createCommandContextActions(runtime),
|
|
639
|
+
handleExtensionError: (error) => this.extensionActions.handleExtensionError(error),
|
|
640
|
+
handleSessionEvent: (event) => this.handleSessionEvent(event),
|
|
641
|
+
addEntry: (entry) => this.addEntry(entry),
|
|
642
|
+
setStatus: (status) => this.setStatus(status),
|
|
643
|
+
showToast: (message, kind) => this.showToast(message, kind),
|
|
644
|
+
setSessionStatus: (session) => this.setSessionStatus(session),
|
|
645
|
+
setSessionActivity: (activity) => this.setSessionActivity(activity),
|
|
646
|
+
sessionEventsReset: () => this.sessionEvents.reset(),
|
|
647
|
+
resetSubagentsWidget: () => this.subagentsWidgetController.reset(),
|
|
648
|
+
resetTodoWidget: () => this.todoWidgetController.reset(),
|
|
649
|
+
conversationViewportClear: () => this.conversationViewport.clear(),
|
|
650
|
+
queuedMessagesReset: () => this.queuedMessages.reset(),
|
|
651
|
+
resetConversationMenuState: () => this.popupMenus.resetConversationMenuState(),
|
|
652
|
+
clearMouseRenderState: () => {
|
|
653
|
+
this.mouseController.renderedTargets.clear();
|
|
654
|
+
this.mouseController.renderedRowTexts.clear();
|
|
655
|
+
this.mouseController.statusModelTarget = undefined;
|
|
656
|
+
this.mouseController.statusThinkingTarget = undefined;
|
|
657
|
+
this.mouseController.statusContextTarget = undefined;
|
|
658
|
+
this.mouseController.statusModelUsageTarget = undefined;
|
|
659
|
+
this.mouseController.statusUserJumpTarget = undefined;
|
|
660
|
+
this.mouseController.statusThinkingExpandTarget = undefined;
|
|
661
|
+
this.mouseController.statusCompactToolsTarget = undefined;
|
|
662
|
+
this.mouseController.statusSessionTarget = undefined;
|
|
663
|
+
this.mouseController.statusPromptEnhancerTarget = undefined;
|
|
664
|
+
this.mouseController.statusVoiceMicTarget = undefined;
|
|
665
|
+
this.mouseController.statusVoiceLanguageTarget = undefined;
|
|
666
|
+
this.mouseController.tabLineTargets.length = 0;
|
|
667
|
+
},
|
|
668
|
+
scrollReset: () => this.scrollController.reset(),
|
|
669
|
+
loadSessionHistoryEntries: () => this.sessionEvents.loadSessionHistory(),
|
|
670
|
+
syncUserSessionEntryMetadata: () => this.workspaceActions.syncUserSessionEntryMetadata(),
|
|
671
|
+
restoreTabsAfterStartup: () => this.tabsController.restoreAfterStartup(),
|
|
672
|
+
render: () => this.render(),
|
|
673
|
+
});
|
|
674
|
+
this.slashCommands = this.commandController.slashCommands;
|
|
675
|
+
}
|
|
676
|
+
async start() {
|
|
677
|
+
await this.sessionLifecycle.start();
|
|
678
|
+
this.modelUsageController.startPolling();
|
|
679
|
+
this.nerdFontController.ensureInstalledOnStartup();
|
|
680
|
+
}
|
|
681
|
+
async bindCurrentSession() {
|
|
682
|
+
await this.sessionLifecycle.bindCurrentSession();
|
|
683
|
+
}
|
|
684
|
+
async activateRuntime(runtime) {
|
|
685
|
+
this.runtime = runtime;
|
|
686
|
+
runtime.setRebindSession(async () => {
|
|
687
|
+
await this.bindCurrentSession();
|
|
688
|
+
});
|
|
689
|
+
await this.bindCurrentSession();
|
|
690
|
+
}
|
|
691
|
+
createExtensionEventBus() {
|
|
692
|
+
return createIsolatedExtensionEventBus((channel, data) => {
|
|
693
|
+
if (channel === TERMINAL_BELL_ATTENTION_EVENT)
|
|
694
|
+
this.handleTerminalBellAttention(data);
|
|
695
|
+
if (channel === SUBAGENTS_LIVE_STATE_EVENT)
|
|
696
|
+
this.subagentsWidgetController.observeLiveState(data);
|
|
697
|
+
if (channel === TODO_STATE_EVENT)
|
|
698
|
+
this.todoWidgetController.observeLiveState(data);
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
handleTerminalBellAttention(data) {
|
|
702
|
+
const sessionFile = isRecord(data) && typeof data.sessionFile === "string" ? data.sessionFile : undefined;
|
|
703
|
+
this.tabsController.markTerminalBellAttention(sessionFile);
|
|
704
|
+
}
|
|
705
|
+
afterSessionReplacement(message) {
|
|
706
|
+
this.sessionLifecycle.afterSessionReplacement(message);
|
|
707
|
+
}
|
|
708
|
+
requireRuntime() {
|
|
709
|
+
return this.sessionLifecycle.requireRuntime();
|
|
710
|
+
}
|
|
711
|
+
restoreSessionStatus() {
|
|
712
|
+
if (this.runtime)
|
|
713
|
+
this.setSessionStatus(this.runtime.session);
|
|
714
|
+
}
|
|
715
|
+
setInput(value) {
|
|
716
|
+
if (value !== this.input) {
|
|
717
|
+
this.requestHistory.resetNavigation();
|
|
718
|
+
this.popupMenus.resetInputMenuDismissals();
|
|
719
|
+
}
|
|
720
|
+
this.input = value;
|
|
721
|
+
}
|
|
722
|
+
resetInputAfterProgrammaticEdit() {
|
|
723
|
+
this.requestHistory.resetNavigation();
|
|
724
|
+
this.popupMenus.resetInputMenuDismissals();
|
|
725
|
+
}
|
|
726
|
+
restoreTabInputState(text, cursor) {
|
|
727
|
+
this.requestHistory.resetNavigation();
|
|
728
|
+
this.popupMenus.resetInputMenuDismissals();
|
|
729
|
+
this.inputEditor.setText(text, cursor);
|
|
730
|
+
}
|
|
731
|
+
async clearPersistedInputDraft() {
|
|
732
|
+
await this.tabsController.setInputStateForTab(this.tabsController.activeInputTabId(), { text: "", cursor: 0 });
|
|
733
|
+
}
|
|
734
|
+
insertVoiceTranscript(text) {
|
|
735
|
+
const transcript = text.trim().replace(/\s+/gu, " ");
|
|
736
|
+
if (!transcript)
|
|
737
|
+
return;
|
|
738
|
+
const selection = this.inputEditor.selection;
|
|
739
|
+
const start = selection ? Math.min(selection.anchor, selection.active) : this.inputEditor.cursor;
|
|
740
|
+
const end = selection ? Math.max(selection.anchor, selection.active) : this.inputEditor.cursor;
|
|
741
|
+
const before = this.inputEditor.text.slice(0, start);
|
|
742
|
+
const after = this.inputEditor.text.slice(end);
|
|
743
|
+
const prefix = before.length > 0 && !/\s$/u.test(before) ? " " : "";
|
|
744
|
+
const suffix = after.length > 0 && !/^\s/u.test(after) ? " " : "";
|
|
745
|
+
this.requestHistory.resetNavigation();
|
|
746
|
+
this.popupMenus.resetInputMenuDismissals();
|
|
747
|
+
this.inputEditor.insert(`${prefix}${transcript}${suffix}`);
|
|
748
|
+
this.render();
|
|
749
|
+
}
|
|
750
|
+
setVoicePartialTranscript(text) {
|
|
751
|
+
if (this.voicePartialText === text)
|
|
752
|
+
return;
|
|
753
|
+
this.voicePartialText = text;
|
|
754
|
+
this.render();
|
|
755
|
+
}
|
|
756
|
+
addVoiceSystemMessage(message) {
|
|
757
|
+
this.addEntry({ id: createId("system"), kind: "system", text: message });
|
|
758
|
+
this.render();
|
|
759
|
+
}
|
|
760
|
+
resetSessionView() {
|
|
761
|
+
this.sessionLifecycle.resetSessionView();
|
|
762
|
+
}
|
|
763
|
+
loadSessionHistory() {
|
|
764
|
+
this.sessionLifecycle.loadSessionHistory();
|
|
765
|
+
}
|
|
766
|
+
async openSearchResultInNewTab(result) {
|
|
767
|
+
const opened = await this.tabsController.openSessionInNewTab(result.session.path);
|
|
768
|
+
if (!opened)
|
|
769
|
+
return;
|
|
770
|
+
this.workspaceActions.syncUserSessionEntryMetadata();
|
|
771
|
+
const target = searchResultTargetEntry(this.entries, result);
|
|
772
|
+
if (!this.scrollController.scrollToConversationText({
|
|
773
|
+
needles: searchResultScrollNeedles(result),
|
|
774
|
+
...(target ? { entryId: target.id } : {}),
|
|
775
|
+
})) {
|
|
776
|
+
this.showToast("Opened session, but could not locate the match", "warning");
|
|
777
|
+
this.setSessionStatus(this.runtime?.session);
|
|
778
|
+
this.render();
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
this.showToast("Opened search result", "success");
|
|
782
|
+
this.setSessionStatus(this.runtime?.session);
|
|
783
|
+
}
|
|
784
|
+
async loadSessionHistoryAsync(options) {
|
|
785
|
+
return this.sessionEvents.loadSessionHistoryAsync(options);
|
|
786
|
+
}
|
|
787
|
+
handleSessionEvent(event) {
|
|
788
|
+
this.sessionEvents.handleSessionEvent(event);
|
|
789
|
+
}
|
|
790
|
+
findEntry(id) {
|
|
791
|
+
return this.sessionEvents.findEntry(id);
|
|
792
|
+
}
|
|
793
|
+
findUserEntry(id) {
|
|
794
|
+
return this.sessionEvents.findUserEntry(id);
|
|
795
|
+
}
|
|
796
|
+
touchEntry(entry) {
|
|
797
|
+
this.sessionEvents.touchEntry(entry);
|
|
798
|
+
}
|
|
799
|
+
addEntry(entry) {
|
|
800
|
+
this.sessionEvents.addEntry(entry);
|
|
801
|
+
}
|
|
802
|
+
setStatus(status) {
|
|
803
|
+
this.statusController.setStatus(status);
|
|
804
|
+
}
|
|
805
|
+
setSessionStatus(session) {
|
|
806
|
+
this.statusController.setSessionStatus(session);
|
|
807
|
+
this.modelUsageController.observeSession(session);
|
|
808
|
+
this.tabsController.syncActiveTabFromRuntime();
|
|
809
|
+
}
|
|
810
|
+
setSessionActivity(activity) {
|
|
811
|
+
this.statusController.setSessionActivity(activity);
|
|
812
|
+
}
|
|
813
|
+
toolDefaultExpanded(toolName) {
|
|
814
|
+
return resolveToolRule(toolName, this.pixConfig.toolRenderer).defaultExpanded === true;
|
|
815
|
+
}
|
|
816
|
+
stopBlinking() {
|
|
817
|
+
this.blinkController.dispose();
|
|
818
|
+
}
|
|
819
|
+
async stop() {
|
|
820
|
+
await this.terminalController.stop();
|
|
821
|
+
}
|
|
822
|
+
refreshModelUsageStatusFromClick() {
|
|
823
|
+
const refresh = this.modelUsageController.refreshNow();
|
|
824
|
+
if (refresh.kind === "unsupported") {
|
|
825
|
+
this.showToast("Usage limits are unavailable for this model", "warning");
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
if (refresh.kind === "in-flight") {
|
|
829
|
+
this.showToast("Usage limits refresh already in progress", "info");
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
this.showToast("Refreshing model usage limits…", "info");
|
|
833
|
+
void refresh.promise.then((result) => {
|
|
834
|
+
if (result === "refreshed") {
|
|
835
|
+
this.showToast("Model usage limits refreshed", "success");
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
if (result === "unavailable") {
|
|
839
|
+
this.showToast("Usage limits are unavailable for this model", "warning");
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
this.showToast("Failed to refresh model usage limits", "error");
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
showToast(message, kind = "info") {
|
|
846
|
+
this.toastController.showToast(message, kind);
|
|
847
|
+
}
|
|
848
|
+
clearToastTimers() {
|
|
849
|
+
this.toastController.clearToastTimers();
|
|
850
|
+
}
|
|
851
|
+
render() {
|
|
852
|
+
this.renderController.render();
|
|
853
|
+
}
|
|
854
|
+
renderStatusLine() {
|
|
855
|
+
this.renderController.renderStatusLine();
|
|
856
|
+
}
|
|
857
|
+
terminalColumns() {
|
|
858
|
+
return Math.max(20, process.stdout.columns ?? 80);
|
|
859
|
+
}
|
|
860
|
+
terminalRows() {
|
|
861
|
+
return Math.max(8, process.stdout.rows ?? 24);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
function newTabRuntimeOptions(options) {
|
|
865
|
+
return {
|
|
866
|
+
cwd: options.cwd,
|
|
867
|
+
themeName: options.themeName,
|
|
868
|
+
noSession: false,
|
|
869
|
+
...(options.modelRef === undefined ? {} : { modelRef: options.modelRef }),
|
|
870
|
+
};
|
|
871
|
+
}
|