shortcutxl 0.3.77 → 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 +9 -9
- package/CHANGELOG.md +8 -0
- package/dist/app/agent-session.d.ts +0 -15
- package/dist/app/agent-session.js +0 -37
- package/dist/app/extensions/slash-commands.js +1 -3
- 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/prompts/com-api.js +1 -1
- package/dist/app/prompts/shared-guidelines.js +6 -2
- package/dist/app/providers/register-shortcut-provider.js +4 -0
- package/dist/app/tools/bash.js +3 -3
- package/dist/app/tools/switch-mode.js +2 -2
- package/dist/app/tools/web-search.js +12 -2
- package/dist/cli.js +871 -2144
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/contracts/model-call.d.ts +0 -1
- package/dist/contracts/model-call.js +1 -2
- package/dist/contracts/wire.d.ts +8 -1
- package/dist/contracts/wire.js +8 -0
- package/dist/embedded-agent/ai-invoke.d.ts +1 -2
- package/dist/embedded-agent/ai-invoke.js +0 -70
- package/dist/embedded-agent/anthropic-messages-transport.d.ts +1 -2
- package/dist/embedded-agent/google-vertex-transport.d.ts +1 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +1 -1
- package/dist/embedded-agent/host-tools/invoke-llm/contract.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/index.d.ts +3 -4
- package/dist/embedded-agent/index.js +2 -3
- package/dist/embedded-agent/openai-completions-transport.d.ts +1 -2
- package/dist/embedded-agent/openai-responses-transport.d.ts +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 +5 -0
- package/dist/embedded-agent/provider-native-request.js +3 -2
- package/dist/embedded-agent/stream.d.ts +8 -88
- package/dist/embedded-agent/stream.js +20 -537
- 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 +16 -1
- package/dist/rpc/index.d.ts +1 -1
- 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/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 +36 -157
- 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 +1 -2
- package/dist/shell/theme/runtime.js +1 -6
- package/dist/shell/theme/theme-schema.json +1 -6
- package/dist/shortcut-model-catalog.js +12 -5
- 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/markdown.js +15 -6
- package/dist/tui/index.d.ts +7 -1
- package/dist/tui/index.js +7 -1
- 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 +1 -1
- package/native-app/package.json +1 -1
- package/native-app/renderer/assets/{index-CtherCML.js → index-B4jz6epR.js} +594 -151
- package/native-app/renderer/assets/{index-B9UxxO8s.css → index-C__g36ft.css} +408 -160
- package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +2 -1
- 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/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/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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const UPDATE_CHECK_INTERVAL_MS = 12 * 60 * 60 * 1000;
|
|
2
|
+
/** Schedules one coalesced asynchronous update check at most once per interval. */
|
|
3
|
+
export class UpdateCheckScheduler {
|
|
4
|
+
options;
|
|
5
|
+
intervalMs;
|
|
6
|
+
now;
|
|
7
|
+
setTimer;
|
|
8
|
+
clearTimer;
|
|
9
|
+
timer;
|
|
10
|
+
inFlight;
|
|
11
|
+
nextCheckAt = Number.POSITIVE_INFINITY;
|
|
12
|
+
stopped = true;
|
|
13
|
+
constructor(options, deps = {}) {
|
|
14
|
+
this.options = options;
|
|
15
|
+
this.intervalMs = options.intervalMs ?? UPDATE_CHECK_INTERVAL_MS;
|
|
16
|
+
this.now = deps.now ?? Date.now;
|
|
17
|
+
this.setTimer = deps.setTimer ?? setTimeout;
|
|
18
|
+
this.clearTimer = deps.clearTimer ?? clearTimeout;
|
|
19
|
+
}
|
|
20
|
+
start(lastCheckedAt) {
|
|
21
|
+
this.stopped = false;
|
|
22
|
+
const lastCheckedAtMs = lastCheckedAt ? Date.parse(lastCheckedAt) : Number.NaN;
|
|
23
|
+
const delayMs = Number.isFinite(lastCheckedAtMs)
|
|
24
|
+
? Math.min(this.intervalMs, Math.max(0, lastCheckedAtMs + this.intervalMs - this.now()))
|
|
25
|
+
: 0;
|
|
26
|
+
this.schedule(delayMs);
|
|
27
|
+
}
|
|
28
|
+
stop() {
|
|
29
|
+
this.stopped = true;
|
|
30
|
+
if (this.timer) {
|
|
31
|
+
this.clearTimer(this.timer);
|
|
32
|
+
this.timer = undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
schedule(delayMs) {
|
|
36
|
+
if (this.stopped)
|
|
37
|
+
return;
|
|
38
|
+
if (this.timer)
|
|
39
|
+
this.clearTimer(this.timer);
|
|
40
|
+
this.nextCheckAt = this.now() + delayMs;
|
|
41
|
+
this.timer = this.setTimer(() => {
|
|
42
|
+
this.timer = undefined;
|
|
43
|
+
this.runCheck();
|
|
44
|
+
}, delayMs);
|
|
45
|
+
this.timer.unref?.();
|
|
46
|
+
}
|
|
47
|
+
runCheck() {
|
|
48
|
+
if (this.stopped || this.inFlight)
|
|
49
|
+
return;
|
|
50
|
+
if (this.timer) {
|
|
51
|
+
this.clearTimer(this.timer);
|
|
52
|
+
this.timer = undefined;
|
|
53
|
+
}
|
|
54
|
+
this.nextCheckAt = this.now() + this.intervalMs;
|
|
55
|
+
const task = Promise.resolve()
|
|
56
|
+
.then(() => this.options.check())
|
|
57
|
+
.then((result) => {
|
|
58
|
+
if (!this.stopped)
|
|
59
|
+
this.options.onResult(result);
|
|
60
|
+
})
|
|
61
|
+
.catch(() => { })
|
|
62
|
+
.finally(() => {
|
|
63
|
+
if (this.inFlight !== task)
|
|
64
|
+
return;
|
|
65
|
+
this.inFlight = undefined;
|
|
66
|
+
this.schedule(Math.max(0, this.nextCheckAt - this.now()));
|
|
67
|
+
});
|
|
68
|
+
this.inFlight = task;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=update-check-scheduler.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Container } from '../../tui/index.js';
|
|
2
|
+
import { type InteractiveAvailableUpdate } from './update-reminder.js';
|
|
3
|
+
interface UpdateReminderControllerOptions {
|
|
4
|
+
initialUpdate?: InteractiveAvailableUpdate;
|
|
5
|
+
lastCheckedAt?: string;
|
|
6
|
+
checkForUpdate?: () => Promise<InteractiveAvailableUpdate | undefined>;
|
|
7
|
+
onChange: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** Owns the live update state, reminder component, and non-blocking refresh schedule. */
|
|
10
|
+
export declare class UpdateReminderController {
|
|
11
|
+
private readonly options;
|
|
12
|
+
readonly container: Container;
|
|
13
|
+
private update;
|
|
14
|
+
private readonly scheduler;
|
|
15
|
+
constructor(options: UpdateReminderControllerOptions);
|
|
16
|
+
start(): void;
|
|
17
|
+
stop(): void;
|
|
18
|
+
private setUpdate;
|
|
19
|
+
private render;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=update-reminder-controller.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Container, Text } from '../../tui/index.js';
|
|
2
|
+
import { theme } from '../theme/runtime.js';
|
|
3
|
+
import { UpdateCheckScheduler } from './update-check-scheduler.js';
|
|
4
|
+
import { formatUpdateReminder } from './update-reminder.js';
|
|
5
|
+
/** Owns the live update state, reminder component, and non-blocking refresh schedule. */
|
|
6
|
+
export class UpdateReminderController {
|
|
7
|
+
options;
|
|
8
|
+
container = new Container();
|
|
9
|
+
update;
|
|
10
|
+
scheduler;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.options = options;
|
|
13
|
+
this.update = options.initialUpdate;
|
|
14
|
+
this.render();
|
|
15
|
+
this.scheduler = options.checkForUpdate
|
|
16
|
+
? new UpdateCheckScheduler({
|
|
17
|
+
check: options.checkForUpdate,
|
|
18
|
+
onResult: (update) => this.setUpdate(update)
|
|
19
|
+
})
|
|
20
|
+
: null;
|
|
21
|
+
}
|
|
22
|
+
start() {
|
|
23
|
+
this.scheduler?.start(this.options.lastCheckedAt);
|
|
24
|
+
}
|
|
25
|
+
stop() {
|
|
26
|
+
this.scheduler?.stop();
|
|
27
|
+
}
|
|
28
|
+
setUpdate(update) {
|
|
29
|
+
this.update = update;
|
|
30
|
+
this.render();
|
|
31
|
+
this.options.onChange();
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
this.container.clear();
|
|
35
|
+
if (!this.update)
|
|
36
|
+
return;
|
|
37
|
+
this.container.addChild(new Text(theme.fg('accent', formatUpdateReminder(this.update)), 1, 0));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=update-reminder-controller.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ThemeColor = 'accent' | 'border' | 'borderAccent' | 'borderMuted' | 'success' | 'error' | 'errorDim' | 'warning' | 'muted' | 'dim' | 'text' | 'thinkingText' | 'userMessageText' | 'customMessageText' | 'customMessageLabel' | 'toolTitle' | 'toolOutput' | 'mdHeading' | 'mdLink' | 'mdLinkUrl' | 'mdCode' | 'mdCodeBlock' | 'mdCodeBlockBorder' | 'mdQuote' | 'mdQuoteBorder' | 'mdHr' | 'mdListBullet' | 'toolDiffAdded' | 'toolDiffRemoved' | 'toolDiffContext' | 'syntaxComment' | 'syntaxKeyword' | 'syntaxFunction' | 'syntaxVariable' | 'syntaxString' | 'syntaxNumber' | 'syntaxType' | 'syntaxOperator' | 'syntaxPunctuation' | 'thinkingOff' | 'thinkingMinimal' | 'thinkingLow' | 'thinkingMedium' | 'thinkingHigh' | 'thinkingXhigh' | 'bashMode'
|
|
1
|
+
export type ThemeColor = 'accent' | 'border' | 'borderAccent' | 'borderMuted' | 'success' | 'error' | 'errorDim' | 'warning' | 'muted' | 'dim' | 'text' | 'thinkingText' | 'userMessageText' | 'customMessageText' | 'customMessageLabel' | 'toolTitle' | 'toolOutput' | 'mdHeading' | 'mdLink' | 'mdLinkUrl' | 'mdCode' | 'mdCodeBlock' | 'mdCodeBlockBorder' | 'mdQuote' | 'mdQuoteBorder' | 'mdHr' | 'mdListBullet' | 'toolDiffAdded' | 'toolDiffRemoved' | 'toolDiffContext' | 'syntaxComment' | 'syntaxKeyword' | 'syntaxFunction' | 'syntaxVariable' | 'syntaxString' | 'syntaxNumber' | 'syntaxType' | 'syntaxOperator' | 'syntaxPunctuation' | 'thinkingOff' | 'thinkingMinimal' | 'thinkingLow' | 'thinkingMedium' | 'thinkingHigh' | 'thinkingXhigh' | 'bashMode';
|
|
2
2
|
export type ThemeBg = 'selectedBg' | 'userMessageBg' | 'customMessageBg' | 'toolPendingBg' | 'toolSuccessBg' | 'toolErrorBg';
|
|
3
3
|
type ColorMode = 'truecolor' | '256color';
|
|
4
4
|
export declare class Theme {
|
|
@@ -23,7 +23,6 @@ export declare class Theme {
|
|
|
23
23
|
getColorMode(): ColorMode;
|
|
24
24
|
getThinkingBorderColor(level: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'): (str: string) => string;
|
|
25
25
|
getBashModeBorderColor(): (str: string) => string;
|
|
26
|
-
getChatModeBorderColor(): (str: string) => string;
|
|
27
26
|
}
|
|
28
27
|
export declare function getAvailableThemes(): string[];
|
|
29
28
|
export declare function loadThemeFromPath(themePath: string, mode?: ColorMode): Theme;
|
|
@@ -74,9 +74,7 @@ const ThemeJsonSchema = Type.Object({
|
|
|
74
74
|
thinkingHigh: ColorValueSchema,
|
|
75
75
|
thinkingXhigh: ColorValueSchema,
|
|
76
76
|
// Bash Mode (1 color)
|
|
77
|
-
bashMode: ColorValueSchema
|
|
78
|
-
// Chat Mode (1 color — collab chat prefix)
|
|
79
|
-
chatMode: ColorValueSchema
|
|
77
|
+
bashMode: ColorValueSchema
|
|
80
78
|
}),
|
|
81
79
|
export: Type.Optional(Type.Object({
|
|
82
80
|
pageBg: Type.Optional(ColorValueSchema),
|
|
@@ -330,9 +328,6 @@ export class Theme {
|
|
|
330
328
|
getBashModeBorderColor() {
|
|
331
329
|
return (str) => this.fg('bashMode', str);
|
|
332
330
|
}
|
|
333
|
-
getChatModeBorderColor() {
|
|
334
|
-
return (str) => this.fg('chatMode', str);
|
|
335
|
-
}
|
|
336
331
|
}
|
|
337
332
|
// ============================================================================
|
|
338
333
|
// Theme Loading
|
|
@@ -85,8 +85,7 @@
|
|
|
85
85
|
"thinkingMedium",
|
|
86
86
|
"thinkingHigh",
|
|
87
87
|
"thinkingXhigh",
|
|
88
|
-
"bashMode"
|
|
89
|
-
"chatMode"
|
|
88
|
+
"bashMode"
|
|
90
89
|
],
|
|
91
90
|
"properties": {
|
|
92
91
|
"accent": {
|
|
@@ -292,10 +291,6 @@
|
|
|
292
291
|
"bashMode": {
|
|
293
292
|
"$ref": "#/$defs/colorValue",
|
|
294
293
|
"description": "Editor border color in bash mode"
|
|
295
|
-
},
|
|
296
|
-
"chatMode": {
|
|
297
|
-
"$ref": "#/$defs/colorValue",
|
|
298
|
-
"description": "Editor border color and text color in collab chat mode"
|
|
299
294
|
}
|
|
300
295
|
},
|
|
301
296
|
"additionalProperties": false
|
|
@@ -107,13 +107,17 @@ const SHORTCUT_PUBLIC_MODEL_DEFINITIONS = [
|
|
|
107
107
|
maxTokens: 128000,
|
|
108
108
|
capabilities: {
|
|
109
109
|
reasoning: {
|
|
110
|
-
control: '
|
|
110
|
+
control: 'effort',
|
|
111
111
|
defaultLevel: 'high',
|
|
112
|
-
levels: ['high'],
|
|
113
|
-
supportsOff:
|
|
112
|
+
levels: ['high', 'max'],
|
|
113
|
+
supportsOff: true
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
protocol: 'openai-completions'
|
|
116
|
+
protocol: 'openai-completions',
|
|
117
|
+
compat: {
|
|
118
|
+
supportsDeveloperRole: false,
|
|
119
|
+
supportsReasoningEffort: true
|
|
120
|
+
}
|
|
117
121
|
},
|
|
118
122
|
// Vision/extraction models the proxy routes to for llm_analysis, take_screenshot,
|
|
119
123
|
// tool summaries, and durable memory. Registered so the api-v2 proxy client's
|
|
@@ -201,7 +205,10 @@ const SHORTCUT_HOSTED_MODEL_DEFINITIONS = [
|
|
|
201
205
|
cost: { input: 0.195, output: 1.56, cacheRead: 0.0195, cacheWrite: 0 },
|
|
202
206
|
contextWindow: HOSTED_CONTEXT_WINDOW_TOKENS,
|
|
203
207
|
maxTokens: HOSTED_MAX_NEW_TOKENS,
|
|
204
|
-
protocol: 'openai-completions'
|
|
208
|
+
protocol: 'openai-completions',
|
|
209
|
+
compat: {
|
|
210
|
+
supportsDeveloperRole: false
|
|
211
|
+
}
|
|
205
212
|
}
|
|
206
213
|
];
|
|
207
214
|
function cloneShortcutModelDefinition(model) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Startup-owned runtime package update detection and cache state.
|
|
3
3
|
*
|
|
4
|
-
* Reads a small local cache
|
|
5
|
-
*
|
|
4
|
+
* Reads a small local cache for startup and exposes an explicit asynchronous
|
|
5
|
+
* refresh for the live shell.
|
|
6
6
|
*/
|
|
7
7
|
interface UpdateCacheFile {
|
|
8
8
|
latestVersion: string;
|
|
@@ -31,12 +31,12 @@ export interface ResolveUpdateOptions {
|
|
|
31
31
|
packageName?: string;
|
|
32
32
|
registryUrl?: string;
|
|
33
33
|
}
|
|
34
|
-
interface
|
|
34
|
+
interface RefreshUpdateDeps {
|
|
35
35
|
fetchLatestVersion?: (registryUrl: string) => Promise<string | undefined>;
|
|
36
|
-
scheduleBackgroundTask?: (task: () => Promise<void>) => void;
|
|
37
36
|
}
|
|
38
|
-
export declare function resolveStartupUpdateStatus(options?: ResolveUpdateOptions
|
|
39
|
-
|
|
37
|
+
export declare function resolveStartupUpdateStatus(options?: ResolveUpdateOptions): Promise<UpdateStatus>;
|
|
38
|
+
/** Refresh the registry-backed cache without blocking startup or session changes. */
|
|
39
|
+
export declare function refreshUpdateStatus(options?: ResolveUpdateOptions, deps?: RefreshUpdateDeps): Promise<UpdateStatus>;
|
|
40
40
|
export declare function getUpdateStatusFromCache(cache: UpdateCacheFile | undefined, options: {
|
|
41
41
|
currentVersion: string;
|
|
42
42
|
packageName?: string;
|
|
@@ -1,56 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Startup-owned runtime package update detection and cache state.
|
|
3
3
|
*
|
|
4
|
-
* Reads a small local cache
|
|
5
|
-
*
|
|
4
|
+
* Reads a small local cache for startup and exposes an explicit asynchronous
|
|
5
|
+
* refresh for the live shell.
|
|
6
6
|
*/
|
|
7
7
|
import { mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
8
8
|
import { dirname } from 'path';
|
|
9
9
|
import { getUpdateCachePath, getUpdateCommand, getUpdateInstruction, NPM_PACKAGE_NAME, NPM_REGISTRY_URL, VERSION } from '../config.js';
|
|
10
|
-
|
|
11
|
-
export async function resolveStartupUpdateStatus(options = {}, deps = {}) {
|
|
10
|
+
export async function resolveStartupUpdateStatus(options = {}) {
|
|
12
11
|
const cachePath = options.cachePath ?? getUpdateCachePath();
|
|
13
12
|
const currentVersion = options.currentVersion ?? VERSION;
|
|
14
13
|
const packageName = options.packageName ?? NPM_PACKAGE_NAME;
|
|
15
|
-
const registryUrl = options.registryUrl ?? NPM_REGISTRY_URL;
|
|
16
|
-
const now = options.now ?? new Date();
|
|
17
14
|
if (options.skipCheck) {
|
|
18
15
|
return { kind: 'none', currentVersion };
|
|
19
16
|
}
|
|
20
17
|
const cache = readUpdateCache(cachePath);
|
|
21
|
-
// Cold-start users migrated from the old live-check flow do not have an
|
|
22
|
-
// update cache yet. Do one bounded foreground fetch so the first launch
|
|
23
|
-
// after the rollout can still show the update prompt immediately.
|
|
24
|
-
if (!options.offline && !cache) {
|
|
25
|
-
const refreshed = await fetchAndPersistUpdateCache({ cachePath, registryUrl, now }, { fetchLatestVersion: deps.fetchLatestVersion });
|
|
26
|
-
return getUpdateStatusFromCache(refreshed, {
|
|
27
|
-
currentVersion,
|
|
28
|
-
packageName
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
if (!options.offline && shouldRefreshUpdateCache(cache, now)) {
|
|
32
|
-
const scheduleBackgroundTask = deps.scheduleBackgroundTask ??
|
|
33
|
-
((task) => {
|
|
34
|
-
void task().catch(() => { });
|
|
35
|
-
});
|
|
36
|
-
scheduleBackgroundTask(async () => {
|
|
37
|
-
await refreshUpdateCache({ cachePath, registryUrl, now }, { fetchLatestVersion: deps.fetchLatestVersion });
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
18
|
return getUpdateStatusFromCache(cache, {
|
|
41
19
|
currentVersion,
|
|
42
20
|
packageName
|
|
43
21
|
});
|
|
44
22
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
23
|
+
/** Refresh the registry-backed cache without blocking startup or session changes. */
|
|
24
|
+
export async function refreshUpdateStatus(options = {}, deps = {}) {
|
|
25
|
+
const cachePath = options.cachePath ?? getUpdateCachePath();
|
|
26
|
+
const currentVersion = options.currentVersion ?? VERSION;
|
|
27
|
+
const packageName = options.packageName ?? NPM_PACKAGE_NAME;
|
|
28
|
+
const registryUrl = options.registryUrl ?? NPM_REGISTRY_URL;
|
|
29
|
+
const now = options.now ?? new Date();
|
|
30
|
+
const cache = readUpdateCache(cachePath);
|
|
31
|
+
if (options.skipCheck || options.offline) {
|
|
32
|
+
return getUpdateStatusFromCache(cache, { currentVersion, packageName });
|
|
48
33
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
34
|
+
let refreshed;
|
|
35
|
+
try {
|
|
36
|
+
refreshed = await fetchAndPersistUpdateCache({ cachePath, registryUrl, now }, { fetchLatestVersion: deps.fetchLatestVersion });
|
|
52
37
|
}
|
|
53
|
-
|
|
38
|
+
catch {
|
|
39
|
+
// Keep the last known cache. The live scheduler will retry on its next interval.
|
|
40
|
+
}
|
|
41
|
+
return getUpdateStatusFromCache(refreshed ?? cache, {
|
|
42
|
+
currentVersion,
|
|
43
|
+
packageName
|
|
44
|
+
});
|
|
54
45
|
}
|
|
55
46
|
export function getUpdateStatusFromCache(cache, options) {
|
|
56
47
|
const noUpdate = {
|
|
@@ -74,12 +65,6 @@ export function getUpdateStatusFromCache(cache, options) {
|
|
|
74
65
|
lastCheckedAt: cache.lastCheckedAt
|
|
75
66
|
};
|
|
76
67
|
}
|
|
77
|
-
async function refreshUpdateCache(options, deps = {}) {
|
|
78
|
-
const nextCache = await fetchAndPersistUpdateCache(options, deps);
|
|
79
|
-
if (!nextCache) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
68
|
async function fetchAndPersistUpdateCache(options, deps = {}) {
|
|
84
69
|
const fetchLatestVersion = deps.fetchLatestVersion ?? fetchLatestVersionFromRegistry;
|
|
85
70
|
const latestVersion = await fetchLatestVersion(options.registryUrl);
|
|
@@ -2,14 +2,14 @@ import chalk from 'chalk';
|
|
|
2
2
|
import { emitKeypressEvents } from 'readline';
|
|
3
3
|
export async function runStartupUpdatePromptIfNeeded(updateStatus, deps = {}) {
|
|
4
4
|
if (deps.suppress || updateStatus.kind !== 'available' || !updateStatus.command) {
|
|
5
|
-
return { kind: 'continue' };
|
|
5
|
+
return { kind: 'continue', updateStatus };
|
|
6
6
|
}
|
|
7
7
|
const write = deps.write ?? ((text) => process.stdout.write(text));
|
|
8
8
|
const promptSelection = deps.promptSelection ?? promptSelectionInteractive;
|
|
9
9
|
const selection = await promptSelection(updateStatus, write);
|
|
10
10
|
return selection === 'update-now'
|
|
11
11
|
? { kind: 'run-update', update: updateStatus }
|
|
12
|
-
: { kind: 'continue' };
|
|
12
|
+
: { kind: 'continue', updateStatus };
|
|
13
13
|
}
|
|
14
14
|
export function renderStartupUpdatePrompt(update, selected = 'update-now') {
|
|
15
15
|
const optionRow = (option, label) => {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { marked } from 'marked';
|
|
2
2
|
import { isImageLine } from '../terminal-image.js';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
applyBackgroundToLine,
|
|
5
|
+
formatTerminalHyperlink,
|
|
6
|
+
visibleWidth,
|
|
7
|
+
wrapTextWithAnsi
|
|
8
|
+
} from '../utils.js';
|
|
4
9
|
export class Markdown {
|
|
5
10
|
text;
|
|
6
11
|
paddingX; // Left/right padding
|
|
@@ -316,6 +321,10 @@ export class Markdown {
|
|
|
316
321
|
break;
|
|
317
322
|
case 'link': {
|
|
318
323
|
const linkText = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);
|
|
324
|
+
const styledLink = formatTerminalHyperlink(
|
|
325
|
+
this.theme.link(this.theme.underline(linkText)),
|
|
326
|
+
token.href
|
|
327
|
+
);
|
|
319
328
|
// If link text matches href, only show the link once
|
|
320
329
|
// Compare raw text (token.text) not styled text (linkText) since linkText has ANSI codes
|
|
321
330
|
// For mailto: links, strip the prefix before comparing (autolinked emails have
|
|
@@ -324,12 +333,12 @@ export class Markdown {
|
|
|
324
333
|
? token.href.slice(7)
|
|
325
334
|
: token.href;
|
|
326
335
|
if (token.text === token.href || token.text === hrefForComparison) {
|
|
327
|
-
result +=
|
|
336
|
+
result += styledLink + stylePrefix;
|
|
337
|
+
} else if (token.href.startsWith('file:')) {
|
|
338
|
+
// Absolute file URLs can be long and noisy. Keep the full path in hyperlink metadata.
|
|
339
|
+
result += styledLink + stylePrefix;
|
|
328
340
|
} else {
|
|
329
|
-
result +=
|
|
330
|
-
this.theme.link(this.theme.underline(linkText)) +
|
|
331
|
-
this.theme.linkUrl(` (${token.href})`) +
|
|
332
|
-
stylePrefix;
|
|
341
|
+
result += styledLink + this.theme.linkUrl(` (${token.href})`) + stylePrefix;
|
|
333
342
|
}
|
|
334
343
|
break;
|
|
335
344
|
}
|
package/dist/tui/index.d.ts
CHANGED
|
@@ -76,5 +76,11 @@ export {
|
|
|
76
76
|
type OverlayOptions,
|
|
77
77
|
type SizeValue
|
|
78
78
|
} from './tui.js';
|
|
79
|
-
export {
|
|
79
|
+
export {
|
|
80
|
+
formatTerminalHyperlink,
|
|
81
|
+
getTerminalHyperlinkAtColumn,
|
|
82
|
+
truncateToWidth,
|
|
83
|
+
visibleWidth,
|
|
84
|
+
wrapTextWithAnsi
|
|
85
|
+
} from './utils.js';
|
|
80
86
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/tui/index.js
CHANGED
|
@@ -56,5 +56,11 @@ export {
|
|
|
56
56
|
} from './terminal-image.js';
|
|
57
57
|
export { CURSOR_MARKER, Container, ScrollContainer, TUI, isFocusable } from './tui.js';
|
|
58
58
|
// Utilities
|
|
59
|
-
export {
|
|
59
|
+
export {
|
|
60
|
+
formatTerminalHyperlink,
|
|
61
|
+
getTerminalHyperlinkAtColumn,
|
|
62
|
+
truncateToWidth,
|
|
63
|
+
visibleWidth,
|
|
64
|
+
wrapTextWithAnsi
|
|
65
|
+
} from './utils.js';
|
|
60
66
|
//# sourceMappingURL=index.js.map
|
package/dist/tui/tui.d.ts
CHANGED
|
@@ -209,6 +209,8 @@ export declare class TUI extends Container {
|
|
|
209
209
|
setClearOnShrink(enabled: boolean): void;
|
|
210
210
|
setFocus(component: Component | null): void;
|
|
211
211
|
getFocusedComponent(): Component | null;
|
|
212
|
+
/** Resolve an OSC 8 hyperlink from one-based terminal screen coordinates. */
|
|
213
|
+
getHyperlinkAtScreenPosition(row: number, col: number): string | undefined;
|
|
212
214
|
/**
|
|
213
215
|
* Show an overlay component with configurable positioning and sizing.
|
|
214
216
|
* Returns a handle to control the overlay's visibility.
|
package/dist/tui/tui.js
CHANGED
|
@@ -6,7 +6,13 @@ import * as os from 'node:os';
|
|
|
6
6
|
import * as path from 'node:path';
|
|
7
7
|
import { isKeyRelease, matchesKey } from './keys.js';
|
|
8
8
|
import { getCapabilities, isImageLine, setCellDimensions } from './terminal-image.js';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
extractSegments,
|
|
11
|
+
getTerminalHyperlinkAtColumn,
|
|
12
|
+
sliceByColumn,
|
|
13
|
+
sliceWithWidth,
|
|
14
|
+
visibleWidth
|
|
15
|
+
} from './utils.js';
|
|
10
16
|
/** Type guard to check if a component implements Focusable */
|
|
11
17
|
export function isFocusable(component) {
|
|
12
18
|
return component !== null && 'focused' in component;
|
|
@@ -255,6 +261,15 @@ export class TUI extends Container {
|
|
|
255
261
|
getFocusedComponent() {
|
|
256
262
|
return this.focusedComponent;
|
|
257
263
|
}
|
|
264
|
+
/** Resolve an OSC 8 hyperlink from one-based terminal screen coordinates. */
|
|
265
|
+
getHyperlinkAtScreenPosition(row, col) {
|
|
266
|
+
if (!Number.isInteger(row) || !Number.isInteger(col) || row < 1 || col < 1) {
|
|
267
|
+
return undefined;
|
|
268
|
+
}
|
|
269
|
+
const lineIndex = this.previousViewportTop + row - 1;
|
|
270
|
+
const line = this.previousLines[lineIndex];
|
|
271
|
+
return line === undefined ? undefined : getTerminalHyperlinkAtColumn(line, col - 1);
|
|
272
|
+
}
|
|
258
273
|
/**
|
|
259
274
|
* Show an overlay component with configurable positioning and sizing.
|
|
260
275
|
* Returns a handle to control the overlay's visibility.
|
package/dist/tui/utils.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ export declare function getSegmenter(): Intl.Segmenter;
|
|
|
6
6
|
* Calculate the visible width of a string in terminal columns.
|
|
7
7
|
*/
|
|
8
8
|
export declare function visibleWidth(str: string): number;
|
|
9
|
+
/** Wrap terminal text in a safe OSC 8 hyperlink for supported URL schemes. */
|
|
10
|
+
export declare function formatTerminalHyperlink(text: string, href: string): string;
|
|
11
|
+
/** Return the active OSC 8 hyperlink at a zero-based terminal column. */
|
|
12
|
+
export declare function getTerminalHyperlinkAtColumn(
|
|
13
|
+
line: string,
|
|
14
|
+
targetColumn: number
|
|
15
|
+
): string | undefined;
|
|
9
16
|
/**
|
|
10
17
|
* Extract ANSI escape sequences from a string at the given position.
|
|
11
18
|
*/
|
package/dist/tui/utils.js
CHANGED
|
@@ -171,7 +171,13 @@ class AnsiCodeTracker {
|
|
|
171
171
|
strikethrough = false;
|
|
172
172
|
fgColor = null; // Stores the full code like "31" or "38;5;240"
|
|
173
173
|
bgColor = null; // Stores the full code like "41" or "48;5;240"
|
|
174
|
+
hyperlinkUrl = null;
|
|
174
175
|
process(ansiCode) {
|
|
176
|
+
const hyperlinkMatch = ansiCode.match(/^\x1b\]8;[^;]*;(.*?)(?:\x07|\x1b\\)$/s);
|
|
177
|
+
if (hyperlinkMatch) {
|
|
178
|
+
this.hyperlinkUrl = hyperlinkMatch[1] || null;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
175
181
|
if (!ansiCode.endsWith('m')) {
|
|
176
182
|
return;
|
|
177
183
|
}
|
|
@@ -304,6 +310,7 @@ class AnsiCodeTracker {
|
|
|
304
310
|
/** Clear all state for reuse. */
|
|
305
311
|
clear() {
|
|
306
312
|
this.reset();
|
|
313
|
+
this.hyperlinkUrl = null;
|
|
307
314
|
}
|
|
308
315
|
getActiveCodes() {
|
|
309
316
|
const codes = [];
|
|
@@ -317,8 +324,9 @@ class AnsiCodeTracker {
|
|
|
317
324
|
if (this.strikethrough) codes.push('9');
|
|
318
325
|
if (this.fgColor) codes.push(this.fgColor);
|
|
319
326
|
if (this.bgColor) codes.push(this.bgColor);
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
const sgr = codes.length === 0 ? '' : `\x1b[${codes.join(';')}m`;
|
|
328
|
+
const hyperlink = this.hyperlinkUrl ? `\x1b]8;;${this.hyperlinkUrl}\x07` : '';
|
|
329
|
+
return hyperlink + sgr;
|
|
322
330
|
}
|
|
323
331
|
hasActiveCodes() {
|
|
324
332
|
return (
|
|
@@ -331,7 +339,8 @@ class AnsiCodeTracker {
|
|
|
331
339
|
this.hidden ||
|
|
332
340
|
this.strikethrough ||
|
|
333
341
|
this.fgColor !== null ||
|
|
334
|
-
this.bgColor !== null
|
|
342
|
+
this.bgColor !== null ||
|
|
343
|
+
this.hyperlinkUrl !== null
|
|
335
344
|
);
|
|
336
345
|
}
|
|
337
346
|
/**
|
|
@@ -340,13 +349,54 @@ class AnsiCodeTracker {
|
|
|
340
349
|
* Returns empty string if no problematic attributes are active.
|
|
341
350
|
*/
|
|
342
351
|
getLineEndReset() {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
352
|
+
const underlineReset = this.underline ? '\x1b[24m' : '';
|
|
353
|
+
const hyperlinkReset = this.hyperlinkUrl ? '\x1b]8;;\x07' : '';
|
|
354
|
+
return underlineReset + hyperlinkReset;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const CLICKABLE_PROTOCOLS = new Set(['file:', 'http:', 'https:', 'mailto:']);
|
|
359
|
+
|
|
360
|
+
/** Wrap terminal text in a safe OSC 8 hyperlink for supported URL schemes. */
|
|
361
|
+
export function formatTerminalHyperlink(text, href) {
|
|
362
|
+
if (typeof href !== 'string' || href.length === 0 || href.length > 8192) return text;
|
|
363
|
+
if (/[\u0000-\u001f\u007f]/u.test(href)) return text;
|
|
364
|
+
try {
|
|
365
|
+
const url = new URL(href);
|
|
366
|
+
if (!CLICKABLE_PROTOCOLS.has(url.protocol)) return text;
|
|
367
|
+
} catch {
|
|
368
|
+
return text;
|
|
369
|
+
}
|
|
370
|
+
return `\x1b]8;;${href}\x07${text}\x1b]8;;\x07`;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** Return the active OSC 8 hyperlink at a zero-based terminal column. */
|
|
374
|
+
export function getTerminalHyperlinkAtColumn(line, targetColumn) {
|
|
375
|
+
if (!Number.isInteger(targetColumn) || targetColumn < 0) return undefined;
|
|
376
|
+
|
|
377
|
+
let activeHref;
|
|
378
|
+
let column = 0;
|
|
379
|
+
let index = 0;
|
|
380
|
+
while (index < line.length) {
|
|
381
|
+
const ansi = extractAnsiCode(line, index);
|
|
382
|
+
if (ansi) {
|
|
383
|
+
const hyperlinkMatch = ansi.code.match(/^\x1b\]8;[^;]*;(.*?)(?:\x07|\x1b\\)$/s);
|
|
384
|
+
if (hyperlinkMatch) activeHref = hyperlinkMatch[1] || undefined;
|
|
385
|
+
index += ansi.length;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
let textEnd = index + 1;
|
|
390
|
+
while (textEnd < line.length && line[textEnd] !== '\x1b') textEnd++;
|
|
391
|
+
const text = line.slice(index, textEnd);
|
|
392
|
+
for (const { segment } of segmenter.segment(text)) {
|
|
393
|
+
const width = graphemeWidth(segment);
|
|
394
|
+
if (targetColumn >= column && targetColumn < column + width) return activeHref;
|
|
395
|
+
column += width;
|
|
347
396
|
}
|
|
348
|
-
|
|
397
|
+
index = textEnd;
|
|
349
398
|
}
|
|
399
|
+
return undefined;
|
|
350
400
|
}
|
|
351
401
|
function updateTrackerFromText(text, tracker) {
|
|
352
402
|
let i = 0;
|
package/native-app/main/index.js
CHANGED
|
@@ -8549,7 +8549,7 @@ function createWindow() {
|
|
|
8549
8549
|
minWidth: 820,
|
|
8550
8550
|
minHeight: 560,
|
|
8551
8551
|
title: "Shortcut CLI",
|
|
8552
|
-
backgroundColor: "#
|
|
8552
|
+
backgroundColor: "#f5f5f5",
|
|
8553
8553
|
webPreferences: {
|
|
8554
8554
|
preload: join(__dirname, "../preload/index.cjs"),
|
|
8555
8555
|
contextIsolation: true,
|