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
|
@@ -15,13 +15,13 @@ import { readFile } from 'node:fs/promises';
|
|
|
15
15
|
import { MODE } from '../../mode-names.js';
|
|
16
16
|
import { ACTION_SWITCH_MODE, INSTALLATION_SWITCH_MODE, PLAN_SWITCH_MODE } from '../../tool-names.js';
|
|
17
17
|
import { APPROVAL } from '../approvals/types.js';
|
|
18
|
-
import {
|
|
18
|
+
import { getModeMetadata } from '../modes/metadata.js';
|
|
19
19
|
import { switchMode } from '../modes/switch-mode.js';
|
|
20
20
|
function buildDescription(sourceModeName, allowedTargets) {
|
|
21
21
|
const modeList = allowedTargets.length > 0
|
|
22
22
|
? allowedTargets
|
|
23
23
|
.map((modeName) => {
|
|
24
|
-
const mode =
|
|
24
|
+
const mode = getModeMetadata(modeName);
|
|
25
25
|
return `- **${modeName}**: ${mode?.description ?? ''}`;
|
|
26
26
|
})
|
|
27
27
|
.join('\n')
|
|
@@ -96,8 +96,6 @@ async function defaultAnalyzeWithVisionLLM(screenshots, query, model, shortcutLl
|
|
|
96
96
|
model,
|
|
97
97
|
messages,
|
|
98
98
|
max_tokens: SCREENSHOT_LLM_MAX_TOKENS,
|
|
99
|
-
effort_level: 'low',
|
|
100
|
-
thinking_type: 'off',
|
|
101
99
|
llmOperation: 'screenshot'
|
|
102
100
|
}, { signal: signal ?? AbortSignal.timeout(SCREENSHOT_LLM_TIMEOUT_MS) });
|
|
103
101
|
}
|
|
@@ -189,8 +189,7 @@ export async function runTaskSubagent(options) {
|
|
|
189
189
|
getTools: () => childTools,
|
|
190
190
|
permissionPolicy: context.permissionPolicy,
|
|
191
191
|
sessionState: new SessionState(),
|
|
192
|
-
approvalGrants: undefined
|
|
193
|
-
subagentSpawnGrant: undefined
|
|
192
|
+
approvalGrants: undefined
|
|
194
193
|
};
|
|
195
194
|
const usage = emptyTaskUsage();
|
|
196
195
|
const observedToolCalls = [];
|
|
@@ -12,13 +12,11 @@ import type { ToolDefinition } from '../../../core/core-types.js';
|
|
|
12
12
|
import { type RuntimePermissionPolicy } from '../../../core/permission-policy.js';
|
|
13
13
|
import { type TaskManager } from './manager.js';
|
|
14
14
|
import { type TaskSubagentResult } from './types.js';
|
|
15
|
-
/** Derive
|
|
15
|
+
/** Derive a non-widening subagent policy from the parent policy and child tools. */
|
|
16
16
|
export declare function buildInheritedSubagentPermissionPolicy(input: {
|
|
17
17
|
parentPolicy: RuntimePermissionPolicy;
|
|
18
18
|
childToolNames: readonly string[];
|
|
19
|
-
taskCwd: string;
|
|
20
19
|
persistentApprovals: RuntimePermissionPolicy['filesystem']['persistentApprovals'];
|
|
21
|
-
fullWorker?: boolean;
|
|
22
20
|
}): RuntimePermissionPolicy;
|
|
23
21
|
/** Pick the most informative error string from a subagent result for display. */
|
|
24
22
|
export declare function getSubagentDisplayError(result: Pick<TaskSubagentResult, 'errorMessage' | 'text'>): string;
|
|
@@ -60,10 +60,6 @@ function getInheritedFilesystemGrants(ctx) {
|
|
|
60
60
|
}
|
|
61
61
|
return Array.from(deduped.values());
|
|
62
62
|
}
|
|
63
|
-
/** Combine the parent's workspace roots with the subagent's working directory. */
|
|
64
|
-
function getInheritedWorkspaceRoots(permissionPolicy, taskCwd) {
|
|
65
|
-
return Array.from(new Set([...permissionPolicy.filesystem.workspaceRoots, taskCwd]));
|
|
66
|
-
}
|
|
67
63
|
/** Compute the capability flags implied by a subagent's declared tool list. */
|
|
68
64
|
function getChildCapabilities(childToolNames) {
|
|
69
65
|
const declaredToolNames = [...new Set(childToolNames)];
|
|
@@ -78,48 +74,35 @@ function getChildCapabilities(childToolNames) {
|
|
|
78
74
|
subagents: hasCapability(declaredCapabilityIds, RUNTIME_CAPABILITY.SUBAGENT_SPAWN)
|
|
79
75
|
};
|
|
80
76
|
}
|
|
81
|
-
/** Derive
|
|
77
|
+
/** Derive a non-widening subagent policy from the parent policy and child tools. */
|
|
82
78
|
export function buildInheritedSubagentPermissionPolicy(input) {
|
|
83
79
|
const capabilities = getChildCapabilities(input.childToolNames);
|
|
84
|
-
const fullWorker = input.fullWorker === true;
|
|
85
80
|
return {
|
|
86
81
|
modeName: undefined,
|
|
87
|
-
dangerouslySkipRuntimePermissions: input.parentPolicy.dangerouslySkipRuntimePermissions
|
|
82
|
+
dangerouslySkipRuntimePermissions: input.parentPolicy.dangerouslySkipRuntimePermissions,
|
|
88
83
|
declaredToolNames: capabilities.declaredToolNames,
|
|
89
84
|
declaredCapabilityIds: capabilities.declaredCapabilityIds,
|
|
90
85
|
filesystem: {
|
|
91
|
-
workspaceRoots:
|
|
86
|
+
workspaceRoots: [...input.parentPolicy.filesystem.workspaceRoots],
|
|
92
87
|
persistentApprovals: [...input.persistentApprovals],
|
|
93
88
|
defaultReadScope: !capabilities.filesystemRead
|
|
94
89
|
? 'none'
|
|
95
|
-
:
|
|
96
|
-
? 'unrestricted'
|
|
97
|
-
: input.parentPolicy.filesystem.defaultReadScope,
|
|
90
|
+
: input.parentPolicy.filesystem.defaultReadScope,
|
|
98
91
|
defaultWriteScope: !capabilities.filesystemWrite
|
|
99
92
|
? 'none'
|
|
100
|
-
:
|
|
101
|
-
|
|
102
|
-
: input.parentPolicy.filesystem.defaultWriteScope,
|
|
103
|
-
requireApprovalOutsideWorkspace: fullWorker
|
|
104
|
-
? false
|
|
105
|
-
: input.parentPolicy.filesystem.requireApprovalOutsideWorkspace
|
|
93
|
+
: input.parentPolicy.filesystem.defaultWriteScope,
|
|
94
|
+
requireApprovalOutsideWorkspace: input.parentPolicy.filesystem.requireApprovalOutsideWorkspace
|
|
106
95
|
},
|
|
107
96
|
shell: {
|
|
108
|
-
enabled: capabilities.shell &&
|
|
109
|
-
mutationBehavior: !capabilities.shell
|
|
110
|
-
? 'deny'
|
|
111
|
-
: fullWorker
|
|
112
|
-
? 'allow'
|
|
113
|
-
: input.parentPolicy.shell.mutationBehavior
|
|
97
|
+
enabled: capabilities.shell && input.parentPolicy.shell.enabled,
|
|
98
|
+
mutationBehavior: !capabilities.shell ? 'deny' : input.parentPolicy.shell.mutationBehavior
|
|
114
99
|
},
|
|
115
100
|
spreadsheet: {
|
|
116
|
-
enabled: capabilities.spreadsheet &&
|
|
101
|
+
enabled: capabilities.spreadsheet && input.parentPolicy.spreadsheet.enabled,
|
|
117
102
|
mutationBehavior: !capabilities.spreadsheet
|
|
118
103
|
? 'deny'
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
: input.parentPolicy.spreadsheet.mutationBehavior,
|
|
122
|
-
allowHeadlessApproval: fullWorker || input.parentPolicy.spreadsheet.allowHeadlessApproval
|
|
104
|
+
: input.parentPolicy.spreadsheet.mutationBehavior,
|
|
105
|
+
allowHeadlessApproval: input.parentPolicy.spreadsheet.allowHeadlessApproval
|
|
123
106
|
},
|
|
124
107
|
subagents: {
|
|
125
108
|
enabled: capabilities.subagents && input.parentPolicy.subagents.enabled,
|
|
@@ -162,16 +145,19 @@ function buildSchema(excludeSubagents) {
|
|
|
162
145
|
}
|
|
163
146
|
/** Build the child runtime tool catalog by replacing the task tool with a scoped clone. */
|
|
164
147
|
export function buildChildRuntimeTools(tools, options) {
|
|
165
|
-
return tools.map((tool) =>
|
|
166
|
-
|
|
148
|
+
return tools.map((tool) => {
|
|
149
|
+
if (tool.name !== TASK)
|
|
150
|
+
return tool;
|
|
151
|
+
const childTaskTool = createTaskTool({
|
|
167
152
|
cwd: options.cwd,
|
|
168
153
|
excludeSubagents: options.excludeSubagents ? [...options.excludeSubagents] : undefined,
|
|
169
154
|
getRuntimeTools: options.getRuntimeTools,
|
|
170
155
|
notifyParent: options.notifyParent,
|
|
171
156
|
taskManager: options.taskManager,
|
|
172
157
|
disableMemory: options.disableMemory
|
|
173
|
-
})
|
|
174
|
-
|
|
158
|
+
});
|
|
159
|
+
return childTaskTool;
|
|
160
|
+
});
|
|
175
161
|
}
|
|
176
162
|
/** Return any declared tool names that are missing from the runtime tool catalog. */
|
|
177
163
|
function getMissingDeclaredTools(declaredToolNames, runtimeTools) {
|
|
@@ -190,9 +176,7 @@ export function createTaskTool(options = {}) {
|
|
|
190
176
|
parameters: schema,
|
|
191
177
|
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
192
178
|
const { subagent_type, name, query: rawQuery, query_file: queryFile, model: modelOverride, run_in_background } = params;
|
|
193
|
-
|
|
194
|
-
// the model asked for; otherwise honor the LLM's run_in_background flag.
|
|
195
|
-
const effectiveRunInBackground = ctx?.subagentSpawnGrant?.runInBackground ?? run_in_background === true;
|
|
179
|
+
const effectiveRunInBackground = run_in_background === true;
|
|
196
180
|
// Look up agent config
|
|
197
181
|
const agentConfig = getSubagent(subagent_type);
|
|
198
182
|
if (!agentConfig) {
|
|
@@ -266,14 +250,10 @@ export function createTaskTool(options = {}) {
|
|
|
266
250
|
const modelInfo = extCtx.modelRegistry.find(modelProvider, modelId);
|
|
267
251
|
const contextWindow = modelInfo?.contextWindow ?? 0;
|
|
268
252
|
const inheritedFilesystemGrants = getInheritedFilesystemGrants(ctx);
|
|
269
|
-
const fullWorkerChild = permissionPolicy.dangerouslySkipRuntimePermissions ||
|
|
270
|
-
ctx?.subagentSpawnGrant?.fullWorker === true;
|
|
271
253
|
const inheritedPermissionPolicy = buildInheritedSubagentPermissionPolicy({
|
|
272
254
|
parentPolicy: permissionPolicy,
|
|
273
255
|
childToolNames: effectiveConfig.tools,
|
|
274
|
-
|
|
275
|
-
persistentApprovals: inheritedFilesystemGrants,
|
|
276
|
-
fullWorker: fullWorkerChild
|
|
256
|
+
persistentApprovals: inheritedFilesystemGrants
|
|
277
257
|
});
|
|
278
258
|
const timeoutMs = (agentConfig.timeoutSeconds ?? DEFAULT_SUBAGENT_TIMEOUT_SECONDS) * 1000;
|
|
279
259
|
const abortController = new AbortController();
|
|
@@ -174,7 +174,7 @@ function createStartRateLimiter(ops) {
|
|
|
174
174
|
await waitForStartSlot();
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
async function requestWebSearchResult(baseUrl, apiKey, query, outputSchema, ops, signal) {
|
|
177
|
+
async function requestWebSearchResult(baseUrl, apiKey, query, outputSchema, attribution, ops, signal) {
|
|
178
178
|
// Mirrors the embedded exa_web_search route call; api-v1 owns the Exa key and
|
|
179
179
|
// forwards outputSchema to Exa when present.
|
|
180
180
|
const response = await ops.fetch(`${baseUrl}${SHORTCUT_API_ENDPOINTS.webSearch}`, {
|
|
@@ -182,6 +182,10 @@ async function requestWebSearchResult(baseUrl, apiKey, query, outputSchema, ops,
|
|
|
182
182
|
headers: {
|
|
183
183
|
'Content-Type': 'application/json',
|
|
184
184
|
Authorization: `Bearer ${apiKey}`,
|
|
185
|
+
'X-Client-Platform': 'shortcutxl',
|
|
186
|
+
...(attribution.userMessageId ? { 'X-Turn-Id': attribution.userMessageId } : {}),
|
|
187
|
+
...(attribution.conversationId ? { 'X-Session-Id': attribution.conversationId } : {}),
|
|
188
|
+
...(attribution.agentRunId ? { 'X-Agent-Run-Id': attribution.agentRunId } : {}),
|
|
185
189
|
'User-AgentController': `Mozilla/5.0 (compatible; ${APP_NAME}-coding-agent/1.0)`
|
|
186
190
|
},
|
|
187
191
|
body: JSON.stringify({
|
|
@@ -225,6 +229,12 @@ export function createWebSearchTool(baseUrl = SHORTCUT_API_URL, options) {
|
|
|
225
229
|
if (!apiKey) {
|
|
226
230
|
throw new Error('Not authenticated. Please log in first.');
|
|
227
231
|
}
|
|
232
|
+
const conversationId = extCtx?.sessionManager.getSessionId();
|
|
233
|
+
const attribution = {
|
|
234
|
+
...(extCtx?.userMessageId ? { userMessageId: extCtx.userMessageId } : {}),
|
|
235
|
+
...(conversationId ? { conversationId } : {}),
|
|
236
|
+
...(extCtx?.continuationRunId ? { agentRunId: extCtx.continuationRunId } : {})
|
|
237
|
+
};
|
|
228
238
|
const queries = await readQueries(normalizedInput, ops);
|
|
229
239
|
if (queries.length === 0) {
|
|
230
240
|
throw new Error('Web search did not receive any non-empty queries.');
|
|
@@ -256,7 +266,7 @@ export function createWebSearchTool(baseUrl = SHORTCUT_API_URL, options) {
|
|
|
256
266
|
await mapWithMaxInFlight(queries, MAX_IN_FLIGHT_WEB_SEARCH_REQUESTS, waitForStartSlot, async (query) => {
|
|
257
267
|
let result;
|
|
258
268
|
try {
|
|
259
|
-
result = attachQuery(await requestWebSearchResult(baseUrl, apiKey, query, normalizedInput.outputSchema, ops, signal), query);
|
|
269
|
+
result = attachQuery(await requestWebSearchResult(baseUrl, apiKey, query, normalizedInput.outputSchema, attribution, ops, signal), query);
|
|
260
270
|
}
|
|
261
271
|
catch (error) {
|
|
262
272
|
result = {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface AutocompleteCoreItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface PathPrefix {
|
|
8
|
+
rawPrefix: string;
|
|
9
|
+
isAtPrefix: boolean;
|
|
10
|
+
isQuotedPrefix: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CompletionResult {
|
|
14
|
+
lines: string[];
|
|
15
|
+
cursorLine: number;
|
|
16
|
+
cursorCol: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare function findLastDelimiter(text: string): number;
|
|
20
|
+
export declare function extractQuotedPrefix(text: string): string | null;
|
|
21
|
+
export declare function extractAtPrefix(text: string): string | null;
|
|
22
|
+
export declare function parsePathPrefix(prefix: string): PathPrefix;
|
|
23
|
+
export declare function buildCompletionValue(
|
|
24
|
+
path: string,
|
|
25
|
+
options: { isAtPrefix: boolean; isQuotedPrefix: boolean }
|
|
26
|
+
): string;
|
|
27
|
+
export declare function applyAutocompleteCompletion(
|
|
28
|
+
lines: string[],
|
|
29
|
+
cursorLine: number,
|
|
30
|
+
cursorCol: number,
|
|
31
|
+
item: AutocompleteCoreItem,
|
|
32
|
+
prefix: string
|
|
33
|
+
): CompletionResult;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const PATH_DELIMITERS = new Set([' ', '\t', '"', "'", '=']);
|
|
2
|
+
|
|
3
|
+
export function findLastDelimiter(text) {
|
|
4
|
+
for (let i = text.length - 1; i >= 0; i -= 1) {
|
|
5
|
+
if (PATH_DELIMITERS.has(text[i] ?? '')) return i;
|
|
6
|
+
}
|
|
7
|
+
return -1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function findUnclosedQuoteStart(text) {
|
|
11
|
+
let inQuotes = false;
|
|
12
|
+
let quoteStart = -1;
|
|
13
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
14
|
+
if (text[i] === '"') {
|
|
15
|
+
inQuotes = !inQuotes;
|
|
16
|
+
if (inQuotes) quoteStart = i;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return inQuotes ? quoteStart : null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function isTokenStart(text, index) {
|
|
23
|
+
return index === 0 || PATH_DELIMITERS.has(text[index - 1] ?? '');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function extractQuotedPrefix(text) {
|
|
27
|
+
const quoteStart = findUnclosedQuoteStart(text);
|
|
28
|
+
if (quoteStart === null) return null;
|
|
29
|
+
if (quoteStart > 0 && text[quoteStart - 1] === '@') {
|
|
30
|
+
if (!isTokenStart(text, quoteStart - 1)) return null;
|
|
31
|
+
return text.slice(quoteStart - 1);
|
|
32
|
+
}
|
|
33
|
+
if (!isTokenStart(text, quoteStart)) return null;
|
|
34
|
+
return text.slice(quoteStart);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function extractAtPrefix(text) {
|
|
38
|
+
const quotedPrefix = extractQuotedPrefix(text);
|
|
39
|
+
if (quotedPrefix?.startsWith('@"')) return quotedPrefix;
|
|
40
|
+
const lastDelimiterIndex = findLastDelimiter(text);
|
|
41
|
+
const tokenStart = lastDelimiterIndex === -1 ? 0 : lastDelimiterIndex + 1;
|
|
42
|
+
return text[tokenStart] === '@' ? text.slice(tokenStart) : null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function parsePathPrefix(prefix) {
|
|
46
|
+
if (prefix.startsWith('@"')) {
|
|
47
|
+
return { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };
|
|
48
|
+
}
|
|
49
|
+
if (prefix.startsWith('"')) {
|
|
50
|
+
return { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };
|
|
51
|
+
}
|
|
52
|
+
if (prefix.startsWith('@')) {
|
|
53
|
+
return { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };
|
|
54
|
+
}
|
|
55
|
+
return { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function buildCompletionValue(path, options) {
|
|
59
|
+
const needsQuotes = options.isQuotedPrefix || path.includes(' ');
|
|
60
|
+
const prefix = options.isAtPrefix ? '@' : '';
|
|
61
|
+
return needsQuotes ? `${prefix}"${path}"` : `${prefix}${path}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Browser-safe completion semantics shared by the TUI and native React composer. */
|
|
65
|
+
export function applyAutocompleteCompletion(lines, cursorLine, cursorCol, item, prefix) {
|
|
66
|
+
const currentLine = lines[cursorLine] || '';
|
|
67
|
+
const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
|
|
68
|
+
const afterCursor = currentLine.slice(cursorCol);
|
|
69
|
+
const isQuotedPrefix = prefix.startsWith('"') || prefix.startsWith('@"');
|
|
70
|
+
const adjustedAfterCursor =
|
|
71
|
+
isQuotedPrefix && item.value.endsWith('"') && afterCursor.startsWith('"')
|
|
72
|
+
? afterCursor.slice(1)
|
|
73
|
+
: afterCursor;
|
|
74
|
+
const isSlashCommand =
|
|
75
|
+
prefix.startsWith('/') &&
|
|
76
|
+
!prefix.slice(1).includes('/') &&
|
|
77
|
+
(beforePrefix.trim() === '' || item.value.startsWith('skill:'));
|
|
78
|
+
|
|
79
|
+
if (isSlashCommand) {
|
|
80
|
+
const newLines = [...lines];
|
|
81
|
+
newLines[cursorLine] = `${beforePrefix}/${item.value} ${adjustedAfterCursor}`;
|
|
82
|
+
return {
|
|
83
|
+
lines: newLines,
|
|
84
|
+
cursorLine,
|
|
85
|
+
cursorCol: beforePrefix.length + item.value.length + 2
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (prefix.startsWith('@')) {
|
|
90
|
+
const isDirectory = item.label.endsWith('/');
|
|
91
|
+
const suffix = isDirectory ? '' : ' ';
|
|
92
|
+
const newLines = [...lines];
|
|
93
|
+
newLines[cursorLine] = `${beforePrefix + item.value}${suffix}${adjustedAfterCursor}`;
|
|
94
|
+
const cursorOffset =
|
|
95
|
+
isDirectory && item.value.endsWith('"') ? item.value.length - 1 : item.value.length;
|
|
96
|
+
return {
|
|
97
|
+
lines: newLines,
|
|
98
|
+
cursorLine,
|
|
99
|
+
cursorCol: beforePrefix.length + cursorOffset + suffix.length
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const newLines = [...lines];
|
|
104
|
+
newLines[cursorLine] = beforePrefix + item.value + adjustedAfterCursor;
|
|
105
|
+
const isDirectory = item.label.endsWith('/');
|
|
106
|
+
const cursorOffset =
|
|
107
|
+
isDirectory && item.value.endsWith('"') ? item.value.length - 1 : item.value.length;
|
|
108
|
+
return {
|
|
109
|
+
lines: newLines,
|
|
110
|
+
cursorLine,
|
|
111
|
+
cursorCol: beforePrefix.length + cursorOffset
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -2,71 +2,16 @@ import { spawnSync } from 'child_process';
|
|
|
2
2
|
import { readdirSync, statSync } from 'fs';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { basename, dirname, join } from 'path';
|
|
5
|
+
import {
|
|
6
|
+
applyAutocompleteCompletion,
|
|
7
|
+
buildCompletionValue,
|
|
8
|
+
extractAtPrefix,
|
|
9
|
+
extractQuotedPrefix,
|
|
10
|
+
findLastDelimiter,
|
|
11
|
+
parsePathPrefix
|
|
12
|
+
} from './core.js';
|
|
5
13
|
import { fuzzyFilter } from './fuzzy.js';
|
|
6
14
|
import { extractInlineSkillAutocompleteToken } from './skill-autocomplete.js';
|
|
7
|
-
const PATH_DELIMITERS = new Set([' ', '\t', '"', "'", '=']);
|
|
8
|
-
function findLastDelimiter(text) {
|
|
9
|
-
for (let i = text.length - 1; i >= 0; i -= 1) {
|
|
10
|
-
if (PATH_DELIMITERS.has(text[i] ?? '')) {
|
|
11
|
-
return i;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return -1;
|
|
15
|
-
}
|
|
16
|
-
function findUnclosedQuoteStart(text) {
|
|
17
|
-
let inQuotes = false;
|
|
18
|
-
let quoteStart = -1;
|
|
19
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
20
|
-
if (text[i] === '"') {
|
|
21
|
-
inQuotes = !inQuotes;
|
|
22
|
-
if (inQuotes) {
|
|
23
|
-
quoteStart = i;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return inQuotes ? quoteStart : null;
|
|
28
|
-
}
|
|
29
|
-
function isTokenStart(text, index) {
|
|
30
|
-
return index === 0 || PATH_DELIMITERS.has(text[index - 1] ?? '');
|
|
31
|
-
}
|
|
32
|
-
function extractQuotedPrefix(text) {
|
|
33
|
-
const quoteStart = findUnclosedQuoteStart(text);
|
|
34
|
-
if (quoteStart === null) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
if (quoteStart > 0 && text[quoteStart - 1] === '@') {
|
|
38
|
-
if (!isTokenStart(text, quoteStart - 1)) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return text.slice(quoteStart - 1);
|
|
42
|
-
}
|
|
43
|
-
if (!isTokenStart(text, quoteStart)) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
return text.slice(quoteStart);
|
|
47
|
-
}
|
|
48
|
-
function parsePathPrefix(prefix) {
|
|
49
|
-
if (prefix.startsWith('@"')) {
|
|
50
|
-
return { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };
|
|
51
|
-
}
|
|
52
|
-
if (prefix.startsWith('"')) {
|
|
53
|
-
return { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };
|
|
54
|
-
}
|
|
55
|
-
if (prefix.startsWith('@')) {
|
|
56
|
-
return { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };
|
|
57
|
-
}
|
|
58
|
-
return { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };
|
|
59
|
-
}
|
|
60
|
-
function buildCompletionValue(path, options) {
|
|
61
|
-
const needsQuotes = options.isQuotedPrefix || path.includes(' ');
|
|
62
|
-
const prefix = options.isAtPrefix ? '@' : '';
|
|
63
|
-
if (!needsQuotes) {
|
|
64
|
-
return `${prefix}${path}`;
|
|
65
|
-
}
|
|
66
|
-
const openQuote = `${prefix}"`;
|
|
67
|
-
const closeQuote = '"';
|
|
68
|
-
return `${openQuote}${path}${closeQuote}`;
|
|
69
|
-
}
|
|
70
15
|
// Use fd to walk directory tree (fast, respects .gitignore)
|
|
71
16
|
function walkDirectoryWithFd(baseDir, fdPath, query, maxResults) {
|
|
72
17
|
const args = [
|
|
@@ -99,10 +44,11 @@ function walkDirectoryWithFd(baseDir, fdPath, query, maxResults) {
|
|
|
99
44
|
if (result.status !== 0 || !result.stdout) {
|
|
100
45
|
return [];
|
|
101
46
|
}
|
|
102
|
-
const lines = result.stdout.trim().split(
|
|
47
|
+
const lines = result.stdout.trim().split(/\r?\n/).filter(Boolean);
|
|
103
48
|
const results = [];
|
|
104
49
|
for (const line of lines) {
|
|
105
|
-
const
|
|
50
|
+
const posixPath = line.replaceAll('\\', '/');
|
|
51
|
+
const normalizedPath = posixPath.endsWith('/') ? posixPath.slice(0, -1) : posixPath;
|
|
106
52
|
if (
|
|
107
53
|
normalizedPath === '.git' ||
|
|
108
54
|
normalizedPath.startsWith('.git/') ||
|
|
@@ -111,14 +57,58 @@ function walkDirectoryWithFd(baseDir, fdPath, query, maxResults) {
|
|
|
111
57
|
continue;
|
|
112
58
|
}
|
|
113
59
|
// fd outputs directories with trailing /
|
|
114
|
-
const isDirectory =
|
|
60
|
+
const isDirectory = posixPath.endsWith('/');
|
|
115
61
|
results.push({
|
|
116
|
-
path:
|
|
62
|
+
path: posixPath,
|
|
117
63
|
isDirectory
|
|
118
64
|
});
|
|
119
65
|
}
|
|
120
66
|
return results;
|
|
121
67
|
}
|
|
68
|
+
// Keep autocomplete available when the shared tool bootstrap cannot provide fd, such as in
|
|
69
|
+
// offline mode or on an unsupported platform.
|
|
70
|
+
function walkDirectoryWithoutFd(baseDir, query, maxResults) {
|
|
71
|
+
const normalizedQuery = query.toLowerCase();
|
|
72
|
+
const results = [];
|
|
73
|
+
const pendingDirectories = [''];
|
|
74
|
+
let visitedEntries = 0;
|
|
75
|
+
const maxVisitedEntries = 20_000;
|
|
76
|
+
|
|
77
|
+
while (
|
|
78
|
+
pendingDirectories.length > 0 &&
|
|
79
|
+
results.length < maxResults &&
|
|
80
|
+
visitedEntries < maxVisitedEntries
|
|
81
|
+
) {
|
|
82
|
+
const relativeDirectory = pendingDirectories.shift() ?? '';
|
|
83
|
+
const directory = relativeDirectory ? join(baseDir, relativeDirectory) : baseDir;
|
|
84
|
+
let entries;
|
|
85
|
+
try {
|
|
86
|
+
entries = readdirSync(directory, { withFileTypes: true });
|
|
87
|
+
} catch {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
entries.sort((a, b) => {
|
|
91
|
+
if (a.isDirectory() !== b.isDirectory()) return a.isDirectory() ? -1 : 1;
|
|
92
|
+
return a.name.localeCompare(b.name);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
for (const entry of entries) {
|
|
96
|
+
visitedEntries++;
|
|
97
|
+
if (entry.name === '.git' || entry.name === 'node_modules') continue;
|
|
98
|
+
const relativePath = relativeDirectory ? join(relativeDirectory, entry.name) : entry.name;
|
|
99
|
+
const displayPath = relativePath.split('\\').join('/');
|
|
100
|
+
const isDirectory = entry.isDirectory();
|
|
101
|
+
if (isDirectory) pendingDirectories.push(relativePath);
|
|
102
|
+
if (!normalizedQuery || displayPath.toLowerCase().includes(normalizedQuery)) {
|
|
103
|
+
results.push({ path: isDirectory ? `${displayPath}/` : displayPath, isDirectory });
|
|
104
|
+
if (results.length >= maxResults) break;
|
|
105
|
+
}
|
|
106
|
+
if (visitedEntries >= maxVisitedEntries) break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return results;
|
|
111
|
+
}
|
|
122
112
|
// Combined provider that handles both slash commands and file paths
|
|
123
113
|
export class CombinedAutocompleteProvider {
|
|
124
114
|
commands;
|
|
@@ -253,94 +243,11 @@ export class CombinedAutocompleteProvider {
|
|
|
253
243
|
return null;
|
|
254
244
|
}
|
|
255
245
|
applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
|
|
256
|
-
|
|
257
|
-
const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
|
|
258
|
-
const afterCursor = currentLine.slice(cursorCol);
|
|
259
|
-
const isQuotedPrefix = prefix.startsWith('"') || prefix.startsWith('@"');
|
|
260
|
-
const hasLeadingQuoteAfterCursor = afterCursor.startsWith('"');
|
|
261
|
-
const hasTrailingQuoteInItem = item.value.endsWith('"');
|
|
262
|
-
const adjustedAfterCursor =
|
|
263
|
-
isQuotedPrefix && hasTrailingQuoteInItem && hasLeadingQuoteAfterCursor
|
|
264
|
-
? afterCursor.slice(1)
|
|
265
|
-
: afterCursor;
|
|
266
|
-
// Check if we're completing a slash command (prefix starts with "/" but NOT a file path)
|
|
267
|
-
// Slash commands are at the start of the line and don't contain path separators after the first /
|
|
268
|
-
const isSlashCommand =
|
|
269
|
-
prefix.startsWith('/') &&
|
|
270
|
-
!prefix.slice(1).includes('/') &&
|
|
271
|
-
(beforePrefix.trim() === '' || item.value.startsWith('skill:'));
|
|
272
|
-
if (isSlashCommand) {
|
|
273
|
-
// This is a command name completion
|
|
274
|
-
const newLine = `${beforePrefix}/${item.value} ${adjustedAfterCursor}`;
|
|
275
|
-
const newLines = [...lines];
|
|
276
|
-
newLines[cursorLine] = newLine;
|
|
277
|
-
return {
|
|
278
|
-
lines: newLines,
|
|
279
|
-
cursorLine,
|
|
280
|
-
cursorCol: beforePrefix.length + item.value.length + 2 // +2 for "/" and space
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
// Check if we're completing a file attachment (prefix starts with "@")
|
|
284
|
-
if (prefix.startsWith('@')) {
|
|
285
|
-
// This is a file attachment completion
|
|
286
|
-
// Don't add space after directories so user can continue autocompleting
|
|
287
|
-
const isDirectory = item.label.endsWith('/');
|
|
288
|
-
const suffix = isDirectory ? '' : ' ';
|
|
289
|
-
const newLine = `${beforePrefix + item.value}${suffix}${adjustedAfterCursor}`;
|
|
290
|
-
const newLines = [...lines];
|
|
291
|
-
newLines[cursorLine] = newLine;
|
|
292
|
-
const hasTrailingQuote = item.value.endsWith('"');
|
|
293
|
-
const cursorOffset =
|
|
294
|
-
isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;
|
|
295
|
-
return {
|
|
296
|
-
lines: newLines,
|
|
297
|
-
cursorLine,
|
|
298
|
-
cursorCol: beforePrefix.length + cursorOffset + suffix.length
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
// Check if we're in a slash command context (beforePrefix contains "/command ")
|
|
302
|
-
const textBeforeCursor = currentLine.slice(0, cursorCol);
|
|
303
|
-
if (textBeforeCursor.includes('/') && textBeforeCursor.includes(' ')) {
|
|
304
|
-
// This is likely a command argument completion
|
|
305
|
-
const newLine = beforePrefix + item.value + adjustedAfterCursor;
|
|
306
|
-
const newLines = [...lines];
|
|
307
|
-
newLines[cursorLine] = newLine;
|
|
308
|
-
const isDirectory = item.label.endsWith('/');
|
|
309
|
-
const hasTrailingQuote = item.value.endsWith('"');
|
|
310
|
-
const cursorOffset =
|
|
311
|
-
isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;
|
|
312
|
-
return {
|
|
313
|
-
lines: newLines,
|
|
314
|
-
cursorLine,
|
|
315
|
-
cursorCol: beforePrefix.length + cursorOffset
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
// For file paths, complete the path
|
|
319
|
-
const newLine = beforePrefix + item.value + adjustedAfterCursor;
|
|
320
|
-
const newLines = [...lines];
|
|
321
|
-
newLines[cursorLine] = newLine;
|
|
322
|
-
const isDirectory = item.label.endsWith('/');
|
|
323
|
-
const hasTrailingQuote = item.value.endsWith('"');
|
|
324
|
-
const cursorOffset =
|
|
325
|
-
isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;
|
|
326
|
-
return {
|
|
327
|
-
lines: newLines,
|
|
328
|
-
cursorLine,
|
|
329
|
-
cursorCol: beforePrefix.length + cursorOffset
|
|
330
|
-
};
|
|
246
|
+
return applyAutocompleteCompletion(lines, cursorLine, cursorCol, item, prefix);
|
|
331
247
|
}
|
|
332
248
|
// Extract @ prefix for fuzzy file suggestions
|
|
333
249
|
extractAtPrefix(text) {
|
|
334
|
-
|
|
335
|
-
if (quotedPrefix?.startsWith('@"')) {
|
|
336
|
-
return quotedPrefix;
|
|
337
|
-
}
|
|
338
|
-
const lastDelimiterIndex = findLastDelimiter(text);
|
|
339
|
-
const tokenStart = lastDelimiterIndex === -1 ? 0 : lastDelimiterIndex + 1;
|
|
340
|
-
if (text[tokenStart] === '@') {
|
|
341
|
-
return text.slice(tokenStart);
|
|
342
|
-
}
|
|
343
|
-
return null;
|
|
250
|
+
return extractAtPrefix(text);
|
|
344
251
|
}
|
|
345
252
|
// Extract a path-like prefix from the text before cursor
|
|
346
253
|
extractPathPrefix(text, forceExtract = false) {
|
|
@@ -546,15 +453,13 @@ export class CombinedAutocompleteProvider {
|
|
|
546
453
|
}
|
|
547
454
|
// Fuzzy file search using fd (fast, respects .gitignore)
|
|
548
455
|
getFuzzyFileSuggestions(query, options) {
|
|
549
|
-
if (!this.fdPath) {
|
|
550
|
-
// fd not available, return empty results
|
|
551
|
-
return [];
|
|
552
|
-
}
|
|
553
456
|
try {
|
|
554
457
|
const scopedQuery = this.resolveScopedFuzzyQuery(query);
|
|
555
458
|
const fdBaseDir = scopedQuery?.baseDir ?? this.basePath;
|
|
556
459
|
const fdQuery = scopedQuery?.query ?? query;
|
|
557
|
-
const entries =
|
|
460
|
+
const entries = this.fdPath
|
|
461
|
+
? walkDirectoryWithFd(fdBaseDir, this.fdPath, fdQuery, 100)
|
|
462
|
+
: walkDirectoryWithoutFd(fdBaseDir, fdQuery, 100);
|
|
558
463
|
// Score entries
|
|
559
464
|
const scoredEntries = entries
|
|
560
465
|
.map((entry) => ({
|
|
@@ -622,4 +527,3 @@ export class CombinedAutocompleteProvider {
|
|
|
622
527
|
return true;
|
|
623
528
|
}
|
|
624
529
|
}
|
|
625
|
-
//# sourceMappingURL=autocomplete.js.map
|
package/dist/cli/args.js
CHANGED
|
@@ -233,7 +233,7 @@ ${chalk.bold('Options:')}
|
|
|
233
233
|
--session <path> Use specific session file
|
|
234
234
|
--session-dir <dir> Directory for session storage and lookup
|
|
235
235
|
--no-session Don't save session (ephemeral)
|
|
236
|
-
--thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh
|
|
236
|
+
--thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh, max
|
|
237
237
|
--extension, -e <path> Load an extension file (can be used multiple times)
|
|
238
238
|
--no-extensions, -ne Disable extension discovery (explicit -e paths still work)
|
|
239
239
|
--skill <path> Load a skill file or directory (can be used multiple times)
|