shortcutxl 0.3.76 → 0.3.78
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/BINARY-INVENTORY.json +813 -813
- package/CHANGELOG.md +14 -0
- package/dist/ai/models.d.ts +10 -6
- package/dist/ai/models.generated.d.ts +72 -0
- package/dist/ai/models.generated.js +33 -0
- package/dist/ai/models.js +36 -13
- package/dist/ai/providers/anthropic.d.ts +4 -2
- package/dist/ai/providers/anthropic.js +59 -29
- package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
- package/dist/ai/providers/azure-openai-responses.js +4 -20
- package/dist/ai/providers/google-vertex.d.ts +8 -2
- package/dist/ai/providers/google-vertex.js +66 -54
- package/dist/ai/providers/google.js +15 -48
- package/dist/ai/providers/openai-completions.d.ts +4 -1
- package/dist/ai/providers/openai-completions.js +26 -10
- package/dist/ai/providers/openai-reasoning.d.ts +5 -0
- package/dist/ai/providers/openai-reasoning.js +13 -0
- package/dist/ai/providers/openai-responses-shared.js +1 -1
- package/dist/ai/providers/openai-responses.d.ts +6 -2
- package/dist/ai/providers/openai-responses.js +28 -23
- package/dist/ai/providers/simple-options.d.ts +2 -3
- package/dist/ai/providers/simple-options.js +4 -6
- package/dist/ai/types.d.ts +19 -2
- package/dist/app/agent-session-runtime-adapter.js +7 -6
- package/dist/app/agent-session.d.ts +0 -15
- package/dist/app/agent-session.js +0 -37
- package/dist/app/approvals/approval-errors.d.ts +15 -0
- package/dist/app/approvals/approval-errors.js +14 -0
- package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
- package/dist/app/approvals/tool-approval.d.ts +1 -0
- package/dist/app/approvals/tool-approval.js +11 -23
- package/dist/app/approvals/types.d.ts +0 -14
- package/dist/app/approvals/types.js +0 -2
- package/dist/app/background/tool-summaries.js +0 -2
- package/dist/app/extensions/slash-commands.js +1 -3
- package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
- package/dist/app/local/tools/execute-code/executor.js +20 -10
- package/dist/app/local/tools/execute-code/tool.js +21 -2
- package/dist/app/modes/action/agent.js +4 -5
- package/dist/app/modes/ask/agent.js +4 -6
- package/dist/app/modes/index.js +20 -10
- package/dist/app/modes/installation/agent.js +4 -5
- package/dist/app/modes/manage/agent.js +3 -4
- package/dist/app/modes/manage/prompt.js +1 -2
- package/dist/app/modes/metadata.d.ts +31 -0
- package/dist/app/modes/metadata.js +35 -0
- package/dist/app/modes/plan/agent.js +5 -8
- package/dist/app/modes/plan/prompt.js +3 -3
- package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
- package/dist/app/permissions/runtime-approval-flow.js +0 -28
- package/dist/app/permissions/tool-gates.d.ts +2 -3
- package/dist/app/permissions/tool-gates.js +3 -81
- package/dist/app/prompts/com-api.js +1 -1
- package/dist/app/prompts/shared-guidelines.js +7 -3
- package/dist/app/providers/google-vertex-gateway.js +4 -51
- package/dist/app/providers/model-registry.d.ts +1 -0
- package/dist/app/providers/model-registry.js +39 -0
- package/dist/app/providers/model-resolver.js +10 -7
- package/dist/app/providers/register-shortcut-provider.js +6 -6
- package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
- package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
- package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
- package/dist/app/resources/package-manager.js +2 -123
- package/dist/app/resources/resource-patterns.d.ts +9 -0
- package/dist/app/resources/resource-patterns.js +120 -0
- package/dist/app/session/forked-agent.d.ts +2 -2
- package/dist/app/session/model-manager.js +3 -2
- package/dist/app/session/session-lifecycle.js +3 -2
- package/dist/app/session/session-models.d.ts +2 -0
- package/dist/app/session/session-models.js +14 -6
- package/dist/app/settings-manager.d.ts +3 -3
- package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
- package/dist/app/shared/tools/execute-code/mog.js +18 -2
- package/dist/app/tools/bash.js +3 -3
- package/dist/app/tools/execute-code/index.d.ts +1 -0
- package/dist/app/tools/execute-code/index.js +3 -1
- package/dist/app/tools/find-ignore-files.d.ts +3 -0
- package/dist/app/tools/find-ignore-files.js +33 -0
- package/dist/app/tools/find.js +2 -21
- package/dist/app/tools/llm-analysis.js +0 -2
- package/dist/app/tools/refresh-context.d.ts +1 -1
- package/dist/app/tools/session-settings/update-session-settings.js +2 -2
- package/dist/app/tools/switch-mode.js +2 -2
- package/dist/app/tools/take-screenshot.js +0 -2
- package/dist/app/tools/task/runner.js +1 -2
- package/dist/app/tools/task/task.d.ts +1 -3
- package/dist/app/tools/task/task.js +20 -40
- package/dist/app/tools/web-search.js +12 -2
- package/dist/autocomplete/core.d.ts +33 -0
- package/dist/autocomplete/core.js +113 -0
- package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
- package/dist/{tui → autocomplete}/fuzzy.js +0 -1
- package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
- package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
- package/dist/cli/args.js +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli.js +26227 -30480
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/contracts/agent-session-store.d.ts +1 -1
- package/dist/contracts/agent-settings.d.ts +1 -0
- package/dist/contracts/agent-settings.js +2 -1
- package/dist/contracts/model-call.d.ts +1 -2
- package/dist/contracts/model-call.js +1 -2
- package/dist/contracts/model-stream.d.ts +1 -0
- package/dist/contracts/model-stream.js +1 -0
- package/dist/contracts/wire.d.ts +10 -7
- package/dist/contracts/wire.js +8 -0
- package/dist/core/agent-engine.js +1 -1
- package/dist/core/core-types.d.ts +1 -21
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.js +9 -1
- package/dist/core/prompts/agent-guidelines.d.ts +4 -5
- package/dist/core/prompts/agent-guidelines.js +28 -42
- package/dist/core/session-schema.d.ts +1 -1
- package/dist/embedded-agent/ai-invoke.d.ts +1 -2
- package/dist/embedded-agent/ai-invoke.js +2 -70
- package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
- package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
- package/dist/embedded-agent/bootstrap.js +2 -2
- package/dist/embedded-agent/compose.js +8 -7
- package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
- package/dist/embedded-agent/gateway-base-url.js +35 -0
- package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
- package/dist/embedded-agent/google-vertex-transport.js +20 -117
- package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
- package/dist/embedded-agent/host-runtime-options.js +10 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
- package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/shared/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
- package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
- package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
- package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
- package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
- package/dist/embedded-agent/host-tools/task/contract.js +1 -1
- package/dist/embedded-agent/index.d.ts +3 -4
- package/dist/embedded-agent/index.js +2 -3
- package/dist/embedded-agent/model-selection.d.ts +0 -6
- package/dist/embedded-agent/model-selection.js +15 -8
- package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-completions-transport.js +20 -120
- package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-responses-transport.js +15 -170
- package/dist/embedded-agent/prompt/build.js +1 -2
- package/dist/embedded-agent/prompt/sections.d.ts +1 -1
- package/dist/embedded-agent/prompt/sections.js +2 -0
- package/dist/embedded-agent/provider-native-request.d.ts +29 -0
- package/dist/embedded-agent/provider-native-request.js +65 -0
- package/dist/embedded-agent/run-stats.d.ts +1 -1
- package/dist/embedded-agent/stream.d.ts +10 -96
- package/dist/embedded-agent/stream.js +31 -556
- package/dist/embedded-agent/suggestions.d.ts +1 -1
- package/dist/embedded-agent/suggestions.js +1 -1
- package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
- package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
- package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
- package/dist/main.js +18 -14
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/rpc-approval-gates.js +1 -2
- package/dist/rpc/rpc-host.d.ts +4 -0
- package/dist/rpc/rpc-host.js +13 -24
- package/dist/rpc/rpc-types.d.ts +6 -17
- package/dist/shared/platform/open.d.ts +4 -1
- package/dist/shared/platform/open.js +14 -2
- package/dist/shell/approvals/runtime-approval-gates.js +1 -3
- package/dist/shell/components/selectors/model-selector.js +2 -1
- package/dist/shell/components/selectors/session-selector-search.js +1 -1
- package/dist/shell/components/selectors/thinking-selector.js +7 -6
- package/dist/shell/index.d.ts +0 -1
- package/dist/shell/index.js +0 -1
- package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
- package/dist/shell/interactive/interactive-mode.d.ts +6 -12
- package/dist/shell/interactive/interactive-mode.js +39 -158
- package/dist/shell/interactive/slash-commands.d.ts +0 -34
- package/dist/shell/interactive/slash-commands.js +0 -2
- package/dist/shell/links/local-file-link-input.d.ts +15 -0
- package/dist/shell/links/local-file-link-input.js +38 -0
- package/dist/shell/links/local-file-link.d.ts +7 -0
- package/dist/shell/links/local-file-link.js +35 -0
- package/dist/shell/links/local-file-opener.d.ts +16 -0
- package/dist/shell/links/local-file-opener.js +90 -0
- package/dist/shell/session-client.d.ts +0 -1
- package/dist/shell/session-client.js +0 -6
- package/dist/shell/status/update-check-scheduler.d.ts +30 -0
- package/dist/shell/status/update-check-scheduler.js +71 -0
- package/dist/shell/status/update-reminder-controller.d.ts +22 -0
- package/dist/shell/status/update-reminder-controller.js +40 -0
- package/dist/shell/status/update-reminder.d.ts +6 -0
- package/dist/shell/status/update-reminder.js +4 -0
- package/dist/shell/theme/dark.json +1 -2
- package/dist/shell/theme/light.json +1 -2
- package/dist/shell/theme/runtime.d.ts +2 -3
- package/dist/shell/theme/runtime.js +2 -6
- package/dist/shell/theme/theme-schema.json +1 -6
- package/dist/shortcut-model-catalog.d.ts +7 -2
- package/dist/shortcut-model-catalog.js +134 -10
- package/dist/startup/update-manager.d.ts +6 -6
- package/dist/startup/update-manager.js +23 -38
- package/dist/startup/update-prompt.d.ts +1 -0
- package/dist/startup/update-prompt.js +2 -2
- package/dist/tui/components/editor.d.ts +1 -1
- package/dist/tui/components/editor.js +1 -1
- package/dist/tui/components/markdown.js +15 -6
- package/dist/tui/components/settings-list.js +1 -1
- package/dist/tui/editor-component.d.ts +1 -1
- package/dist/tui/index.d.ts +7 -8
- package/dist/tui/index.js +7 -6
- package/dist/tui/tui.d.ts +2 -0
- package/dist/tui/tui.js +16 -1
- package/dist/tui/utils.d.ts +7 -0
- package/dist/tui/utils.js +58 -8
- package/native-app/main/index.js +3200 -48
- package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
- package/native-app/package.json +1 -1
- package/native-app/preload/index.cjs +2 -0
- package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
- package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
- package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +17 -3
- package/skills/add-custom-model/SKILL.md +52 -0
- package/user-docs/dist/index.html +1 -1
- package/user-docs/dist/shortcutxl-docs.pdf +0 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/shortcut_xl/_managed.py +26 -7
- package/xll/modules/shortcut_xl/_tracking.py +141 -251
- package/xll/modules/shortcut_xl/api/__init__.py +60 -0
- package/xll/modules/shortcut_xl/api/workbook.py +9 -1
- package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
- package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
- package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
- package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
- package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
- package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
- package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
- package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
- package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
- package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
- package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
- package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
- package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
- package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
- package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
- package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
- package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
- package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
- package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
- package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
- package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
- package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
- package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
- package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
- package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
- package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
- package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
- package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
- package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
- package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
- package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
- package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
- package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
- package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
- package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
- package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
- package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
- package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
- package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
- package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
- package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
- package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
- package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
- package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
- package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
- package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
- package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
- package/dist/app/collab/awareness.d.ts +0 -32
- package/dist/app/collab/awareness.js +0 -52
- package/dist/app/collab/collab-client.d.ts +0 -37
- package/dist/app/collab/collab-client.js +0 -208
- package/dist/app/collab/collab-manager.d.ts +0 -91
- package/dist/app/collab/collab-manager.js +0 -218
- package/dist/app/collab/collab-sync.d.ts +0 -62
- package/dist/app/collab/collab-sync.js +0 -215
- package/dist/app/collab/index.d.ts +0 -9
- package/dist/app/collab/index.js +0 -6
- package/dist/app/collab/super-fight.d.ts +0 -90
- package/dist/app/collab/super-fight.js +0 -310
- package/dist/app/collab/sync-bridge.d.ts +0 -35
- package/dist/app/collab/sync-bridge.js +0 -109
- package/dist/app/collab/types.d.ts +0 -75
- package/dist/app/collab/types.js +0 -5
- package/dist/embedded-agent/ai-content.d.ts +0 -52
- package/dist/embedded-agent/ai-content.js +0 -101
- package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
- package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
- package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
- package/dist/embedded-agent/model-call-orchestrator.js +0 -22
- package/dist/embedded-agent/stream-errors.d.ts +0 -10
- package/dist/embedded-agent/stream-errors.js +0 -73
- package/dist/embedded-agent/stream-message-state.d.ts +0 -14
- package/dist/embedded-agent/stream-message-state.js +0 -271
- package/dist/embedded-agent/stream-sse.d.ts +0 -78
- package/dist/embedded-agent/stream-sse.js +0 -73
- package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
- package/dist/shell/approvals/task-spawn-approval.js +0 -93
- package/dist/shell/interactive/collab-command.d.ts +0 -9
- package/dist/shell/interactive/collab-command.js +0 -115
- package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
- package/dist/shell/interactive/super-fight-ui.js +0 -484
- package/dist/shell/status/collab-status.d.ts +0 -18
- package/dist/shell/status/collab-status.js +0 -46
- package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
- /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
|
@@ -16,13 +16,17 @@ import { confirmRuntimePermissionBypass, formatPermissionBypassStatusMessage } f
|
|
|
16
16
|
import { createShortcutLlmProxyClient } from '../../app/providers/shortcut-llm-proxy-client.js';
|
|
17
17
|
import { hydrateParsedSkillBlock } from '../../app/resources/skills.js';
|
|
18
18
|
import { getSharedSkillProposalBackground } from '../../app/skill-proposals/background.js';
|
|
19
|
-
import {
|
|
19
|
+
import { fuzzyFilter } from '../../autocomplete/fuzzy.js';
|
|
20
|
+
import { CombinedAutocompleteProvider } from '../../autocomplete/index.js';
|
|
21
|
+
import { APP_NAME, BARE_SKILL_NAMES, getDebugLogPath, VERSION } from '../../config.js';
|
|
20
22
|
import { getActiveUserMessageId } from '../../core/user-message-id.js';
|
|
21
23
|
import { getCurrentMode, MODE, onModeChange } from '../../mode-names.js';
|
|
22
|
-
import {
|
|
24
|
+
import { Container, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, Text, TruncatedText, TUI, visibleWidth } from '../../tui/index.js';
|
|
23
25
|
import { parseMouseEvent, parseMouseWheelDelta } from '../../tui/keys.js';
|
|
24
26
|
import { FooterDataProvider } from '../footer-data-provider.js';
|
|
25
27
|
import { KeybindingsManager } from '../keybindings.js';
|
|
28
|
+
import { LocalFileLinkInput } from '../links/local-file-link-input.js';
|
|
29
|
+
import { openLocalFileLink } from '../links/local-file-opener.js';
|
|
26
30
|
import { PromptHistoryStore } from '../prompt-history-store.js';
|
|
27
31
|
import { drainPendingRefreshes } from '../../app/session/pending-refresh-runner.js';
|
|
28
32
|
import { formatWorkbookScopeAnnotation, getScopedWorkbookNames, SCOPE_NONE, SCOPE_SELECTED } from '../../app/workbook-scope.js';
|
|
@@ -31,14 +35,11 @@ import { getChangelogPath, getNewEntries, parseChangelog } from '../changelog.js
|
|
|
31
35
|
import { extensionForImageMimeType, readClipboardImage } from '../clipboard/clipboard-image.js';
|
|
32
36
|
import { copyToClipboard } from '../clipboard/clipboard.js';
|
|
33
37
|
import { getAvailableThemes, initTheme, onThemeChange, setTheme, theme } from '../theme/runtime.js';
|
|
34
|
-
import { CollabManager, FileDisplayNameProvider } from '../../app/collab/collab-manager.js';
|
|
35
|
-
import { decodeGameMsg, encodeGameMsg, GAME_MSG_PREFIX } from '../../app/collab/super-fight.js';
|
|
36
38
|
import { getModeNames } from '../../app/modes/index.js';
|
|
37
39
|
import { filterInteractiveSelectableModels } from '../../app/session/session-models.js';
|
|
38
40
|
import { getShellConfig, getShellEnv, sanitizeBinaryOutput } from '../../app/tools/bash-runtime.js';
|
|
39
41
|
import { TASK_NOTIFICATION_CUSTOM_TYPE, taskManager } from '../../app/tools/task/manager.js';
|
|
40
42
|
import { ensureTool } from '../../app/tools/tool-binaries.js';
|
|
41
|
-
import { COLLAB_SERVER_URL } from '../../constants.js';
|
|
42
43
|
import { interceptProcessWarnings } from '../../shared/logging/agent-log.js';
|
|
43
44
|
import { manageChildProcess } from '../../shared/process/lifecycle.js';
|
|
44
45
|
import { CustomEditor } from '../components/editors/custom-editor.js';
|
|
@@ -65,8 +66,8 @@ import { WorkbookScopeSelectorComponent } from '../components/selectors/workbook
|
|
|
65
66
|
import { createInteractiveRenderTrace } from '../dev/interactive-render-trace.js';
|
|
66
67
|
import { appendAttachedFiles, AttachmentManager, parseAttachedFiles, stripQuotes } from '../input/file-attachments.js';
|
|
67
68
|
import { buildScopeGroups, createResourceDisplayHelpers, formatDiagnostics, formatDisplayPath, formatScopeGroups, getShortPath } from '../presentation/resource-display.js';
|
|
68
|
-
import { startCollabStatusUpdater } from '../status/collab-status.js';
|
|
69
69
|
import { refreshSkillProposalStatus } from '../status/skill-proposals-status.js';
|
|
70
|
+
import { UpdateReminderController } from '../status/update-reminder-controller.js';
|
|
70
71
|
import { getEditorTheme, getMarkdownTheme } from '../theme/theme.js';
|
|
71
72
|
import { getToolPresentation } from '../tools/presentation/index.js';
|
|
72
73
|
import { ToolExecutionComponent } from '../tools/runtime/tool-execution.js';
|
|
@@ -83,12 +84,11 @@ import { ReloadWorkflow } from './reload-workflow.js';
|
|
|
83
84
|
import { SessionWorkflow } from './session-workflow.js';
|
|
84
85
|
import { SkillsWorkflow } from './skills-workflow.js';
|
|
85
86
|
import { buildDefaultCommands, REBUILD_CHAT_COMMANDS } from './slash-commands.js';
|
|
86
|
-
import { SuperFightUI } from './super-fight-ui.js';
|
|
87
87
|
import { WorkbookScopeController } from './workbook-scope-controller.js';
|
|
88
88
|
const MOUSE_WHEEL_LINES = 8;
|
|
89
89
|
// Position of editorContainer within the shell layout's bottom stack (see the
|
|
90
90
|
// InteractiveShellLayout constructor call). Kept in sync with that array order.
|
|
91
|
-
const EDITOR_BOTTOM_INDEX =
|
|
91
|
+
const EDITOR_BOTTOM_INDEX = 1;
|
|
92
92
|
function isSelectionCapableEditor(editor) {
|
|
93
93
|
return (typeof editor.startSelectionAtScreenRow === 'function' &&
|
|
94
94
|
typeof editor.extendSelectionAtScreenRow === 'function' &&
|
|
@@ -113,6 +113,7 @@ export class InteractiveMode {
|
|
|
113
113
|
options;
|
|
114
114
|
session;
|
|
115
115
|
ui;
|
|
116
|
+
localFileLinkInput;
|
|
116
117
|
renderTracePath = undefined;
|
|
117
118
|
shellLayout;
|
|
118
119
|
mainContentContainer;
|
|
@@ -313,13 +314,13 @@ export class InteractiveMode {
|
|
|
313
314
|
customFooter = undefined;
|
|
314
315
|
// Header container that holds the built-in or custom header
|
|
315
316
|
headerContainer;
|
|
317
|
+
updateReminderController;
|
|
316
318
|
// Built-in header (logo + keybinding hints + changelog)
|
|
317
319
|
builtInHeader = undefined;
|
|
318
320
|
// Custom header from extension (undefined = use built-in header)
|
|
319
321
|
customHeader = undefined;
|
|
320
322
|
// Bash prefix mode — tracks whether the editor text starts with '!'
|
|
321
323
|
isBashMode = false;
|
|
322
|
-
isChatMode = false;
|
|
323
324
|
// Credit balance polling during active agent turns
|
|
324
325
|
creditPollInterval = undefined;
|
|
325
326
|
static CREDIT_POLL_INTERVAL_MS = 10_000;
|
|
@@ -327,8 +328,6 @@ export class InteractiveMode {
|
|
|
327
328
|
// Slash command registry
|
|
328
329
|
_commands;
|
|
329
330
|
_resourceDisplay;
|
|
330
|
-
_collabManager = null;
|
|
331
|
-
_superFight = null;
|
|
332
331
|
manualMemoryCoordinator = new DurableMemoryCoordinator();
|
|
333
332
|
manualSkillProposalBackground = getSharedSkillProposalBackground();
|
|
334
333
|
// Convenience accessors
|
|
@@ -354,6 +353,12 @@ export class InteractiveMode {
|
|
|
354
353
|
this.renderTracePath = renderTrace?.path;
|
|
355
354
|
this.ui.setRenderTrace(renderTrace);
|
|
356
355
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
356
|
+
this.localFileLinkInput = new LocalFileLinkInput({
|
|
357
|
+
getHyperlinkAtScreenPosition: (row, col) => this.ui.getHyperlinkAtScreenPosition(row, col),
|
|
358
|
+
openHref: (href) => {
|
|
359
|
+
void this.handleLocalFileLink(href);
|
|
360
|
+
}
|
|
361
|
+
});
|
|
357
362
|
this.headerContainer = new Container();
|
|
358
363
|
this.chatContainer = new Container();
|
|
359
364
|
this.mainContentContainer = new Container();
|
|
@@ -372,6 +377,12 @@ export class InteractiveMode {
|
|
|
372
377
|
this.mainContentContainer.addChild(this.statusContainer);
|
|
373
378
|
this.mainContentContainer.addChild(this.widgetContainerAbove);
|
|
374
379
|
this.scrollableMainContent = new LineSelectionScrollContainer(this.mainContentContainer);
|
|
380
|
+
this.updateReminderController = new UpdateReminderController({
|
|
381
|
+
initialUpdate: this.options.availableUpdate,
|
|
382
|
+
lastCheckedAt: this.options.updateLastCheckedAt,
|
|
383
|
+
checkForUpdate: this.options.checkForUpdate,
|
|
384
|
+
onChange: () => this.ui.requestRender()
|
|
385
|
+
});
|
|
375
386
|
this.keybindings = KeybindingsManager.create();
|
|
376
387
|
this.promptHistoryStore = new PromptHistoryStore({
|
|
377
388
|
sessionId: () => this.sessionManager.getSessionId()
|
|
@@ -409,6 +420,7 @@ export class InteractiveMode {
|
|
|
409
420
|
// Index of editorContainer within the shell layout's bottom stack; used to
|
|
410
421
|
// read its cached screen geometry for mouse hit-testing (see EDITOR_BOTTOM_INDEX).
|
|
411
422
|
this.shellLayout = new InteractiveShellLayout(this.ui.terminal, this.scrollableMainContent, [
|
|
423
|
+
this.updateReminderController.container,
|
|
412
424
|
this.editorContainer,
|
|
413
425
|
this.widgetContainerBelow,
|
|
414
426
|
this.footerContainer
|
|
@@ -746,6 +758,7 @@ export class InteractiveMode {
|
|
|
746
758
|
});
|
|
747
759
|
await this.updateAvailableProviderCount();
|
|
748
760
|
this.refreshAgentFooterStatus();
|
|
761
|
+
this.updateReminderController.start();
|
|
749
762
|
}
|
|
750
763
|
/**
|
|
751
764
|
* Update terminal title with session name and cwd.
|
|
@@ -1715,6 +1728,7 @@ export class InteractiveMode {
|
|
|
1715
1728
|
cycleMode: async () => this.cycleMode()
|
|
1716
1729
|
}
|
|
1717
1730
|
});
|
|
1731
|
+
this.ui.addInputListener((data) => this.localFileLinkInput.handleInput(data));
|
|
1718
1732
|
this.ui.addInputListener((data) => this.handleEditorSelectionInput(data));
|
|
1719
1733
|
this.ui.addInputListener((data) => this.handleTranscriptSelectionInput(data));
|
|
1720
1734
|
this.ui.addInputListener((data) => this.handleTranscriptScrollInput(data));
|
|
@@ -1796,6 +1810,15 @@ export class InteractiveMode {
|
|
|
1796
1810
|
this.ui.requestRender();
|
|
1797
1811
|
return { consume: true };
|
|
1798
1812
|
}
|
|
1813
|
+
async handleLocalFileLink(href) {
|
|
1814
|
+
try {
|
|
1815
|
+
const result = await (this.options.openLocalFileHref ?? openLocalFileLink)(href);
|
|
1816
|
+
this.showStatus(`Opened ${result.path}`);
|
|
1817
|
+
}
|
|
1818
|
+
catch (error) {
|
|
1819
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1799
1822
|
/**
|
|
1800
1823
|
* Screen-row range (1-based, inclusive) occupied by the editor, derived from
|
|
1801
1824
|
* geometry cached during the last frame render — no re-render per mouse event.
|
|
@@ -2090,43 +2113,11 @@ export class InteractiveMode {
|
|
|
2090
2113
|
},
|
|
2091
2114
|
updateTerminalTitle: () => this.updateTerminalTitle(),
|
|
2092
2115
|
resourceDisplay: this._resourceDisplay,
|
|
2093
|
-
getCollabClient: () => this.getCollabCommandClient(),
|
|
2094
|
-
stopSuperFight: () => {
|
|
2095
|
-
if (this._superFight?.isRunning) {
|
|
2096
|
-
this._superFight.stop();
|
|
2097
|
-
this._superFight = null;
|
|
2098
|
-
}
|
|
2099
|
-
},
|
|
2100
2116
|
showSkillsSelector: () => this.skillsWorkflow.showSkillsSelector(),
|
|
2101
2117
|
selectOption: (title, options) => this.showExtensionSelector(title, options)
|
|
2102
2118
|
};
|
|
2103
2119
|
}
|
|
2104
|
-
/**
|
|
2105
|
-
getCollabCommandClient() {
|
|
2106
|
-
if (!this._collabManager) {
|
|
2107
|
-
const pool = this.session.sheetPool;
|
|
2108
|
-
if (!pool)
|
|
2109
|
-
throw new Error('Cannot use collab without a sheet pool');
|
|
2110
|
-
const nameProvider = new FileDisplayNameProvider(getAgentDir());
|
|
2111
|
-
this._collabManager = new CollabManager(COLLAB_SERVER_URL, pool, nameProvider);
|
|
2112
|
-
this.session.collabClient = this._collabManager.client;
|
|
2113
|
-
this._attachCollabEvents(this._collabManager);
|
|
2114
|
-
}
|
|
2115
|
-
const manager = this._collabManager;
|
|
2116
|
-
return {
|
|
2117
|
-
get inRoom() {
|
|
2118
|
-
return manager.inRoom;
|
|
2119
|
-
},
|
|
2120
|
-
createRoom: (displayName) => manager.createRoom(displayName),
|
|
2121
|
-
currentDisplayName: () => manager.currentDisplayName(),
|
|
2122
|
-
getDisplayName: () => manager.getDisplayName(),
|
|
2123
|
-
getStatus: () => manager.getStatus(),
|
|
2124
|
-
joinRoom: (roomId, displayName) => manager.joinRoom(roomId, displayName),
|
|
2125
|
-
leave: () => manager.leave(),
|
|
2126
|
-
setDisplayName: (name) => manager.setDisplayName(name)
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
/** Wire the default editor submit handler covering bash, chat, slash, and prompt dispatch. */
|
|
2120
|
+
/** Wire the default editor submit handler covering bash, slash, and prompt dispatch. */
|
|
2130
2121
|
setupEditorSubmitHandler() {
|
|
2131
2122
|
this.defaultEditor.onSubmit = async (text) => {
|
|
2132
2123
|
this.clearCtrlCHint();
|
|
@@ -2151,39 +2142,6 @@ export class InteractiveMode {
|
|
|
2151
2142
|
await this.executeBashCommand(command);
|
|
2152
2143
|
return;
|
|
2153
2144
|
}
|
|
2154
|
-
// Chat prefix dispatch — send to collab peers, never sent to the agent
|
|
2155
|
-
if (text.startsWith(':')) {
|
|
2156
|
-
const chatText = text.slice(1).trim();
|
|
2157
|
-
this.editor.setText('');
|
|
2158
|
-
this.isChatMode = false;
|
|
2159
|
-
this.updateEditorBorderColor();
|
|
2160
|
-
this.editor.addToHistory?.(text);
|
|
2161
|
-
if (!chatText) {
|
|
2162
|
-
this.showStatus('No message to send');
|
|
2163
|
-
return;
|
|
2164
|
-
}
|
|
2165
|
-
const client = this.session.collabClient;
|
|
2166
|
-
if (!client || !client.state.roomId) {
|
|
2167
|
-
this.showError('Not in a collaboration session. Use /collab to create or join one.');
|
|
2168
|
-
return;
|
|
2169
|
-
}
|
|
2170
|
-
// Super Fight easter egg
|
|
2171
|
-
if (chatText === 'super-fight') {
|
|
2172
|
-
if (this._superFight?.isRunning) {
|
|
2173
|
-
this.showStatus('Super Fight is already running!');
|
|
2174
|
-
return;
|
|
2175
|
-
}
|
|
2176
|
-
// Broadcast start message
|
|
2177
|
-
client.sendChat(encodeGameMsg({ type: 'start' }));
|
|
2178
|
-
this.launchSuperFight(client);
|
|
2179
|
-
return;
|
|
2180
|
-
}
|
|
2181
|
-
client.sendChat(chatText);
|
|
2182
|
-
// Render locally as "You: text"
|
|
2183
|
-
this.chatContainer.addChild(new Text(theme.fg('chatMode', `You: ${chatText}`), 1, 0));
|
|
2184
|
-
this.ui.requestRender();
|
|
2185
|
-
return;
|
|
2186
|
-
}
|
|
2187
2145
|
// Slash command dispatch via registry
|
|
2188
2146
|
if (text.startsWith('/')) {
|
|
2189
2147
|
const spaceIndex = text.indexOf(' ');
|
|
@@ -2997,101 +2955,23 @@ export class InteractiveMode {
|
|
|
2997
2955
|
this.showStatus(`Restored ${restored} queued message${restored > 1 ? 's' : ''} to editor`);
|
|
2998
2956
|
}
|
|
2999
2957
|
}
|
|
3000
|
-
/** Refresh the editor border color based on bash/
|
|
2958
|
+
/** Refresh the editor border color based on bash/thinking state. */
|
|
3001
2959
|
updateEditorBorderColor() {
|
|
3002
2960
|
if (this.isBashMode) {
|
|
3003
2961
|
this.editor.borderColor = theme.getBashModeBorderColor();
|
|
3004
2962
|
}
|
|
3005
|
-
else if (this.isChatMode) {
|
|
3006
|
-
this.editor.borderColor = theme.getChatModeBorderColor();
|
|
3007
|
-
}
|
|
3008
2963
|
else {
|
|
3009
2964
|
const level = this.session.thinkingLevel || 'off';
|
|
3010
2965
|
this.editor.borderColor = theme.getThinkingBorderColor(level);
|
|
3011
2966
|
}
|
|
3012
2967
|
this.ui.requestRender();
|
|
3013
2968
|
}
|
|
3014
|
-
/**
|
|
3015
|
-
_attachCollabEvents(manager) {
|
|
3016
|
-
const client = manager.client;
|
|
3017
|
-
client.on('onPeerJoined', (peer) => {
|
|
3018
|
-
this.chatContainer.addChild(new Text(theme.fg('dim', `[collab] ${peer.displayName} joined`), 1, 0));
|
|
3019
|
-
this.ui.requestRender();
|
|
3020
|
-
// Add to active game if running
|
|
3021
|
-
this._superFight?.addPeer(peer.peerId, peer.displayName);
|
|
3022
|
-
});
|
|
3023
|
-
client.on('onPeerLeft', (peerId, displayName) => {
|
|
3024
|
-
this.chatContainer.addChild(new Text(theme.fg('dim', `[collab] ${displayName ?? peerId} left`), 1, 0));
|
|
3025
|
-
this.ui.requestRender();
|
|
3026
|
-
// Remove from active game if running
|
|
3027
|
-
this._superFight?.removePeer(peerId);
|
|
3028
|
-
});
|
|
3029
|
-
client.on('onChat', (peerId, displayName, text) => {
|
|
3030
|
-
// Route game messages to the active game, don't show in chat
|
|
3031
|
-
if (text.startsWith(GAME_MSG_PREFIX)) {
|
|
3032
|
-
if (this._superFight?.isRunning) {
|
|
3033
|
-
this._superFight.handleGameMessage(peerId, text);
|
|
3034
|
-
}
|
|
3035
|
-
else {
|
|
3036
|
-
// Auto-launch game when receiving a start message
|
|
3037
|
-
const msg = decodeGameMsg(text);
|
|
3038
|
-
if (msg?.type === 'start') {
|
|
3039
|
-
this.launchSuperFight(client);
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
return;
|
|
3043
|
-
}
|
|
3044
|
-
this.chatContainer.addChild(new Text(theme.fg('chatMode', `${displayName}: ${text}`), 1, 0));
|
|
3045
|
-
this.ui.requestRender();
|
|
3046
|
-
});
|
|
3047
|
-
client.on('onAwareness', (_peerId, displayName, sheets) => {
|
|
3048
|
-
if (sheets.length > 0) {
|
|
3049
|
-
const names = sheets.map((s) => s.name).join(', ');
|
|
3050
|
-
this.chatContainer.addChild(new Text(theme.fg('dim', `[collab] ${displayName} has: ${names}`), 1, 0));
|
|
3051
|
-
this.ui.requestRender();
|
|
3052
|
-
}
|
|
3053
|
-
});
|
|
3054
|
-
client.on('onDisconnect', () => {
|
|
3055
|
-
// Force-stop game on disconnect
|
|
3056
|
-
if (this._superFight?.isRunning) {
|
|
3057
|
-
this._superFight.stop();
|
|
3058
|
-
this._superFight = null;
|
|
3059
|
-
}
|
|
3060
|
-
this.chatContainer.addChild(new Text(theme.fg('dim', '[collab] disconnected from server'), 1, 0));
|
|
3061
|
-
this.ui.requestRender();
|
|
3062
|
-
});
|
|
3063
|
-
client.on('onError', (message) => {
|
|
3064
|
-
this.chatContainer.addChild(new Text(theme.fg('error', `[collab] error: ${message}`), 1, 0));
|
|
3065
|
-
this.ui.requestRender();
|
|
3066
|
-
});
|
|
3067
|
-
// Footer status line
|
|
3068
|
-
startCollabStatusUpdater(this.session, client, (key, text) => this.setExtensionStatus(key, text), () => this.ui.requestRender());
|
|
3069
|
-
}
|
|
3070
|
-
/** Launch the SuperFight collab mini-game UI for the current room. */
|
|
3071
|
-
launchSuperFight(client) {
|
|
3072
|
-
const peerId = client.state.peerId;
|
|
3073
|
-
if (!peerId)
|
|
3074
|
-
return;
|
|
3075
|
-
this._superFight = new SuperFightUI({
|
|
3076
|
-
ui: this.ui,
|
|
3077
|
-
client,
|
|
3078
|
-
localPeerId: peerId,
|
|
3079
|
-
localDisplayName: this._collabManager?.getDisplayName().name ?? 'You',
|
|
3080
|
-
peers: client.state.peers
|
|
3081
|
-
});
|
|
3082
|
-
this._superFight.onStop = () => {
|
|
3083
|
-
this._superFight = null;
|
|
3084
|
-
};
|
|
3085
|
-
this._superFight.start();
|
|
3086
|
-
}
|
|
3087
|
-
/** Watch editor text and toggle bash/chat-mode borders based on `!`/`:` prefixes. */
|
|
2969
|
+
/** Watch editor text and toggle bash-mode borders based on the `!` prefix. */
|
|
3088
2970
|
setupBashModeDetection() {
|
|
3089
2971
|
this.defaultEditor.onChange = (text) => {
|
|
3090
2972
|
const shouldBeBashMode = text.startsWith('!');
|
|
3091
|
-
|
|
3092
|
-
if (shouldBeBashMode !== this.isBashMode || shouldBeChatMode !== this.isChatMode) {
|
|
2973
|
+
if (shouldBeBashMode !== this.isBashMode) {
|
|
3093
2974
|
this.isBashMode = shouldBeBashMode;
|
|
3094
|
-
this.isChatMode = shouldBeChatMode;
|
|
3095
2975
|
this.updateEditorBorderColor();
|
|
3096
2976
|
}
|
|
3097
2977
|
};
|
|
@@ -4059,6 +3939,7 @@ export class InteractiveMode {
|
|
|
4059
3939
|
}
|
|
4060
3940
|
/** Tear down the interactive shell: loaders, listeners, polling, footer, and UI. */
|
|
4061
3941
|
stop() {
|
|
3942
|
+
this.updateReminderController.stop();
|
|
4062
3943
|
this.stopTranscriptSelectionAutoScroll();
|
|
4063
3944
|
if (this.loadingAnimation) {
|
|
4064
3945
|
this.loadingAnimation.stop();
|
|
@@ -21,36 +21,6 @@ export interface CommandChat {
|
|
|
21
21
|
addChild(component: Component): void;
|
|
22
22
|
clear(): void;
|
|
23
23
|
}
|
|
24
|
-
export interface CollabCommandClient {
|
|
25
|
-
readonly inRoom: boolean;
|
|
26
|
-
createRoom: (displayName: string) => Promise<{
|
|
27
|
-
roomId: string;
|
|
28
|
-
}>;
|
|
29
|
-
currentDisplayName: () => string | null | undefined;
|
|
30
|
-
getDisplayName: () => {
|
|
31
|
-
name: string;
|
|
32
|
-
isNew: boolean;
|
|
33
|
-
};
|
|
34
|
-
getStatus: () => {
|
|
35
|
-
roomId: string | null;
|
|
36
|
-
peers: Array<{
|
|
37
|
-
displayName: string;
|
|
38
|
-
sheets?: Array<{
|
|
39
|
-
name: string;
|
|
40
|
-
cellCount: number;
|
|
41
|
-
usedRange?: string | null;
|
|
42
|
-
}>;
|
|
43
|
-
}>;
|
|
44
|
-
};
|
|
45
|
-
joinRoom: (roomId: string, displayName: string) => Promise<{
|
|
46
|
-
roomId: string;
|
|
47
|
-
peers: Array<{
|
|
48
|
-
displayName: string;
|
|
49
|
-
}>;
|
|
50
|
-
}>;
|
|
51
|
-
leave: () => void;
|
|
52
|
-
setDisplayName: (name: string) => void;
|
|
53
|
-
}
|
|
54
24
|
/**
|
|
55
25
|
* The context passed to every slash command handler.
|
|
56
26
|
* Kept deliberately narrow — commands should not reach into InteractiveMode internals.
|
|
@@ -72,10 +42,6 @@ export interface CommandContext {
|
|
|
72
42
|
updateTerminalTitle(): void;
|
|
73
43
|
/** Resource display helpers (formatting, scope groups). */
|
|
74
44
|
resourceDisplay: ResourceDisplayHelpers;
|
|
75
|
-
/** Get or lazily create the collaboration command client. */
|
|
76
|
-
getCollabClient(): CollabCommandClient;
|
|
77
|
-
/** Stop any active Super Fight game (called on /collab leave). */
|
|
78
|
-
stopSuperFight?(): void;
|
|
79
45
|
/** Open the interactive skill visibility selector when supported by the shell. */
|
|
80
46
|
showSkillsSelector?(): void;
|
|
81
47
|
selectOption?(title: string, options: SelectItem[]): Promise<string | undefined>;
|
|
@@ -12,7 +12,6 @@ import { getChangelogPath, parseChangelog } from '../changelog.js';
|
|
|
12
12
|
import { copyToClipboard } from '../clipboard/clipboard.js';
|
|
13
13
|
import { buildChangelogComponents, buildHotkeysComponents, buildSessionInfoText, buildSkillsComponents, buildSkillsText } from '../presentation/slash-command-rendering.js';
|
|
14
14
|
import { theme } from '../theme/runtime.js';
|
|
15
|
-
import { collabCommand } from './collab-command.js';
|
|
16
15
|
// ============================================================================
|
|
17
16
|
// Command Implementations
|
|
18
17
|
// ============================================================================
|
|
@@ -220,7 +219,6 @@ export function buildDefaultCommands(additionalCommands = []) {
|
|
|
220
219
|
commands.set('hotkeys', hotkeysCommand);
|
|
221
220
|
commands.set('skills', skillsCommand);
|
|
222
221
|
commands.set('hide-thinking', hideThinkingCommand);
|
|
223
|
-
commands.set('collab', collabCommand);
|
|
224
222
|
for (const command of additionalCommands) {
|
|
225
223
|
commands.set(command.name, command.handler);
|
|
226
224
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface LocalFileLinkInputDependencies {
|
|
2
|
+
getHyperlinkAtScreenPosition(row: number, col: number): string | undefined;
|
|
3
|
+
openHref(href: string): void;
|
|
4
|
+
platform?: NodeJS.Platform;
|
|
5
|
+
}
|
|
6
|
+
/** Converts a left click on a rendered local-file hyperlink into an open request. */
|
|
7
|
+
export declare class LocalFileLinkInput {
|
|
8
|
+
private readonly dependencies;
|
|
9
|
+
private pendingClick?;
|
|
10
|
+
constructor(dependencies: LocalFileLinkInputDependencies);
|
|
11
|
+
handleInput(data: string): {
|
|
12
|
+
consume?: boolean;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=local-file-link-input.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { parseMouseEvent } from '../../tui/keys.js';
|
|
2
|
+
import { parseLocalFileLink } from './local-file-link.js';
|
|
3
|
+
/** Converts a left click on a rendered local-file hyperlink into an open request. */
|
|
4
|
+
export class LocalFileLinkInput {
|
|
5
|
+
dependencies;
|
|
6
|
+
pendingClick;
|
|
7
|
+
constructor(dependencies) {
|
|
8
|
+
this.dependencies = dependencies;
|
|
9
|
+
}
|
|
10
|
+
handleInput(data) {
|
|
11
|
+
const event = parseMouseEvent(data);
|
|
12
|
+
if (!event || event.kind !== 'button' || (event.button & 0x03) !== 0)
|
|
13
|
+
return undefined;
|
|
14
|
+
const isMotion = (event.button & 0x20) !== 0;
|
|
15
|
+
if (isMotion) {
|
|
16
|
+
if (!this.pendingClick)
|
|
17
|
+
return undefined;
|
|
18
|
+
this.pendingClick = undefined;
|
|
19
|
+
return { consume: true };
|
|
20
|
+
}
|
|
21
|
+
const href = this.dependencies.getHyperlinkAtScreenPosition(event.row, event.col);
|
|
22
|
+
if (event.action === 'press') {
|
|
23
|
+
if (!href || !parseLocalFileLink(href, this.dependencies.platform))
|
|
24
|
+
return undefined;
|
|
25
|
+
this.pendingClick = { href, row: event.row, col: event.col };
|
|
26
|
+
return { consume: true };
|
|
27
|
+
}
|
|
28
|
+
const pending = this.pendingClick;
|
|
29
|
+
this.pendingClick = undefined;
|
|
30
|
+
if (!pending)
|
|
31
|
+
return undefined;
|
|
32
|
+
if (href === pending.href && event.row === pending.row && event.col === pending.col) {
|
|
33
|
+
this.dependencies.openHref(pending.href);
|
|
34
|
+
}
|
|
35
|
+
return { consume: true };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=local-file-link-input.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface LocalFileLink {
|
|
2
|
+
href: string;
|
|
3
|
+
path: string;
|
|
4
|
+
}
|
|
5
|
+
/** Parse an absolute file URL emitted in assistant Markdown. */
|
|
6
|
+
export declare function parseLocalFileLink(href: string, platform?: NodeJS.Platform): LocalFileLink | undefined;
|
|
7
|
+
//# sourceMappingURL=local-file-link.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { posix, win32 } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
function hasControlCharacters(value) {
|
|
4
|
+
return /[\u0000-\u001f\u007f]/u.test(value);
|
|
5
|
+
}
|
|
6
|
+
/** Parse an absolute file URL emitted in assistant Markdown. */
|
|
7
|
+
export function parseLocalFileLink(href, platform = process.platform) {
|
|
8
|
+
let url;
|
|
9
|
+
try {
|
|
10
|
+
url = new URL(href);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
if (url.protocol !== 'file:' ||
|
|
16
|
+
url.hostname ||
|
|
17
|
+
url.username ||
|
|
18
|
+
url.password ||
|
|
19
|
+
url.search ||
|
|
20
|
+
url.hash) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
let filePath;
|
|
24
|
+
try {
|
|
25
|
+
filePath = fileURLToPath(url, { windows: platform === 'win32' });
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const pathApi = platform === 'win32' ? win32 : posix;
|
|
31
|
+
if (!pathApi.isAbsolute(filePath) || hasControlCharacters(filePath))
|
|
32
|
+
return undefined;
|
|
33
|
+
return { href, path: filePath };
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=local-file-link.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface LocalFileOpenResult {
|
|
2
|
+
path: string;
|
|
3
|
+
}
|
|
4
|
+
export interface LocalFileOpenerDependencies {
|
|
5
|
+
platform?: NodeJS.Platform;
|
|
6
|
+
statPath?: (path: string) => Promise<{
|
|
7
|
+
isFile(): boolean;
|
|
8
|
+
isDirectory(): boolean;
|
|
9
|
+
isSymbolicLink?(): boolean;
|
|
10
|
+
mode?: number;
|
|
11
|
+
}>;
|
|
12
|
+
openPath?: (path: string) => Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
/** Validate and open a local file or folder link with the platform default application. */
|
|
15
|
+
export declare function openLocalFileLink(href: string, dependencies?: LocalFileOpenerDependencies): Promise<LocalFileOpenResult>;
|
|
16
|
+
//# sourceMappingURL=local-file-opener.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { lstat } from 'node:fs/promises';
|
|
2
|
+
import { posix, win32 } from 'node:path';
|
|
3
|
+
import { openInEditor } from '../../shared/platform/open.js';
|
|
4
|
+
import { parseLocalFileLink } from './local-file-link.js';
|
|
5
|
+
const UNSAFE_OPEN_EXTENSIONS = new Set([
|
|
6
|
+
'.app',
|
|
7
|
+
'.appimage',
|
|
8
|
+
'.command',
|
|
9
|
+
'.desktop',
|
|
10
|
+
'.dmg',
|
|
11
|
+
'.jar',
|
|
12
|
+
'.mobileconfig',
|
|
13
|
+
'.pkg',
|
|
14
|
+
'.url',
|
|
15
|
+
'.webloc'
|
|
16
|
+
]);
|
|
17
|
+
const UNSAFE_WINDOWS_OPEN_EXTENSIONS = new Set([
|
|
18
|
+
'.application',
|
|
19
|
+
'.bat',
|
|
20
|
+
'.cmd',
|
|
21
|
+
'.com',
|
|
22
|
+
'.cpl',
|
|
23
|
+
'.exe',
|
|
24
|
+
'.gadget',
|
|
25
|
+
'.hta',
|
|
26
|
+
'.js',
|
|
27
|
+
'.jse',
|
|
28
|
+
'.lnk',
|
|
29
|
+
'.msc',
|
|
30
|
+
'.msh',
|
|
31
|
+
'.msh1',
|
|
32
|
+
'.msh1xml',
|
|
33
|
+
'.msh2',
|
|
34
|
+
'.msh2xml',
|
|
35
|
+
'.mshxml',
|
|
36
|
+
'.msi',
|
|
37
|
+
'.msp',
|
|
38
|
+
'.pif',
|
|
39
|
+
'.pl',
|
|
40
|
+
'.ps1',
|
|
41
|
+
'.py',
|
|
42
|
+
'.pyw',
|
|
43
|
+
'.reg',
|
|
44
|
+
'.rb',
|
|
45
|
+
'.scf',
|
|
46
|
+
'.scr',
|
|
47
|
+
'.sh',
|
|
48
|
+
'.vb',
|
|
49
|
+
'.vbe',
|
|
50
|
+
'.vbs',
|
|
51
|
+
'.wsf',
|
|
52
|
+
'.wsh'
|
|
53
|
+
]);
|
|
54
|
+
function hasUnsafeOpenExtension(filePath, platform) {
|
|
55
|
+
const pathApi = platform === 'win32' ? win32 : posix;
|
|
56
|
+
const extension = pathApi.extname(filePath).toLowerCase();
|
|
57
|
+
return (UNSAFE_OPEN_EXTENSIONS.has(extension) ||
|
|
58
|
+
(platform === 'win32' && UNSAFE_WINDOWS_OPEN_EXTENSIONS.has(extension)));
|
|
59
|
+
}
|
|
60
|
+
function isExecutableFile(fileStats, platform) {
|
|
61
|
+
return (platform !== 'win32' &&
|
|
62
|
+
fileStats.isFile() &&
|
|
63
|
+
fileStats.mode !== undefined &&
|
|
64
|
+
(fileStats.mode & 0o111) !== 0);
|
|
65
|
+
}
|
|
66
|
+
/** Validate and open a local file or folder link with the platform default application. */
|
|
67
|
+
export async function openLocalFileLink(href, dependencies = {}) {
|
|
68
|
+
const platform = dependencies.platform ?? process.platform;
|
|
69
|
+
const link = parseLocalFileLink(href, platform);
|
|
70
|
+
if (!link)
|
|
71
|
+
throw new Error('Only absolute local file links can be opened.');
|
|
72
|
+
if (hasUnsafeOpenExtension(link.path, platform)) {
|
|
73
|
+
throw new Error(`Executable applications, scripts, installers, and shortcuts cannot be opened from links: ${link.path}`);
|
|
74
|
+
}
|
|
75
|
+
const fileStats = await (dependencies.statPath ?? lstat)(link.path);
|
|
76
|
+
if (fileStats.isSymbolicLink?.() || (!fileStats.isFile() && !fileStats.isDirectory())) {
|
|
77
|
+
throw new Error(`The link target is not a regular file or folder: ${link.path}`);
|
|
78
|
+
}
|
|
79
|
+
if (isExecutableFile(fileStats, platform)) {
|
|
80
|
+
throw new Error(`Executable files cannot be opened from links: ${link.path}`);
|
|
81
|
+
}
|
|
82
|
+
if (dependencies.openPath) {
|
|
83
|
+
await dependencies.openPath(link.path);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
await openInEditor(link.path, { directory: fileStats.isDirectory() });
|
|
87
|
+
}
|
|
88
|
+
return { path: link.path };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=local-file-opener.js.map
|
|
@@ -166,7 +166,6 @@ interface LocalSessionServices {
|
|
|
166
166
|
export interface InteractiveSessionClient extends LocalSessionServices {
|
|
167
167
|
readonly agent: AgentSession['agent'];
|
|
168
168
|
readonly approvalState: AgentSession['approvalState'];
|
|
169
|
-
collabClient: AgentSession['collabClient'];
|
|
170
169
|
readonly extensionRunner: AgentSession['extensionRunner'];
|
|
171
170
|
readonly lastPrePromptDetails: AgentSession['lastPrePromptDetails'];
|
|
172
171
|
readonly messages: AgentSession['messages'];
|
|
@@ -52,12 +52,6 @@ function createInteractiveSessionSurface(session) {
|
|
|
52
52
|
get approvalState() {
|
|
53
53
|
return session.approvalState;
|
|
54
54
|
},
|
|
55
|
-
get collabClient() {
|
|
56
|
-
return session.collabClient;
|
|
57
|
-
},
|
|
58
|
-
set collabClient(client) {
|
|
59
|
-
session.collabClient = client;
|
|
60
|
-
},
|
|
61
55
|
get extensionRunner() {
|
|
62
56
|
return session.extensionRunner;
|
|
63
57
|
},
|