@bastani/atomic 0.9.11-alpha.4 → 0.9.11-alpha.6
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 +55 -0
- package/README.md +12 -5
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/README.md +3 -3
- package/dist/builtin/mcp/cli.js +0 -1
- package/dist/builtin/mcp/config.ts +0 -2
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/mcp/types.ts +0 -1
- package/dist/builtin/subagents/CHANGELOG.md +19 -0
- package/dist/builtin/subagents/README.md +10 -1
- package/dist/builtin/subagents/agents/code-simplifier.md +47 -102
- package/dist/builtin/subagents/agents/codebase-analyzer.md +27 -130
- package/dist/builtin/subagents/agents/codebase-locator.md +24 -83
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +60 -259
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +29 -207
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +28 -150
- package/dist/builtin/subagents/agents/codebase-research-locator.md +21 -118
- package/dist/builtin/subagents/agents/debugger.md +29 -65
- package/dist/builtin/subagents/agents/worker.md +23 -30
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/prompts/gather-context-and-clarify.md +18 -11
- package/dist/builtin/subagents/prompts/parallel-cleanup.md +34 -33
- package/dist/builtin/subagents/prompts/parallel-context-build.md +22 -36
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +20 -52
- package/dist/builtin/subagents/prompts/parallel-research.md +17 -41
- package/dist/builtin/subagents/prompts/parallel-review.md +23 -28
- package/dist/builtin/subagents/prompts/review-loop.md +18 -27
- package/dist/builtin/subagents/skills/subagent/SKILL.md +6 -6
- package/dist/builtin/subagents/src/extension/prompt-guidance.ts +4 -1
- package/dist/builtin/subagents/src/runs/background/async-execution-chain.ts +23 -4
- package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +2 -0
- package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +10 -0
- package/dist/builtin/subagents/src/runs/background/subagent-runner-step.ts +1 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +2 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +8 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +1 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +6 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +2 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +7 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +1 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-resume.ts +3 -0
- package/dist/builtin/subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +1 -2
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +1 -0
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +5 -3
- package/dist/builtin/subagents/src/shared/settings.ts +4 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +53 -0
- package/dist/builtin/workflows/README.md +72 -70
- package/dist/builtin/workflows/ambient.d.ts +0 -5
- package/dist/builtin/workflows/builtin/adversarial-verification-prompts.ts +7 -4
- package/dist/builtin/workflows/builtin/adversarial-verification-runner.ts +1 -1
- package/dist/builtin/workflows/builtin/adversarial-verification.ts +2 -1
- package/dist/builtin/workflows/builtin/classify-and-act-prompts.ts +5 -2
- package/dist/builtin/workflows/builtin/classify-and-act-runner.ts +5 -7
- package/dist/builtin/workflows/builtin/classify-and-act.ts +3 -2
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize-prompts.ts +6 -3
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize-runner.ts +5 -5
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.ts +3 -2
- package/dist/builtin/workflows/builtin/generate-and-filter-prompts.ts +7 -4
- package/dist/builtin/workflows/builtin/generate-and-filter-runner.ts +6 -3
- package/dist/builtin/workflows/builtin/generate-and-filter.ts +3 -2
- package/dist/builtin/workflows/builtin/goal-artifacts.ts +1 -1
- package/dist/builtin/workflows/builtin/goal-models.ts +39 -39
- package/dist/builtin/workflows/builtin/goal-orchestrator-prompts.ts +94 -0
- package/dist/builtin/workflows/builtin/goal-prompts.ts +66 -286
- package/dist/builtin/workflows/builtin/goal-reducer.ts +1 -1
- package/dist/builtin/workflows/builtin/goal-runner.ts +72 -116
- package/dist/builtin/workflows/builtin/goal.ts +9 -8
- package/dist/builtin/workflows/builtin/index.d.ts +17 -112
- package/dist/builtin/workflows/builtin/index.ts +1 -2
- package/dist/builtin/workflows/builtin/loop-until-done-prompts.ts +20 -12
- package/dist/builtin/workflows/builtin/loop-until-done-runner.ts +3 -0
- package/dist/builtin/workflows/builtin/loop-until-done.ts +3 -2
- package/dist/builtin/workflows/builtin/open-claude-design-phases.ts +52 -55
- package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +45 -52
- package/dist/builtin/workflows/builtin/open-claude-design-setup.ts +41 -46
- package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +16 -21
- package/dist/builtin/workflows/builtin/open-claude-design.ts +2 -1
- package/dist/builtin/workflows/builtin/ralph-core.ts +61 -57
- package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +41 -45
- package/dist/builtin/workflows/builtin/ralph-models.ts +33 -43
- package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +35 -117
- package/dist/builtin/workflows/builtin/ralph-runner.ts +81 -108
- package/dist/builtin/workflows/builtin/ralph.ts +2 -1
- package/dist/builtin/workflows/builtin/shared-prompts.ts +111 -80
- package/dist/builtin/workflows/builtin/steering-context.ts +51 -0
- package/dist/builtin/workflows/builtin/tournament-prompts.ts +21 -12
- package/dist/builtin/workflows/builtin/tournament-runner.ts +3 -0
- package/dist/builtin/workflows/builtin/tournament.ts +3 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/create-spec/SKILL.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +6 -8
- package/dist/builtin/workflows/skills/impeccable/reference/live.md +3 -4
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +2 -20
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +4 -42
- package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +3 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +2 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +0 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +4 -4
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +57 -252
- package/dist/builtin/workflows/skills/prompt-engineer/references/advanced_patterns.md +70 -226
- package/dist/builtin/workflows/skills/prompt-engineer/references/core_prompting.md +64 -103
- package/dist/builtin/workflows/skills/prompt-engineer/references/quality_improvement.md +81 -155
- package/dist/builtin/workflows/src/authoring.d.ts +5 -1
- package/dist/builtin/workflows/src/durable/backend.ts +68 -9
- package/dist/builtin/workflows/src/durable/boundary-lifecycle.ts +148 -0
- package/dist/builtin/workflows/src/durable/boundary-topology.ts +420 -0
- package/dist/builtin/workflows/src/durable/child-invocation.ts +14 -0
- package/dist/builtin/workflows/src/durable/child-primitive.ts +74 -44
- package/dist/builtin/workflows/src/durable/completed-catalog-stage-groups.ts +250 -0
- package/dist/builtin/workflows/src/durable/completed-catalog.ts +205 -131
- package/dist/builtin/workflows/src/durable/completed-inspection.ts +8 -2
- package/dist/builtin/workflows/src/durable/completed-subtree.ts +31 -0
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +28 -24
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +130 -3
- package/dist/builtin/workflows/src/durable/dbos-metadata.ts +18 -0
- package/dist/builtin/workflows/src/durable/scoped-backend.ts +64 -17
- package/dist/builtin/workflows/src/durable/stage-primitive.ts +60 -60
- package/dist/builtin/workflows/src/durable/stage-topology-validation.ts +234 -0
- package/dist/builtin/workflows/src/durable/stage-topology.ts +53 -0
- package/dist/builtin/workflows/src/durable/tool-failure-checkpoint.ts +49 -0
- package/dist/builtin/workflows/src/durable/tool-outcome.ts +120 -0
- package/dist/builtin/workflows/src/durable/tool-primitive.ts +367 -58
- package/dist/builtin/workflows/src/durable/types.ts +97 -0
- package/dist/builtin/workflows/src/durable/ui-primitive.ts +46 -0
- package/dist/builtin/workflows/src/durable/workflow-child-result.ts +58 -0
- package/dist/builtin/workflows/src/engine/options.ts +1 -0
- package/dist/builtin/workflows/src/engine/primitives/workflow.ts +19 -10
- package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +11 -1
- package/dist/builtin/workflows/src/engine/run-durable-topology.ts +190 -18
- package/dist/builtin/workflows/src/engine/run-terminal-event.ts +37 -0
- package/dist/builtin/workflows/src/engine/run-terminal-failure.ts +50 -0
- package/dist/builtin/workflows/src/engine/run-tool-execution-tracker.ts +152 -0
- package/dist/builtin/workflows/src/engine/run-tool-node-lifecycle.ts +87 -0
- package/dist/builtin/workflows/src/engine/run.ts +111 -110
- package/dist/builtin/workflows/src/engine/runtime.ts +15 -2
- package/dist/builtin/workflows/src/extension/extension-factory.ts +1 -0
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +11 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +6599 -4776
- package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +16 -5
- package/dist/builtin/workflows/src/extension/render-result.ts +16 -2
- package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +3 -0
- package/dist/builtin/workflows/src/extension/runtime.ts +4 -0
- package/dist/builtin/workflows/src/extension/wiring.ts +3 -1
- package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +1 -0
- package/dist/builtin/workflows/src/extension/workflow-durable-resume-command.ts +9 -3
- package/dist/builtin/workflows/src/extension/workflow-module-loader.ts +18 -3
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +27 -9
- package/dist/builtin/workflows/src/extension/workflow-status-summary.ts +43 -0
- package/dist/builtin/workflows/src/extension/workflow-targets.ts +34 -30
- package/dist/builtin/workflows/src/extension/workflow-tool-content.ts +12 -5
- package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +162 -63
- package/dist/builtin/workflows/src/runs/background/run-inspect.ts +7 -1
- package/dist/builtin/workflows/src/runs/background/status.ts +18 -8
- package/dist/builtin/workflows/src/runs/background/workflow-lifecycle-aggregate.ts +3 -11
- package/dist/builtin/workflows/src/runs/foreground/executor-child-boundary.ts +24 -21
- package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +1 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-lifecycle.ts +30 -13
- package/dist/builtin/workflows/src/runs/foreground/executor-prompt-nodes.ts +102 -53
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +13 -5
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +26 -8
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +11 -4
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-types.ts +4 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +7 -1
- package/dist/builtin/workflows/src/runs/foreground/postmortem-stage-chat.ts +35 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +136 -17
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +12 -4
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +35 -42
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-options.ts +5 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-pause.ts +195 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-session-options.ts +0 -13
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +14 -2
- package/dist/builtin/workflows/src/runs/shared/model-fallback-candidates.ts +3 -143
- package/dist/builtin/workflows/src/sdk-surface.ts +1 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +6 -11
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +6 -11
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +57 -6
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +76 -11
- package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +206 -116
- package/dist/builtin/workflows/src/shared/intercom-group.ts +17 -10
- package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +30 -0
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +5 -0
- package/dist/builtin/workflows/src/shared/render-inputs-schema.ts +3 -3
- package/dist/builtin/workflows/src/shared/store-factory.ts +2 -0
- package/dist/builtin/workflows/src/shared/store-internal.ts +8 -0
- package/dist/builtin/workflows/src/shared/store-public-types.ts +8 -0
- package/dist/builtin/workflows/src/shared/store-run-methods.ts +9 -0
- package/dist/builtin/workflows/src/shared/store-stage-methods.ts +2 -0
- package/dist/builtin/workflows/src/shared/store-tool-node-methods.ts +46 -0
- package/dist/builtin/workflows/src/shared/store-types.ts +34 -0
- package/dist/builtin/workflows/src/shared/types.ts +14 -24
- package/dist/builtin/workflows/src/shared/workflow-failures-classifier.ts +11 -5
- package/dist/builtin/workflows/src/shared/workflow-failures-signals.ts +58 -0
- package/dist/builtin/workflows/src/shared/workflow-run-ownership.ts +53 -0
- package/dist/builtin/workflows/src/tui/graph-view-input.ts +2 -8
- package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +11 -4
- package/dist/builtin/workflows/src/tui/graph-view-render.ts +1 -0
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +27 -9
- package/dist/builtin/workflows/src/tui/graph-view-types.ts +4 -3
- package/dist/builtin/workflows/src/tui/node-card.ts +4 -3
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +0 -4
- package/dist/builtin/workflows/src/tui/run-detail.ts +53 -17
- package/dist/builtin/workflows/src/tui/session-list.ts +8 -4
- package/dist/builtin/workflows/src/tui/stage-chat-view-render-helpers.ts +12 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-render-settings.ts +21 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +3 -19
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -2
- package/dist/builtin/workflows/src/tui/switcher.ts +13 -3
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-handle.ts +1 -1
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +0 -9
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +16 -49
- package/dist/builtin/workflows/src/tui/workflow-status.ts +7 -0
- package/dist/builtin/workflows/src/workflows/identity.ts +1 -1
- package/dist/cli/args.d.ts +0 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -20
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -2
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +2 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.js +2 -2
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/config-self-update.js +1 -1
- package/dist/config-self-update.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +34 -10
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-accessors.d.ts.map +1 -1
- package/dist/core/agent-session-accessors.js +2 -1
- package/dist/core/agent-session-accessors.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts +4 -3
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +55 -59
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts +9 -6
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +32 -13
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts +11 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +87 -19
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-custom-message-commit.d.ts +14 -0
- package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -0
- package/dist/core/agent-session-custom-message-commit.js +141 -0
- package/dist/core/agent-session-custom-message-commit.js.map +1 -0
- package/dist/core/agent-session-delivery-forwarding.d.ts +9 -0
- package/dist/core/agent-session-delivery-forwarding.d.ts.map +1 -0
- package/dist/core/agent-session-delivery-forwarding.js +36 -0
- package/dist/core/agent-session-delivery-forwarding.js.map +1 -0
- package/dist/core/agent-session-events.d.ts +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +45 -14
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts +2 -6
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +18 -11
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts +5 -2
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +91 -97
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +47 -39
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts +2 -38
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +5 -147
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.d.ts +47 -0
- package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -0
- package/dist/core/agent-session-persistent-custom-messages.js +267 -0
- package/dist/core/agent-session-persistent-custom-messages.js.map +1 -0
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +34 -9
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts +2 -0
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +42 -16
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-queue-pause.d.ts +10 -0
- package/dist/core/agent-session-queue-pause.d.ts.map +1 -0
- package/dist/core/agent-session-queue-pause.js +86 -0
- package/dist/core/agent-session-queue-pause.js.map +1 -0
- package/dist/core/agent-session-retry.d.ts +0 -11
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +8 -57
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-runtime-auth.d.ts +6 -0
- package/dist/core/agent-session-runtime-auth.d.ts.map +1 -0
- package/dist/core/agent-session-runtime-auth.js +26 -0
- package/dist/core/agent-session-runtime-auth.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +13 -2
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +32 -6
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +0 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -7
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +3 -0
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +6 -1
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +2 -18
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-transfer.d.ts +4 -0
- package/dist/core/agent-session-transfer.d.ts.map +1 -0
- package/dist/core/agent-session-transfer.js +71 -0
- package/dist/core/agent-session-transfer.js.map +1 -0
- package/dist/core/agent-session-tree.js +1 -1
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -11
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js +0 -3
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +12 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +8 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +31 -33
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/auth-storage.js +2 -2
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +5 -3
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +5 -4
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +0 -6
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +8 -3
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +17 -6
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction-boundary.d.ts +18 -1
- package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
- package/dist/core/compaction/compaction-boundary.js +2 -2
- package/dist/core/compaction/compaction-boundary.js.map +1 -1
- package/dist/core/compaction/compaction-runner.d.ts +61 -6
- package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/compaction-runner.js +242 -18
- package/dist/core/compaction/compaction-runner.js.map +1 -1
- package/dist/core/compaction/compaction-types.d.ts +53 -2
- package/dist/core/compaction/compaction-types.d.ts.map +1 -1
- package/dist/core/compaction/compaction-types.js.map +1 -1
- package/dist/core/compaction/fallback-planner.d.ts +64 -0
- package/dist/core/compaction/fallback-planner.d.ts.map +1 -0
- package/dist/core/compaction/fallback-planner.js +75 -0
- package/dist/core/compaction/fallback-planner.js.map +1 -0
- package/dist/core/compaction/index.d.ts +3 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +3 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/planner-outcome.d.ts +86 -0
- package/dist/core/compaction/planner-outcome.d.ts.map +1 -0
- package/dist/core/compaction/planner-outcome.js +122 -0
- package/dist/core/compaction/planner-outcome.js.map +1 -0
- package/dist/core/compaction/range-planner-diagnostics.d.ts +58 -6
- package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -1
- package/dist/core/compaction/range-planner-diagnostics.js +69 -31
- package/dist/core/compaction/range-planner-diagnostics.js.map +1 -1
- package/dist/core/compaction/range-planner.d.ts +36 -8
- package/dist/core/compaction/range-planner.d.ts.map +1 -1
- package/dist/core/compaction/range-planner.js +136 -51
- package/dist/core/compaction/range-planner.js.map +1 -1
- package/dist/core/compaction/region-trimming.d.ts +34 -0
- package/dist/core/compaction/region-trimming.d.ts.map +1 -0
- package/dist/core/compaction/region-trimming.js +73 -0
- package/dist/core/compaction/region-trimming.js.map +1 -0
- package/dist/core/compaction/transcript-serialization.d.ts +8 -1
- package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
- package/dist/core/compaction/transcript-serialization.js +78 -27
- package/dist/core/compaction/transcript-serialization.js.map +1 -1
- package/dist/core/context-tool-pairing.d.ts +19 -0
- package/dist/core/context-tool-pairing.d.ts.map +1 -0
- package/dist/core/context-tool-pairing.js +50 -0
- package/dist/core/context-tool-pairing.js.map +1 -0
- package/dist/core/diagnostics.d.ts +8 -0
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +3 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -0
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +48 -27
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts +2 -4
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +199 -18
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/message-types.d.ts +7 -4
- package/dist/core/extensions/message-types.d.ts.map +1 -1
- package/dist/core/extensions/message-types.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +9 -4
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts +2 -0
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +4 -0
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +28 -20
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +25 -0
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/tool-types.d.ts +7 -3
- package/dist/core/extensions/tool-types.d.ts.map +1 -1
- package/dist/core/extensions/tool-types.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +14 -4
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/fallback-models.d.ts +37 -0
- package/dist/core/fallback-models.d.ts.map +1 -0
- package/dist/core/fallback-models.js +48 -0
- package/dist/core/fallback-models.js.map +1 -0
- package/dist/core/flattened-tool-arguments.d.ts +4 -7
- package/dist/core/flattened-tool-arguments.d.ts.map +1 -1
- package/dist/core/flattened-tool-arguments.js +4 -7
- package/dist/core/flattened-tool-arguments.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +0 -5
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/messages.d.ts +14 -2
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +28 -4
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-capabilities.d.ts +18 -0
- package/dist/core/model-capabilities.d.ts.map +1 -0
- package/dist/core/model-capabilities.js +23 -0
- package/dist/core/model-capabilities.js.map +1 -0
- package/dist/core/model-registry-auth.d.ts.map +1 -1
- package/dist/core/model-registry-auth.js +0 -2
- package/dist/core/model-registry-auth.js.map +1 -1
- package/dist/core/model-registry-builtins.d.ts +0 -2
- package/dist/core/model-registry-builtins.d.ts.map +1 -1
- package/dist/core/model-registry-builtins.js +9 -76
- package/dist/core/model-registry-builtins.js.map +1 -1
- package/dist/core/model-registry-custom-loader.d.ts.map +1 -1
- package/dist/core/model-registry-custom-loader.js +1 -12
- package/dist/core/model-registry-custom-loader.js.map +1 -1
- package/dist/core/model-registry-dynamic.d.ts.map +1 -1
- package/dist/core/model-registry-dynamic.js +3 -15
- package/dist/core/model-registry-dynamic.js.map +1 -1
- package/dist/core/model-registry-extension-refresh.d.ts +23 -0
- package/dist/core/model-registry-extension-refresh.d.ts.map +1 -0
- package/dist/core/model-registry-extension-refresh.js +32 -0
- package/dist/core/model-registry-extension-refresh.js.map +1 -0
- package/dist/core/model-registry-schemas.d.ts +118 -9
- package/dist/core/model-registry-schemas.d.ts.map +1 -1
- package/dist/core/model-registry-schemas.js +10 -3
- package/dist/core/model-registry-schemas.js.map +1 -1
- package/dist/core/model-registry-types.d.ts +5 -5
- package/dist/core/model-registry-types.d.ts.map +1 -1
- package/dist/core/model-registry-types.js.map +1 -1
- package/dist/core/model-registry-validation.d.ts +7 -0
- package/dist/core/model-registry-validation.d.ts.map +1 -0
- package/dist/core/model-registry-validation.js +12 -0
- package/dist/core/model-registry-validation.js.map +1 -0
- package/dist/core/model-registry.d.ts +5 -3
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +34 -33
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver-defaults.d.ts.map +1 -1
- package/dist/core/model-resolver-defaults.js +0 -1
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-resolver-initial.d.ts.map +1 -1
- package/dist/core/model-resolver-initial.js +9 -0
- package/dist/core/model-resolver-initial.js.map +1 -1
- package/dist/core/model-resolver-patterns.d.ts.map +1 -1
- package/dist/core/model-resolver-patterns.js +0 -2
- package/dist/core/model-resolver-patterns.js.map +1 -1
- package/dist/core/model-resolver-scope.d.ts +2 -0
- package/dist/core/model-resolver-scope.d.ts.map +1 -1
- package/dist/core/model-resolver-scope.js +18 -4
- package/dist/core/model-resolver-scope.js.map +1 -1
- package/dist/core/model-resolver-types.d.ts +2 -0
- package/dist/core/model-resolver-types.d.ts.map +1 -1
- package/dist/core/model-resolver-types.js.map +1 -1
- package/dist/core/oauth-provider-bridge.d.ts +21 -0
- package/dist/core/oauth-provider-bridge.d.ts.map +1 -1
- package/dist/core/oauth-provider-bridge.js +68 -7
- package/dist/core/oauth-provider-bridge.js.map +1 -1
- package/dist/core/package-manager-auto-resources.d.ts.map +1 -1
- package/dist/core/package-manager-auto-resources.js +12 -4
- package/dist/core/package-manager-auto-resources.js.map +1 -1
- package/dist/core/package-manager-resolver.d.ts.map +1 -1
- package/dist/core/package-manager-resolver.js +42 -11
- package/dist/core/package-manager-resolver.js.map +1 -1
- package/dist/core/package-manager-types.d.ts +2 -0
- package/dist/core/package-manager-types.d.ts.map +1 -1
- package/dist/core/package-manager-types.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +17 -11
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader-assets.d.ts.map +1 -1
- package/dist/core/resource-loader-assets.js +30 -4
- package/dist/core/resource-loader-assets.js.map +1 -1
- package/dist/core/resource-loader-context-files.d.ts.map +1 -1
- package/dist/core/resource-loader-context-files.js +3 -1
- package/dist/core/resource-loader-context-files.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts +2 -1
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js +3 -0
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-extensions.d.ts +1 -0
- package/dist/core/resource-loader-extensions.d.ts.map +1 -1
- package/dist/core/resource-loader-extensions.js +120 -7
- package/dist/core/resource-loader-extensions.js.map +1 -1
- package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
- package/dist/core/resource-loader-package-resources.js +14 -1
- package/dist/core/resource-loader-package-resources.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +2 -1
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/resource-loader-source-info.d.ts.map +1 -1
- package/dist/core/resource-loader-source-info.js +6 -3
- package/dist/core/resource-loader-source-info.js.map +1 -1
- package/dist/core/sdk-types.d.ts +11 -10
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -84
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +3 -3
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +18 -25
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +2 -5
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +2 -8
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +3 -3
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +49 -27
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-storage.d.ts +6 -0
- package/dist/core/session-manager-storage.d.ts.map +1 -1
- package/dist/core/session-manager-storage.js +38 -5
- package/dist/core/session-manager-storage.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +6 -6
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +0 -4
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +0 -50
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-core.d.ts +2 -4
- package/dist/core/settings-manager-core.d.ts.map +1 -1
- package/dist/core/settings-manager-core.js +5 -51
- package/dist/core/settings-manager-core.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-storage.d.ts +3 -1
- package/dist/core/settings-storage.d.ts.map +1 -1
- package/dist/core/settings-storage.js +22 -0
- package/dist/core/settings-storage.js.map +1 -1
- package/dist/core/settings-types.d.ts +2 -4
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +69 -23
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +3 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +2 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +11 -0
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.js +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
- package/dist/core/tools/bash-session-environment.d.ts +13 -0
- package/dist/core/tools/bash-session-environment.d.ts.map +1 -0
- package/dist/core/tools/bash-session-environment.js +35 -0
- package/dist/core/tools/bash-session-environment.js.map +1 -0
- package/dist/core/tools/bash.d.ts +4 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +16 -8
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +3 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +10 -2
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +3 -2
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +9 -3
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/main-session-options.d.ts.map +1 -1
- package/dist/main-session-options.js +0 -4
- package/dist/main-session-options.js.map +1 -1
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +2 -1
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -17
- package/dist/main.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
- package/dist/modes/interactive/chat-input-actions.js +14 -96
- package/dist/modes/interactive/chat-input-actions.js.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts +9 -8
- package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.js +68 -24
- package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
- package/dist/modes/interactive/components/atomic-working-status.d.ts +52 -0
- package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -0
- package/dist/modes/interactive/components/atomic-working-status.js +202 -0
- package/dist/modes/interactive/components/atomic-working-status.js.map +1 -0
- package/dist/modes/interactive/components/chat-message-renderer.js +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js +99 -7
- package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-editor.js +3 -3
- package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +52 -9
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +23 -7
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +2 -0
- package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.js +67 -18
- package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +9 -0
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +5 -0
- package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.d.ts +10 -0
- package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js +2 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +3 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +9 -2
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +3 -2
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +14 -43
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +18 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/startup-identity.d.ts +22 -0
- package/dist/modes/interactive/components/startup-identity.d.ts.map +1 -0
- package/dist/modes/interactive/components/startup-identity.js +58 -0
- package/dist/modes/interactive/components/startup-identity.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.js +0 -6
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-model.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-model.js +0 -1
- package/dist/modes/interactive/components/tree-selector-model.js.map +1 -1
- package/dist/modes/interactive/components/working-status.d.ts +5 -11
- package/dist/modes/interactive/components/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/working-status.js +14 -15
- package/dist/modes/interactive/components/working-status.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +23 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +120 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-agent-events.js +25 -20
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +16 -6
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +3 -0
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.d.ts +2 -1
- package/dist/modes/interactive/interactive-bash-compact.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +8 -0
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +49 -19
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +4 -3
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +3 -2
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-initial-session-binding.d.ts +4 -0
- package/dist/modes/interactive/interactive-initial-session-binding.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-initial-session-binding.js +23 -0
- package/dist/modes/interactive/interactive-initial-session-binding.js.map +1 -0
- package/dist/modes/interactive/interactive-input-handling.d.ts +2 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +27 -51
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +11 -7
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +14 -6
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -4
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +2 -4
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -8
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-model-catalog-startup.d.ts +2 -3
- package/dist/modes/interactive/interactive-model-catalog-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-catalog-startup.js +3 -6
- package/dist/modes/interactive/interactive-model-catalog-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +26 -97
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-pause.d.ts +4 -0
- package/dist/modes/interactive/interactive-pause.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-pause.js +8 -0
- package/dist/modes/interactive/interactive-pause.js.map +1 -0
- package/dist/modes/interactive/interactive-process-lifecycle.js +5 -4
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-prompt-turn.d.ts +2 -0
- package/dist/modes/interactive/interactive-prompt-turn.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-prompt-turn.js +41 -0
- package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -0
- package/dist/modes/interactive/interactive-render-chat.js +20 -8
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-paths.js +11 -2
- package/dist/modes/interactive/interactive-resource-paths.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js +99 -0
- package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup-chat-container.d.ts +20 -0
- package/dist/modes/interactive/interactive-startup-chat-container.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-startup-chat-container.js +26 -0
- package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -0
- package/dist/modes/interactive/interactive-startup.d.ts +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +30 -25
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-summarization-retry-events.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-summarization-retry-events.js +9 -3
- package/dist/modes/interactive/interactive-summarization-retry-events.js.map +1 -1
- package/dist/modes/interactive/theme/catppuccin-frappe.json +1 -1
- package/dist/modes/interactive/theme/catppuccin-latte.json +1 -1
- package/dist/modes/interactive/theme/catppuccin-macchiato.json +1 -1
- package/dist/modes/interactive/theme/catppuccin-mocha.json +9 -1
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme-class.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-class.js +7 -0
- package/dist/modes/interactive/theme/theme-class.js.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.js +4 -0
- package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +32 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.js +8 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +15 -2
- package/dist/modes/interactive/whimsical-messages.d.ts +1 -0
- package/dist/modes/interactive/whimsical-messages.d.ts.map +1 -1
- package/dist/modes/interactive/whimsical-messages.js +2 -2
- package/dist/modes/interactive/whimsical-messages.js.map +1 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.js +3 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/engine-args.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-args.js +0 -1
- package/dist/modes/interactive-engine/engine-args.js.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +5 -17
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.js +8 -19
- package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js +3 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-auth.d.ts +10 -0
- package/dist/modes/interactive-engine/isolated-auth.d.ts.map +1 -0
- package/dist/modes/interactive-engine/isolated-auth.js +14 -0
- package/dist/modes/interactive-engine/isolated-auth.js.map +1 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +9 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +46 -34
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +3 -10
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.js +10 -1
- package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
- package/dist/modes/interactive-engine/remote-queue-pause.d.ts +13 -0
- package/dist/modes/interactive-engine/remote-queue-pause.d.ts.map +1 -0
- package/dist/modes/interactive-engine/remote-queue-pause.js +38 -0
- package/dist/modes/interactive-engine/remote-queue-pause.js.map +1 -0
- package/dist/modes/interactive-engine/remote-renderer.d.ts +3 -1
- package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-renderer.js +4 -1
- package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +5 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts +2 -7
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +7 -24
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/queued-writer.d.ts +19 -0
- package/dist/modes/rpc/queued-writer.d.ts.map +1 -0
- package/dist/modes/rpc/{bounded-writer.js → queued-writer.js} +7 -30
- package/dist/modes/rpc/queued-writer.js.map +1 -0
- package/dist/modes/rpc/rpc-bash-request-owners.d.ts +24 -0
- package/dist/modes/rpc/rpc-bash-request-owners.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-bash-request-owners.js +45 -0
- package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -0
- package/dist/modes/rpc/rpc-client-api.d.ts +8 -5
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js +10 -11
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts +1 -4
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +2 -14
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +8 -4
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +21 -30
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts +7 -4
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +76 -93
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.d.ts +3 -3
- package/dist/modes/rpc/rpc-input-scheduler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.js +7 -4
- package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +5 -5
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-model-fallback-prompt.d.ts +4 -0
- package/dist/modes/rpc/rpc-model-fallback-prompt.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-model-fallback-prompt.js +11 -0
- package/dist/modes/rpc/rpc-model-fallback-prompt.js.map +1 -0
- package/dist/modes/rpc/rpc-oauth-client.d.ts +22 -0
- package/dist/modes/rpc/rpc-oauth-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-oauth-client.js +74 -0
- package/dist/modes/rpc/rpc-oauth-client.js.map +1 -0
- package/dist/modes/rpc/rpc-oauth-interaction.d.ts +9 -0
- package/dist/modes/rpc/rpc-oauth-interaction.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-oauth-interaction.js +49 -0
- package/dist/modes/rpc/rpc-oauth-interaction.js.map +1 -0
- package/dist/modes/rpc/rpc-output-buffer.d.ts +2 -1
- package/dist/modes/rpc/rpc-output-buffer.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-output-buffer.js +4 -39
- package/dist/modes/rpc/rpc-output-buffer.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.d.ts +23 -0
- package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-provider-auth.js +145 -0
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -0
- package/dist/modes/rpc/rpc-responses.d.ts +0 -1
- package/dist/modes/rpc/rpc-responses.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-responses.js +0 -14
- package/dist/modes/rpc/rpc-responses.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +83 -27
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +21 -8
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +3 -1
- package/dist/utils/version-check.js.map +1 -1
- package/docs/changelog.mdx +12 -1
- package/docs/compaction.md +101 -18
- package/docs/custom-provider.md +13 -4
- package/docs/docs.json +1 -0
- package/docs/environment-variables.md +37 -0
- package/docs/extensions.md +45 -9
- package/docs/index.md +1 -0
- package/docs/intercom.md +1 -1
- package/docs/json.md +4 -4
- package/docs/keybindings.md +4 -2
- package/docs/llama-cpp.md +3 -1
- package/docs/models.md +29 -43
- package/docs/providers.md +18 -24
- package/docs/quickstart.md +19 -16
- package/docs/rpc.md +38 -85
- package/docs/sdk.md +15 -22
- package/docs/session-format.md +2 -15
- package/docs/sessions.md +1 -1
- package/docs/settings.md +10 -15
- package/docs/skills.md +8 -0
- package/docs/subagents.md +24 -8
- package/docs/themes.md +10 -1
- package/docs/tui.md +3 -3
- package/docs/usage.md +30 -2
- package/docs/windows.md +1 -1
- package/docs/workflows.md +1128 -522
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/handoff.ts +8 -1
- package/examples/extensions/message-renderer.ts +2 -2
- package/examples/extensions/summarize.ts +3 -0
- package/examples/extensions/working-indicator.ts +2 -2
- package/npm-shrinkwrap.json +40 -46
- package/package.json +9 -7
- package/dist/builtin/cursor/CHANGELOG.md +0 -281
- package/dist/builtin/cursor/LICENSE +0 -26
- package/dist/builtin/cursor/README.md +0 -24
- package/dist/builtin/cursor/index.ts +0 -9
- package/dist/builtin/cursor/package.json +0 -47
- package/dist/builtin/cursor/src/auth.ts +0 -352
- package/dist/builtin/cursor/src/catalog-cache.ts +0 -155
- package/dist/builtin/cursor/src/config.ts +0 -123
- package/dist/builtin/cursor/src/conversation-state.ts +0 -135
- package/dist/builtin/cursor/src/cursor-models-raw.json +0 -412
- package/dist/builtin/cursor/src/model-mapper.ts +0 -369
- package/dist/builtin/cursor/src/model-reference.ts +0 -282
- package/dist/builtin/cursor/src/models.ts +0 -54
- package/dist/builtin/cursor/src/native-loader.ts +0 -71
- package/dist/builtin/cursor/src/proto/README.md +0 -34
- package/dist/builtin/cursor/src/proto/agent_pb.ts +0 -15294
- package/dist/builtin/cursor/src/proto/protobuf-codec-base64.ts +0 -22
- package/dist/builtin/cursor/src/proto/protobuf-codec-json.ts +0 -44
- package/dist/builtin/cursor/src/proto/protobuf-codec-request.ts +0 -311
- package/dist/builtin/cursor/src/proto/protobuf-codec-wire.ts +0 -248
- package/dist/builtin/cursor/src/proto/protobuf-codec.ts +0 -200
- package/dist/builtin/cursor/src/provider.ts +0 -301
- package/dist/builtin/cursor/src/stream.ts +0 -494
- package/dist/builtin/cursor/src/transport-errors.ts +0 -74
- package/dist/builtin/cursor/src/transport-frame.ts +0 -56
- package/dist/builtin/cursor/src/transport-http2.ts +0 -122
- package/dist/builtin/cursor/src/transport-native-client.ts +0 -161
- package/dist/builtin/cursor/src/transport-run-stream.ts +0 -188
- package/dist/builtin/cursor/src/transport-timeouts.ts +0 -87
- package/dist/builtin/cursor/src/transport-types.ts +0 -143
- package/dist/builtin/cursor/src/transport.ts +0 -26
- package/dist/builtin/workflows/builtin/deep-research-codebase-runner.ts +0 -492
- package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +0 -383
- package/dist/builtin/workflows/builtin/deep-research-codebase.d.ts +0 -35
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +0 -47
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +0 -516
- package/dist/core/context-window.d.ts +0 -54
- package/dist/core/context-window.d.ts.map +0 -1
- package/dist/core/context-window.js +0 -110
- package/dist/core/context-window.js.map +0 -1
- package/dist/core/copilot-anthropic-sse-repair.d.ts +0 -23
- package/dist/core/copilot-anthropic-sse-repair.d.ts.map +0 -1
- package/dist/core/copilot-anthropic-sse-repair.js +0 -340
- package/dist/core/copilot-anthropic-sse-repair.js.map +0 -1
- package/dist/core/copilot-errors.d.ts +0 -9
- package/dist/core/copilot-errors.d.ts.map +0 -1
- package/dist/core/copilot-errors.js +0 -32
- package/dist/core/copilot-errors.js.map +0 -1
- package/dist/core/copilot-gemini-payload-sanitizer.d.ts +0 -72
- package/dist/core/copilot-gemini-payload-sanitizer.d.ts.map +0 -1
- package/dist/core/copilot-gemini-payload-sanitizer.js +0 -296
- package/dist/core/copilot-gemini-payload-sanitizer.js.map +0 -1
- package/dist/core/copilot-gemini-reasoning.d.ts +0 -126
- package/dist/core/copilot-gemini-reasoning.d.ts.map +0 -1
- package/dist/core/copilot-gemini-reasoning.js +0 -265
- package/dist/core/copilot-gemini-reasoning.js.map +0 -1
- package/dist/core/copilot-gemini-tool-arguments.d.ts +0 -42
- package/dist/core/copilot-gemini-tool-arguments.d.ts.map +0 -1
- package/dist/core/copilot-gemini-tool-arguments.js +0 -159
- package/dist/core/copilot-gemini-tool-arguments.js.map +0 -1
- package/dist/core/copilot-hosts.d.ts +0 -12
- package/dist/core/copilot-hosts.d.ts.map +0 -1
- package/dist/core/copilot-hosts.js +0 -33
- package/dist/core/copilot-hosts.js.map +0 -1
- package/dist/core/copilot-model-catalog.d.ts +0 -114
- package/dist/core/copilot-model-catalog.d.ts.map +0 -1
- package/dist/core/copilot-model-catalog.js +0 -392
- package/dist/core/copilot-model-catalog.js.map +0 -1
- package/dist/core/copilot-model-static-fallbacks.d.ts +0 -43
- package/dist/core/copilot-model-static-fallbacks.d.ts.map +0 -1
- package/dist/core/copilot-model-static-fallbacks.js +0 -50
- package/dist/core/copilot-model-static-fallbacks.js.map +0 -1
- package/dist/core/copilot-model-synthesis.d.ts +0 -10
- package/dist/core/copilot-model-synthesis.d.ts.map +0 -1
- package/dist/core/copilot-model-synthesis.js +0 -91
- package/dist/core/copilot-model-synthesis.js.map +0 -1
- package/dist/modes/interactive/components/context-window-selector.d.ts +0 -53
- package/dist/modes/interactive/components/context-window-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/context-window-selector.js +0 -136
- package/dist/modes/interactive/components/context-window-selector.js.map +0 -1
- package/dist/modes/rpc/bounded-writer.d.ts +0 -27
- package/dist/modes/rpc/bounded-writer.d.ts.map +0 -1
- package/dist/modes/rpc/bounded-writer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-render-chat.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-render-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAsK,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,sBAAsB,EA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AgB;QAAE,OAAO,KAAK,CAAC;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QAC5C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACpB,OAAO,OAAO,KAAK,0BAA0B,GAAG,MAAM,CAAC,aAAa,CAAC;AACvE,CAAC","sourcesContent":["import { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type AgentMessage, type Component, type VerbatimCompactionResult, type SessionContext, type TruncationResult, type ChatMessageEntry, type ChatMessageRenderOptions, Spacer, Text, parseSkillBlock, AssistantMessageComponent, BashExecutionComponent, BranchSummaryMessageComponent, chatEntriesFromAgentMessages, renderChatMessageEntry, addChatTranscriptEntry, CompactionBoundaryMessageComponent, CustomMessageComponent, SkillInvocationMessageComponent, ToolExecutionComponent, UserMessageComponent, recordTimeSinceReset, theme } from \"./interactive-mode-deps.ts\";\nimport { yieldToEventLoop } from \"../../utils/event-loop.ts\";\nimport { VERBATIM_COMPACTION_PREFIX } from \"../../core/messages.ts\";\nimport { buildContextEntries, sessionEntryToContextMessages, type SessionEntry } from \"../../core/session-manager.ts\";\nimport { IsolatedInteractiveRuntime } from \"../interactive-engine/isolated-runtime.ts\";\nimport { RemoteCustomMessageComponent, RemoteToolExecutionComponent } from \"../interactive-engine/remote-renderer.ts\";\nimport type { CustomEntry } from \"../../core/session-manager.ts\";\nimport { CustomEntryComponent } from \"./components/custom-entry.ts\";\nimport { CACHE_TTL_MS, collectCacheMisses } from \"../../core/cache-stats.ts\";\n\nInteractiveModeBase.prototype.showStatus = function(this: InteractiveModeBase, message: string): void {\n const children = this.chatContainer.children;\n const last =\n children.length > 0 ? children[children.length - 1] : undefined;\n const secondLast =\n children.length > 1 ? children[children.length - 2] : undefined;\n\n if (\n last &&\n secondLast &&\n last === this.lastStatusText &&\n secondLast === this.lastStatusSpacer\n ) {\n this.lastStatusText.setText(theme.fg(\"dim\", message));\n this.ui.requestRender();\n return;\n }\n\n const spacer = new Spacer(1);\n const text = new Text(theme.fg(\"dim\", message), 1, 0);\n this.chatContainer.addChild(spacer);\n this.chatContainer.addChild(text);\n this.lastStatusSpacer = spacer;\n this.lastStatusText = text;\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.renderDeferredUserInput = function(this: InteractiveModeBase, text: string): void {\n this.deferredRenderedUserInputs.push(text);\n const startIndex = this.chatContainer.children.length;\n this.addMessageToChat({ role: \"user\", content: text } as AgentMessage);\n const renderedComponents = this.chatContainer.children.slice(startIndex);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text) ?? [];\n trackedComponents.push(renderedComponents);\n this.deferredRenderedUserInputComponents.set(text, trackedComponents);\n this.updatePendingMessagesDisplay();\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.consumeDeferredRenderedUserInput = function(this: InteractiveModeBase, text: string): boolean {\n const index = this.deferredRenderedUserInputs.indexOf(text);\n if (index === -1) return false;\n this.deferredRenderedUserInputs.splice(index, 1);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text);\n trackedComponents?.shift();\n if (trackedComponents && trackedComponents.length === 0) {\n this.deferredRenderedUserInputComponents.delete(text);\n }\n return true;\n };\n\nInteractiveModeBase.prototype.discardDeferredRenderedUserInput = function(this: InteractiveModeBase, text: string): void {\n const index = this.deferredRenderedUserInputs.indexOf(text);\n if (index !== -1) this.deferredRenderedUserInputs.splice(index, 1);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text);\n const componentsToRemove = trackedComponents?.shift();\n if (trackedComponents && trackedComponents.length === 0) {\n this.deferredRenderedUserInputComponents.delete(text);\n }\n if (!componentsToRemove) return;\n for (const component of componentsToRemove) {\n this.chatContainer.removeChild(component);\n }\n this.updatePendingMessagesDisplay();\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.chatMessageRenderOptions = function(this: InteractiveModeBase): ChatMessageRenderOptions {\n const isolated = this.runtimeHost instanceof IsolatedInteractiveRuntime;\n return {\n ui: this.ui,\n cwd: this.sessionManager.getCwd(),\n markdownTheme: this.getMarkdownThemeWithSettings(),\n hideThinkingBlock: this.hideThinkingBlock,\n hiddenThinkingLabel: this.hiddenThinkingLabel,\n toolOutputExpanded: this.toolOutputExpanded,\n showImages: this.settingsManager.getShowImages(),\n imageWidthCells: this.settingsManager.getImageWidthCells(),\n outputPad: this.outputPad,\n getToolDefinition: isolated ? undefined : (toolName) => this.getRegisteredToolDefinition(toolName),\n getCustomMessageRenderer: isolated ? undefined : (customType) => this.session.extensionRunner.getMessageRenderer(customType),\n createToolComponent: isolated ? (entry) => {\n const component = new RemoteToolExecutionComponent(\n entry.toolName,\n entry.toolCallId,\n entry.args,\n { showImages: this.settingsManager.getShowImages(), imageWidthCells: this.settingsManager.getImageWidthCells() },\n this.runtimeHost as IsolatedInteractiveRuntime,\n () => this.ui.requestRender(),\n );\n component.setExpanded(this.toolOutputExpanded);\n if (entry.result) component.updateResult(entry.result, entry.isPartial ?? false);\n return component;\n } : undefined,\n createCustomMessageComponent: isolated ? (message) => {\n const component = new RemoteCustomMessageComponent(message, this.runtimeHost as IsolatedInteractiveRuntime, () => this.ui.requestRender());\n component.setExpanded(this.toolOutputExpanded);\n return component;\n } : undefined,\n };\n };\n\nInteractiveModeBase.prototype.addRenderedChatEntry = function(this: InteractiveModeBase, entry: ChatMessageEntry): Component {\n const component = renderChatMessageEntry(entry, this.chatMessageRenderOptions());\n addChatTranscriptEntry(this.chatContainer, component, entry.role);\n return component;\n };\n\nInteractiveModeBase.prototype.addCompactionBoundaryToChat = function(this: InteractiveModeBase, result: VerbatimCompactionResult): void {\n this.chatContainer.addChild(new Spacer(1));\n const component = new CompactionBoundaryMessageComponent(result);\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n };\n\nInteractiveModeBase.prototype.addCustomEntryToChat = function(this: InteractiveModeBase, entry: CustomEntry): void {\n const renderer = this.session.extensionRunner.getEntryRenderer(entry.customType);\n if (!renderer) return;\n const component = new CustomEntryComponent(entry, renderer);\n component.setExpanded(this.toolOutputExpanded);\n if (!component.hasContent()) return;\n const streamingIndex = this.streamingComponent\n ? this.chatContainer.children.indexOf(this.streamingComponent)\n : -1;\n if (streamingIndex >= 0) this.chatContainer.children.splice(streamingIndex, 0, component);\n else this.chatContainer.addChild(component);\n};\n\nInteractiveModeBase.prototype.addMessageToChat = function(this: InteractiveModeBase, message: AgentMessage, options?: { populateHistory?: boolean }): void {\n switch (message.role) {\n case \"bashExecution\": {\n const component = new BashExecutionComponent(\n message.command,\n this.ui,\n message.excludeFromContext,\n );\n if (message.output) {\n component.appendOutput(message.output);\n }\n component.setComplete(\n message.exitCode,\n message.cancelled,\n message.truncated\n ? ({ truncated: true } as TruncationResult)\n : undefined,\n message.fullOutputPath,\n );\n this.chatContainer.addChild(component);\n break;\n }\n case \"custom\": {\n if (message.display) {\n const component = this.runtimeHost instanceof IsolatedInteractiveRuntime\n ? new RemoteCustomMessageComponent(message, this.runtimeHost, () => this.ui.requestRender())\n : new CustomMessageComponent(\n message,\n this.session.extensionRunner.getMessageRenderer(message.customType),\n this.getMarkdownThemeWithSettings(),\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n }\n break;\n }\n case \"branchSummary\": {\n this.chatContainer.addChild(new Spacer(1));\n const component = new BranchSummaryMessageComponent(\n message,\n this.getMarkdownThemeWithSettings(),\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n break;\n }\n case \"user\": {\n const textContent = this.getUserMessageText(message);\n if (textContent) {\n if (this.chatContainer.children.length > 0) {\n this.chatContainer.addChild(new Spacer(1));\n }\n const skillBlock = parseSkillBlock(textContent);\n if (skillBlock) {\n // Render skill block (collapsible)\n const component = new SkillInvocationMessageComponent(\n skillBlock,\n this.getMarkdownThemeWithSettings(),\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n // Render user message separately if present\n if (skillBlock.userMessage) {\n const userComponent = new UserMessageComponent(\n skillBlock.userMessage,\n this.getMarkdownThemeWithSettings(),\n this.outputPad,\n );\n this.chatContainer.addChild(userComponent);\n }\n } else {\n const userComponent = new UserMessageComponent(\n textContent,\n this.getMarkdownThemeWithSettings(),\n this.outputPad,\n );\n this.chatContainer.addChild(userComponent);\n }\n if (options?.populateHistory) {\n this.editor.addToHistory?.(textContent);\n }\n }\n break;\n }\n case \"assistant\": {\n const assistantComponent = new AssistantMessageComponent(\n message,\n this.hideThinkingBlock,\n this.getMarkdownThemeWithSettings(),\n this.hiddenThinkingLabel,\n this.outputPad,\n );\n this.chatContainer.addChild(assistantComponent);\n break;\n }\n case \"toolResult\": {\n // Tool results are rendered inline with tool calls, handled separately\n break;\n }\n default:\n break;\n }\n };\n\nInteractiveModeBase.prototype.renderSessionContext = function(this: InteractiveModeBase, sessionContext: SessionContext, options: { updateFooter?: boolean; populateHistory?: boolean } = {}): void {\n this.pendingTools.clear();\n const pendingDeferredInputs = [...this.deferredRenderedUserInputs];\n this.deferredRenderedUserInputs = [];\n this.deferredRenderedUserInputComponents.clear();\n\n if (options.updateFooter) {\n this.footer.invalidate();\n this.updateEditorBorderColor();\n }\n\n const entries = chatEntriesFromAgentMessages(sessionContext.messages);\n for (const entry of entries) {\n const component = this.addRenderedChatEntry(entry);\n if (\n entry.kind === \"tool\" &&\n entry.isPartial !== false &&\n component instanceof ToolExecutionComponent\n ) {\n this.pendingTools.set(entry.toolCallId, component);\n }\n if (options.populateHistory && entry.kind === \"user\") {\n this.editor.addToHistory?.(entry.text);\n }\n }\n\n for (const input of pendingDeferredInputs) {\n this.renderDeferredUserInput(input);\n }\n\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.renderSessionEntries = function(\n this: InteractiveModeBase,\n sessionEntries: SessionEntry[],\n options: { updateFooter?: boolean; populateHistory?: boolean; suppressCompactionBoundary?: VerbatimCompactionResult } = {},\n): void {\n this.pendingTools.clear();\n const deferredInputs = [...this.deferredRenderedUserInputs];\n this.deferredRenderedUserInputs = [];\n this.deferredRenderedUserInputComponents.clear();\n if (options.updateFooter) {\n this.footer.invalidate();\n this.updateEditorBorderColor();\n }\n let messageBuffer: AgentMessage[] = [];\n let firstMessage = true;\n const flushMessages = (): void => {\n if (options.suppressCompactionBoundary && firstMessage && isSynthesizedCompactionBoundary(messageBuffer[0], options.suppressCompactionBoundary)) {\n messageBuffer = messageBuffer.slice(1);\n }\n firstMessage = false;\n for (const entry of chatEntriesFromAgentMessages(messageBuffer)) {\n const component = this.addRenderedChatEntry(entry);\n if (entry.kind === \"tool\" && entry.isPartial !== false && component instanceof ToolExecutionComponent) {\n this.pendingTools.set(entry.toolCallId, component);\n }\n if (options.populateHistory && entry.kind === \"user\") this.editor.addToHistory?.(entry.text);\n }\n messageBuffer = [];\n };\n for (const entry of sessionEntries) {\n if (entry.type === \"custom\") {\n flushMessages();\n this.addCustomEntryToChat(entry);\n } else {\n messageBuffer.push(...sessionEntryToContextMessages(entry));\n }\n }\n flushMessages();\n if (this.settingsManager.getShowCacheMissNotices()) {\n for (const miss of collectCacheMisses(sessionEntries, { getModel: (provider, model) => this.session.modelRegistry.find(provider, model) }).values()) {\n const cause = miss.modelChanged ? \" after model switch\" : miss.idleMs >= CACHE_TTL_MS ? \" after cache TTL expiry\" : \"\";\n this.chatContainer.addChild(new Text(theme.fg(\"warning\", `Prompt cache miss${cause}: ${miss.missedTokens.toLocaleString()} tokens re-billed ($${miss.missedCost.toFixed(3)})`), 1, 0));\n }\n }\n for (const input of deferredInputs) this.renderDeferredUserInput(input);\n this.ui.requestRender();\n};\n\nInteractiveModeBase.prototype.attachStartupNoticesContainer = function(this: InteractiveModeBase, options: { resetDetached?: boolean } = {}): void {\n const isAttached = this.chatContainer.children.includes(this.startupNoticesContainer);\n if (isAttached) return;\n if (options.resetDetached) {\n this.startupNoticesContainer.clear();\n }\n this.chatContainer.addChild(this.startupNoticesContainer);\n };\n\nInteractiveModeBase.prototype.renderInitialMessages = function(this: InteractiveModeBase): void {\n this.attachStartupNoticesContainer({ resetDetached: true });\n const entries = buildContextEntries(\n this.sessionManager.getEntries(),\n this.sessionManager.getLeafId(),\n );\n this.renderSessionEntries(entries, { updateFooter: true, populateHistory: true });\n };\n\nInteractiveModeBase.prototype.getUserInput = async function(this: InteractiveModeBase): Promise<string> {\n for (let attempt = 0; !this.startupCookedInputRecovered && attempt < 10; attempt += 1) {\n await yieldToEventLoop();\n if (this.recoverCookedStartupInput?.()) break;\n }\n while (true) {\n const queuedInput = this.pendingUserInputs.shift();\n if (queuedInput !== undefined) {\n return queuedInput;\n }\n\n if (this.startupReplayActiveInput) {\n await this.drainStartupReplayCommands();\n continue;\n }\n\n return new Promise((resolve) => {\n this.onInputCallback = (text: string) => {\n this.onInputCallback = undefined;\n resolve(text);\n };\n if (!this.inputHandlerReadyRecorded) {\n this.inputHandlerReadyRecorded = true;\n recordTimeSinceReset(\"interactive-input-handler-ready\");\n void (async () => {\n await yieldToEventLoop();\n // pi parity: the changelog/first-run notices need nothing from\n // extensions — render them right after the input handler is ready\n // instead of gating them behind the deferred extension reload (or,\n // when the user types immediately, behind the whole agent turn).\n this.showStartupNoticesIfNeeded(this.startupNoticesContainer);\n this.footerDataProvider.startGitWatcher();\n if (this.deferredStartupPending) {\n await this.ensureDeferredStartupComplete();\n }\n })().catch((error) => {\n const message = error instanceof Error ? error.message : String(error);\n console.error(`Deferred input-readiness startup task failed: ${message}`);\n });\n }\n });\n }\n };\n\nInteractiveModeBase.prototype.rebuildChatFromMessages = function(\n this: InteractiveModeBase,\n options: { suppressCompactionBoundary?: VerbatimCompactionResult } = {},\n): void {\n this.chatContainer.clear();\n this.attachStartupNoticesContainer();\n const entries = buildContextEntries(\n this.sessionManager.getEntries(),\n this.sessionManager.getLeafId(),\n );\n this.renderSessionEntries(entries, { suppressCompactionBoundary: options.suppressCompactionBoundary });\n };\n\nfunction isSynthesizedCompactionBoundary(\n message: AgentMessage | undefined,\n result: VerbatimCompactionResult,\n): boolean {\n if (message?.role !== \"custom\" || message.customType !== \"compaction\" || !message.display) return false;\n const details = message.details as { strategy?: string } | undefined;\n if (details?.strategy !== \"verbatim-lines\") return false;\n const content = Array.isArray(message.content)\n ? message.content.filter((block) => block.type === \"text\").map((block) => block.text).join(\"\\n\")\n : message.content;\n return content === VERBATIM_COMPACTION_PREFIX + result.compactedText;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-render-chat.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-render-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAsK,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACvjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAqB,MAAM,+BAA+B,CAAC;AACtH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAEtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE7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K,QAAQ,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IACxG,MAAM,OAAO,GAAG,OAAO,CAAC,OAA4C,CAAC;IACrE,IAAI,OAAO,EAAE,QAAQ,KAAK,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QAC5C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACpB,OAAO,OAAO,KAAK,0BAA0B,GAAG,MAAM,CAAC,aAAa,CAAC;AACvE,CAAC","sourcesContent":["import { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type AgentMessage, type Component, type VerbatimCompactionResult, type SessionContext, type TruncationResult, type ChatMessageEntry, type ChatMessageRenderOptions, Spacer, Text, parseSkillBlock, AssistantMessageComponent, BashExecutionComponent, BranchSummaryMessageComponent, chatEntriesFromAgentMessages, renderChatMessageEntry, addChatTranscriptEntry, CompactionBoundaryMessageComponent, CustomMessageComponent, SkillInvocationMessageComponent, ToolExecutionComponent, UserMessageComponent, recordTimeSinceReset, theme } from \"./interactive-mode-deps.ts\";\nimport { yieldToEventLoop } from \"../../utils/event-loop.ts\";\nimport { VERBATIM_COMPACTION_PREFIX } from \"../../core/messages.ts\";\nimport { buildContextEntries, sessionEntryToContextMessages, type SessionEntry } from \"../../core/session-manager.ts\";\nimport { IsolatedInteractiveRuntime } from \"../interactive-engine/isolated-runtime.ts\";\nimport { RemoteCustomMessageComponent, RemoteToolExecutionComponent } from \"../interactive-engine/remote-renderer.ts\";\nimport type { CustomEntry } from \"../../core/session-manager.ts\";\nimport { CustomEntryComponent } from \"./components/custom-entry.ts\";\nimport { CACHE_TTL_MS, collectCacheMisses } from \"../../core/cache-stats.ts\";\n\nInteractiveModeBase.prototype.showStatus = function(this: InteractiveModeBase, message: string): void {\n const children = this.chatContainer.children;\n const last =\n children.length > 0 ? children[children.length - 1] : undefined;\n const secondLast =\n children.length > 1 ? children[children.length - 2] : undefined;\n\n if (\n last &&\n secondLast &&\n last === this.lastStatusText &&\n secondLast === this.lastStatusSpacer\n ) {\n this.lastStatusText.setText(theme.fg(\"dim\", message));\n this.ui.requestRender();\n return;\n }\n\n const spacer = new Spacer(1);\n const text = new Text(theme.fg(\"dim\", message), 1, 0);\n this.chatContainer.addChild(spacer);\n this.chatContainer.addChild(text);\n this.lastStatusSpacer = spacer;\n this.lastStatusText = text;\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.renderDeferredUserInput = function(this: InteractiveModeBase, text: string): void {\n this.deferredRenderedUserInputs.push(text);\n const startIndex = this.chatContainer.children.length;\n this.addMessageToChat({ role: \"user\", content: text } as AgentMessage);\n const renderedComponents = this.chatContainer.children.slice(startIndex);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text) ?? [];\n trackedComponents.push(renderedComponents);\n this.deferredRenderedUserInputComponents.set(text, trackedComponents);\n this.updatePendingMessagesDisplay();\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.consumeDeferredRenderedUserInput = function(this: InteractiveModeBase, text: string): boolean {\n const index = this.deferredRenderedUserInputs.indexOf(text);\n if (index === -1) return false;\n this.deferredRenderedUserInputs.splice(index, 1);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text);\n trackedComponents?.shift();\n if (trackedComponents && trackedComponents.length === 0) {\n this.deferredRenderedUserInputComponents.delete(text);\n }\n return true;\n };\n\nInteractiveModeBase.prototype.discardDeferredRenderedUserInput = function(this: InteractiveModeBase, text: string): void {\n const index = this.deferredRenderedUserInputs.indexOf(text);\n if (index !== -1) this.deferredRenderedUserInputs.splice(index, 1);\n const trackedComponents = this.deferredRenderedUserInputComponents.get(text);\n const componentsToRemove = trackedComponents?.shift();\n if (trackedComponents && trackedComponents.length === 0) {\n this.deferredRenderedUserInputComponents.delete(text);\n }\n if (!componentsToRemove) return;\n for (const component of componentsToRemove) {\n this.chatContainer.removeChild(component);\n }\n this.updatePendingMessagesDisplay();\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.chatMessageRenderOptions = function(this: InteractiveModeBase): ChatMessageRenderOptions {\n const isolated = this.runtimeHost instanceof IsolatedInteractiveRuntime;\n return {\n ui: this.ui,\n cwd: this.sessionManager.getCwd(),\n markdownTheme: this.getMarkdownThemeWithSettings(),\n hideThinkingBlock: this.hideThinkingBlock,\n hiddenThinkingLabel: this.hiddenThinkingLabel,\n toolOutputExpanded: this.toolOutputExpanded,\n showImages: this.settingsManager.getShowImages(),\n imageWidthCells: this.settingsManager.getImageWidthCells(),\n outputPad: this.outputPad,\n getToolDefinition: isolated ? undefined : (toolName) => this.getRegisteredToolDefinition(toolName),\n getCustomMessageRenderer: isolated ? undefined : (customType) => this.session.extensionRunner.getMessageRenderer(customType),\n createToolComponent: isolated ? (entry) => {\n const component = new RemoteToolExecutionComponent(\n entry.toolName,\n entry.toolCallId,\n entry.args,\n { showImages: this.settingsManager.getShowImages(), imageWidthCells: this.settingsManager.getImageWidthCells() },\n this.runtimeHost as IsolatedInteractiveRuntime,\n () => this.ui.requestRender(),\n );\n component.setExpanded(this.toolOutputExpanded);\n if (entry.result) component.updateResult(entry.result, entry.isPartial ?? false);\n return component;\n } : undefined,\n createCustomMessageComponent: isolated ? (message) => {\n const component = new RemoteCustomMessageComponent(\n message,\n this.runtimeHost as IsolatedInteractiveRuntime,\n () => this.ui.requestRender(),\n this.outputPad,\n );\n component.setExpanded(this.toolOutputExpanded);\n return component;\n } : undefined,\n };\n };\n\nInteractiveModeBase.prototype.addRenderedChatEntry = function(this: InteractiveModeBase, entry: ChatMessageEntry): Component {\n const component = renderChatMessageEntry(entry, this.chatMessageRenderOptions());\n addChatTranscriptEntry(this.chatContainer, component, entry.role);\n return component;\n };\n\nInteractiveModeBase.prototype.addCompactionBoundaryToChat = function(this: InteractiveModeBase, result: VerbatimCompactionResult): void {\n this.chatContainer.addChild(new Spacer(1));\n const component = new CompactionBoundaryMessageComponent(result);\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n };\n\nInteractiveModeBase.prototype.addCustomEntryToChat = function(this: InteractiveModeBase, entry: CustomEntry): void {\n const renderer = this.session.extensionRunner.getEntryRenderer(entry.customType);\n if (!renderer) return;\n const component = new CustomEntryComponent(entry, renderer);\n component.setExpanded(this.toolOutputExpanded);\n if (!component.hasContent()) return;\n const streamingIndex = this.streamingComponent\n ? this.chatContainer.children.indexOf(this.streamingComponent)\n : -1;\n if (streamingIndex >= 0) this.chatContainer.children.splice(streamingIndex, 0, component);\n else this.chatContainer.addChild(component);\n};\n\nInteractiveModeBase.prototype.addMessageToChat = function(this: InteractiveModeBase, message: AgentMessage, options?: { populateHistory?: boolean }): void {\n switch (message.role) {\n case \"bashExecution\": {\n const component = new BashExecutionComponent(\n message.command,\n this.ui,\n message.excludeFromContext,\n );\n if (message.output) {\n component.appendOutput(message.output);\n }\n component.setComplete(\n message.exitCode,\n message.cancelled,\n message.truncated\n ? ({ truncated: true } as TruncationResult)\n : undefined,\n message.fullOutputPath,\n );\n this.chatContainer.addChild(component);\n break;\n }\n case \"custom\": {\n if (message.display) {\n const component = this.runtimeHost instanceof IsolatedInteractiveRuntime\n ? new RemoteCustomMessageComponent(message, this.runtimeHost, () => this.ui.requestRender(), this.outputPad)\n : new CustomMessageComponent(\n message,\n this.session.extensionRunner.getMessageRenderer(message.customType),\n this.getMarkdownThemeWithSettings(),\n this.outputPad,\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n }\n break;\n }\n case \"branchSummary\": {\n this.chatContainer.addChild(new Spacer(1));\n const component = new BranchSummaryMessageComponent(\n message,\n this.getMarkdownThemeWithSettings(),\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n break;\n }\n case \"user\": {\n const textContent = this.getUserMessageText(message);\n if (textContent) {\n if (this.chatContainer.children.length > 0) {\n this.chatContainer.addChild(new Spacer(1));\n }\n const skillBlock = parseSkillBlock(textContent);\n if (skillBlock) {\n // Render skill block (collapsible)\n const component = new SkillInvocationMessageComponent(\n skillBlock,\n this.getMarkdownThemeWithSettings(),\n );\n component.setExpanded(this.toolOutputExpanded);\n this.chatContainer.addChild(component);\n // Render user message separately if present\n if (skillBlock.userMessage) {\n const userComponent = new UserMessageComponent(\n skillBlock.userMessage,\n this.getMarkdownThemeWithSettings(),\n this.outputPad,\n );\n this.chatContainer.addChild(userComponent);\n }\n } else {\n const userComponent = new UserMessageComponent(\n textContent,\n this.getMarkdownThemeWithSettings(),\n this.outputPad,\n );\n this.chatContainer.addChild(userComponent);\n }\n if (options?.populateHistory) {\n this.editor.addToHistory?.(textContent);\n }\n }\n break;\n }\n case \"assistant\": {\n const assistantComponent = new AssistantMessageComponent(\n message,\n this.hideThinkingBlock,\n this.getMarkdownThemeWithSettings(),\n this.hiddenThinkingLabel,\n this.outputPad,\n );\n this.chatContainer.addChild(assistantComponent);\n break;\n }\n case \"toolResult\": {\n // Tool results are rendered inline with tool calls, handled separately\n break;\n }\n default:\n break;\n }\n };\n\nInteractiveModeBase.prototype.renderSessionContext = function(this: InteractiveModeBase, sessionContext: SessionContext, options: { updateFooter?: boolean; populateHistory?: boolean } = {}): void {\n this.pendingTools.clear();\n const pendingDeferredInputs = [...this.deferredRenderedUserInputs];\n this.deferredRenderedUserInputs = [];\n this.deferredRenderedUserInputComponents.clear();\n\n if (options.updateFooter) {\n this.footer.invalidate();\n this.updateEditorBorderColor();\n }\n\n const entries = chatEntriesFromAgentMessages(sessionContext.messages);\n for (const entry of entries) {\n const component = this.addRenderedChatEntry(entry);\n if (\n entry.kind === \"tool\" &&\n entry.isPartial !== false &&\n component instanceof ToolExecutionComponent\n ) {\n this.pendingTools.set(entry.toolCallId, component);\n }\n if (options.populateHistory && entry.kind === \"user\") {\n this.editor.addToHistory?.(entry.text);\n }\n }\n\n for (const input of pendingDeferredInputs) {\n this.renderDeferredUserInput(input);\n }\n\n this.ui.requestRender();\n };\n\nInteractiveModeBase.prototype.renderSessionEntries = function(\n this: InteractiveModeBase,\n sessionEntries: SessionEntry[],\n options: { updateFooter?: boolean; populateHistory?: boolean; suppressCompactionBoundary?: VerbatimCompactionResult } = {},\n): void {\n this.pendingTools.clear();\n const deferredInputs = [...this.deferredRenderedUserInputs];\n this.deferredRenderedUserInputs = [];\n this.deferredRenderedUserInputComponents.clear();\n if (options.updateFooter) {\n this.footer.invalidate();\n this.updateEditorBorderColor();\n }\n let messageBuffer: AgentMessage[] = [];\n let firstMessage = true;\n const flushMessages = (): void => {\n if (options.suppressCompactionBoundary && firstMessage && isSynthesizedCompactionBoundary(messageBuffer[0], options.suppressCompactionBoundary)) {\n messageBuffer = messageBuffer.slice(1);\n }\n firstMessage = false;\n for (const entry of chatEntriesFromAgentMessages(messageBuffer)) {\n const component = this.addRenderedChatEntry(entry);\n if (entry.kind === \"tool\" && entry.isPartial !== false && component instanceof ToolExecutionComponent) {\n this.pendingTools.set(entry.toolCallId, component);\n }\n if (options.populateHistory && entry.kind === \"user\") this.editor.addToHistory?.(entry.text);\n }\n messageBuffer = [];\n };\n for (const entry of sessionEntries) {\n if (entry.type === \"custom\") {\n flushMessages();\n this.addCustomEntryToChat(entry);\n } else {\n messageBuffer.push(...sessionEntryToContextMessages(entry));\n }\n }\n flushMessages();\n if (this.settingsManager.getShowCacheMissNotices()) {\n for (const miss of collectCacheMisses(sessionEntries, { getModel: (provider, model) => this.session.modelRegistry.find(provider, model) }).values()) {\n const cause = miss.modelChanged ? \" after model switch\" : miss.idleMs >= CACHE_TTL_MS ? \" after cache TTL expiry\" : \"\";\n this.chatContainer.addChild(new Text(theme.fg(\"warning\", `Prompt cache miss${cause}: ${miss.missedTokens.toLocaleString()} tokens re-billed ($${miss.missedCost.toFixed(3)})`), 1, 0));\n }\n }\n for (const input of deferredInputs) this.renderDeferredUserInput(input);\n this.ui.requestRender();\n};\n\nInteractiveModeBase.prototype.attachStartupNoticesContainer = function(this: InteractiveModeBase, options: { resetDetached?: boolean } = {}): void {\n const disclosureIndex = this.chatContainer.children.indexOf(this.resourceDisclosureContainer);\n const noticesIndex = this.chatContainer.children.indexOf(this.startupNoticesContainer);\n if (disclosureIndex >= 0 && noticesIndex >= 0) return;\n if (disclosureIndex < 0) {\n if (options.resetDetached) this.resourceDisclosureContainer.clear();\n if (noticesIndex >= 0) this.chatContainer.children.splice(noticesIndex, 0, this.resourceDisclosureContainer);\n else this.chatContainer.addChild(this.resourceDisclosureContainer);\n }\n if (noticesIndex < 0) {\n if (options.resetDetached) this.startupNoticesContainer.clear();\n this.chatContainer.addChild(this.startupNoticesContainer);\n }\n };\n\nInteractiveModeBase.prototype.renderInitialMessages = function(this: InteractiveModeBase): void {\n this.attachStartupNoticesContainer({ resetDetached: true });\n const entries = buildContextEntries(\n this.sessionManager.getEntries(),\n this.sessionManager.getLeafId(),\n );\n this.renderSessionEntries(entries, { updateFooter: true, populateHistory: true });\n };\n\nInteractiveModeBase.prototype.getUserInput = async function(this: InteractiveModeBase): Promise<string> {\n for (let attempt = 0; !this.startupCookedInputRecovered && attempt < 10; attempt += 1) {\n await yieldToEventLoop();\n if (this.recoverCookedStartupInput?.()) break;\n }\n while (true) {\n const queuedInput = this.pendingUserInputs.shift();\n if (queuedInput !== undefined) {\n return queuedInput;\n }\n\n if (this.startupReplayActiveInput) {\n await this.drainStartupReplayCommands();\n continue;\n }\n\n return new Promise((resolve) => {\n this.onInputCallback = (text: string) => {\n this.onInputCallback = undefined;\n resolve(text);\n };\n if (!this.inputHandlerReadyRecorded) {\n this.inputHandlerReadyRecorded = true;\n recordTimeSinceReset(\"interactive-input-handler-ready\");\n void (async () => {\n await yieldToEventLoop();\n // pi parity: the changelog/first-run notices need nothing from\n // extensions — render them right after the input handler is ready\n // instead of gating them behind the deferred extension reload (or,\n // when the user types immediately, behind the whole agent turn).\n this.showStartupNoticesIfNeeded(this.startupNoticesContainer);\n this.footerDataProvider.startGitWatcher();\n if (this.deferredStartupPending) {\n await this.ensureDeferredStartupComplete();\n }\n })().catch((error) => {\n const message = error instanceof Error ? error.message : String(error);\n console.error(`Deferred input-readiness startup task failed: ${message}`);\n });\n }\n });\n }\n };\n\nInteractiveModeBase.prototype.rebuildChatFromMessages = function(\n this: InteractiveModeBase,\n options: {\n suppressCompactionBoundary?: VerbatimCompactionResult;\n resetStartupDisclosure?: boolean;\n } = {},\n): void {\n this.chatContainer.clear();\n if (options.resetStartupDisclosure) this.resourceDisclosureContainer.clear();\n this.attachStartupNoticesContainer();\n const entries = buildContextEntries(\n this.sessionManager.getEntries(),\n this.sessionManager.getLeafId(),\n );\n this.renderSessionEntries(entries, { suppressCompactionBoundary: options.suppressCompactionBoundary });\n };\n\nfunction isSynthesizedCompactionBoundary(\n message: AgentMessage | undefined,\n result: VerbatimCompactionResult,\n): boolean {\n if (message?.role !== \"custom\" || message.customType !== \"compaction\" || !message.display) return false;\n const details = message.details as { strategy?: string } | undefined;\n if (details?.strategy !== \"verbatim-lines\") return false;\n const content = Array.isArray(message.content)\n ? message.content.filter((block) => block.type === \"text\").map((block) => block.text).join(\"\\n\")\n : message.content;\n return content === VERBATIM_COMPACTION_PREFIX + result.compactedText;\n}\n"]}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { InteractiveModeBase } from "./interactive-mode-base.js";
|
|
2
2
|
import { path, parseGitUrl, theme } from "./interactive-mode-deps.js";
|
|
3
3
|
InteractiveModeBase.prototype.getShortPath = function (fullPath, sourceInfo) {
|
|
4
|
+
const normalizedFullPath = fullPath.replace(/\\/g, "/");
|
|
4
5
|
const baseDir = sourceInfo?.baseDir;
|
|
5
6
|
if (baseDir && this.isPackageSource(sourceInfo)) {
|
|
7
|
+
const normalizedBaseDir = baseDir.replace(/\\/g, "/");
|
|
8
|
+
const npmRootMatch = normalizedBaseDir.match(/^(.*\/node_modules)\/(@?[^/]+(?:\/[^/]+)?)$/);
|
|
9
|
+
if (npmRootMatch?.[1] && normalizedFullPath.startsWith(`${npmRootMatch[1]}/`)) {
|
|
10
|
+
return path.posix.relative(normalizedBaseDir, normalizedFullPath);
|
|
11
|
+
}
|
|
6
12
|
const relativePath = path.relative(path.resolve(baseDir), path.resolve(fullPath));
|
|
7
13
|
if (relativePath &&
|
|
8
14
|
relativePath !== "." &&
|
|
@@ -13,11 +19,11 @@ InteractiveModeBase.prototype.getShortPath = function (fullPath, sourceInfo) {
|
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
21
|
const source = sourceInfo?.source ?? "";
|
|
16
|
-
const npmMatch =
|
|
22
|
+
const npmMatch = normalizedFullPath.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)\/(.*)/);
|
|
17
23
|
if (npmMatch && source.startsWith("npm:")) {
|
|
18
24
|
return npmMatch[2];
|
|
19
25
|
}
|
|
20
|
-
const gitMatch =
|
|
26
|
+
const gitMatch = normalizedFullPath.match(/git\/[^/]+\/[^/]+\/(.*)/);
|
|
21
27
|
if (gitMatch && source.startsWith("git:")) {
|
|
22
28
|
return gitMatch[1];
|
|
23
29
|
}
|
|
@@ -43,6 +49,9 @@ InteractiveModeBase.prototype.getCompactPackageSourceLabel = function (sourceInf
|
|
|
43
49
|
if (gitSource) {
|
|
44
50
|
return gitSource.path || source;
|
|
45
51
|
}
|
|
52
|
+
if (sourceInfo?.origin === "package") {
|
|
53
|
+
return path.basename(source) || source;
|
|
54
|
+
}
|
|
46
55
|
return source;
|
|
47
56
|
};
|
|
48
57
|
InteractiveModeBase.prototype.getCompactExtensionLabel = function (resourcePath, sourceInfo) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-resource-paths.js","sourceRoot":"","sources":["../../../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IAChB,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC5B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEJ,mBAAmB,CAAC,SAAS,CAAC,oBAAoB,GAAG,UAAoC,CAAS,EAAE,UAAuB;IACvH,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACpE,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,UAAU,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;QAClE,OAAO,GAAG,SAAS,IAAI,SAAS,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC","sourcesContent":["import { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type SourceInfo, path, parseGitUrl, theme } from \"./interactive-mode-deps.ts\";\n\nInteractiveModeBase.prototype.getShortPath = function(this: InteractiveModeBase, fullPath: string, sourceInfo?: SourceInfo): string {\n const baseDir = sourceInfo?.baseDir;\n if (baseDir && this.isPackageSource(sourceInfo)) {\n const relativePath = path.relative(\n path.resolve(baseDir),\n path.resolve(fullPath),\n );\n if (\n relativePath &&\n relativePath !== \".\" &&\n !relativePath.startsWith(\"..\") &&\n !relativePath.startsWith(`..${path.sep}`) &&\n !path.isAbsolute(relativePath)\n ) {\n return relativePath.replace(/\\\\/g, \"/\");\n }\n }\n\n const source = sourceInfo?.source ?? \"\";\n const npmMatch = fullPath.match(\n /node_modules\\/(@?[^/]+(?:\\/[^/]+)?)\\/(.*)/,\n );\n if (npmMatch && source.startsWith(\"npm:\")) {\n return npmMatch[2];\n }\n\n const gitMatch = fullPath.match(/git\\/[^/]+\\/[^/]+\\/(.*)/);\n if (gitMatch && source.startsWith(\"git:\")) {\n return gitMatch[1];\n }\n\n return this.formatDisplayPath(fullPath);\n };\n\nInteractiveModeBase.prototype.getCompactPathLabel = function(this: InteractiveModeBase, resourcePath: string, sourceInfo?: SourceInfo): string {\n const shortPath = this.getShortPath(resourcePath, sourceInfo);\n const normalizedPath = shortPath.replace(/\\\\/g, \"/\");\n const segments = normalizedPath\n .split(\"/\")\n .filter((segment) => segment.length > 0 && segment !== \"~\");\n if (segments.length > 0) {\n return segments[segments.length - 1]!;\n }\n return shortPath;\n };\n\nInteractiveModeBase.prototype.getCompactPackageSourceLabel = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): string {\n const source = sourceInfo?.source ?? \"\";\n if (source.startsWith(\"npm:\")) {\n return source.slice(\"npm:\".length) || source;\n }\n\n const gitSource = parseGitUrl(source);\n if (gitSource) {\n return gitSource.path || source;\n }\n\n return source;\n };\n\nInteractiveModeBase.prototype.getCompactExtensionLabel = function(this: InteractiveModeBase, resourcePath: string, sourceInfo?: SourceInfo): string {\n if (!this.isPackageSource(sourceInfo)) {\n return this.getCompactPathLabel(resourcePath, sourceInfo);\n }\n\n const sourceLabel = this.getCompactPackageSourceLabel(sourceInfo);\n if (!sourceLabel) {\n return this.getCompactPathLabel(resourcePath, sourceInfo);\n }\n\n const shortPath = this.getShortPath(resourcePath, sourceInfo).replace(\n /\\\\/g,\n \"/\",\n );\n const packagePath = shortPath.startsWith(\"extensions/\")\n ? shortPath.slice(\"extensions/\".length)\n : shortPath;\n const parsedPath = path.posix.parse(packagePath);\n\n if (parsedPath.name === \"index\") {\n return !parsedPath.dir || parsedPath.dir === \".\"\n ? sourceLabel\n : `${sourceLabel}:${parsedPath.dir}`;\n }\n\n return `${sourceLabel}:${packagePath}`;\n };\n\nInteractiveModeBase.prototype.getCompactDisplayPathSegments = function(this: InteractiveModeBase, resourcePath: string): string[] {\n return this.formatDisplayPath(resourcePath)\n .replace(/\\\\/g, \"/\")\n .split(\"/\")\n .filter((segment) => segment.length > 0 && segment !== \"~\");\n };\n\nInteractiveModeBase.prototype.getCompactNonPackageExtensionLabel = function(this: InteractiveModeBase, resourcePath: string, index: number, allPaths: Array<{ path: string; segments: string[] }>): string {\n const segments = allPaths[index]?.segments;\n if (!segments || segments.length === 0) {\n return this.getCompactPathLabel(resourcePath);\n }\n\n for (\n let segmentCount = 1;\n segmentCount <= segments.length;\n segmentCount += 1\n ) {\n const candidate = segments.slice(-segmentCount).join(\"/\");\n const isUnique = allPaths.every((item, itemIndex) => {\n if (itemIndex === index) {\n return true;\n }\n return item.segments.slice(-segmentCount).join(\"/\") !== candidate;\n });\n\n if (isUnique) {\n return candidate;\n }\n }\n\n return segments.join(\"/\");\n };\n\nInteractiveModeBase.prototype.getCompactExtensionLabels = function(this: InteractiveModeBase, extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[] {\n const nonPackageExtensions = extensions\n .map((extension) => {\n const segments = this.getCompactDisplayPathSegments(extension.path);\n const lastSegment = segments[segments.length - 1];\n if (\n segments.length > 1 &&\n (lastSegment === \"index.ts\" || lastSegment === \"index.js\")\n ) {\n segments.pop();\n }\n return {\n path: extension.path,\n sourceInfo: extension.sourceInfo,\n segments,\n };\n })\n .filter((extension) => !this.isPackageSource(extension.sourceInfo));\n\n return extensions.map((extension) => {\n if (this.isPackageSource(extension.sourceInfo)) {\n return this.getCompactExtensionLabel(\n extension.path,\n extension.sourceInfo,\n );\n }\n\n const nonPackageIndex = nonPackageExtensions.findIndex(\n (item) => item.path === extension.path,\n );\n if (nonPackageIndex === -1) {\n return this.getCompactPathLabel(extension.path, extension.sourceInfo);\n }\n\n return this.getCompactNonPackageExtensionLabel(\n extension.path,\n nonPackageIndex,\n nonPackageExtensions,\n );\n });\n };\n\nInteractiveModeBase.prototype.getDisplaySourceInfo = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): {\n label: string;\n scopeLabel?: string;\n color: \"accent\" | \"muted\";\n } {\n const source = sourceInfo?.source ?? \"local\";\n const scope = sourceInfo?.scope ?? \"project\";\n if (source === \"local\") {\n if (scope === \"user\") {\n return { label: \"user\", color: \"muted\" };\n }\n if (scope === \"project\") {\n return { label: \"project\", color: \"muted\" };\n }\n if (scope === \"temporary\") {\n return { label: \"path\", scopeLabel: \"temp\", color: \"muted\" };\n }\n return { label: \"path\", color: \"muted\" };\n }\n\n if (source === \"cli\") {\n return {\n label: \"path\",\n scopeLabel: scope === \"temporary\" ? \"temp\" : undefined,\n color: \"muted\",\n };\n }\n\n const scopeLabel =\n scope === \"user\"\n ? \"user\"\n : scope === \"project\"\n ? \"project\"\n : scope === \"temporary\"\n ? \"temp\"\n : undefined;\n return { label: source, scopeLabel, color: \"accent\" };\n };\n\nInteractiveModeBase.prototype.getScopeGroup = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\" {\n const source = sourceInfo?.source ?? \"local\";\n const scope = sourceInfo?.scope ?? \"project\";\n if (source === \"cli\" || scope === \"temporary\") return \"path\";\n if (scope === \"user\") return \"user\";\n if (scope === \"project\") return \"project\";\n return \"path\";\n };\n\nInteractiveModeBase.prototype.isPackageSource = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): boolean {\n const source = sourceInfo?.source ?? \"\";\n return source.startsWith(\"npm:\") || source.startsWith(\"git:\");\n };\n\nInteractiveModeBase.prototype.buildScopeGroups = function(this: InteractiveModeBase, items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }> {\n const groups: Record<\n \"user\" | \"project\" | \"path\",\n {\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }\n > = {\n user: { scope: \"user\", paths: [], packages: new Map() },\n project: { scope: \"project\", paths: [], packages: new Map() },\n path: { scope: \"path\", paths: [], packages: new Map() },\n };\n\n for (const item of items) {\n const groupKey = this.getScopeGroup(item.sourceInfo);\n const group = groups[groupKey];\n const source = item.sourceInfo?.source ?? \"local\";\n\n if (this.isPackageSource(item.sourceInfo)) {\n const list = group.packages.get(source) ?? [];\n list.push(item);\n group.packages.set(source, list);\n } else {\n group.paths.push(item);\n }\n }\n\n return [groups.project, groups.user, groups.path].filter(\n (group) => group.paths.length > 0 || group.packages.size > 0,\n );\n };\n\nInteractiveModeBase.prototype.formatScopeGroups = function(this: InteractiveModeBase, groups: Array<{\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }>, options: {\n formatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n formatPackagePath: (\n item: { path: string; sourceInfo?: SourceInfo },\n source: string,\n ) => string;\n }): string {\n const lines: string[] = [];\n\n for (const group of groups) {\n lines.push(` ${theme.fg(\"accent\", group.scope)}`);\n\n const sortedPaths = [...group.paths].sort((a, b) =>\n a.path.localeCompare(b.path),\n );\n for (const item of sortedPaths) {\n lines.push(theme.fg(\"dim\", ` ${options.formatPath(item)}`));\n }\n\n const sortedPackages = Array.from(group.packages.entries()).sort(\n ([a], [b]) => a.localeCompare(b),\n );\n for (const [source, items] of sortedPackages) {\n lines.push(` ${theme.fg(\"mdLink\", source)}`);\n const sortedPackagePaths = [...items].sort((a, b) =>\n a.path.localeCompare(b.path),\n );\n for (const item of sortedPackagePaths) {\n lines.push(\n theme.fg(\"dim\", ` ${options.formatPackagePath(item, source)}`),\n );\n }\n }\n }\n\n return lines.join(\"\\n\");\n };\n\nInteractiveModeBase.prototype.findSourceInfoForPath = function(this: InteractiveModeBase, p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined {\n const exact = sourceInfos.get(p);\n if (exact) return exact;\n\n let current = p;\n while (current.includes(\"/\")) {\n current = current.substring(0, current.lastIndexOf(\"/\"));\n const parent = sourceInfos.get(current);\n if (parent) return parent;\n }\n\n return undefined;\n };\n\nInteractiveModeBase.prototype.formatPathWithSource = function(this: InteractiveModeBase, p: string, sourceInfo?: SourceInfo): string {\n if (sourceInfo) {\n const shortPath = this.getShortPath(p, sourceInfo);\n const { label, scopeLabel } = this.getDisplaySourceInfo(sourceInfo);\n const labelText = scopeLabel ? `${label} (${scopeLabel})` : label;\n return `${labelText} ${shortPath}`;\n }\n return this.formatDisplayPath(p);\n };\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-resource-paths.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-resource-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAmB,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEvF,mBAAmB,CAAC,SAAS,CAAC,YAAY,GAAG,UAAoC,QAAgB,EAAE,UAAuB;IACtH,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAC;IACpC,IAAI,OAAO,IAAI,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChD,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACtD,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC5F,IAAI,YAAY,EAAE,C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,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC5B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEJ,mBAAmB,CAAC,SAAS,CAAC,oBAAoB,GAAG,UAAoC,CAAS,EAAE,UAAuB;IACvH,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACpE,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,UAAU,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;QAClE,OAAO,GAAG,SAAS,IAAI,SAAS,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC","sourcesContent":["import { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type SourceInfo, path, parseGitUrl, theme } from \"./interactive-mode-deps.ts\";\n\nInteractiveModeBase.prototype.getShortPath = function(this: InteractiveModeBase, fullPath: string, sourceInfo?: SourceInfo): string {\n const normalizedFullPath = fullPath.replace(/\\\\/g, \"/\");\n const baseDir = sourceInfo?.baseDir;\n if (baseDir && this.isPackageSource(sourceInfo)) {\n const normalizedBaseDir = baseDir.replace(/\\\\/g, \"/\");\n const npmRootMatch = normalizedBaseDir.match(/^(.*\\/node_modules)\\/(@?[^/]+(?:\\/[^/]+)?)$/);\n if (npmRootMatch?.[1] && normalizedFullPath.startsWith(`${npmRootMatch[1]}/`)) {\n return path.posix.relative(normalizedBaseDir, normalizedFullPath);\n }\n const relativePath = path.relative(path.resolve(baseDir), path.resolve(fullPath));\n if (\n relativePath &&\n relativePath !== \".\" &&\n !relativePath.startsWith(\"..\") &&\n !relativePath.startsWith(`..${path.sep}`) &&\n !path.isAbsolute(relativePath)\n ) {\n return relativePath.replace(/\\\\/g, \"/\");\n }\n }\n\n const source = sourceInfo?.source ?? \"\";\n const npmMatch = normalizedFullPath.match(\n /node_modules\\/(@?[^/]+(?:\\/[^/]+)?)\\/(.*)/,\n );\n if (npmMatch && source.startsWith(\"npm:\")) {\n return npmMatch[2];\n }\n\n const gitMatch = normalizedFullPath.match(/git\\/[^/]+\\/[^/]+\\/(.*)/);\n if (gitMatch && source.startsWith(\"git:\")) {\n return gitMatch[1];\n }\n\n return this.formatDisplayPath(fullPath);\n };\n\nInteractiveModeBase.prototype.getCompactPathLabel = function(this: InteractiveModeBase, resourcePath: string, sourceInfo?: SourceInfo): string {\n const shortPath = this.getShortPath(resourcePath, sourceInfo);\n const normalizedPath = shortPath.replace(/\\\\/g, \"/\");\n const segments = normalizedPath\n .split(\"/\")\n .filter((segment) => segment.length > 0 && segment !== \"~\");\n if (segments.length > 0) {\n return segments[segments.length - 1]!;\n }\n return shortPath;\n };\n\nInteractiveModeBase.prototype.getCompactPackageSourceLabel = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): string {\n const source = sourceInfo?.source ?? \"\";\n if (source.startsWith(\"npm:\")) {\n return source.slice(\"npm:\".length) || source;\n }\n\n const gitSource = parseGitUrl(source);\n if (gitSource) {\n return gitSource.path || source;\n }\n\n if (sourceInfo?.origin === \"package\") {\n return path.basename(source) || source;\n }\n\n return source;\n };\n\nInteractiveModeBase.prototype.getCompactExtensionLabel = function(this: InteractiveModeBase, resourcePath: string, sourceInfo?: SourceInfo): string {\n if (!this.isPackageSource(sourceInfo)) {\n return this.getCompactPathLabel(resourcePath, sourceInfo);\n }\n\n const sourceLabel = this.getCompactPackageSourceLabel(sourceInfo);\n if (!sourceLabel) {\n return this.getCompactPathLabel(resourcePath, sourceInfo);\n }\n\n const shortPath = this.getShortPath(resourcePath, sourceInfo).replace(\n /\\\\/g,\n \"/\",\n );\n const packagePath = shortPath.startsWith(\"extensions/\")\n ? shortPath.slice(\"extensions/\".length)\n : shortPath;\n const parsedPath = path.posix.parse(packagePath);\n\n if (parsedPath.name === \"index\") {\n return !parsedPath.dir || parsedPath.dir === \".\"\n ? sourceLabel\n : `${sourceLabel}:${parsedPath.dir}`;\n }\n\n return `${sourceLabel}:${packagePath}`;\n };\n\nInteractiveModeBase.prototype.getCompactDisplayPathSegments = function(this: InteractiveModeBase, resourcePath: string): string[] {\n return this.formatDisplayPath(resourcePath)\n .replace(/\\\\/g, \"/\")\n .split(\"/\")\n .filter((segment) => segment.length > 0 && segment !== \"~\");\n };\n\nInteractiveModeBase.prototype.getCompactNonPackageExtensionLabel = function(this: InteractiveModeBase, resourcePath: string, index: number, allPaths: Array<{ path: string; segments: string[] }>): string {\n const segments = allPaths[index]?.segments;\n if (!segments || segments.length === 0) {\n return this.getCompactPathLabel(resourcePath);\n }\n\n for (\n let segmentCount = 1;\n segmentCount <= segments.length;\n segmentCount += 1\n ) {\n const candidate = segments.slice(-segmentCount).join(\"/\");\n const isUnique = allPaths.every((item, itemIndex) => {\n if (itemIndex === index) {\n return true;\n }\n return item.segments.slice(-segmentCount).join(\"/\") !== candidate;\n });\n\n if (isUnique) {\n return candidate;\n }\n }\n\n return segments.join(\"/\");\n };\n\nInteractiveModeBase.prototype.getCompactExtensionLabels = function(this: InteractiveModeBase, extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[] {\n const nonPackageExtensions = extensions\n .map((extension) => {\n const segments = this.getCompactDisplayPathSegments(extension.path);\n const lastSegment = segments[segments.length - 1];\n if (\n segments.length > 1 &&\n (lastSegment === \"index.ts\" || lastSegment === \"index.js\")\n ) {\n segments.pop();\n }\n return {\n path: extension.path,\n sourceInfo: extension.sourceInfo,\n segments,\n };\n })\n .filter((extension) => !this.isPackageSource(extension.sourceInfo));\n\n return extensions.map((extension) => {\n if (this.isPackageSource(extension.sourceInfo)) {\n return this.getCompactExtensionLabel(\n extension.path,\n extension.sourceInfo,\n );\n }\n\n const nonPackageIndex = nonPackageExtensions.findIndex(\n (item) => item.path === extension.path,\n );\n if (nonPackageIndex === -1) {\n return this.getCompactPathLabel(extension.path, extension.sourceInfo);\n }\n\n return this.getCompactNonPackageExtensionLabel(\n extension.path,\n nonPackageIndex,\n nonPackageExtensions,\n );\n });\n };\n\nInteractiveModeBase.prototype.getDisplaySourceInfo = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): {\n label: string;\n scopeLabel?: string;\n color: \"accent\" | \"muted\";\n } {\n const source = sourceInfo?.source ?? \"local\";\n const scope = sourceInfo?.scope ?? \"project\";\n if (source === \"local\") {\n if (scope === \"user\") {\n return { label: \"user\", color: \"muted\" };\n }\n if (scope === \"project\") {\n return { label: \"project\", color: \"muted\" };\n }\n if (scope === \"temporary\") {\n return { label: \"path\", scopeLabel: \"temp\", color: \"muted\" };\n }\n return { label: \"path\", color: \"muted\" };\n }\n\n if (source === \"cli\") {\n return {\n label: \"path\",\n scopeLabel: scope === \"temporary\" ? \"temp\" : undefined,\n color: \"muted\",\n };\n }\n\n const scopeLabel =\n scope === \"user\"\n ? \"user\"\n : scope === \"project\"\n ? \"project\"\n : scope === \"temporary\"\n ? \"temp\"\n : undefined;\n return { label: source, scopeLabel, color: \"accent\" };\n };\n\nInteractiveModeBase.prototype.getScopeGroup = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\" {\n const source = sourceInfo?.source ?? \"local\";\n const scope = sourceInfo?.scope ?? \"project\";\n if (source === \"cli\" || scope === \"temporary\") return \"path\";\n if (scope === \"user\") return \"user\";\n if (scope === \"project\") return \"project\";\n return \"path\";\n };\n\nInteractiveModeBase.prototype.isPackageSource = function(this: InteractiveModeBase, sourceInfo?: SourceInfo): boolean {\n const source = sourceInfo?.source ?? \"\";\n return source.startsWith(\"npm:\") || source.startsWith(\"git:\");\n };\n\nInteractiveModeBase.prototype.buildScopeGroups = function(this: InteractiveModeBase, items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }> {\n const groups: Record<\n \"user\" | \"project\" | \"path\",\n {\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }\n > = {\n user: { scope: \"user\", paths: [], packages: new Map() },\n project: { scope: \"project\", paths: [], packages: new Map() },\n path: { scope: \"path\", paths: [], packages: new Map() },\n };\n\n for (const item of items) {\n const groupKey = this.getScopeGroup(item.sourceInfo);\n const group = groups[groupKey];\n const source = item.sourceInfo?.source ?? \"local\";\n\n if (this.isPackageSource(item.sourceInfo)) {\n const list = group.packages.get(source) ?? [];\n list.push(item);\n group.packages.set(source, list);\n } else {\n group.paths.push(item);\n }\n }\n\n return [groups.project, groups.user, groups.path].filter(\n (group) => group.paths.length > 0 || group.packages.size > 0,\n );\n };\n\nInteractiveModeBase.prototype.formatScopeGroups = function(this: InteractiveModeBase, groups: Array<{\n scope: \"user\" | \"project\" | \"path\";\n paths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n packages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n }>, options: {\n formatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n formatPackagePath: (\n item: { path: string; sourceInfo?: SourceInfo },\n source: string,\n ) => string;\n }): string {\n const lines: string[] = [];\n\n for (const group of groups) {\n lines.push(` ${theme.fg(\"accent\", group.scope)}`);\n\n const sortedPaths = [...group.paths].sort((a, b) =>\n a.path.localeCompare(b.path),\n );\n for (const item of sortedPaths) {\n lines.push(theme.fg(\"dim\", ` ${options.formatPath(item)}`));\n }\n\n const sortedPackages = Array.from(group.packages.entries()).sort(\n ([a], [b]) => a.localeCompare(b),\n );\n for (const [source, items] of sortedPackages) {\n lines.push(` ${theme.fg(\"mdLink\", source)}`);\n const sortedPackagePaths = [...items].sort((a, b) =>\n a.path.localeCompare(b.path),\n );\n for (const item of sortedPackagePaths) {\n lines.push(\n theme.fg(\"dim\", ` ${options.formatPackagePath(item, source)}`),\n );\n }\n }\n }\n\n return lines.join(\"\\n\");\n };\n\nInteractiveModeBase.prototype.findSourceInfoForPath = function(this: InteractiveModeBase, p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined {\n const exact = sourceInfos.get(p);\n if (exact) return exact;\n\n let current = p;\n while (current.includes(\"/\")) {\n current = current.substring(0, current.lastIndexOf(\"/\"));\n const parent = sourceInfos.get(current);\n if (parent) return parent;\n }\n\n return undefined;\n };\n\nInteractiveModeBase.prototype.formatPathWithSource = function(this: InteractiveModeBase, p: string, sourceInfo?: SourceInfo): string {\n if (sourceInfo) {\n const shortPath = this.getShortPath(p, sourceInfo);\n const { label, scopeLabel } = this.getDisplaySourceInfo(sourceInfo);\n const labelText = scopeLabel ? `${label} (${scopeLabel})` : label;\n return `${labelText} ${shortPath}`;\n }\n return this.formatDisplayPath(p);\n };\n"]}
|
|
@@ -1,5 +1,93 @@
|
|
|
1
|
+
import { getInteractiveEngineResourceOverlaps } from "../interactive-engine/extension-ui-bridge.js";
|
|
1
2
|
import { InteractiveModeBase } from "./interactive-mode-base.js";
|
|
2
3
|
import { Spacer, Text, theme } from "./interactive-mode-deps.js";
|
|
4
|
+
function formatList(values) {
|
|
5
|
+
if (values.length <= 1)
|
|
6
|
+
return values[0] ?? "";
|
|
7
|
+
if (values.length === 2)
|
|
8
|
+
return `${values[0]} and ${values[1]}`;
|
|
9
|
+
return `${values.slice(0, -1).join(", ")}, and ${values.at(-1)}`;
|
|
10
|
+
}
|
|
11
|
+
function getShortestUniqueSourceLabels(sources, reservedLabels) {
|
|
12
|
+
const partsBySource = new Map(sources.map((source) => [
|
|
13
|
+
source,
|
|
14
|
+
source.replace(/\\/g, "/").split("/").filter(Boolean),
|
|
15
|
+
]));
|
|
16
|
+
const depthBySource = new Map(sources.map((source) => [source, 1]));
|
|
17
|
+
while (true) {
|
|
18
|
+
const groups = new Map();
|
|
19
|
+
for (const source of sources) {
|
|
20
|
+
const parts = partsBySource.get(source) ?? [source];
|
|
21
|
+
const depth = depthBySource.get(source) ?? 1;
|
|
22
|
+
const label = parts.slice(-depth).join("/") || source;
|
|
23
|
+
groups.set(label, [...(groups.get(label) ?? []), source]);
|
|
24
|
+
}
|
|
25
|
+
const duplicates = [...groups].filter(([label, group]) => group.length > 1 || reservedLabels.has(label));
|
|
26
|
+
if (duplicates.length === 0) {
|
|
27
|
+
return new Map(sources.map((source) => {
|
|
28
|
+
const parts = partsBySource.get(source) ?? [source];
|
|
29
|
+
return [source, parts.slice(-(depthBySource.get(source) ?? 1)).join("/") || source];
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
let expanded = false;
|
|
33
|
+
for (const [, group] of duplicates) {
|
|
34
|
+
for (const source of group) {
|
|
35
|
+
const maxDepth = partsBySource.get(source)?.length ?? 1;
|
|
36
|
+
const depth = depthBySource.get(source) ?? 1;
|
|
37
|
+
if (depth < maxDepth) {
|
|
38
|
+
depthBySource.set(source, depth + 1);
|
|
39
|
+
expanded = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!expanded)
|
|
44
|
+
return new Map(sources.map((source) => [source, source]));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function getExtensionIdentityPath(resourcePath) {
|
|
48
|
+
const normalized = resourcePath.replace(/\\/g, "/");
|
|
49
|
+
const segments = normalized.split("/").filter(Boolean);
|
|
50
|
+
if (/^index\.[cm]?[jt]sx?$/.test(segments.at(-1) ?? ""))
|
|
51
|
+
segments.pop();
|
|
52
|
+
return segments.join("/") || normalized;
|
|
53
|
+
}
|
|
54
|
+
function getOverlapLabels(mode, overlaps) {
|
|
55
|
+
const labels = new Set();
|
|
56
|
+
const localPackageSources = new Set();
|
|
57
|
+
const extensionSources = new Set();
|
|
58
|
+
for (const overlap of overlaps) {
|
|
59
|
+
const sourceInfo = overlap.inherited;
|
|
60
|
+
if (sourceInfo.origin !== "package") {
|
|
61
|
+
extensionSources.add(getExtensionIdentityPath(sourceInfo.path));
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (!mode.isPackageSource(sourceInfo)) {
|
|
65
|
+
localPackageSources.add(sourceInfo.source);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const label = mode.getCompactPackageSourceLabel(sourceInfo);
|
|
69
|
+
if (label)
|
|
70
|
+
labels.add(label);
|
|
71
|
+
}
|
|
72
|
+
for (const label of getShortestUniqueSourceLabels([...localPackageSources], labels).values())
|
|
73
|
+
labels.add(label);
|
|
74
|
+
for (const label of getShortestUniqueSourceLabels([...extensionSources], labels).values())
|
|
75
|
+
labels.add(label);
|
|
76
|
+
return [...labels];
|
|
77
|
+
}
|
|
78
|
+
const displayedOverlapFingerprints = new WeakMap();
|
|
79
|
+
function shouldDisplayOverlapNotice(mode, overlaps) {
|
|
80
|
+
if (overlaps.length === 0)
|
|
81
|
+
return false;
|
|
82
|
+
const fingerprint = overlaps
|
|
83
|
+
.map((overlap) => `${overlap.resourceType}:${overlap.name}:${overlap.inherited.path}:${overlap.bundled.path}`)
|
|
84
|
+
.sort()
|
|
85
|
+
.join("\n");
|
|
86
|
+
if (displayedOverlapFingerprints.get(mode) === fingerprint)
|
|
87
|
+
return false;
|
|
88
|
+
displayedOverlapFingerprints.set(mode, fingerprint);
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
3
91
|
InteractiveModeBase.prototype.showLoadedResources = function (options) {
|
|
4
92
|
const targetContainer = options?.targetContainer ?? this.chatContainer;
|
|
5
93
|
const showListing = options?.force ||
|
|
@@ -139,6 +227,17 @@ InteractiveModeBase.prototype.showLoadedResources = function (options) {
|
|
|
139
227
|
});
|
|
140
228
|
}
|
|
141
229
|
if (showDiagnostics) {
|
|
230
|
+
const overlaps = [
|
|
231
|
+
...(this.session.resourceLoader.getExtensions().overlaps ?? []),
|
|
232
|
+
...getInteractiveEngineResourceOverlaps(this.runtimeHost),
|
|
233
|
+
];
|
|
234
|
+
const overlapLabels = getOverlapLabels(this, overlaps);
|
|
235
|
+
if (shouldDisplayOverlapNotice(this, overlaps) && overlapLabels.length > 0) {
|
|
236
|
+
const sources = formatList(overlapLabels.map((label) => `\`${label}\``));
|
|
237
|
+
const verb = overlapLabels.length === 1 ? "provides" : "provide";
|
|
238
|
+
targetContainer.addChild(new Text(theme.fg("warning", `Extension overlap detected: ${sources} ${verb} resources already bundled with Atomic. Atomic kept its bundled versions; non-conflicting extension features remain available.`), 0, 0));
|
|
239
|
+
targetContainer.addChild(new Spacer(1));
|
|
240
|
+
}
|
|
142
241
|
const skillDiagnostics = skillsResult.diagnostics;
|
|
143
242
|
if (skillDiagnostics.length > 0) {
|
|
144
243
|
const warningLines = this.formatDiagnostics(skillDiagnostics, sourceInfos);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-resource-rendering.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-resource-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAA4D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAE3H,mBAAmB,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAoC,OAKrF;IACC,MAAM,eAAe,GAAG,OAAO,EAAE,eAAe,IAAI,IAAI,CAAC,aAAa,CAAC;IACvE,MAAM,WAAW,GACf,OAAO,EAAE,KAAK;QACd,IAAI,CAAC,OAAO,CAAC,OAAO;QACpB,CAAC,IAAI,CAAC,eAAe,CAAC,e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YAAY,GAAG,IAAI,CAAC,iBAAiB,CACzC,gBAAgB,EAChB,WAAW,CACZ,CAAC;YACF,eAAe,CAAC,QAAQ,CACtB,IAAI,IAAI,CACN,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,KAAK,YAAY,EAAE,EAC9D,CAAC,EACD,CAAC,CACF,CACF,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type Container, type ResourceDiagnostic, type SourceInfo, Spacer, Text, theme } from \"./interactive-mode-deps.ts\";\n\nInteractiveModeBase.prototype.showLoadedResources = function(this: InteractiveModeBase, options?: {\n extensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n force?: boolean;\n showDiagnosticsWhenQuiet?: boolean;\n targetContainer?: Container;\n }): void {\n const targetContainer = options?.targetContainer ?? this.chatContainer;\n const showListing =\n options?.force ||\n this.options.verbose ||\n !this.settingsManager.getQuietStartup();\n const showDiagnostics =\n showListing || options?.showDiagnosticsWhenQuiet === true;\n if (!showListing && !showDiagnostics) {\n return;\n }\n\n const skillsResult = this.session.resourceLoader.getSkills();\n const promptsResult = this.session.resourceLoader.getPrompts();\n const themesResult = this.session.resourceLoader.getThemes();\n const extensions =\n options?.extensions ??\n this.session.resourceLoader\n .getExtensions()\n .extensions.filter((extension) => extension.hidden !== true).map((extension) => ({\n path: extension.path,\n sourceInfo: extension.sourceInfo,\n }));\n const sourceInfos = new Map<string, SourceInfo>();\n for (const extension of extensions) {\n if (extension.sourceInfo) {\n sourceInfos.set(extension.path, extension.sourceInfo);\n }\n }\n for (const skill of skillsResult.skills) {\n if (skill.sourceInfo) {\n sourceInfos.set(skill.filePath, skill.sourceInfo);\n }\n }\n for (const prompt of promptsResult.prompts) {\n if (prompt.sourceInfo) {\n sourceInfos.set(prompt.filePath, prompt.sourceInfo);\n }\n }\n for (const loadedTheme of themesResult.themes) {\n if (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n sourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n }\n }\n\n if (showListing) {\n const contextFiles =\n this.session.resourceLoader.getAgentsFiles().agentsFiles;\n const templates = this.session.promptTemplates;\n const customThemes = themesResult.themes.filter((t) => t.sourcePath);\n\n const expandedSections: string[] = [];\n if (contextFiles.length > 0) {\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"CONTEXT\"))}\\n${contextFiles\n .map((contextFile) => theme.fg(\"dim\", ` ${this.formatDisplayPath(contextFile.path)}`))\n .join(\"\\n\")}`,\n );\n }\n\n const skills = skillsResult.skills;\n if (skills.length > 0) {\n const groups = this.buildScopeGroups(\n skills.map((skill) => ({\n path: skill.filePath,\n sourceInfo: skill.sourceInfo,\n })),\n );\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"SKILLS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.getShortPath(item.path, item.sourceInfo),\n })}`,\n );\n }\n\n if (templates.length > 0) {\n const groups = this.buildScopeGroups(\n templates.map((template) => ({\n path: template.filePath,\n sourceInfo: template.sourceInfo,\n })),\n );\n const templateByPath = new Map(templates.map((t) => [t.filePath, t]));\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"PROMPTS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => {\n const template = templateByPath.get(item.path);\n return template\n ? `/${template.name}`\n : this.formatDisplayPath(item.path);\n },\n formatPackagePath: (item) => {\n const template = templateByPath.get(item.path);\n return template\n ? `/${template.name}`\n : this.formatDisplayPath(item.path);\n },\n })}`,\n );\n }\n\n const prompts = promptsResult.prompts;\n if (prompts.length > 0) {\n const groups = this.buildScopeGroups(\n prompts.map((prompt) => ({\n path: prompt.filePath,\n sourceInfo: prompt.sourceInfo,\n })),\n );\n const promptByPath = new Map(prompts.map((prompt) => [prompt.filePath, prompt]));\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"PROMPTS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => promptByPath.get(item.path)?.name ?? this.formatDisplayPath(item.path),\n formatPackagePath: (item) => promptByPath.get(item.path)?.name ?? this.formatDisplayPath(item.path),\n })}`,\n );\n }\n\n if (extensions.length > 0) {\n const groups = this.buildScopeGroups(extensions);\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"EXTENSIONS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatExtensionDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.formatExtensionDisplayPath(\n this.getShortPath(item.path, item.sourceInfo),\n ),\n })}`,\n );\n }\n\n if (customThemes.length > 0) {\n const groups = this.buildScopeGroups(\n customThemes.map((loadedTheme) => ({\n path: loadedTheme.sourcePath!,\n sourceInfo: loadedTheme.sourceInfo,\n })),\n );\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"THEMES\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.getShortPath(item.path, item.sourceInfo),\n })}`,\n );\n }\n\n const extensionDiagnostics: ResourceDiagnostic[] = [];\n const extensionErrors =\n this.session.resourceLoader.getExtensions().errors;\n for (const error of extensionErrors) {\n extensionDiagnostics.push({\n type: \"error\",\n message: error.error,\n path: error.path,\n });\n }\n extensionDiagnostics.push(\n ...this.session.extensionRunner.getCommandDiagnostics(),\n ...this.getBuiltInCommandConflictDiagnostics(\n this.session.extensionRunner,\n ),\n ...this.session.extensionRunner.getShortcutDiagnostics(),\n );\n\n this.addResourceDisclosure({\n contextFiles,\n skills,\n prompts,\n templates,\n extensions,\n themes: customThemes,\n diagnosticsTotal: this.getResourceDiagnosticsTotal([\n skillsResult.diagnostics,\n promptsResult.diagnostics,\n extensionDiagnostics,\n themesResult.diagnostics,\n ]),\n expandedBody: this.options.verbose ? expandedSections.join(\"\\n\\n\") : \"\",\n targetContainer,\n });\n }\n\n if (showDiagnostics) {\n const skillDiagnostics = skillsResult.diagnostics;\n if (skillDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n skillDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const promptDiagnostics = promptsResult.diagnostics;\n if (promptDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n promptDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const extensionDiagnostics: ResourceDiagnostic[] = [];\n const extensionErrors =\n this.session.resourceLoader.getExtensions().errors;\n if (extensionErrors.length > 0) {\n for (const error of extensionErrors) {\n extensionDiagnostics.push({\n type: \"error\",\n message: error.error,\n path: error.path,\n });\n }\n }\n\n const commandDiagnostics =\n this.session.extensionRunner.getCommandDiagnostics();\n extensionDiagnostics.push(...commandDiagnostics);\n extensionDiagnostics.push(\n ...this.getBuiltInCommandConflictDiagnostics(\n this.session.extensionRunner,\n ),\n );\n\n const shortcutDiagnostics =\n this.session.extensionRunner.getShortcutDiagnostics();\n extensionDiagnostics.push(...shortcutDiagnostics);\n\n if (extensionDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n extensionDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Extension issues]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const themeDiagnostics = themesResult.diagnostics;\n if (themeDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n themeDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n }\n };\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-resource-rendering.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-resource-rendering.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAA4D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAE3H,SAAS,UAAU,CAAC,MAAgB;IAClC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,6BAA6B,CAAC,OAAiB,EAAE,cAAmC;IAC3F,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACpD,MAAM;QACN,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;KACtD,CAAC,CAAC,CAAC;IACJ,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,C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SAAS,EAAE,oBAAoB,CAAC,KAAK,YAAY,EAAE,EAC/D,CAAC,EACD,CAAC,CACF,CACF,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,gBAAgB,GAAG,YAAY,CAAC,WAAW,CAAC;QAClD,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CACzC,gBAAgB,EAChB,WAAW,CACZ,CAAC;YACF,eAAe,CAAC,QAAQ,CACtB,IAAI,IAAI,CACN,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,KAAK,YAAY,EAAE,EAC9D,CAAC,EACD,CAAC,CACF,CACF,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import type { ResourceOverlap } from \"../../core/diagnostics.ts\";\nimport { getInteractiveEngineResourceOverlaps } from \"../interactive-engine/extension-ui-bridge.ts\";\nimport { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport { type Container, type ResourceDiagnostic, type SourceInfo, Spacer, Text, theme } from \"./interactive-mode-deps.ts\";\n\nfunction formatList(values: string[]): string {\n if (values.length <= 1) return values[0] ?? \"\";\n if (values.length === 2) return `${values[0]} and ${values[1]}`;\n return `${values.slice(0, -1).join(\", \")}, and ${values.at(-1)}`;\n}\n\nfunction getShortestUniqueSourceLabels(sources: string[], reservedLabels: ReadonlySet<string>): Map<string, string> {\n const partsBySource = new Map(sources.map((source) => [\n source,\n source.replace(/\\\\/g, \"/\").split(\"/\").filter(Boolean),\n ]));\n const depthBySource = new Map(sources.map((source) => [source, 1]));\n while (true) {\n const groups = new Map<string, string[]>();\n for (const source of sources) {\n const parts = partsBySource.get(source) ?? [source];\n const depth = depthBySource.get(source) ?? 1;\n const label = parts.slice(-depth).join(\"/\") || source;\n groups.set(label, [...(groups.get(label) ?? []), source]);\n }\n const duplicates = [...groups].filter(([label, group]) => group.length > 1 || reservedLabels.has(label));\n if (duplicates.length === 0) {\n return new Map(sources.map((source) => {\n const parts = partsBySource.get(source) ?? [source];\n return [source, parts.slice(-(depthBySource.get(source) ?? 1)).join(\"/\") || source];\n }));\n }\n let expanded = false;\n for (const [, group] of duplicates) {\n for (const source of group) {\n const maxDepth = partsBySource.get(source)?.length ?? 1;\n const depth = depthBySource.get(source) ?? 1;\n if (depth < maxDepth) {\n depthBySource.set(source, depth + 1);\n expanded = true;\n }\n }\n }\n if (!expanded) return new Map(sources.map((source) => [source, source]));\n }\n}\n\nfunction getExtensionIdentityPath(resourcePath: string): string {\n const normalized = resourcePath.replace(/\\\\/g, \"/\");\n const segments = normalized.split(\"/\").filter(Boolean);\n if (/^index\\.[cm]?[jt]sx?$/.test(segments.at(-1) ?? \"\")) segments.pop();\n return segments.join(\"/\") || normalized;\n}\n\nfunction getOverlapLabels(mode: InteractiveModeBase, overlaps: readonly ResourceOverlap[]): string[] {\n const labels = new Set<string>();\n const localPackageSources = new Set<string>();\n const extensionSources = new Set<string>();\n for (const overlap of overlaps) {\n const sourceInfo = overlap.inherited;\n if (sourceInfo.origin !== \"package\") {\n extensionSources.add(getExtensionIdentityPath(sourceInfo.path));\n continue;\n }\n if (!mode.isPackageSource(sourceInfo)) {\n localPackageSources.add(sourceInfo.source);\n continue;\n }\n const label = mode.getCompactPackageSourceLabel(sourceInfo);\n if (label) labels.add(label);\n }\n for (const label of getShortestUniqueSourceLabels([...localPackageSources], labels).values()) labels.add(label);\n for (const label of getShortestUniqueSourceLabels([...extensionSources], labels).values()) labels.add(label);\n return [...labels];\n}\nconst displayedOverlapFingerprints = new WeakMap<InteractiveModeBase, string>();\n\nfunction shouldDisplayOverlapNotice(mode: InteractiveModeBase, overlaps: readonly ResourceOverlap[]): boolean {\n if (overlaps.length === 0) return false;\n const fingerprint = overlaps\n .map((overlap) => `${overlap.resourceType}:${overlap.name}:${overlap.inherited.path}:${overlap.bundled.path}`)\n .sort()\n .join(\"\\n\");\n if (displayedOverlapFingerprints.get(mode) === fingerprint) return false;\n displayedOverlapFingerprints.set(mode, fingerprint);\n return true;\n}\n\n\nInteractiveModeBase.prototype.showLoadedResources = function(this: InteractiveModeBase, options?: {\n extensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n force?: boolean;\n showDiagnosticsWhenQuiet?: boolean;\n targetContainer?: Container;\n }): void {\n const targetContainer = options?.targetContainer ?? this.chatContainer;\n const showListing =\n options?.force ||\n this.options.verbose ||\n !this.settingsManager.getQuietStartup();\n const showDiagnostics =\n showListing || options?.showDiagnosticsWhenQuiet === true;\n if (!showListing && !showDiagnostics) {\n return;\n }\n\n const skillsResult = this.session.resourceLoader.getSkills();\n const promptsResult = this.session.resourceLoader.getPrompts();\n const themesResult = this.session.resourceLoader.getThemes();\n const extensions =\n options?.extensions ??\n this.session.resourceLoader\n .getExtensions()\n .extensions.filter((extension) => extension.hidden !== true).map((extension) => ({\n path: extension.path,\n sourceInfo: extension.sourceInfo,\n }));\n const sourceInfos = new Map<string, SourceInfo>();\n for (const extension of extensions) {\n if (extension.sourceInfo) {\n sourceInfos.set(extension.path, extension.sourceInfo);\n }\n }\n for (const skill of skillsResult.skills) {\n if (skill.sourceInfo) {\n sourceInfos.set(skill.filePath, skill.sourceInfo);\n }\n }\n for (const prompt of promptsResult.prompts) {\n if (prompt.sourceInfo) {\n sourceInfos.set(prompt.filePath, prompt.sourceInfo);\n }\n }\n for (const loadedTheme of themesResult.themes) {\n if (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n sourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n }\n }\n\n if (showListing) {\n const contextFiles =\n this.session.resourceLoader.getAgentsFiles().agentsFiles;\n const templates = this.session.promptTemplates;\n const customThemes = themesResult.themes.filter((t) => t.sourcePath);\n\n const expandedSections: string[] = [];\n if (contextFiles.length > 0) {\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"CONTEXT\"))}\\n${contextFiles\n .map((contextFile) => theme.fg(\"dim\", ` ${this.formatDisplayPath(contextFile.path)}`))\n .join(\"\\n\")}`,\n );\n }\n\n const skills = skillsResult.skills;\n if (skills.length > 0) {\n const groups = this.buildScopeGroups(\n skills.map((skill) => ({\n path: skill.filePath,\n sourceInfo: skill.sourceInfo,\n })),\n );\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"SKILLS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.getShortPath(item.path, item.sourceInfo),\n })}`,\n );\n }\n\n if (templates.length > 0) {\n const groups = this.buildScopeGroups(\n templates.map((template) => ({\n path: template.filePath,\n sourceInfo: template.sourceInfo,\n })),\n );\n const templateByPath = new Map(templates.map((t) => [t.filePath, t]));\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"PROMPTS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => {\n const template = templateByPath.get(item.path);\n return template\n ? `/${template.name}`\n : this.formatDisplayPath(item.path);\n },\n formatPackagePath: (item) => {\n const template = templateByPath.get(item.path);\n return template\n ? `/${template.name}`\n : this.formatDisplayPath(item.path);\n },\n })}`,\n );\n }\n\n const prompts = promptsResult.prompts;\n if (prompts.length > 0) {\n const groups = this.buildScopeGroups(\n prompts.map((prompt) => ({\n path: prompt.filePath,\n sourceInfo: prompt.sourceInfo,\n })),\n );\n const promptByPath = new Map(prompts.map((prompt) => [prompt.filePath, prompt]));\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"PROMPTS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => promptByPath.get(item.path)?.name ?? this.formatDisplayPath(item.path),\n formatPackagePath: (item) => promptByPath.get(item.path)?.name ?? this.formatDisplayPath(item.path),\n })}`,\n );\n }\n\n if (extensions.length > 0) {\n const groups = this.buildScopeGroups(extensions);\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"EXTENSIONS\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatExtensionDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.formatExtensionDisplayPath(\n this.getShortPath(item.path, item.sourceInfo),\n ),\n })}`,\n );\n }\n\n if (customThemes.length > 0) {\n const groups = this.buildScopeGroups(\n customThemes.map((loadedTheme) => ({\n path: loadedTheme.sourcePath!,\n sourceInfo: loadedTheme.sourceInfo,\n })),\n );\n expandedSections.push(\n `${theme.bold(theme.fg(\"muted\", \"THEMES\"))}\\n${this.formatScopeGroups(groups, {\n formatPath: (item) => this.formatDisplayPath(item.path),\n formatPackagePath: (item) =>\n this.getShortPath(item.path, item.sourceInfo),\n })}`,\n );\n }\n\n const extensionDiagnostics: ResourceDiagnostic[] = [];\n const extensionErrors =\n this.session.resourceLoader.getExtensions().errors;\n for (const error of extensionErrors) {\n extensionDiagnostics.push({\n type: \"error\",\n message: error.error,\n path: error.path,\n });\n }\n extensionDiagnostics.push(\n ...this.session.extensionRunner.getCommandDiagnostics(),\n ...this.getBuiltInCommandConflictDiagnostics(\n this.session.extensionRunner,\n ),\n ...this.session.extensionRunner.getShortcutDiagnostics(),\n );\n\n this.addResourceDisclosure({\n contextFiles,\n skills,\n prompts,\n templates,\n extensions,\n themes: customThemes,\n diagnosticsTotal: this.getResourceDiagnosticsTotal([\n skillsResult.diagnostics,\n promptsResult.diagnostics,\n extensionDiagnostics,\n themesResult.diagnostics,\n ]),\n expandedBody: this.options.verbose ? expandedSections.join(\"\\n\\n\") : \"\",\n targetContainer,\n });\n }\n\n if (showDiagnostics) {\n const overlaps = [\n ...(this.session.resourceLoader.getExtensions().overlaps ?? []),\n ...getInteractiveEngineResourceOverlaps(this.runtimeHost),\n ];\n const overlapLabels = getOverlapLabels(this, overlaps);\n if (shouldDisplayOverlapNotice(this, overlaps) && overlapLabels.length > 0) {\n const sources = formatList(overlapLabels.map((label) => `\\`${label}\\``));\n const verb = overlapLabels.length === 1 ? \"provides\" : \"provide\";\n targetContainer.addChild(new Text(theme.fg(\n \"warning\",\n `Extension overlap detected: ${sources} ${verb} resources already bundled with Atomic. Atomic kept its bundled versions; non-conflicting extension features remain available.`,\n ), 0, 0));\n targetContainer.addChild(new Spacer(1));\n }\n\n const skillDiagnostics = skillsResult.diagnostics;\n if (skillDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n skillDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const promptDiagnostics = promptsResult.diagnostics;\n if (promptDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n promptDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const extensionDiagnostics: ResourceDiagnostic[] = [];\n const extensionErrors =\n this.session.resourceLoader.getExtensions().errors;\n if (extensionErrors.length > 0) {\n for (const error of extensionErrors) {\n extensionDiagnostics.push({\n type: \"error\",\n message: error.error,\n path: error.path,\n });\n }\n }\n\n const commandDiagnostics =\n this.session.extensionRunner.getCommandDiagnostics();\n extensionDiagnostics.push(...commandDiagnostics);\n extensionDiagnostics.push(\n ...this.getBuiltInCommandConflictDiagnostics(\n this.session.extensionRunner,\n ),\n );\n\n const shortcutDiagnostics =\n this.session.extensionRunner.getShortcutDiagnostics();\n extensionDiagnostics.push(...shortcutDiagnostics);\n\n if (extensionDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n extensionDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Extension issues]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n\n const themeDiagnostics = themesResult.diagnostics;\n if (themeDiagnostics.length > 0) {\n const warningLines = this.formatDiagnostics(\n themeDiagnostics,\n sourceInfos,\n );\n targetContainer.addChild(\n new Text(\n `${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${warningLines}`,\n 0,\n 0,\n ),\n );\n targetContainer.addChild(new Spacer(1));\n }\n }\n };\n"]}
|
|
@@ -79,7 +79,7 @@ InteractiveModeBase.prototype.bindCurrentSessionExtensions = async function () {
|
|
|
79
79
|
this.setupAutocompleteProvider();
|
|
80
80
|
const extensionRunner = this.session.extensionRunner;
|
|
81
81
|
this.setupExtensionShortcuts(extensionRunner);
|
|
82
|
-
if (!this.deferredStartupPending) {
|
|
82
|
+
if (!this.deferredStartupPending && !this.initialStartupBinding) {
|
|
83
83
|
this.showLoadedResources({ force: true, showDiagnosticsWhenQuiet: true });
|
|
84
84
|
this.showStartupNoticesIfNeeded();
|
|
85
85
|
}
|