@eddyskywalker/dsh-chatgpt-subscription 0.70.1 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +4 -2
- package/lib/client.js +1188 -226
- package/lib/client.js.map +1 -1
- package/lib/{entry-progress-updates-DpzbX1GP.js → entry-progress-updates-DMLVID9V.js} +10 -23
- package/lib/index.js +6516 -3205
- package/lib/plan-mode-pipeline.js +3 -3
- package/lib/progress-updates.js +1 -1
- package/lib/types/client/antigravity-acp/AntigravityAcpComposerBadge.d.ts +35 -0
- package/lib/types/client/antigravity-acp/AntigravityAcpComposerBadge.d.ts.map +1 -0
- package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts +20 -0
- package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -0
- package/lib/types/client/antigravity-acp/api.d.ts +36 -0
- package/lib/types/client/antigravity-acp/api.d.ts.map +1 -0
- package/lib/types/client/antigravity-acp/locales.d.ts +521 -0
- package/lib/types/client/antigravity-acp/locales.d.ts.map +1 -0
- package/lib/types/client/antigravity-acp/route.d.ts +3 -0
- package/lib/types/client/antigravity-acp/route.d.ts.map +1 -0
- package/lib/types/client/antigravity-acp/styles.d.ts +15 -0
- package/lib/types/client/antigravity-acp/styles.d.ts.map +1 -0
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/hub/brand-icons.d.ts +1 -1
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
- package/lib/types/client/hub/providers.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/antigravity-acp.d.ts +10 -0
- package/lib/types/client/locales-ru/antigravity-acp.d.ts.map +1 -0
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +3 -1
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/entry-plan-mode-pipeline.d.ts +3 -3
- package/lib/types/entry-plan-mode-pipeline.d.ts.map +1 -1
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/acp-client.d.ts +136 -0
- package/lib/types/host/antigravity-acp/acp-client.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/adapter.d.ts +191 -0
- package/lib/types/host/antigravity-acp/adapter.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/auth-cache.d.ts +50 -0
- package/lib/types/host/antigravity-acp/auth-cache.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/binary.d.ts +122 -0
- package/lib/types/host/antigravity-acp/binary.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/catalog.d.ts +95 -0
- package/lib/types/host/antigravity-acp/catalog.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/doctor.d.ts +73 -0
- package/lib/types/host/antigravity-acp/doctor.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/errors.d.ts +59 -0
- package/lib/types/host/antigravity-acp/errors.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/history.d.ts +76 -0
- package/lib/types/host/antigravity-acp/history.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/login.d.ts +59 -0
- package/lib/types/host/antigravity-acp/login.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/mcp-bridge.d.ts +115 -0
- package/lib/types/host/antigravity-acp/mcp-bridge.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/routes.d.ts +81 -0
- package/lib/types/host/antigravity-acp/routes.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/settings.d.ts +70 -0
- package/lib/types/host/antigravity-acp/settings.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/subagent.d.ts +96 -0
- package/lib/types/host/antigravity-acp/subagent.d.ts.map +1 -0
- package/lib/types/host/antigravity-acp/types.d.ts +113 -0
- package/lib/types/host/antigravity-acp/types.d.ts.map +1 -0
- package/lib/types/host/common/i18n/en.d.ts.map +1 -1
- package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -1
- package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
- package/lib/types/host/common/i18n/zh.d.ts +3 -0
- package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
- package/lib/types/host/common/model-request-control.d.ts +1 -1
- package/lib/types/host/common/model-request-control.d.ts.map +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts +2 -2
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/protocol.d.ts.map +1 -1
- package/lib/types/host/progress-updates/prompt.d.ts +2 -2
- package/lib/types/host/progress-updates/prompt.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-quota.d.ts +10 -0
- package/lib/types/host/widget-board/line-quota.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-registry.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/antigravity-acp-contracts.d.ts +132 -0
- package/lib/types/shared/antigravity-acp-contracts.d.ts.map +1 -0
- package/package.json +1 -1
- package/presets/dispatch/README.md +27 -21
- package/presets/dispatch/agent.cordis.yml +64 -74
- package/presets/dispatch/preset.yml +1 -1
package/lib/client.js
CHANGED
|
@@ -563,6 +563,13 @@ window.__ModuleLoader__.load({
|
|
|
563
563
|
workbuddy: {
|
|
564
564
|
mark: "tencent",
|
|
565
565
|
tile: "#0055E9"
|
|
566
|
+
},
|
|
567
|
+
"antigravity-acp": {
|
|
568
|
+
image: {
|
|
569
|
+
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEzNiAxMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHN0eWxlPgogICAgLmZhdi1iZyB7IGZpbGw6ICNGRkZGRkY7IH0KICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmZhdi1iZyB7IGZpbGw6ICMwMDAwMDA7IH0KICAgIH0KICA8L3N0eWxlPgogIDxjaXJjbGUgY2xhc3M9ImZhdi1iZyIgY3g9IjY4IiBjeT0iNjgiIHI9IjY1IiBmaWxsPSIjRkZGRkZGIi8+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIgMTApIj4KICAgIDxwYXRoIGQ9Ik04OS42OTkyIDkzLjY5NUM5NC4zNjU5IDk3LjE5NSAxMDEuMzY2IDk0Ljg2MTcgOTQuOTQ5MiA4OC40NDVDNzUuNjk5MiA2OS43NzgzIDc5Ljc4MjUgMTguNDQ1IDU1Ljg2NTkgMTguNDQ1QzMxLjk0OTIgMTguNDQ1IDM2LjAzMjUgNjkuNzc4MyAxNi43ODI1IDg4LjQ0NUM5Ljc4MjUxIDk1LjQ0NSAxNy4zNjU4IDk3LjE5NSAyMi4wMzI1IDkzLjY5NUM0MC4xMTU5IDgxLjQ0NSAzOC45NDkyIDU5Ljg2MTcgNTUuODY1OSA1OS44NjE3QzcyLjc4MjUgNTkuODYxNyA3MS42MTU5IDgxLjQ0NSA4OS42OTkyIDkzLjY5NVoiIGZpbGw9IiMzMTg2RkYiLz4KICAgIDxtYXNrIGlkPSJhZ19mYXZfbSIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMTMiIHk9IjE4IiB3aWR0aD0iODUiIGhlaWdodD0iNzgiPgogICAgICA8cGF0aCBkPSJNODkuNjk5MiA5My42OTVDOTQuMzY1OSA5Ny4xOTUgMTAxLjM2NiA5NC44NjE3IDk0Ljk0OTIgODguNDQ1Qzc1LjY5OTIgNjkuNzc4MyA3OS43ODI1IDE4LjQ0NSA1NS44NjU5IDE4LjQ0NUMzMS45NDkyIDE4LjQ0NSAzNi4wMzI1IDY5Ljc3ODMgMTYuNzgyNSA4OC40NDVDOS43ODI1MSA5NS40NDUgMTcuMzY1OCA5Ny4xOTUgMjIuMDMyNSA5My42OTVDNDAuMTE1OSA4MS40NDUgMzguOTQ5MiA1OS44NjE3IDU1Ljg2NTkgNTkuODYxN0M3Mi43ODI1IDU5Ljg2MTcgNzEuNjE1OSA4MS40NDUgODkuNjk5MiA5My42OTVaIiBmaWxsPSJibGFjayIvPgogICAgPC9tYXNrPgogICAgPGcgbWFzaz0idXJsKCNhZ19mYXZfbSkiPgogICAgICA8ZyBmaWx0ZXI9InVybCgjYWdfZmF2X2YwKSI+PGVsbGlwc2UgY3g9IjIyLjc4NzMiIGN5PSIyNi44MDk4IiByeD0iMjIuNzg3MyIgcnk9IjI2LjgwOTgiIHRyYW5zZm9ybT0ibWF0cml4KC0wLjExMjc4NCAwLjk5MzYyIC0wLjk5MzYyIC0wLjExMjc4MSA2Ni4yNDczIC0xNS41MzQ0KSIgZmlsbD0iI0ZGRTQzMiIvPjwvZz4KICAgICAgPGcgZmlsdGVyPSJ1cmwoI2FnX2Zhdl9mMSkiPjxlbGxpcHNlIGN4PSI5Ni40OTEiIGN5PSIzNS4xMjMxIiByeD0iMjkuNTAwNyIgcnk9IjMwLjE0OTIiIHRyYW5zZm9ybT0icm90YXRlKDc2LjkyNDMgOTYuNDkxIDM1LjEyMzEpIiBmaWxsPSIjRkM0MTNEIi8+PC9nPgogICAgICA8ZyBmaWx0ZXI9InVybCgjYWdfZmF2X2YyKSI+PGVsbGlwc2UgY3g9IjkuMDI5ODgiIGN5PSI0MS42NjQ3IiByeD0iMzAuODMyIiByeT0iMzkuOTQxNyIgdHJhbnNmb3JtPSJyb3RhdGUoNzQuMTI1NyA5LjAyOTg4IDQxLjY2NDcpIiBmaWxsPSIjMDBCOTVDIi8+PC9nPgogICAgICA8ZyBmaWx0ZXI9InVybCgjYWdfZmF2X2YzKSI+PGVsbGlwc2UgY3g9IjExLjIyMTIiIGN5PSI0Mi44OTE1IiByeD0iMzAuMjIiIHJ5PSIzMy4yNjk1IiB0cmFuc2Zvcm09InJvdGF0ZSg0NS42MDY1IDExLjIyMTIgNDIuODkxNSkiIGZpbGw9IiMwMEI5NUMiLz48L2c+CiAgICAgIDxnIGZpbHRlcj0idXJsKCNhZ19mYXZfZjQpIj48ZWxsaXBzZSBjeD0iNzUuNzU0NiIgY3k9IjEwNC44MjIiIHJ4PSIyOS4wMTc3IiByeT0iMjcuOTQzIiB0cmFuc2Zvcm09InJvdGF0ZSg3Ni45MjQzIDc1Ljc1NDYgMTA0LjgyMikiIGZpbGw9IiMzMTg2RkYiLz48L2c+CiAgICAgIDxnIGZpbHRlcj0idXJsKCNhZ19mYXZfZjUpIj48ZWxsaXBzZSBjeD0iMzMuNTY2MSIgY3k9IjM1LjQwNDMiIHJ4PSIzMy41NjYxIiByeT0iMzUuNDA0MyIgdHJhbnNmb3JtPSJtYXRyaXgoLTAuNDA5NTM5IDAuOTEyMjkzIC0wLjkxMjI5NCAtMC40MDk1MzcgMTAxLjI1IC0xNS4xNjc0KSIgZmlsbD0iI0ZCQkMwNCIvPjwvZz4KICAgICAgPGcgZmlsdGVyPSJ1cmwoI2FnX2Zhdl9mNikiPjxwYXRoIGQ9Ik0yLjU2ODAyIDE0OS42OTVDLTE1LjgxMTYgMTQyLjQ4IDE1LjU5ODcgODMuMTE2MyAyMy40MDkzIDYzLjIyMDNDMzEuMjIgNDMuMzI0NCA1Mi40NTE0IDMzLjA0NDcgNzAuODMxIDQwLjI2Qzg5LjIxMDcgNDcuNDc1MyAxMTAuOTk2IDg3LjIxNjIgMTAzLjE4NSAxMDcuMTEyQzk1LjM3NDIgMTI3LjAwOCAyMC45NDc3IDE1Ni45MSAyLjU2ODAyIDE0OS42OTVaIiBmaWxsPSIjMzE4NkZGIi8+PC9nPgogICAgICA8ZyBmaWx0ZXI9InVybCgjYWdfZmF2X2Y3KSI+PHBhdGggZD0iTTExMy45MzQgNzUuODA3OUMxMDkuMDEzIDgxLjU1MDkgOTYuMTcyNCA3OC42MjI0IDg1LjI1MyA2OS4yNjY3Qzc0LjMzMzUgNTkuOTExIDY5LjQ3MDQgNDcuNjcxMSA3NC4zOTEgNDEuOTI4Qzc5LjMxMTYgMzYuMTg1IDkyLjE1MjUgMzkuMTEzNiAxMDMuMDcyIDQ4LjQ2OTJDMTEzLjk5MSA1Ny44MjQ5IDExOC44NTUgNzAuMDY0OCAxMTMuOTM0IDc1LjgwNzlaIiBmaWxsPSIjNzQ5QkZGIi8+PC9nPgogICAgICA8ZyBmaWx0ZXI9InVybCgjYWdfZmF2X2Y4KSI+PGVsbGlwc2UgY3g9IjkyLjYxMSIgY3k9IjIzLjc5NjIiIHJ4PSI0NC4yNDExIiByeT0iMjcuNTAxNiIgdHJhbnNmb3JtPSJyb3RhdGUoMzQuMDc2MyA5Mi42MTEgMjMuNzk2MikiIGZpbGw9IiNGQzQxM0QiLz48L2c+CiAgICAgIDxnIGZpbHRlcj0idXJsKCNhZ19mYXZfZjkpIj48ZWxsaXBzZSBjeD0iMjMuNDk0OSIgY3k9IjI5LjU4ODciIHJ4PSIyMy43MDcxIiByeT0iMTMuNzg2OSIgdHJhbnNmb3JtPSJyb3RhdGUoMTEyLjUxNiAyMy40OTQ5IDI5LjU4ODcpIiBmaWxsPSIjRkZFRTQ4Ii8+PC9nPgogICAgPC9nPgogIDwvZz4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImFnX2Zhdl9mMCIgeD0iMi40OTM0OCIgeT0iLTI2LjU0MjMiIHdpZHRoPSI2OS4wODk5IiBoZWlnaHQ9IjYxLjI1MjUiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzLjg5MDM0Ii8+PC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJhZ19mYXZfZjEiIHg9IjI4Ljc1MjQiIHk9Ii0zMi4wMzMzIiB3aWR0aD0iMTM1LjQ3NyIgaGVpZ2h0PSIxMzQuMzEzIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTguODA3OCIvPjwvZmlsdGVyPgogICAgPGZpbHRlciBpZD0iYWdfZmF2X2YyIiB4PSItNjIuMjg4NCIgeT0iLTIxLjkyNTMiIHdpZHRoPSIxNDIuNjM3IiBoZWlnaHQ9IjEyNy4xOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjE1Ljk4ODQiLz48L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImFnX2Zhdl9mMyIgeD0iLTUyLjU2OTciIHk9Ii0yMC44MzQ2IiB3aWR0aD0iMTI3LjU4MiIgaGVpZ2h0PSIxMjcuNDUyIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUuOTg4NCIvPjwvZmlsdGVyPgogICAgPGZpbHRlciBpZD0iYWdfZmF2X2Y0IiB4PSIxNy4zNjE5IiB5PSI0NS40NjQ2IiB3aWR0aD0iMTE2Ljc4NiIgaGVpZ2h0PSIxMTguNzE1IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUuMTkzNyIvPjwvZmlsdGVyPgogICAgPGZpbHRlciBpZD0iYWdfZmF2X2Y1IiB4PSItNy40NDc2NSIgeT0iLTYwLjQ3MzciIHdpZHRoPSIxMjUuMzAzIiBoZWlnaHQ9IjEyMi44NTgiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMy43Njk4Ii8+PC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJhZ19mYXZfZjYiIHg9Ii0yNy43MDg2IiB5PSIxMy4zNTk3IiB3aWR0aD0iMTU3LjExOSIgaGVpZ2h0PSIxNjIuMDI5IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTIuMjk3Ii8+PC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJhZ19mYXZfZjciIHg9IjUwLjQ2MzgiIHk9IjE2Ljk4MSIgd2lkdGg9Ijg3LjM5NzMiIGhlaWdodD0iODMuNzczOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjExLjAwMzYiLz48L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImFnX2Zhdl9mOCIgeD0iMzQuMjYwNCIgeT0iLTI4LjQ1NyIgd2lkdGg9IjExNi43MDEiIGhlaWdodD0iMTA0LjUwNiIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjkuMjkzODUiLz48L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImFnX2Zhdl9mOSIgeD0iLTE1LjE1MjIiIHk9Ii0xNS45NDkzIiB3aWR0aD0iNzcuMjk0MSIgaGVpZ2h0PSI5MS4wNzYiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMS41MDI3Ii8+PC9maWx0ZXI+CiAgPC9kZWZzPgo8L3N2Zz4K",
|
|
570
|
+
fit: "cover"
|
|
571
|
+
},
|
|
572
|
+
tile: "#FFFFFF"
|
|
566
573
|
}
|
|
567
574
|
};
|
|
568
575
|
/** One brand mark at a given box size; the artwork is decorative. */
|
|
@@ -952,10 +959,10 @@ window.__ModuleLoader__.load({
|
|
|
952
959
|
//#region src/client/api.ts
|
|
953
960
|
var SubscriptionApi = class {
|
|
954
961
|
status() {
|
|
955
|
-
return request$
|
|
962
|
+
return request$3(`${ROUTE_PREFIX}/status`);
|
|
956
963
|
}
|
|
957
964
|
startLogin() {
|
|
958
|
-
return post$
|
|
965
|
+
return post$6(`${ROUTE_PREFIX}/login/start`, {});
|
|
959
966
|
}
|
|
960
967
|
/**
|
|
961
968
|
* Start a device-code sign-in instead of the browser callback.
|
|
@@ -965,14 +972,14 @@ window.__ModuleLoader__.load({
|
|
|
965
972
|
* wait for confirmation arrives on the same event stream as any other login.
|
|
966
973
|
*/
|
|
967
974
|
startDeviceLogin() {
|
|
968
|
-
return post$
|
|
975
|
+
return post$6(`${ROUTE_PREFIX}/login/device/start`, {});
|
|
969
976
|
}
|
|
970
977
|
cancelLogin(loginId) {
|
|
971
|
-
return post$
|
|
978
|
+
return post$6(`${ROUTE_PREFIX}/login/cancel`, { loginId });
|
|
972
979
|
}
|
|
973
980
|
/** Sign out one pooled account; without an id, the active one. */
|
|
974
981
|
logout(accountId) {
|
|
975
|
-
return post$
|
|
982
|
+
return post$6(`${ROUTE_PREFIX}/logout`, accountId === void 0 ? {} : { accountId });
|
|
976
983
|
}
|
|
977
984
|
/**
|
|
978
985
|
* One account-pool action, returning the refreshed status.
|
|
@@ -981,7 +988,7 @@ window.__ModuleLoader__.load({
|
|
|
981
988
|
* never has to guess what the pool looks like after a change.
|
|
982
989
|
*/
|
|
983
990
|
accountAction(action, body = {}) {
|
|
984
|
-
return post$
|
|
991
|
+
return post$6(`${ROUTE_PREFIX}/accounts`, {
|
|
985
992
|
action,
|
|
986
993
|
...body
|
|
987
994
|
});
|
|
@@ -996,11 +1003,11 @@ window.__ModuleLoader__.load({
|
|
|
996
1003
|
* call the host always answers with a 400.
|
|
997
1004
|
*/
|
|
998
1005
|
adoptLocalLogin(source) {
|
|
999
|
-
return post$
|
|
1006
|
+
return post$6(`${ROUTE_PREFIX}/adopt`, { source });
|
|
1000
1007
|
}
|
|
1001
1008
|
/** Forget every imported snapshot. The CLIs' own files are never touched. */
|
|
1002
1009
|
disableAdoptedLocalLogins() {
|
|
1003
|
-
return post$
|
|
1010
|
+
return post$6(`${ROUTE_PREFIX}/adopt/disable`, {});
|
|
1004
1011
|
}
|
|
1005
1012
|
/**
|
|
1006
1013
|
* Choose the account-pool store, answering with the refreshed status.
|
|
@@ -1009,39 +1016,39 @@ window.__ModuleLoader__.load({
|
|
|
1009
1016
|
* back already names the store the pools will read and write from here on.
|
|
1010
1017
|
*/
|
|
1011
1018
|
setPoolStorage(mode) {
|
|
1012
|
-
return post$
|
|
1019
|
+
return post$6(`${ROUTE_PREFIX}/storage`, { mode });
|
|
1013
1020
|
}
|
|
1014
1021
|
refresh() {
|
|
1015
|
-
return post$
|
|
1022
|
+
return post$6(`${ROUTE_PREFIX}/token/refresh`, {});
|
|
1016
1023
|
}
|
|
1017
1024
|
refreshQuota() {
|
|
1018
|
-
return post$
|
|
1025
|
+
return post$6(`${ROUTE_PREFIX}/quota/refresh`, {});
|
|
1019
1026
|
}
|
|
1020
1027
|
useResetCredit() {
|
|
1021
|
-
return post$
|
|
1028
|
+
return post$6(`${ROUTE_PREFIX}/quota/reset-credit/use`, {});
|
|
1022
1029
|
}
|
|
1023
1030
|
testConnection() {
|
|
1024
|
-
return post$
|
|
1031
|
+
return post$6(`${ROUTE_PREFIX}/connection/test`, {});
|
|
1025
1032
|
}
|
|
1026
1033
|
updatePreferences(patch) {
|
|
1027
|
-
return post$
|
|
1034
|
+
return post$6(`${ROUTE_PREFIX}/preferences/update`, patch);
|
|
1028
1035
|
}
|
|
1029
1036
|
/** Every route a compaction summary may be pointed at, read per call. */
|
|
1030
1037
|
compactionCandidates() {
|
|
1031
|
-
return post$
|
|
1038
|
+
return post$6(`${ROUTE_PREFIX}/compaction/candidates`, {});
|
|
1032
1039
|
}
|
|
1033
1040
|
events(loginId) {
|
|
1034
1041
|
return new EventSource(`${ROUTE_PREFIX}/login/events?loginId=${encodeURIComponent(loginId)}`);
|
|
1035
1042
|
}
|
|
1036
1043
|
};
|
|
1037
|
-
async function post$
|
|
1038
|
-
return request$
|
|
1044
|
+
async function post$6(url, body) {
|
|
1045
|
+
return request$3(url, {
|
|
1039
1046
|
method: "POST",
|
|
1040
1047
|
headers: { "content-type": "application/json" },
|
|
1041
1048
|
body: JSON.stringify(body)
|
|
1042
1049
|
});
|
|
1043
1050
|
}
|
|
1044
|
-
async function request$
|
|
1051
|
+
async function request$3(url, init) {
|
|
1045
1052
|
const response = await fetch(url, {
|
|
1046
1053
|
...init,
|
|
1047
1054
|
credentials: "same-origin"
|
|
@@ -3269,7 +3276,7 @@ window.__ModuleLoader__.load({
|
|
|
3269
3276
|
//#endregion
|
|
3270
3277
|
//#region src/client/command-code/locales.ts
|
|
3271
3278
|
const NS_COMMAND_CODE = "dsh-command-code";
|
|
3272
|
-
const zh$
|
|
3279
|
+
const zh$15 = {
|
|
3273
3280
|
...accountPoolZh,
|
|
3274
3281
|
title: "Command Code",
|
|
3275
3282
|
pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
|
|
@@ -3337,7 +3344,7 @@ window.__ModuleLoader__.load({
|
|
|
3337
3344
|
loginFailed: "登录失败",
|
|
3338
3345
|
tokens: "tokens"
|
|
3339
3346
|
};
|
|
3340
|
-
const en$
|
|
3347
|
+
const en$15 = {
|
|
3341
3348
|
...accountPoolEn,
|
|
3342
3349
|
title: "Command Code",
|
|
3343
3350
|
pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
|
|
@@ -3405,11 +3412,11 @@ window.__ModuleLoader__.load({
|
|
|
3405
3412
|
loginFailed: "Sign-in failed",
|
|
3406
3413
|
tokens: "tokens"
|
|
3407
3414
|
};
|
|
3408
|
-
const dictionaries$
|
|
3409
|
-
zh: zh$
|
|
3410
|
-
"zh-CN": zh$
|
|
3411
|
-
en: en$
|
|
3412
|
-
"en-US": en$
|
|
3415
|
+
const dictionaries$15 = {
|
|
3416
|
+
zh: zh$15,
|
|
3417
|
+
"zh-CN": zh$15,
|
|
3418
|
+
en: en$15,
|
|
3419
|
+
"en-US": en$15
|
|
3413
3420
|
};
|
|
3414
3421
|
//#endregion
|
|
3415
3422
|
//#region src/client/command-code/CommandCodeSection.tsx
|
|
@@ -3450,7 +3457,7 @@ window.__ModuleLoader__.load({
|
|
|
3450
3457
|
const [apiKey, setApiKey] = (0, react.useState)("");
|
|
3451
3458
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
3452
3459
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
3453
|
-
const t = useLineDict(NS_COMMAND_CODE, zh$
|
|
3460
|
+
const t = useLineDict(NS_COMMAND_CODE, zh$15);
|
|
3454
3461
|
const notifyChange = (0, react.useCallback)(() => {
|
|
3455
3462
|
onModelChange?.();
|
|
3456
3463
|
loadModelDirectory?.();
|
|
@@ -4211,7 +4218,7 @@ window.__ModuleLoader__.load({
|
|
|
4211
4218
|
//#endregion
|
|
4212
4219
|
//#region src/client/kimi-code/locales.ts
|
|
4213
4220
|
const NS_KIMI_CODE = "dsh-kimi-code";
|
|
4214
|
-
const zh$
|
|
4221
|
+
const zh$14 = {
|
|
4215
4222
|
...accountPoolZh,
|
|
4216
4223
|
title: "Kimi Code",
|
|
4217
4224
|
pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -4398,7 +4405,7 @@ window.__ModuleLoader__.load({
|
|
|
4398
4405
|
compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
|
|
4399
4406
|
compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
|
|
4400
4407
|
};
|
|
4401
|
-
const en$
|
|
4408
|
+
const en$14 = {
|
|
4402
4409
|
...accountPoolEn,
|
|
4403
4410
|
title: "Kimi Code",
|
|
4404
4411
|
pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
|
|
@@ -4585,11 +4592,11 @@ window.__ModuleLoader__.load({
|
|
|
4585
4592
|
compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
|
|
4586
4593
|
compactionRouteEmpty: "No route is available — sign in to one first."
|
|
4587
4594
|
};
|
|
4588
|
-
const dictionaries$
|
|
4589
|
-
zh: zh$
|
|
4590
|
-
"zh-CN": zh$
|
|
4591
|
-
en: en$
|
|
4592
|
-
"en-US": en$
|
|
4595
|
+
const dictionaries$14 = {
|
|
4596
|
+
zh: zh$14,
|
|
4597
|
+
"zh-CN": zh$14,
|
|
4598
|
+
en: en$14,
|
|
4599
|
+
"en-US": en$14
|
|
4593
4600
|
};
|
|
4594
4601
|
//#endregion
|
|
4595
4602
|
//#region src/shared/kimi-code-contracts.ts
|
|
@@ -4701,7 +4708,7 @@ window.__ModuleLoader__.load({
|
|
|
4701
4708
|
return `${value}x`;
|
|
4702
4709
|
}
|
|
4703
4710
|
function KimiModelCapabilities({ models }) {
|
|
4704
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
4711
|
+
const t = useLineDict(NS_KIMI_CODE, zh$14);
|
|
4705
4712
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4706
4713
|
className: "dsha-cap-table",
|
|
4707
4714
|
children: [
|
|
@@ -5230,7 +5237,7 @@ window.__ModuleLoader__.load({
|
|
|
5230
5237
|
statusGeneration.current += 1;
|
|
5231
5238
|
setStatus(next);
|
|
5232
5239
|
}, []);
|
|
5233
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5240
|
+
const t = useLineDict(NS_KIMI_CODE, zh$14);
|
|
5234
5241
|
const notifyChange = (0, react.useCallback)(() => {
|
|
5235
5242
|
onModelChange?.();
|
|
5236
5243
|
loadModelDirectory?.();
|
|
@@ -6011,7 +6018,7 @@ window.__ModuleLoader__.load({
|
|
|
6011
6018
|
const api$12 = createLineApi(MINIMAX_CODE_ROUTE_PREFIX, "MiniMax Code");
|
|
6012
6019
|
api$12.request;
|
|
6013
6020
|
const get$3 = api$12.get;
|
|
6014
|
-
const post$
|
|
6021
|
+
const post$5 = api$12.post;
|
|
6015
6022
|
function messageOf$3(cause) {
|
|
6016
6023
|
return cause instanceof Error ? cause.message : String(cause);
|
|
6017
6024
|
}
|
|
@@ -6033,12 +6040,12 @@ window.__ModuleLoader__.load({
|
|
|
6033
6040
|
* looks the card up and sends the key it found.
|
|
6034
6041
|
*/
|
|
6035
6042
|
function useResetCard(cardId) {
|
|
6036
|
-
return post$
|
|
6043
|
+
return post$5("/reset-cards/use", { cardId });
|
|
6037
6044
|
}
|
|
6038
6045
|
//#endregion
|
|
6039
6046
|
//#region src/client/minimax-code/locales.ts
|
|
6040
6047
|
const NS_MINIMAX_CODE = "dsh-minimax-code";
|
|
6041
|
-
const zh$
|
|
6048
|
+
const zh$13 = {
|
|
6042
6049
|
...accountPoolZh,
|
|
6043
6050
|
title: "MiniMax Code",
|
|
6044
6051
|
pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
|
|
@@ -6236,7 +6243,7 @@ window.__ModuleLoader__.load({
|
|
|
6236
6243
|
videoHistoryEncrypted: "已由系统凭据后端加密",
|
|
6237
6244
|
videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
|
|
6238
6245
|
};
|
|
6239
|
-
const en$
|
|
6246
|
+
const en$13 = {
|
|
6240
6247
|
...accountPoolEn,
|
|
6241
6248
|
title: "MiniMax Code",
|
|
6242
6249
|
pageDesc: "Sign in to the MiniMax Code coding subscription (device-code OAuth) and reuse the local MiniMax Code sign-in to manage the account, connection, and models.",
|
|
@@ -6434,11 +6441,11 @@ window.__ModuleLoader__.load({
|
|
|
6434
6441
|
videoHistoryEncrypted: "Encrypted by the platform credential backend",
|
|
6435
6442
|
videoHistoryPlain: "No credential backend on this host; stored as plain text"
|
|
6436
6443
|
};
|
|
6437
|
-
const dictionaries$
|
|
6438
|
-
zh: zh$
|
|
6439
|
-
"zh-CN": zh$
|
|
6440
|
-
en: en$
|
|
6441
|
-
"en-US": en$
|
|
6444
|
+
const dictionaries$13 = {
|
|
6445
|
+
zh: zh$13,
|
|
6446
|
+
"zh-CN": zh$13,
|
|
6447
|
+
en: en$13,
|
|
6448
|
+
"en-US": en$13
|
|
6442
6449
|
};
|
|
6443
6450
|
//#endregion
|
|
6444
6451
|
//#region src/client/minimax-code/useMinimaxCodeSection.ts
|
|
@@ -6452,7 +6459,7 @@ window.__ModuleLoader__.load({
|
|
|
6452
6459
|
* rather than inferred from the JSX.
|
|
6453
6460
|
*/
|
|
6454
6461
|
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
6455
|
-
const fallbackTranslate$7 = (key) => zh$
|
|
6462
|
+
const fallbackTranslate$7 = (key) => zh$13[key];
|
|
6456
6463
|
/**
|
|
6457
6464
|
* The shared pool card's labels, resolved through this card's dictionary.
|
|
6458
6465
|
*
|
|
@@ -6602,7 +6609,7 @@ window.__ModuleLoader__.load({
|
|
|
6602
6609
|
const timer = window.setInterval(() => {
|
|
6603
6610
|
(async () => {
|
|
6604
6611
|
try {
|
|
6605
|
-
const poll = await post$
|
|
6612
|
+
const poll = await post$5("/login/poll", { loginId });
|
|
6606
6613
|
if (stopped || poll.status === "pending") return;
|
|
6607
6614
|
stopped = true;
|
|
6608
6615
|
window.clearInterval(timer);
|
|
@@ -6643,7 +6650,7 @@ window.__ModuleLoader__.load({
|
|
|
6643
6650
|
quotaRequested.current = true;
|
|
6644
6651
|
(async () => {
|
|
6645
6652
|
try {
|
|
6646
|
-
setStatus(await post$
|
|
6653
|
+
setStatus(await post$5("/quota"));
|
|
6647
6654
|
} catch {}
|
|
6648
6655
|
})();
|
|
6649
6656
|
}, [authenticated, status?.quota]);
|
|
@@ -6711,7 +6718,7 @@ window.__ModuleLoader__.load({
|
|
|
6711
6718
|
setError(null);
|
|
6712
6719
|
setConnectionNotice(null);
|
|
6713
6720
|
setCopied(false);
|
|
6714
|
-
const started = await post$
|
|
6721
|
+
const started = await post$5("/login/start");
|
|
6715
6722
|
const next = started.login ?? (typeof started.loginId === "string" ? started : void 0);
|
|
6716
6723
|
if (next === void 0) {
|
|
6717
6724
|
setError(t("loginFailed"));
|
|
@@ -6729,7 +6736,7 @@ window.__ModuleLoader__.load({
|
|
|
6729
6736
|
setFlow(null);
|
|
6730
6737
|
if (pending === null) return;
|
|
6731
6738
|
try {
|
|
6732
|
-
await post$
|
|
6739
|
+
await post$5("/login/cancel", { loginId: pending.loginId });
|
|
6733
6740
|
} catch (cause) {
|
|
6734
6741
|
setError(messageOf$3(cause));
|
|
6735
6742
|
}
|
|
@@ -6749,7 +6756,7 @@ window.__ModuleLoader__.load({
|
|
|
6749
6756
|
setError(null);
|
|
6750
6757
|
setConnectionNotice(null);
|
|
6751
6758
|
setFlow(null);
|
|
6752
|
-
const result = await post$
|
|
6759
|
+
const result = await post$5("/logout");
|
|
6753
6760
|
if (result.native === true) setConnectionNotice(result.error ?? t("logoutOwnedByApp"));
|
|
6754
6761
|
await loadStatus(true);
|
|
6755
6762
|
onModelChange?.();
|
|
@@ -6780,7 +6787,7 @@ window.__ModuleLoader__.load({
|
|
|
6780
6787
|
try {
|
|
6781
6788
|
setBusy(action);
|
|
6782
6789
|
setError(null);
|
|
6783
|
-
await post$
|
|
6790
|
+
await post$5("/accounts", {
|
|
6784
6791
|
action,
|
|
6785
6792
|
accountId
|
|
6786
6793
|
});
|
|
@@ -6797,7 +6804,7 @@ window.__ModuleLoader__.load({
|
|
|
6797
6804
|
try {
|
|
6798
6805
|
setBusy("strategy");
|
|
6799
6806
|
setError(null);
|
|
6800
|
-
await post$
|
|
6807
|
+
await post$5("/accounts", {
|
|
6801
6808
|
action: "strategy",
|
|
6802
6809
|
strategy
|
|
6803
6810
|
});
|
|
@@ -6811,7 +6818,7 @@ window.__ModuleLoader__.load({
|
|
|
6811
6818
|
const applyEnabled = async (enabledModelIds) => {
|
|
6812
6819
|
try {
|
|
6813
6820
|
setError(null);
|
|
6814
|
-
const updated = await post$
|
|
6821
|
+
const updated = await post$5("/models", { enabledModelIds });
|
|
6815
6822
|
setStatus(updated);
|
|
6816
6823
|
setContextDrafts(contextDraftsFor(updated));
|
|
6817
6824
|
onModelChange?.();
|
|
@@ -6824,7 +6831,7 @@ window.__ModuleLoader__.load({
|
|
|
6824
6831
|
try {
|
|
6825
6832
|
setBusy("checkin");
|
|
6826
6833
|
setError(null);
|
|
6827
|
-
const updated = await post$
|
|
6834
|
+
const updated = await post$5("/settings", { checkin: { enabled } });
|
|
6828
6835
|
setStatus(updated);
|
|
6829
6836
|
} catch (cause) {
|
|
6830
6837
|
setError(messageOf$3(cause));
|
|
@@ -6837,7 +6844,7 @@ window.__ModuleLoader__.load({
|
|
|
6837
6844
|
try {
|
|
6838
6845
|
setBusy("checkin");
|
|
6839
6846
|
setError(null);
|
|
6840
|
-
const updated = await post$
|
|
6847
|
+
const updated = await post$5("/checkin/now");
|
|
6841
6848
|
setStatus(updated);
|
|
6842
6849
|
} catch (cause) {
|
|
6843
6850
|
setError(messageOf$3(cause));
|
|
@@ -6858,7 +6865,7 @@ window.__ModuleLoader__.load({
|
|
|
6858
6865
|
const updateEffort = async (effort) => {
|
|
6859
6866
|
try {
|
|
6860
6867
|
setError(null);
|
|
6861
|
-
const updated = await post$
|
|
6868
|
+
const updated = await post$5("/settings", { defaultReasoningEffort: effort });
|
|
6862
6869
|
setStatus(updated);
|
|
6863
6870
|
onModelChange?.();
|
|
6864
6871
|
} catch (cause) {
|
|
@@ -6875,7 +6882,7 @@ window.__ModuleLoader__.load({
|
|
|
6875
6882
|
try {
|
|
6876
6883
|
setSavingModel(modelId);
|
|
6877
6884
|
setError(null);
|
|
6878
|
-
const updated = await post$
|
|
6885
|
+
const updated = await post$5("/settings", { contextWindowOverrides: { [modelId]: parsed } });
|
|
6879
6886
|
setStatus(updated);
|
|
6880
6887
|
setContextDrafts((prev) => ({
|
|
6881
6888
|
...prev,
|
|
@@ -6892,7 +6899,7 @@ window.__ModuleLoader__.load({
|
|
|
6892
6899
|
try {
|
|
6893
6900
|
setSavingModel(modelId);
|
|
6894
6901
|
setError(null);
|
|
6895
|
-
const updated = await post$
|
|
6902
|
+
const updated = await post$5("/settings", { contextWindowOverrides: { [modelId]: null } });
|
|
6896
6903
|
setStatus(updated);
|
|
6897
6904
|
const model = updated.models.find((entry) => entry.id === modelId);
|
|
6898
6905
|
if (model !== void 0) setContextDrafts((prev) => ({
|
|
@@ -6911,7 +6918,7 @@ window.__ModuleLoader__.load({
|
|
|
6911
6918
|
if (ids.length === 0) return;
|
|
6912
6919
|
try {
|
|
6913
6920
|
setError(null);
|
|
6914
|
-
const updated = await post$
|
|
6921
|
+
const updated = await post$5("/settings", { contextWindowOverrides: Object.fromEntries(ids.map((id) => [id, null])) });
|
|
6915
6922
|
setStatus(updated);
|
|
6916
6923
|
setContextDrafts(contextDraftsFor(updated));
|
|
6917
6924
|
onModelChange?.();
|
|
@@ -6924,7 +6931,7 @@ window.__ModuleLoader__.load({
|
|
|
6924
6931
|
try {
|
|
6925
6932
|
setBusy("quota");
|
|
6926
6933
|
setError(null);
|
|
6927
|
-
setStatus(await post$
|
|
6934
|
+
setStatus(await post$5("/quota"));
|
|
6928
6935
|
} catch (cause) {
|
|
6929
6936
|
setError(messageOf$3(cause));
|
|
6930
6937
|
} finally {
|
|
@@ -6936,7 +6943,7 @@ window.__ModuleLoader__.load({
|
|
|
6936
6943
|
setBusy("test");
|
|
6937
6944
|
setError(null);
|
|
6938
6945
|
setConnectionNotice(null);
|
|
6939
|
-
const result = await post$
|
|
6946
|
+
const result = await post$5("/test");
|
|
6940
6947
|
if (result.ok === true) {
|
|
6941
6948
|
setConnectionNotice(result.model === void 0 || result.model === "" ? t("testSuccess") : t("testSuccessModel").replace("{model}", result.model));
|
|
6942
6949
|
return;
|
|
@@ -8510,7 +8517,7 @@ window.__ModuleLoader__.load({
|
|
|
8510
8517
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
8511
8518
|
*/
|
|
8512
8519
|
const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
|
|
8513
|
-
const zh$
|
|
8520
|
+
const zh$12 = {
|
|
8514
8521
|
...accountPoolZh,
|
|
8515
8522
|
title: "GLM(ZCode 账号)",
|
|
8516
8523
|
pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
|
|
@@ -8604,7 +8611,7 @@ window.__ModuleLoader__.load({
|
|
|
8604
8611
|
quotaAllowanceUnknown: "未判定",
|
|
8605
8612
|
quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
|
|
8606
8613
|
};
|
|
8607
|
-
const en$
|
|
8614
|
+
const en$12 = {
|
|
8608
8615
|
...accountPoolEn,
|
|
8609
8616
|
title: "GLM (ZCode account)",
|
|
8610
8617
|
pageDesc: "Sign in with a ZCode account to reach GLM Coding Plan (China bigmodel.cn / International z.ai), and manage the account pool, plan quota and model selection. The two regions hold independent credentials, so a pool can carry accounts from both.",
|
|
@@ -8698,11 +8705,11 @@ window.__ModuleLoader__.load({
|
|
|
8698
8705
|
quotaAllowanceUnknown: "Undetermined",
|
|
8699
8706
|
quotaAllowanceHint: "The allowance source established by the sign-in probe. “Free trial allowance” means 8M tokens per day for 5 days from first use, granted automatically to new accounts."
|
|
8700
8707
|
};
|
|
8701
|
-
const dictionaries$
|
|
8702
|
-
zh: zh$
|
|
8703
|
-
"zh-CN": zh$
|
|
8704
|
-
en: en$
|
|
8705
|
-
"en-US": en$
|
|
8708
|
+
const dictionaries$12 = {
|
|
8709
|
+
zh: zh$12,
|
|
8710
|
+
"zh-CN": zh$12,
|
|
8711
|
+
en: en$12,
|
|
8712
|
+
"en-US": en$12
|
|
8706
8713
|
};
|
|
8707
8714
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
8708
8715
|
const QUOTA_WINDOW_MINUTES$1 = {
|
|
@@ -8763,7 +8770,7 @@ window.__ModuleLoader__.load({
|
|
|
8763
8770
|
*/
|
|
8764
8771
|
const api$11 = createLineApi(GLM_CODING_PLAN_ROUTE_PREFIX, GLM_CODING_PLAN_PROVIDER_NAME);
|
|
8765
8772
|
const get$2 = api$11.get;
|
|
8766
|
-
const post$
|
|
8773
|
+
const post$4 = api$11.post;
|
|
8767
8774
|
function messageOf$2(cause) {
|
|
8768
8775
|
return cause instanceof Error ? cause.message : String(cause);
|
|
8769
8776
|
}
|
|
@@ -8783,7 +8790,7 @@ window.__ModuleLoader__.load({
|
|
|
8783
8790
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
8784
8791
|
const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
|
|
8785
8792
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
8786
|
-
const fallbackTranslate$6 = (key) => zh$
|
|
8793
|
+
const fallbackTranslate$6 = (key) => zh$12[key];
|
|
8787
8794
|
/**
|
|
8788
8795
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
8789
8796
|
*
|
|
@@ -8931,7 +8938,7 @@ window.__ModuleLoader__.load({
|
|
|
8931
8938
|
setError(null);
|
|
8932
8939
|
setConnection(null);
|
|
8933
8940
|
setPasteValue("");
|
|
8934
|
-
const flow = await post$
|
|
8941
|
+
const flow = await post$4("/login/start", { region: loginRegion });
|
|
8935
8942
|
await loadStatus(true);
|
|
8936
8943
|
if (flow.authorizeUrl !== void 0 && flow.authorizeUrl !== "") try {
|
|
8937
8944
|
window.open(flow.authorizeUrl, "_blank", "noopener,noreferrer");
|
|
@@ -8946,7 +8953,7 @@ window.__ModuleLoader__.load({
|
|
|
8946
8953
|
try {
|
|
8947
8954
|
setBusy("login:cancel");
|
|
8948
8955
|
setError(null);
|
|
8949
|
-
await post$
|
|
8956
|
+
await post$4("/login/cancel", { region });
|
|
8950
8957
|
await loadStatus(true);
|
|
8951
8958
|
} catch (cause) {
|
|
8952
8959
|
setError(messageOf$2(cause));
|
|
@@ -8962,7 +8969,7 @@ window.__ModuleLoader__.load({
|
|
|
8962
8969
|
try {
|
|
8963
8970
|
setBusy("login-manual");
|
|
8964
8971
|
setError(null);
|
|
8965
|
-
setStatus(await post$
|
|
8972
|
+
setStatus(await post$4("/login/manual", {
|
|
8966
8973
|
region,
|
|
8967
8974
|
code: pasteValue.trim()
|
|
8968
8975
|
}));
|
|
@@ -8978,7 +8985,7 @@ window.__ModuleLoader__.load({
|
|
|
8978
8985
|
try {
|
|
8979
8986
|
setBusy("adopt");
|
|
8980
8987
|
setError(null);
|
|
8981
|
-
const result = await post$
|
|
8988
|
+
const result = await post$4("/adopt", { region });
|
|
8982
8989
|
setAdoptResult(result);
|
|
8983
8990
|
await loadStatus(true);
|
|
8984
8991
|
if (result.adopted) onModelChange?.();
|
|
@@ -8992,7 +8999,7 @@ window.__ModuleLoader__.load({
|
|
|
8992
8999
|
try {
|
|
8993
9000
|
setBusy(`account:${action}:${accountId}`);
|
|
8994
9001
|
setError(null);
|
|
8995
|
-
setStatus(await post$
|
|
9002
|
+
setStatus(await post$4("/accounts", {
|
|
8996
9003
|
action,
|
|
8997
9004
|
accountId
|
|
8998
9005
|
}));
|
|
@@ -9007,7 +9014,7 @@ window.__ModuleLoader__.load({
|
|
|
9007
9014
|
try {
|
|
9008
9015
|
setBusy("strategy");
|
|
9009
9016
|
setError(null);
|
|
9010
|
-
setStatus(await post$
|
|
9017
|
+
setStatus(await post$4("/accounts", {
|
|
9011
9018
|
action: "strategy",
|
|
9012
9019
|
strategy
|
|
9013
9020
|
}));
|
|
@@ -9021,7 +9028,7 @@ window.__ModuleLoader__.load({
|
|
|
9021
9028
|
const applyEnabledModels = async (enabledModelIds) => {
|
|
9022
9029
|
try {
|
|
9023
9030
|
setError(null);
|
|
9024
|
-
const updated = await post$
|
|
9031
|
+
const updated = await post$4("/settings", { enabledModelIds });
|
|
9025
9032
|
setStatus(updated);
|
|
9026
9033
|
setContextDrafts(contextDraftsFor(updated));
|
|
9027
9034
|
onModelChange?.();
|
|
@@ -9049,7 +9056,7 @@ window.__ModuleLoader__.load({
|
|
|
9049
9056
|
try {
|
|
9050
9057
|
setSavingModel(modelId);
|
|
9051
9058
|
setError(null);
|
|
9052
|
-
setStatus(await post$
|
|
9059
|
+
setStatus(await post$4("/settings", { contextWindowOverrides: { [modelId]: parsed } }));
|
|
9053
9060
|
setContextDrafts((previous) => ({
|
|
9054
9061
|
...previous,
|
|
9055
9062
|
[modelId]: formatCapacity$1(parsed)
|
|
@@ -9065,7 +9072,7 @@ window.__ModuleLoader__.load({
|
|
|
9065
9072
|
try {
|
|
9066
9073
|
setSavingModel(modelId);
|
|
9067
9074
|
setError(null);
|
|
9068
|
-
const updated = await post$
|
|
9075
|
+
const updated = await post$4("/settings", { contextWindowOverrides: { [modelId]: null } });
|
|
9069
9076
|
setStatus(updated);
|
|
9070
9077
|
const model = updated.models.find((entry) => entry.id === modelId);
|
|
9071
9078
|
if (model !== void 0) setContextDrafts((previous) => ({
|
|
@@ -9084,7 +9091,7 @@ window.__ModuleLoader__.load({
|
|
|
9084
9091
|
if (ids.length === 0) return;
|
|
9085
9092
|
try {
|
|
9086
9093
|
setError(null);
|
|
9087
|
-
const updated = await post$
|
|
9094
|
+
const updated = await post$4("/settings", { contextWindowOverrides: Object.fromEntries(ids.map((id) => [id, null])) });
|
|
9088
9095
|
setStatus(updated);
|
|
9089
9096
|
setContextDrafts(contextDraftsFor(updated));
|
|
9090
9097
|
onModelChange?.();
|
|
@@ -9096,7 +9103,7 @@ window.__ModuleLoader__.load({
|
|
|
9096
9103
|
try {
|
|
9097
9104
|
setBusy("quota");
|
|
9098
9105
|
setError(null);
|
|
9099
|
-
setStatus(await post$
|
|
9106
|
+
setStatus(await post$4("/quota", {}));
|
|
9100
9107
|
} catch (cause) {
|
|
9101
9108
|
setError(messageOf$2(cause));
|
|
9102
9109
|
} finally {
|
|
@@ -9107,7 +9114,7 @@ window.__ModuleLoader__.load({
|
|
|
9107
9114
|
try {
|
|
9108
9115
|
setBusy("catalog");
|
|
9109
9116
|
setError(null);
|
|
9110
|
-
setStatus(await post$
|
|
9117
|
+
setStatus(await post$4("/catalog/refresh", {}));
|
|
9111
9118
|
} catch (cause) {
|
|
9112
9119
|
setError(messageOf$2(cause));
|
|
9113
9120
|
} finally {
|
|
@@ -9118,7 +9125,7 @@ window.__ModuleLoader__.load({
|
|
|
9118
9125
|
try {
|
|
9119
9126
|
setBusy("connection");
|
|
9120
9127
|
setError(null);
|
|
9121
|
-
setConnection(await post$
|
|
9128
|
+
setConnection(await post$4("/connection/test", {}));
|
|
9122
9129
|
} catch (cause) {
|
|
9123
9130
|
setError(messageOf$2(cause));
|
|
9124
9131
|
} finally {
|
|
@@ -9209,7 +9216,7 @@ window.__ModuleLoader__.load({
|
|
|
9209
9216
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
9210
9217
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
|
|
9211
9218
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
9212
|
-
const t = useLineDict(NS_GLM_CODING_PLAN, zh$
|
|
9219
|
+
const t = useLineDict(NS_GLM_CODING_PLAN, zh$12);
|
|
9213
9220
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9214
9221
|
className: "dsha-page",
|
|
9215
9222
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -9674,7 +9681,7 @@ window.__ModuleLoader__.load({
|
|
|
9674
9681
|
* provider — the same reason every sibling line has one.
|
|
9675
9682
|
*/
|
|
9676
9683
|
const NS_CLAUDE = "dsh-claude";
|
|
9677
|
-
const zh$
|
|
9684
|
+
const zh$11 = {
|
|
9678
9685
|
...accountPoolZh,
|
|
9679
9686
|
title: "Claude(订阅)",
|
|
9680
9687
|
pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -9791,7 +9798,7 @@ window.__ModuleLoader__.load({
|
|
|
9791
9798
|
copy: "复制",
|
|
9792
9799
|
copied: "已复制"
|
|
9793
9800
|
};
|
|
9794
|
-
const en$
|
|
9801
|
+
const en$11 = {
|
|
9795
9802
|
...accountPoolEn,
|
|
9796
9803
|
title: "Claude (subscription)",
|
|
9797
9804
|
pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
|
|
@@ -9908,11 +9915,11 @@ window.__ModuleLoader__.load({
|
|
|
9908
9915
|
copy: "Copy",
|
|
9909
9916
|
copied: "Copied"
|
|
9910
9917
|
};
|
|
9911
|
-
const dictionaries$
|
|
9912
|
-
zh: zh$
|
|
9913
|
-
"zh-CN": zh$
|
|
9914
|
-
en: en$
|
|
9915
|
-
"en-US": en$
|
|
9918
|
+
const dictionaries$11 = {
|
|
9919
|
+
zh: zh$11,
|
|
9920
|
+
"zh-CN": zh$11,
|
|
9921
|
+
en: en$11,
|
|
9922
|
+
"en-US": en$11
|
|
9916
9923
|
};
|
|
9917
9924
|
//#endregion
|
|
9918
9925
|
//#region src/client/claude/useClaudeSection.ts
|
|
@@ -9946,7 +9953,7 @@ window.__ModuleLoader__.load({
|
|
|
9946
9953
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
9947
9954
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
9948
9955
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
9949
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
9956
|
+
const t = useLineDict(NS_CLAUDE, zh$11);
|
|
9950
9957
|
const notifyChange = (0, react.useCallback)(() => {
|
|
9951
9958
|
onModelChange?.();
|
|
9952
9959
|
loadModelDirectory?.();
|
|
@@ -10393,11 +10400,11 @@ window.__ModuleLoader__.load({
|
|
|
10393
10400
|
* out here would hide a choice the host would accept and a catalog may expose.
|
|
10394
10401
|
*/
|
|
10395
10402
|
const EFFORT_LABELS$2 = {
|
|
10396
|
-
low: zh$
|
|
10397
|
-
medium: zh$
|
|
10398
|
-
high: zh$
|
|
10399
|
-
xhigh: zh$
|
|
10400
|
-
max: zh$
|
|
10403
|
+
low: zh$11.effortLow,
|
|
10404
|
+
medium: zh$11.effortMedium,
|
|
10405
|
+
high: zh$11.effortHigh,
|
|
10406
|
+
xhigh: zh$11.effortXHigh,
|
|
10407
|
+
max: zh$11.effortMax
|
|
10401
10408
|
};
|
|
10402
10409
|
/** One-line capability summary shown as a model pill's hover title. */
|
|
10403
10410
|
function modelFacts(model, t) {
|
|
@@ -10418,7 +10425,7 @@ window.__ModuleLoader__.load({
|
|
|
10418
10425
|
const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
|
|
10419
10426
|
const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
|
|
10420
10427
|
const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
|
|
10421
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
10428
|
+
const t = useLineDict(NS_CLAUDE, zh$11);
|
|
10422
10429
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10423
10430
|
className: "dsha-page",
|
|
10424
10431
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -10900,7 +10907,7 @@ window.__ModuleLoader__.load({
|
|
|
10900
10907
|
];
|
|
10901
10908
|
//#endregion
|
|
10902
10909
|
//#region src/client/ollama/api.ts
|
|
10903
|
-
const API$
|
|
10910
|
+
const API$9 = "/ollama/api";
|
|
10904
10911
|
/**
|
|
10905
10912
|
* The Ollama settings API, as the card uses it.
|
|
10906
10913
|
*
|
|
@@ -10909,7 +10916,7 @@ window.__ModuleLoader__.load({
|
|
|
10909
10916
|
*/
|
|
10910
10917
|
var OllamaApi = class {
|
|
10911
10918
|
status() {
|
|
10912
|
-
return request(`${API$
|
|
10919
|
+
return request$1(`${API$9}/status`);
|
|
10913
10920
|
}
|
|
10914
10921
|
/**
|
|
10915
10922
|
* One pool action, returning the refreshed status.
|
|
@@ -10918,13 +10925,13 @@ window.__ModuleLoader__.load({
|
|
|
10918
10925
|
* never has to guess what the pool looks like after a change.
|
|
10919
10926
|
*/
|
|
10920
10927
|
accountAction(action, body = {}) {
|
|
10921
|
-
return post$
|
|
10928
|
+
return post$3(`${API$9}/accounts`, {
|
|
10922
10929
|
action,
|
|
10923
10930
|
...body
|
|
10924
10931
|
});
|
|
10925
10932
|
}
|
|
10926
10933
|
refreshCatalog() {
|
|
10927
|
-
return post$
|
|
10934
|
+
return post$3(`${API$9}/catalog/refresh`, {});
|
|
10928
10935
|
}
|
|
10929
10936
|
/**
|
|
10930
10937
|
* Store the default thinking level, answering with the refreshed status.
|
|
@@ -10939,7 +10946,7 @@ window.__ModuleLoader__.load({
|
|
|
10939
10946
|
* explicitly rather than left out of the body.
|
|
10940
10947
|
*/
|
|
10941
10948
|
setDefaultReasoningEffort(effort) {
|
|
10942
|
-
return post$
|
|
10949
|
+
return post$3(`${API$9}/settings`, { defaultReasoningEffort: effort }).then(() => this.status());
|
|
10943
10950
|
}
|
|
10944
10951
|
/**
|
|
10945
10952
|
* Replace the enabled-model selection.
|
|
@@ -10949,22 +10956,22 @@ window.__ModuleLoader__.load({
|
|
|
10949
10956
|
* selection before it could answer 'turn this one off'.
|
|
10950
10957
|
*/
|
|
10951
10958
|
setEnabledModels(enabledModelIds) {
|
|
10952
|
-
return post$
|
|
10959
|
+
return post$3(`${API$9}/models`, { enabledModelIds });
|
|
10953
10960
|
}
|
|
10954
10961
|
};
|
|
10955
|
-
async function post$
|
|
10956
|
-
return request(url, {
|
|
10962
|
+
async function post$3(url, body) {
|
|
10963
|
+
return request$1(url, {
|
|
10957
10964
|
method: "POST",
|
|
10958
10965
|
headers: { "Content-Type": "application/json" },
|
|
10959
10966
|
body: JSON.stringify(body)
|
|
10960
10967
|
});
|
|
10961
10968
|
}
|
|
10962
|
-
async function request(url, init) {
|
|
10969
|
+
async function request$1(url, init) {
|
|
10963
10970
|
const response = await fetch(url, {
|
|
10964
10971
|
...init,
|
|
10965
10972
|
credentials: "same-origin"
|
|
10966
10973
|
});
|
|
10967
|
-
const envelope = await readEnvelope(response);
|
|
10974
|
+
const envelope = await readEnvelope$1(response);
|
|
10968
10975
|
if (!response.ok || !envelope.ok) throw new Error(envelope.error || `HTTP ${response.status}`);
|
|
10969
10976
|
return envelope.value;
|
|
10970
10977
|
}
|
|
@@ -10982,34 +10989,34 @@ window.__ModuleLoader__.load({
|
|
|
10982
10989
|
* The body is never echoed back: it can be an HTML page of arbitrary size, and
|
|
10983
10990
|
* its content-type alone is what identifies the failure.
|
|
10984
10991
|
*/
|
|
10985
|
-
async function readEnvelope(response) {
|
|
10992
|
+
async function readEnvelope$1(response) {
|
|
10986
10993
|
let text;
|
|
10987
10994
|
try {
|
|
10988
10995
|
text = await response.text();
|
|
10989
10996
|
} catch (cause) {
|
|
10990
|
-
throw new Error(unreadable(response, cause));
|
|
10997
|
+
throw new Error(unreadable$1(response, cause));
|
|
10991
10998
|
}
|
|
10992
|
-
if (text.trim() === "") throw new Error(unreadable(response));
|
|
10999
|
+
if (text.trim() === "") throw new Error(unreadable$1(response));
|
|
10993
11000
|
let parsed;
|
|
10994
11001
|
try {
|
|
10995
11002
|
parsed = JSON.parse(text);
|
|
10996
11003
|
} catch {
|
|
10997
|
-
throw new Error(unreadable(response));
|
|
11004
|
+
throw new Error(unreadable$1(response));
|
|
10998
11005
|
}
|
|
10999
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(unreadable(response));
|
|
11006
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(unreadable$1(response));
|
|
11000
11007
|
const envelope = parsed;
|
|
11001
11008
|
if (typeof envelope.error !== "string") delete envelope.error;
|
|
11002
11009
|
return envelope;
|
|
11003
11010
|
}
|
|
11004
11011
|
/** The one sentence every unreadable answer turns into. */
|
|
11005
|
-
function unreadable(response, cause) {
|
|
11012
|
+
function unreadable$1(response, cause) {
|
|
11006
11013
|
const kind = response.headers.get("content-type") ?? "no content-type";
|
|
11007
11014
|
return `The Ollama settings API answered with ${response.status} and no JSON body (${kind})` + (cause instanceof Error ? `: ${cause.message}` : "") + ". The Host log holds the underlying error.";
|
|
11008
11015
|
}
|
|
11009
11016
|
//#endregion
|
|
11010
11017
|
//#region src/client/ollama/locales.ts
|
|
11011
11018
|
const NS_OLLAMA = "dsh-ollama";
|
|
11012
|
-
const zh$
|
|
11019
|
+
const zh$10 = {
|
|
11013
11020
|
...accountPoolZh,
|
|
11014
11021
|
relogin: "更换 Key",
|
|
11015
11022
|
needsRelogin: "Key 已失效",
|
|
@@ -11061,7 +11068,7 @@ window.__ModuleLoader__.load({
|
|
|
11061
11068
|
usageNone: "尚无请求",
|
|
11062
11069
|
usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
|
|
11063
11070
|
};
|
|
11064
|
-
const en$
|
|
11071
|
+
const en$10 = {
|
|
11065
11072
|
...accountPoolEn,
|
|
11066
11073
|
relogin: "Replace Key",
|
|
11067
11074
|
needsRelogin: "Key rejected",
|
|
@@ -11113,15 +11120,15 @@ window.__ModuleLoader__.load({
|
|
|
11113
11120
|
usageNone: "No requests yet",
|
|
11114
11121
|
usageHint: "Summed locally from the token counts Ollama returns on each response."
|
|
11115
11122
|
};
|
|
11116
|
-
const dictionaries$
|
|
11117
|
-
zh: zh$
|
|
11118
|
-
"zh-CN": zh$
|
|
11119
|
-
en: en$
|
|
11120
|
-
"en-US": en$
|
|
11123
|
+
const dictionaries$10 = {
|
|
11124
|
+
zh: zh$10,
|
|
11125
|
+
"zh-CN": zh$10,
|
|
11126
|
+
en: en$10,
|
|
11127
|
+
"en-US": en$10
|
|
11121
11128
|
};
|
|
11122
11129
|
//#endregion
|
|
11123
11130
|
//#region src/client/ollama/OllamaSection.tsx
|
|
11124
|
-
const API$
|
|
11131
|
+
const API$8 = new OllamaApi();
|
|
11125
11132
|
/**
|
|
11126
11133
|
* What each thinking level says in this card.
|
|
11127
11134
|
*
|
|
@@ -11143,7 +11150,7 @@ window.__ModuleLoader__.load({
|
|
|
11143
11150
|
* no grouping is unreadable at card width, and these are running totals that only
|
|
11144
11151
|
* ever grow, so rounding is fine but commas are not optional.
|
|
11145
11152
|
*/
|
|
11146
|
-
function formatTokens(value) {
|
|
11153
|
+
function formatTokens$1(value) {
|
|
11147
11154
|
if (!Number.isFinite(value) || value < 0) return "—";
|
|
11148
11155
|
if (value < 1e3) return String(Math.floor(value));
|
|
11149
11156
|
if (value < 1e6) return `${(value / 1e3).toFixed(value < 1e4 ? 1 : 0)}K`;
|
|
@@ -11169,7 +11176,7 @@ window.__ModuleLoader__.load({
|
|
|
11169
11176
|
const [enabled, setEnabled] = (0, react.useState)(null);
|
|
11170
11177
|
const reload = (0, react.useCallback)(async () => {
|
|
11171
11178
|
try {
|
|
11172
|
-
const next = await API$
|
|
11179
|
+
const next = await API$8.status();
|
|
11173
11180
|
setStatus(next);
|
|
11174
11181
|
setEnabled(next.enabledModelIds == null ? null : new Set(next.enabledModelIds));
|
|
11175
11182
|
} catch (cause) {
|
|
@@ -11196,7 +11203,7 @@ window.__ModuleLoader__.load({
|
|
|
11196
11203
|
const trimmed = key.trim();
|
|
11197
11204
|
if (trimmed === "") return;
|
|
11198
11205
|
run("add", async () => {
|
|
11199
|
-
const next = await API$
|
|
11206
|
+
const next = await API$8.accountAction("add", {
|
|
11200
11207
|
apiKey: trimmed,
|
|
11201
11208
|
...alias.trim() === "" ? {} : { alias: alias.trim() }
|
|
11202
11209
|
});
|
|
@@ -11212,8 +11219,8 @@ window.__ModuleLoader__.load({
|
|
|
11212
11219
|
]);
|
|
11213
11220
|
const syncCatalog = (0, react.useCallback)(() => {
|
|
11214
11221
|
run("catalog", async () => {
|
|
11215
|
-
await API$
|
|
11216
|
-
return API$
|
|
11222
|
+
await API$8.refreshCatalog();
|
|
11223
|
+
return API$8.status();
|
|
11217
11224
|
});
|
|
11218
11225
|
}, [run]);
|
|
11219
11226
|
const isModelEnabled = (0, react.useCallback)((id) => {
|
|
@@ -11221,9 +11228,9 @@ window.__ModuleLoader__.load({
|
|
|
11221
11228
|
}, [enabled]);
|
|
11222
11229
|
const applyEnabled = (0, react.useCallback)((next) => {
|
|
11223
11230
|
run("models", async () => {
|
|
11224
|
-
const result = await API$
|
|
11231
|
+
const result = await API$8.setEnabledModels(next);
|
|
11225
11232
|
setEnabled(result.enabledModelIds == null ? null : new Set(result.enabledModelIds));
|
|
11226
|
-
return API$
|
|
11233
|
+
return API$8.status();
|
|
11227
11234
|
});
|
|
11228
11235
|
}, [run]);
|
|
11229
11236
|
const toggleModel = (0, react.useCallback)((id, checked) => {
|
|
@@ -11241,9 +11248,9 @@ window.__ModuleLoader__.load({
|
|
|
11241
11248
|
applyEnabled(selectAll ? null : []);
|
|
11242
11249
|
}, [applyEnabled]);
|
|
11243
11250
|
const setEffort = (0, react.useCallback)((value) => {
|
|
11244
|
-
run("effort", () => API$
|
|
11251
|
+
run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
|
|
11245
11252
|
}, [run]);
|
|
11246
|
-
const t = useLineDict(NS_OLLAMA, zh$
|
|
11253
|
+
const t = useLineDict(NS_OLLAMA, zh$10);
|
|
11247
11254
|
const pool = status?.pool;
|
|
11248
11255
|
const models = status?.models ?? [];
|
|
11249
11256
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -11272,10 +11279,10 @@ window.__ModuleLoader__.load({
|
|
|
11272
11279
|
labels: t,
|
|
11273
11280
|
busy,
|
|
11274
11281
|
onLogin: () => setShowKeyForm((value) => !value),
|
|
11275
|
-
onSetPrimary: (id) => void run("set-primary", () => API$
|
|
11276
|
-
onDelete: (id) => void run("delete", () => API$
|
|
11277
|
-
onClearCooldown: (id) => void run("clear-cooldown", () => API$
|
|
11278
|
-
onSetStrategy: (strategy) => void run("strategy", () => API$
|
|
11282
|
+
onSetPrimary: (id) => void run("set-primary", () => API$8.accountAction("set-primary", { accountId: id })),
|
|
11283
|
+
onDelete: (id) => void run("delete", () => API$8.accountAction("delete", { accountId: id })),
|
|
11284
|
+
onClearCooldown: (id) => void run("clear-cooldown", () => API$8.accountAction("clear-cooldown", { accountId: id })),
|
|
11285
|
+
onSetStrategy: (strategy) => void run("strategy", () => API$8.accountAction("strategy", { strategy })),
|
|
11279
11286
|
renderDetails: (account) => {
|
|
11280
11287
|
const usage = account.usage;
|
|
11281
11288
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [account.lastModelId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
@@ -11283,8 +11290,8 @@ window.__ModuleLoader__.load({
|
|
|
11283
11290
|
": ",
|
|
11284
11291
|
account.lastModelId
|
|
11285
11292
|
] }), usage === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t.usageNone }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
11286
|
-
t.usageInput.replace("{tokens}", formatTokens(usage.inputTokens)),
|
|
11287
|
-
t.usageOutput.replace("{tokens}", formatTokens(usage.outputTokens)),
|
|
11293
|
+
t.usageInput.replace("{tokens}", formatTokens$1(usage.inputTokens)),
|
|
11294
|
+
t.usageOutput.replace("{tokens}", formatTokens$1(usage.outputTokens)),
|
|
11288
11295
|
t.usageRequests.replace("{count}", String(usage.requestCount))
|
|
11289
11296
|
] })] });
|
|
11290
11297
|
},
|
|
@@ -11358,7 +11365,7 @@ window.__ModuleLoader__.load({
|
|
|
11358
11365
|
className: "dsha-btn",
|
|
11359
11366
|
disabled: busy !== null,
|
|
11360
11367
|
onClick: () => setShowKeyForm(false),
|
|
11361
|
-
children: zh$
|
|
11368
|
+
children: zh$10.deleteAccount
|
|
11362
11369
|
})]
|
|
11363
11370
|
})
|
|
11364
11371
|
]
|
|
@@ -11469,6 +11476,765 @@ window.__ModuleLoader__.load({
|
|
|
11469
11476
|
] });
|
|
11470
11477
|
}
|
|
11471
11478
|
//#endregion
|
|
11479
|
+
//#region src/client/antigravity-acp/api.ts
|
|
11480
|
+
const API$7 = "/antigravity-acp/api";
|
|
11481
|
+
/**
|
|
11482
|
+
* The Antigravity (ACP) settings API, as the card uses it.
|
|
11483
|
+
*
|
|
11484
|
+
* Same envelope and fetch shape as every other provider section, so the shared
|
|
11485
|
+
* components read alike.
|
|
11486
|
+
*/
|
|
11487
|
+
var AntigravityAcpApi = class {
|
|
11488
|
+
status() {
|
|
11489
|
+
return request(`${API$7}/status`);
|
|
11490
|
+
}
|
|
11491
|
+
/** Submit one settings patch and receive the refreshed status. */
|
|
11492
|
+
update(patch) {
|
|
11493
|
+
return post$2(`${API$7}/settings`, patch);
|
|
11494
|
+
}
|
|
11495
|
+
/** Force a live catalogue read. */
|
|
11496
|
+
refresh() {
|
|
11497
|
+
return post$2(`${API$7}/refresh`, {});
|
|
11498
|
+
}
|
|
11499
|
+
/** Run the line's self-check and return its one-line-per-stage report. */
|
|
11500
|
+
doctor() {
|
|
11501
|
+
return post$2(`${API$7}/doctor`, {});
|
|
11502
|
+
}
|
|
11503
|
+
/**
|
|
11504
|
+
* Start the official sign-in.
|
|
11505
|
+
*
|
|
11506
|
+
* The browser is opened by `agy` itself; this call only asks the host to
|
|
11507
|
+
* spawn it. Nothing here opens a window, which is what keeps one click from
|
|
11508
|
+
* producing two Google pages.
|
|
11509
|
+
*/
|
|
11510
|
+
startLogin() {
|
|
11511
|
+
return post$2(`${API$7}/login/start`, {});
|
|
11512
|
+
}
|
|
11513
|
+
/** Re-read the auth state after a sign-in attempt. */
|
|
11514
|
+
loginStatus() {
|
|
11515
|
+
return request(`${API$7}/login/status`);
|
|
11516
|
+
}
|
|
11517
|
+
};
|
|
11518
|
+
async function post$2(url, body) {
|
|
11519
|
+
return request(url, {
|
|
11520
|
+
method: "POST",
|
|
11521
|
+
headers: { "Content-Type": "application/json" },
|
|
11522
|
+
body: JSON.stringify(body)
|
|
11523
|
+
});
|
|
11524
|
+
}
|
|
11525
|
+
async function request(url, init) {
|
|
11526
|
+
const response = await fetch(url, {
|
|
11527
|
+
...init,
|
|
11528
|
+
credentials: "same-origin"
|
|
11529
|
+
});
|
|
11530
|
+
const envelope = await readEnvelope(response);
|
|
11531
|
+
if (!response.ok || !envelope.ok) throw new Error(envelope.error || `HTTP ${response.status}`);
|
|
11532
|
+
return envelope.value;
|
|
11533
|
+
}
|
|
11534
|
+
/**
|
|
11535
|
+
* Read the {ok,value,error} envelope, or say why there was not one.
|
|
11536
|
+
*
|
|
11537
|
+
* Reading the text first turns an empty or non-JSON answer into a sentence that
|
|
11538
|
+
* names the status instead of the browser's own JSON parse error.
|
|
11539
|
+
*/
|
|
11540
|
+
async function readEnvelope(response) {
|
|
11541
|
+
let text;
|
|
11542
|
+
try {
|
|
11543
|
+
text = await response.text();
|
|
11544
|
+
} catch (cause) {
|
|
11545
|
+
throw new Error(unreadable(response, cause));
|
|
11546
|
+
}
|
|
11547
|
+
if (text.trim() === "") throw new Error(unreadable(response));
|
|
11548
|
+
let parsed;
|
|
11549
|
+
try {
|
|
11550
|
+
parsed = JSON.parse(text);
|
|
11551
|
+
} catch {
|
|
11552
|
+
throw new Error(unreadable(response));
|
|
11553
|
+
}
|
|
11554
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(unreadable(response));
|
|
11555
|
+
const envelope = parsed;
|
|
11556
|
+
if (typeof envelope.error !== "string") delete envelope.error;
|
|
11557
|
+
return envelope;
|
|
11558
|
+
}
|
|
11559
|
+
function unreadable(response, cause) {
|
|
11560
|
+
const kind = response.headers.get("content-type") ?? "no content-type";
|
|
11561
|
+
return `The Antigravity settings API answered with ${response.status} and no JSON body (${kind})` + (cause instanceof Error ? `: ${cause.message}` : "") + ". The Host log holds the underlying error.";
|
|
11562
|
+
}
|
|
11563
|
+
//#endregion
|
|
11564
|
+
//#region src/client/antigravity-acp/locales.ts
|
|
11565
|
+
const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
|
|
11566
|
+
const zh$9 = {
|
|
11567
|
+
title: "Antigravity(ACP)",
|
|
11568
|
+
pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
|
|
11569
|
+
routeOwned: "模型路由由本插件提供",
|
|
11570
|
+
routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。",
|
|
11571
|
+
binarySection: "运行环境",
|
|
11572
|
+
binarySourceLabel: "当前使用",
|
|
11573
|
+
binaryHintSummary: "从哪里找可执行文件?",
|
|
11574
|
+
binaryKindLocal: "本机 Antigravity CLI",
|
|
11575
|
+
binaryKindConfigured: "手动指定路径",
|
|
11576
|
+
binaryKindDownloaded: "官方 ACP server(已下载)",
|
|
11577
|
+
binaryKindMissing: "未找到可用的 agy",
|
|
11578
|
+
binaryVersion: "版本 {version}",
|
|
11579
|
+
binaryMissingHint: "未找到本机 agy,且官方 ACP server 尚未下载。安装 Antigravity CLI 后重新打开此页即可;也可以直接指定可执行文件路径。",
|
|
11580
|
+
binaryPathLabel: "可执行文件路径",
|
|
11581
|
+
binaryPathPlaceholder: "留空则自动查找(本机 agy → 官方 ACP server)",
|
|
11582
|
+
binaryPathSave: "保存路径",
|
|
11583
|
+
binaryPathReset: "恢复自动查找",
|
|
11584
|
+
authSection: "登录",
|
|
11585
|
+
statusLabel: "状态",
|
|
11586
|
+
signedIn: "已登录",
|
|
11587
|
+
signedOut: "未登录",
|
|
11588
|
+
signIn: "登录 Google 账号",
|
|
11589
|
+
signInAgain: "重新登录",
|
|
11590
|
+
signInStarting: "正在启动…",
|
|
11591
|
+
signInSuccess: "已发起登录:浏览器由 Antigravity CLI 打开,完成授权后状态会自动变为「已登录」。",
|
|
11592
|
+
signInAlready: "当前已是登录状态,无需重复登录。",
|
|
11593
|
+
signInHintSummary: "登录是怎么完成的?",
|
|
11594
|
+
signInHint: "登录由 Antigravity CLI 自己完成:点击后它会打开浏览器,完成后回到这里刷新状态。本插件不读取、不保存你的 Google 凭据。",
|
|
11595
|
+
signInHeadless: "无界面环境请在终端执行 agy acp --login,然后回到此页刷新。",
|
|
11596
|
+
tierLabel: "订阅档位",
|
|
11597
|
+
tierUnknown: "官方进程未报告",
|
|
11598
|
+
refreshStatus: "刷新状态",
|
|
11599
|
+
runDoctor: "运行自检",
|
|
11600
|
+
doctorRunning: "自检中…",
|
|
11601
|
+
doctorTitle: "自检结果",
|
|
11602
|
+
modelsSection: "模型",
|
|
11603
|
+
modelsHint: "模型列表来自官方 ACP 会话,随账号与套餐变化,不随插件打包。思考档位由每个模型自己公布。",
|
|
11604
|
+
catalogNeverSynced: "尚未同步模型列表。点右上角「同步模型」获取当前账号可用的模型。",
|
|
11605
|
+
catalogStale: "当前显示的是上次同步的缓存列表。",
|
|
11606
|
+
catalogSync: "同步模型",
|
|
11607
|
+
catalogSyncing: "同步中…",
|
|
11608
|
+
catalogFailed: "无法读取模型列表:{detail}",
|
|
11609
|
+
modelCount: "{count} 个模型",
|
|
11610
|
+
noModels: "官方进程未返回任何模型。",
|
|
11611
|
+
selectAll: "全选",
|
|
11612
|
+
unselectAll: "全不选",
|
|
11613
|
+
noneSelected: "未选择任何模型,该线路不会出现在模型选择器中。",
|
|
11614
|
+
effortLabels: "可选思考档位:{levels}",
|
|
11615
|
+
enhanced: "增强功能",
|
|
11616
|
+
defaultReasoningEffort: "默认思考档位",
|
|
11617
|
+
defaultReasoningEffortHint: "作为新会话的默认值;调用方明确指定时以调用方为准。模型不接受的档位会被丢弃,而不是让整轮失败。",
|
|
11618
|
+
defaultEffortAuto: "不指定(用官方默认)",
|
|
11619
|
+
permissionPolicy: "工具权限",
|
|
11620
|
+
permissionPolicyReject: "拒绝(推荐)",
|
|
11621
|
+
permissionPolicyAllow: "自动批准 allow_once",
|
|
11622
|
+
permissionPolicyHint: "主模型线路里,Antigravity 的工具调用会经本地 MCP 桥交回 DSH 执行,权限由 DSH 的权限预设决定;这里控制的是官方进程自身的权限请求与子代理形态下的自动批准策略。",
|
|
11623
|
+
usageSection: "最近一轮用量",
|
|
11624
|
+
usageInputLabel: "输入",
|
|
11625
|
+
usageOutputLabel: "输出",
|
|
11626
|
+
usageCacheLabel: "缓存命中",
|
|
11627
|
+
usageDurationLabel: "耗时",
|
|
11628
|
+
usageInput: "输入 {tokens}",
|
|
11629
|
+
usageOutput: "输出 {tokens}",
|
|
11630
|
+
usageCache: "缓存命中 {tokens}",
|
|
11631
|
+
usageDuration: "耗时 {seconds}s",
|
|
11632
|
+
usageNone: "尚无已完成的一轮。",
|
|
11633
|
+
usageHintSummary: "这里为什么没有额度百分比?",
|
|
11634
|
+
usageHint: "官方 ACP 服务端不公布剩余额度或套餐百分比,因此这里只显示真实返回的 token 用量。",
|
|
11635
|
+
occupancyLabel: "上下文占用",
|
|
11636
|
+
occupancyDetail: "已用 {used} / 窗口 {size}",
|
|
11637
|
+
scopeSection: "能力边界",
|
|
11638
|
+
scopeSummary: "四条客观限制:无 system 槽位、每轮重建会话、子代理用官方工具、不公布额度。",
|
|
11639
|
+
scopeHintSummary: "展开看这四条限制",
|
|
11640
|
+
scopeHint: "这些是 ACP 与官方 Agent 的客观限制,本线路不做绕过:",
|
|
11641
|
+
scopePrompt: "ACP 没有独立的 system 提示槽位:DSH 的系统提示会作为提示首段随会话发送,官方 Agent 自身的系统提示无法移除。",
|
|
11642
|
+
scopeHistory: "每轮对话按 DSH 的完整历史重建 ACP 会话;历史被压缩或改写时会重新建立会话,而不是复用可能已与 DSH 不一致的旧会话。",
|
|
11643
|
+
scopeTools: "作为主模型时工具由 DSH 执行并把关;作为子代理时子进程使用官方 Agent 自己的工具集。",
|
|
11644
|
+
scopeQuota: "官方服务端不公布剩余额度,因此本卡片不显示任何百分比或余额。",
|
|
11645
|
+
error: "操作失败:{detail}",
|
|
11646
|
+
complianceSummary: "条款风险(点开查看)",
|
|
11647
|
+
complianceNotice: "⚠️ 条款风险:Google Antigravity 官方 FAQ 明确写着「使用第三方软件、工具或服务访问 Antigravity 违反其服务条款」,且「把 agy 包装进第三方编码 Agent 或应用、或自动化账号轮换,在消费者套餐下不受支持」,可能导致账号被暂停或终止。本插件运行的是 Google 官方 agy 与官方 ACP 服务器(不逆向协议、不读取凭据、单账号不轮换),但这些措施不能消除条款风险。是否继续使用请自行判断;需要零争议时请改用 Gemini Enterprise 或 Google AI Studio API Key。",
|
|
11648
|
+
disabledHint: "该线路当前已停用;在上方订阅总览打开开关后才会出现在模型选择器中。",
|
|
11649
|
+
enabledHint: "该线路当前已启用。",
|
|
11650
|
+
toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
|
|
11651
|
+
};
|
|
11652
|
+
const en$9 = {
|
|
11653
|
+
title: "Antigravity (ACP)",
|
|
11654
|
+
pageDesc: "Connect through Google's official Antigravity CLI over the Agent Client Protocol (ACP): the model, its tools and its sessions all come from the official process, which also keeps its own sign-in state.",
|
|
11655
|
+
routeOwned: "Model route served by this plugin",
|
|
11656
|
+
routeConflict: "The model route is already owned by another provider: {detail}",
|
|
11657
|
+
binarySection: "Runtime",
|
|
11658
|
+
binarySourceLabel: "In use",
|
|
11659
|
+
binaryHintSummary: "Where does the executable come from?",
|
|
11660
|
+
binaryKindLocal: "Local Antigravity CLI",
|
|
11661
|
+
binaryKindConfigured: "Configured path",
|
|
11662
|
+
binaryKindDownloaded: "Official ACP server (downloaded)",
|
|
11663
|
+
binaryKindMissing: "No usable agy found",
|
|
11664
|
+
binaryVersion: "version {version}",
|
|
11665
|
+
binaryMissingHint: "No local agy was found and the official ACP server has not been downloaded yet. Install the Antigravity CLI and reopen this page, or point at an executable directly.",
|
|
11666
|
+
binaryPathLabel: "Executable path",
|
|
11667
|
+
binaryPathPlaceholder: "Leave empty to resolve automatically (local agy, then the official ACP server)",
|
|
11668
|
+
binaryPathSave: "Save path",
|
|
11669
|
+
binaryPathReset: "Restore automatic resolution",
|
|
11670
|
+
authSection: "Sign-in",
|
|
11671
|
+
statusLabel: "Status",
|
|
11672
|
+
signedIn: "Signed in",
|
|
11673
|
+
signedOut: "Not signed in",
|
|
11674
|
+
signIn: "Sign in with Google",
|
|
11675
|
+
signInAgain: "Sign in again",
|
|
11676
|
+
signInStarting: "Starting...",
|
|
11677
|
+
signInSuccess: "Sign-in started: the Antigravity CLI opens the browser, and the status here turns to signed in once you approve it.",
|
|
11678
|
+
signInAlready: "This line is already signed in; there is nothing to do.",
|
|
11679
|
+
signInHintSummary: "How does sign-in work?",
|
|
11680
|
+
signInHint: "The Antigravity CLI performs the sign-in itself: it opens the browser, and you come back here to refresh the state. This plugin never reads or stores your Google credentials.",
|
|
11681
|
+
signInHeadless: "On a headless host run agy acp --login in a terminal, then refresh here.",
|
|
11682
|
+
tierLabel: "Plan",
|
|
11683
|
+
tierUnknown: "Not reported by the official process",
|
|
11684
|
+
refreshStatus: "Refresh state",
|
|
11685
|
+
runDoctor: "Run self-check",
|
|
11686
|
+
doctorRunning: "Checking...",
|
|
11687
|
+
doctorTitle: "Self-check result",
|
|
11688
|
+
modelsSection: "Models",
|
|
11689
|
+
modelsHint: "The model list comes from a live ACP session and follows your account and plan; it is not shipped with the plugin. Each model publishes its own thinking levels.",
|
|
11690
|
+
catalogNeverSynced: "The model list has not been synced yet. Use \"Sync models\" above to fetch what this account can use.",
|
|
11691
|
+
catalogStale: "Showing the cached listing from the last sync.",
|
|
11692
|
+
catalogSync: "Sync models",
|
|
11693
|
+
catalogSyncing: "Syncing...",
|
|
11694
|
+
catalogFailed: "Could not read the model list: {detail}",
|
|
11695
|
+
modelCount: "{count} model(s)",
|
|
11696
|
+
noModels: "The official process returned no models.",
|
|
11697
|
+
selectAll: "Select all",
|
|
11698
|
+
unselectAll: "Clear all",
|
|
11699
|
+
noneSelected: "No models are selected, so this line will not appear in the model picker.",
|
|
11700
|
+
effortLabels: "Thinking levels: {levels}",
|
|
11701
|
+
enhanced: "Enhanced",
|
|
11702
|
+
defaultReasoningEffort: "Default thinking level",
|
|
11703
|
+
defaultReasoningEffortHint: "Used as the default for new sessions; an explicit request wins. A level the target model does not accept is dropped rather than failing the turn.",
|
|
11704
|
+
defaultEffortAuto: "Do not specify (official default)",
|
|
11705
|
+
permissionPolicy: "Tool permissions",
|
|
11706
|
+
permissionPolicyReject: "Reject (recommended)",
|
|
11707
|
+
permissionPolicyAllow: "Auto-approve allow_once",
|
|
11708
|
+
permissionPolicyHint: "On the main-model line, Antigravity's tool calls come back to DSH through the local MCP bridge and are governed by DSH permission presets. This setting covers the official process's own permission requests and the auto-approval used by the subagent form.",
|
|
11709
|
+
usageSection: "Last turn usage",
|
|
11710
|
+
usageInputLabel: "Input",
|
|
11711
|
+
usageOutputLabel: "Output",
|
|
11712
|
+
usageCacheLabel: "Cache read",
|
|
11713
|
+
usageDurationLabel: "Duration",
|
|
11714
|
+
usageHintSummary: "Why is there no quota percentage here?",
|
|
11715
|
+
usageInput: "in {tokens}",
|
|
11716
|
+
usageOutput: "out {tokens}",
|
|
11717
|
+
usageCache: "cache read {tokens}",
|
|
11718
|
+
usageDuration: "{seconds}s",
|
|
11719
|
+
usageNone: "No completed turn yet.",
|
|
11720
|
+
usageHint: "The official ACP server publishes no remaining quota or plan percentage, so this card shows only the token counts it actually returned.",
|
|
11721
|
+
occupancyLabel: "Context occupancy",
|
|
11722
|
+
occupancyDetail: "{used} used of {size}",
|
|
11723
|
+
scopeSection: "Boundaries",
|
|
11724
|
+
scopeSummary: "Four objective limits: no system slot, a fresh session every turn, the official tools in subagent form, and no published quota.",
|
|
11725
|
+
scopeHintSummary: "Show the four limits",
|
|
11726
|
+
scopeHint: "These are objective ACP and official-agent limits; this line does not work around them:",
|
|
11727
|
+
scopePrompt: "ACP has no separate system-prompt slot: the DSH system prompt travels as the head of the prompt, and the official agent's own system prompt cannot be removed.",
|
|
11728
|
+
scopeHistory: "Every turn rebuilds the ACP session from the complete DSH history; when that history is compacted or rewritten a new session is created instead of resuming one that may no longer match.",
|
|
11729
|
+
scopeTools: "As a main model its tool calls are executed and gated by DSH; as a subagent the child runs the official agent's own tools.",
|
|
11730
|
+
scopeQuota: "The official server publishes no remaining quota, so this card shows no percentage and no balance.",
|
|
11731
|
+
error: "Action failed: {detail}",
|
|
11732
|
+
complianceSummary: "Terms risk (click to read)",
|
|
11733
|
+
complianceNotice: "Terms risk: Google Antigravity's official FAQ states that accessing Antigravity through third-party software, tools, or services violates its Terms of Service, and that wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans - either can result in suspension or termination of your account. This plugin runs Google's own agy CLI and official ACP server (no protocol reverse-engineering, no credential access, single account, no rotation), but those measures do not remove the risk. Whether to keep using it is your decision; where a zero-controversy setup is required, use a Gemini Enterprise or Google AI Studio API key instead.",
|
|
11734
|
+
disabledHint: "This line is switched off. Turn it on from its card in the subscription overview to make it appear in the model picker.",
|
|
11735
|
+
enabledHint: "This line is enabled.",
|
|
11736
|
+
toggleHint: "You can switch it off at any time from its card in the subscription overview."
|
|
11737
|
+
};
|
|
11738
|
+
const dictionaries$9 = {
|
|
11739
|
+
zh: zh$9,
|
|
11740
|
+
"zh-CN": zh$9,
|
|
11741
|
+
en: en$9,
|
|
11742
|
+
"en-US": en$9
|
|
11743
|
+
};
|
|
11744
|
+
//#endregion
|
|
11745
|
+
//#region src/client/antigravity-acp/AntigravityAcpSection.tsx
|
|
11746
|
+
const API$6 = new AntigravityAcpApi();
|
|
11747
|
+
/** A token count short enough to sit on one line. */
|
|
11748
|
+
function formatTokens(value) {
|
|
11749
|
+
if (!Number.isFinite(value) || value < 0) return "—";
|
|
11750
|
+
if (value < 1e3) return String(Math.floor(value));
|
|
11751
|
+
if (value < 1e6) return (value / 1e3).toFixed(value < 1e4 ? 1 : 0) + "K";
|
|
11752
|
+
return (value / 1e6).toFixed(1) + "M";
|
|
11753
|
+
}
|
|
11754
|
+
/**
|
|
11755
|
+
* The Antigravity (ACP) settings tab.
|
|
11756
|
+
*
|
|
11757
|
+
* One line here is deliberately absent: the account-pool card. This line does not
|
|
11758
|
+
* own accounts - the official CLI does - so rendering a pool would either be an
|
|
11759
|
+
* empty shell or, worse, a second place that claims to manage a sign-in it cannot
|
|
11760
|
+
* see. What is left is what the user actually chooses: which executable runs,
|
|
11761
|
+
* which models appear, the default thinking level, and how the agent's permission
|
|
11762
|
+
* requests are answered.
|
|
11763
|
+
*/
|
|
11764
|
+
function AntigravityAcpSection(props) {
|
|
11765
|
+
const [status, setStatus] = (0, react.useState)(null);
|
|
11766
|
+
const [busy, setBusy] = (0, react.useState)(null);
|
|
11767
|
+
const [error, setError] = (0, react.useState)(null);
|
|
11768
|
+
const [enabled, setEnabled] = (0, react.useState)(null);
|
|
11769
|
+
const [binaryPath, setBinaryPath] = (0, react.useState)("");
|
|
11770
|
+
const [doctor, setDoctor] = (0, react.useState)(null);
|
|
11771
|
+
/** Feedback for the sign-in action, cleared on the next attempt. */
|
|
11772
|
+
const [loginNotice, setLoginNotice] = (0, react.useState)(null);
|
|
11773
|
+
const reload = (0, react.useCallback)(async () => {
|
|
11774
|
+
try {
|
|
11775
|
+
const next = await API$6.status();
|
|
11776
|
+
setStatus(next);
|
|
11777
|
+
setEnabled(next.enabledModelIds == null ? null : new Set(next.enabledModelIds));
|
|
11778
|
+
setBinaryPath(next.binary.path ?? "");
|
|
11779
|
+
} catch (cause) {
|
|
11780
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
11781
|
+
}
|
|
11782
|
+
}, []);
|
|
11783
|
+
(0, react.useEffect)(() => {
|
|
11784
|
+
reload();
|
|
11785
|
+
}, [reload]);
|
|
11786
|
+
const run = (0, react.useCallback)(async (label, action) => {
|
|
11787
|
+
setBusy(label);
|
|
11788
|
+
setError(null);
|
|
11789
|
+
try {
|
|
11790
|
+
setStatus(await action());
|
|
11791
|
+
props.onModelChange?.();
|
|
11792
|
+
props.loadModelDirectory?.();
|
|
11793
|
+
} catch (cause) {
|
|
11794
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
11795
|
+
} finally {
|
|
11796
|
+
setBusy(null);
|
|
11797
|
+
}
|
|
11798
|
+
}, [props]);
|
|
11799
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$9);
|
|
11800
|
+
const models = status?.models ?? [];
|
|
11801
|
+
const auth = status?.auth;
|
|
11802
|
+
const usage = status?.usage;
|
|
11803
|
+
const tier = auth?.tier;
|
|
11804
|
+
const isModelEnabled = (0, react.useCallback)((id) => {
|
|
11805
|
+
return enabled === null || enabled.has(id);
|
|
11806
|
+
}, [enabled]);
|
|
11807
|
+
const applyEnabled = (0, react.useCallback)((next) => {
|
|
11808
|
+
run("models", async () => {
|
|
11809
|
+
const result = await API$6.update({ enabledModelIds: next });
|
|
11810
|
+
setEnabled(result.enabledModelIds == null ? null : new Set(result.enabledModelIds));
|
|
11811
|
+
return result;
|
|
11812
|
+
});
|
|
11813
|
+
}, [run]);
|
|
11814
|
+
const toggleModel = (0, react.useCallback)((id, checked) => {
|
|
11815
|
+
if (status === null) return;
|
|
11816
|
+
const all = status.models ?? [];
|
|
11817
|
+
const current = all.filter((model) => isModelEnabled(model.id)).map((model) => model.id);
|
|
11818
|
+
const next = checked ? [.../* @__PURE__ */ new Set([...current, id])] : current.filter((entry) => entry !== id);
|
|
11819
|
+
applyEnabled(next.length === all.length ? null : next);
|
|
11820
|
+
}, [
|
|
11821
|
+
status,
|
|
11822
|
+
isModelEnabled,
|
|
11823
|
+
applyEnabled
|
|
11824
|
+
]);
|
|
11825
|
+
const setAllModels = (0, react.useCallback)((selectAll) => {
|
|
11826
|
+
applyEnabled(selectAll ? null : []);
|
|
11827
|
+
}, [applyEnabled]);
|
|
11828
|
+
const signIn = (0, react.useCallback)(() => {
|
|
11829
|
+
setBusy("login");
|
|
11830
|
+
setError(null);
|
|
11831
|
+
setLoginNotice(null);
|
|
11832
|
+
API$6.startLogin().then(async (result) => {
|
|
11833
|
+
setLoginNotice(result.started ? t.signInSuccess : t.signInAlready);
|
|
11834
|
+
await reload();
|
|
11835
|
+
}).catch((cause) => setError(cause instanceof Error ? cause.message : String(cause))).finally(() => setBusy(null));
|
|
11836
|
+
}, [reload, t]);
|
|
11837
|
+
const saveBinaryPath = (0, react.useCallback)(() => {
|
|
11838
|
+
run("binary", () => API$6.update({ binaryPath: binaryPath.trim() === "" ? null : binaryPath.trim() }));
|
|
11839
|
+
}, [run, binaryPath]);
|
|
11840
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
11841
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11842
|
+
className: "dsha-group",
|
|
11843
|
+
children: [
|
|
11844
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11845
|
+
className: "dsha-grouphead",
|
|
11846
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11847
|
+
style: {
|
|
11848
|
+
display: "flex",
|
|
11849
|
+
gap: 8
|
|
11850
|
+
},
|
|
11851
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
11852
|
+
className: "dsha-btn",
|
|
11853
|
+
disabled: busy !== null,
|
|
11854
|
+
onClick: () => {
|
|
11855
|
+
setBusy("doctor");
|
|
11856
|
+
setError(null);
|
|
11857
|
+
API$6.doctor().then((report) => setDoctor(report)).catch((cause) => setError(cause instanceof Error ? cause.message : String(cause))).finally(() => setBusy(null));
|
|
11858
|
+
},
|
|
11859
|
+
children: busy === "doctor" ? t.doctorRunning : t.runDoctor
|
|
11860
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
11861
|
+
className: "dsha-btn",
|
|
11862
|
+
disabled: busy !== null,
|
|
11863
|
+
onClick: () => void run("refresh", () => API$6.refresh()),
|
|
11864
|
+
children: busy === "refresh" ? t.catalogSyncing : t.refreshStatus
|
|
11865
|
+
})]
|
|
11866
|
+
})]
|
|
11867
|
+
}),
|
|
11868
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11869
|
+
className: "dsha-notice",
|
|
11870
|
+
children: t.pageDesc
|
|
11871
|
+
}),
|
|
11872
|
+
status !== null && !status.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11873
|
+
className: "dsha-notice",
|
|
11874
|
+
children: t.disabledHint
|
|
11875
|
+
}),
|
|
11876
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
11877
|
+
className: "dshagy-details",
|
|
11878
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t.complianceSummary }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t.complianceNotice })]
|
|
11879
|
+
}),
|
|
11880
|
+
status?.routeConflict !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11881
|
+
className: "dsha-notice",
|
|
11882
|
+
children: t.routeConflict.replace("{detail}", status.routeConflict)
|
|
11883
|
+
}),
|
|
11884
|
+
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11885
|
+
className: "dsha-notice",
|
|
11886
|
+
style: { color: "var(--dsha-danger, #c0392b)" },
|
|
11887
|
+
children: t.error.replace("{detail}", error)
|
|
11888
|
+
}),
|
|
11889
|
+
doctor !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11890
|
+
className: "dsha-pref-row",
|
|
11891
|
+
style: {
|
|
11892
|
+
flexDirection: "column",
|
|
11893
|
+
alignItems: "stretch"
|
|
11894
|
+
},
|
|
11895
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.doctorTitle }), doctor.steps.map((step) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
11896
|
+
className: "dsha-muted",
|
|
11897
|
+
style: { fontSize: 12 },
|
|
11898
|
+
children: [
|
|
11899
|
+
step.ok ? "OK" : "FAIL",
|
|
11900
|
+
" · ",
|
|
11901
|
+
step.id,
|
|
11902
|
+
" · ",
|
|
11903
|
+
step.detail
|
|
11904
|
+
]
|
|
11905
|
+
}, step.id))]
|
|
11906
|
+
})
|
|
11907
|
+
]
|
|
11908
|
+
}),
|
|
11909
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11910
|
+
className: "dsha-group",
|
|
11911
|
+
children: [
|
|
11912
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11913
|
+
className: "dsha-grouphead",
|
|
11914
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.binarySection })
|
|
11915
|
+
}),
|
|
11916
|
+
status !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11917
|
+
className: "dsha-row",
|
|
11918
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11919
|
+
className: "dsha-label",
|
|
11920
|
+
children: t.binarySourceLabel
|
|
11921
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11922
|
+
className: "dsha-value",
|
|
11923
|
+
children: [
|
|
11924
|
+
status.binary.kind === "local-cli" && t.binaryKindLocal,
|
|
11925
|
+
status.binary.kind === "configured" && t.binaryKindConfigured,
|
|
11926
|
+
status.binary.kind === "downloaded" && t.binaryKindDownloaded,
|
|
11927
|
+
status.binary.kind === "missing" && t.binaryKindMissing,
|
|
11928
|
+
status.binary.version !== void 0 && " · " + status.binary.version
|
|
11929
|
+
]
|
|
11930
|
+
})]
|
|
11931
|
+
}),
|
|
11932
|
+
status?.binary.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11933
|
+
className: "dsha-notice",
|
|
11934
|
+
children: status.binary.error
|
|
11935
|
+
}),
|
|
11936
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11937
|
+
className: "dsha-pref-row",
|
|
11938
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11939
|
+
className: "dsha-label",
|
|
11940
|
+
children: t.binaryPathLabel
|
|
11941
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11942
|
+
style: {
|
|
11943
|
+
display: "flex",
|
|
11944
|
+
gap: 8,
|
|
11945
|
+
justifyContent: "flex-end",
|
|
11946
|
+
marginLeft: "auto",
|
|
11947
|
+
flex: "0 1 520px"
|
|
11948
|
+
},
|
|
11949
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11950
|
+
className: "dsha-input",
|
|
11951
|
+
style: {
|
|
11952
|
+
flex: "1 1 260px",
|
|
11953
|
+
minWidth: 180
|
|
11954
|
+
},
|
|
11955
|
+
value: binaryPath,
|
|
11956
|
+
placeholder: t.binaryPathPlaceholder,
|
|
11957
|
+
disabled: busy !== null,
|
|
11958
|
+
onChange: (event) => setBinaryPath(event.target.value)
|
|
11959
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
11960
|
+
className: "dsha-btn",
|
|
11961
|
+
disabled: busy !== null,
|
|
11962
|
+
onClick: saveBinaryPath,
|
|
11963
|
+
children: t.binaryPathSave
|
|
11964
|
+
})]
|
|
11965
|
+
})]
|
|
11966
|
+
}),
|
|
11967
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
11968
|
+
className: "dshagy-details",
|
|
11969
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t.binaryHintSummary }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: status?.binary.kind === "missing" ? t.binaryMissingHint : t.binaryPathPlaceholder })]
|
|
11970
|
+
})
|
|
11971
|
+
]
|
|
11972
|
+
}),
|
|
11973
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11974
|
+
className: "dsha-group",
|
|
11975
|
+
children: [
|
|
11976
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11977
|
+
className: "dsha-grouphead",
|
|
11978
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.authSection }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
11979
|
+
className: "dsha-btn dsha-btn-primary",
|
|
11980
|
+
disabled: busy !== null,
|
|
11981
|
+
onClick: signIn,
|
|
11982
|
+
children: busy === "login" ? t.signInStarting : auth?.authenticated === true ? t.signInAgain : t.signIn
|
|
11983
|
+
})]
|
|
11984
|
+
}),
|
|
11985
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11986
|
+
className: "dsha-row",
|
|
11987
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11988
|
+
className: "dsha-label",
|
|
11989
|
+
children: t.statusLabel
|
|
11990
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11991
|
+
className: "dsha-value",
|
|
11992
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11993
|
+
className: `dsha-badge ${auth?.authenticated === true ? "active" : "danger"}`,
|
|
11994
|
+
children: auth?.authenticated === true ? t.signedIn : t.signedOut
|
|
11995
|
+
})
|
|
11996
|
+
})]
|
|
11997
|
+
}),
|
|
11998
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11999
|
+
className: "dsha-row",
|
|
12000
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12001
|
+
className: "dsha-label",
|
|
12002
|
+
children: t.tierLabel
|
|
12003
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12004
|
+
className: "dsha-value",
|
|
12005
|
+
children: tier === void 0 ? t.tierUnknown : tier.name
|
|
12006
|
+
})]
|
|
12007
|
+
}),
|
|
12008
|
+
loginNotice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12009
|
+
className: "dsha-notice",
|
|
12010
|
+
style: { color: "var(--dsha-success, #10b981)" },
|
|
12011
|
+
children: loginNotice
|
|
12012
|
+
}),
|
|
12013
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
12014
|
+
className: "dshagy-details",
|
|
12015
|
+
children: [
|
|
12016
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t.signInHintSummary }),
|
|
12017
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t.signInHint }),
|
|
12018
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t.signInHeadless })
|
|
12019
|
+
]
|
|
12020
|
+
})
|
|
12021
|
+
]
|
|
12022
|
+
}),
|
|
12023
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12024
|
+
className: "dsha-group",
|
|
12025
|
+
children: [
|
|
12026
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12027
|
+
className: "dsha-grouphead",
|
|
12028
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.modelsSection }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
12029
|
+
className: "dsha-btn",
|
|
12030
|
+
disabled: busy !== null,
|
|
12031
|
+
onClick: () => void run("catalog", () => API$6.refresh()),
|
|
12032
|
+
children: busy === "catalog" ? t.catalogSyncing : t.catalogSync
|
|
12033
|
+
})]
|
|
12034
|
+
}),
|
|
12035
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12036
|
+
className: "dsha-muted",
|
|
12037
|
+
style: { fontSize: 12 },
|
|
12038
|
+
children: t.modelsHint
|
|
12039
|
+
}),
|
|
12040
|
+
status !== null && status.catalogSynced === false && models.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12041
|
+
className: "dsha-muted",
|
|
12042
|
+
style: { fontSize: 12 },
|
|
12043
|
+
children: t.catalogStale
|
|
12044
|
+
}),
|
|
12045
|
+
status !== null && models.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12046
|
+
className: "dsha-empty",
|
|
12047
|
+
children: t.catalogNeverSynced
|
|
12048
|
+
}),
|
|
12049
|
+
status !== null && models.length > 0 && enabled !== null && enabled.size === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12050
|
+
className: "dsha-notice",
|
|
12051
|
+
children: t.noneSelected
|
|
12052
|
+
}),
|
|
12053
|
+
status !== null && models.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12054
|
+
className: "dsha-muted",
|
|
12055
|
+
style: { fontSize: 12 },
|
|
12056
|
+
children: t.modelCount.replace("{count}", String(models.length))
|
|
12057
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelChecklist, {
|
|
12058
|
+
items: models.map((model) => ({
|
|
12059
|
+
id: model.id,
|
|
12060
|
+
name: model.name,
|
|
12061
|
+
hint: model.efforts.length === 0 ? void 0 : t.effortLabels.replace("{levels}", model.efforts.join(" / ")),
|
|
12062
|
+
enabled: isModelEnabled(model.id)
|
|
12063
|
+
})),
|
|
12064
|
+
busy: busy !== null,
|
|
12065
|
+
onToggle: (id, value) => toggleModel(id, value),
|
|
12066
|
+
onToggleAll: (value) => setAllModels(value),
|
|
12067
|
+
labels: {
|
|
12068
|
+
selectAll: t.selectAll,
|
|
12069
|
+
clearAll: t.unselectAll,
|
|
12070
|
+
list: t.modelsSection
|
|
12071
|
+
}
|
|
12072
|
+
})] })
|
|
12073
|
+
]
|
|
12074
|
+
}),
|
|
12075
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12076
|
+
className: "dsha-group",
|
|
12077
|
+
children: [
|
|
12078
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12079
|
+
className: "dsha-grouphead",
|
|
12080
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.enhanced })
|
|
12081
|
+
}),
|
|
12082
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12083
|
+
className: "dsha-pref-row",
|
|
12084
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.defaultReasoningEffort }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12085
|
+
className: "dsha-muted",
|
|
12086
|
+
children: t.defaultReasoningEffortHint
|
|
12087
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
12088
|
+
className: "dsha-select",
|
|
12089
|
+
"aria-label": t.defaultReasoningEffort,
|
|
12090
|
+
value: status?.defaultReasoningEffort ?? "",
|
|
12091
|
+
disabled: busy !== null,
|
|
12092
|
+
onChange: (event) => {
|
|
12093
|
+
const value = event.currentTarget.value;
|
|
12094
|
+
run("effort", () => API$6.update({ defaultReasoningEffort: value === "" ? null : value }));
|
|
12095
|
+
},
|
|
12096
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
12097
|
+
value: "",
|
|
12098
|
+
children: t.defaultEffortAuto
|
|
12099
|
+
}), reasoningLevels(models).map((level) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
12100
|
+
value: level,
|
|
12101
|
+
children: level
|
|
12102
|
+
}, level))]
|
|
12103
|
+
})]
|
|
12104
|
+
}),
|
|
12105
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12106
|
+
className: "dsha-pref-row",
|
|
12107
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.permissionPolicy }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12108
|
+
className: "dsha-muted",
|
|
12109
|
+
children: t.permissionPolicyHint
|
|
12110
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
12111
|
+
className: "dsha-select",
|
|
12112
|
+
"aria-label": t.permissionPolicy,
|
|
12113
|
+
value: status?.permissionPolicy ?? "reject",
|
|
12114
|
+
disabled: busy !== null,
|
|
12115
|
+
onChange: (event) => {
|
|
12116
|
+
const value = event.currentTarget.value === "allow" ? "allow" : "reject";
|
|
12117
|
+
run("permission", () => API$6.update({ permissionPolicy: value }));
|
|
12118
|
+
},
|
|
12119
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
12120
|
+
value: "reject",
|
|
12121
|
+
children: t.permissionPolicyReject
|
|
12122
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
12123
|
+
value: "allow",
|
|
12124
|
+
children: t.permissionPolicyAllow
|
|
12125
|
+
})]
|
|
12126
|
+
})]
|
|
12127
|
+
})
|
|
12128
|
+
]
|
|
12129
|
+
}),
|
|
12130
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12131
|
+
className: "dsha-group",
|
|
12132
|
+
children: [
|
|
12133
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12134
|
+
className: "dsha-grouphead",
|
|
12135
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.usageSection })
|
|
12136
|
+
}),
|
|
12137
|
+
usage === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12138
|
+
className: "dsha-empty",
|
|
12139
|
+
children: t.usageNone
|
|
12140
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12141
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12142
|
+
className: "dsha-row",
|
|
12143
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12144
|
+
className: "dsha-label",
|
|
12145
|
+
children: t.usageInputLabel
|
|
12146
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12147
|
+
className: "dsha-value",
|
|
12148
|
+
children: formatTokens(usage.inputTokens)
|
|
12149
|
+
})]
|
|
12150
|
+
}),
|
|
12151
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12152
|
+
className: "dsha-row",
|
|
12153
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12154
|
+
className: "dsha-label",
|
|
12155
|
+
children: t.usageOutputLabel
|
|
12156
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12157
|
+
className: "dsha-value",
|
|
12158
|
+
children: formatTokens(usage.outputTokens)
|
|
12159
|
+
})]
|
|
12160
|
+
}),
|
|
12161
|
+
usage.cacheReadTokens !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12162
|
+
className: "dsha-row",
|
|
12163
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12164
|
+
className: "dsha-label",
|
|
12165
|
+
children: t.usageCacheLabel
|
|
12166
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12167
|
+
className: "dsha-value",
|
|
12168
|
+
children: formatTokens(usage.cacheReadTokens)
|
|
12169
|
+
})]
|
|
12170
|
+
}),
|
|
12171
|
+
usage.durationMs !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12172
|
+
className: "dsha-row",
|
|
12173
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12174
|
+
className: "dsha-label",
|
|
12175
|
+
children: t.usageDurationLabel
|
|
12176
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
12177
|
+
className: "dsha-value",
|
|
12178
|
+
children: [(usage.durationMs / 1e3).toFixed(1), "s"]
|
|
12179
|
+
})]
|
|
12180
|
+
})
|
|
12181
|
+
] }),
|
|
12182
|
+
status?.occupancy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12183
|
+
className: "dsha-row",
|
|
12184
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12185
|
+
className: "dsha-label",
|
|
12186
|
+
children: t.occupancyLabel
|
|
12187
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12188
|
+
className: "dsha-value",
|
|
12189
|
+
children: t.occupancyDetail.replace("{used}", formatTokens(status.occupancy.used)).replace("{size}", formatTokens(status.occupancy.size))
|
|
12190
|
+
})]
|
|
12191
|
+
}),
|
|
12192
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
12193
|
+
className: "dshagy-details",
|
|
12194
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t.usageHintSummary }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t.usageHint })]
|
|
12195
|
+
})
|
|
12196
|
+
]
|
|
12197
|
+
}),
|
|
12198
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12199
|
+
className: "dsha-group",
|
|
12200
|
+
children: [
|
|
12201
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12202
|
+
className: "dsha-grouphead",
|
|
12203
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.scopeSection })
|
|
12204
|
+
}),
|
|
12205
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12206
|
+
className: "dsha-muted",
|
|
12207
|
+
style: { fontSize: 12 },
|
|
12208
|
+
children: t.scopeSummary
|
|
12209
|
+
}),
|
|
12210
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
12211
|
+
className: "dshagy-details",
|
|
12212
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t.scopeHintSummary }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
12213
|
+
className: "dshagy-boundary",
|
|
12214
|
+
children: [
|
|
12215
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopePrompt }),
|
|
12216
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeHistory }),
|
|
12217
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeTools }),
|
|
12218
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeQuota })
|
|
12219
|
+
]
|
|
12220
|
+
})]
|
|
12221
|
+
})
|
|
12222
|
+
]
|
|
12223
|
+
})
|
|
12224
|
+
] });
|
|
12225
|
+
}
|
|
12226
|
+
/** Every thinking level any listed model publishes, in first-seen order. */
|
|
12227
|
+
function reasoningLevels(models) {
|
|
12228
|
+
const seen = /* @__PURE__ */ new Set();
|
|
12229
|
+
const levels = [];
|
|
12230
|
+
for (const model of models) for (const level of model.efforts) {
|
|
12231
|
+
if (seen.has(level)) continue;
|
|
12232
|
+
seen.add(level);
|
|
12233
|
+
levels.push(level);
|
|
12234
|
+
}
|
|
12235
|
+
return levels;
|
|
12236
|
+
}
|
|
12237
|
+
//#endregion
|
|
11472
12238
|
//#region src/client/step-code/locales.ts
|
|
11473
12239
|
/**
|
|
11474
12240
|
* Step Code(Step Plan 订阅)线路的客户端命名空间。
|
|
@@ -13783,7 +14549,7 @@ window.__ModuleLoader__.load({
|
|
|
13783
14549
|
};
|
|
13784
14550
|
//#endregion
|
|
13785
14551
|
//#region src/client/cline-pass/ClinePassSection.tsx
|
|
13786
|
-
const API$
|
|
14552
|
+
const API$5 = new ClinePassApi();
|
|
13787
14553
|
/**
|
|
13788
14554
|
* How often an open card re-reads the quota.
|
|
13789
14555
|
*
|
|
@@ -13846,7 +14612,7 @@ window.__ModuleLoader__.load({
|
|
|
13846
14612
|
*/
|
|
13847
14613
|
const loadStatus = (0, react.useCallback)(async (quiet = false) => {
|
|
13848
14614
|
try {
|
|
13849
|
-
const next = await API$
|
|
14615
|
+
const next = await API$5.status();
|
|
13850
14616
|
setStatus(next);
|
|
13851
14617
|
setSettingsForm((current) => current ?? (next.settings === void 0 ? null : settingsFormOf$1(next)));
|
|
13852
14618
|
if (!quiet) setError(null);
|
|
@@ -13895,7 +14661,7 @@ window.__ModuleLoader__.load({
|
|
|
13895
14661
|
const flow = loginFlow;
|
|
13896
14662
|
if (flow === null || flow.status !== "pending") return;
|
|
13897
14663
|
const timer = window.setInterval(() => {
|
|
13898
|
-
API$
|
|
14664
|
+
API$5.loginStatus(flow.id).then((next) => {
|
|
13899
14665
|
setLoginFlow(next);
|
|
13900
14666
|
if (next.status === "complete") {
|
|
13901
14667
|
setNotice(zh$7.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
|
|
@@ -13910,7 +14676,7 @@ window.__ModuleLoader__.load({
|
|
|
13910
14676
|
setBusy("login");
|
|
13911
14677
|
setError(null);
|
|
13912
14678
|
setNotice(null);
|
|
13913
|
-
API$
|
|
14679
|
+
API$5.startLogin().then((flow) => {
|
|
13914
14680
|
setLoginFlow(flow);
|
|
13915
14681
|
if (flow.verificationUri !== "" && typeof window !== "undefined" && typeof window.open === "function") try {
|
|
13916
14682
|
window.open(flow.verificationUri, "_blank", "noopener,noreferrer");
|
|
@@ -13919,7 +14685,7 @@ window.__ModuleLoader__.load({
|
|
|
13919
14685
|
}, []);
|
|
13920
14686
|
const cancelLogin = (0, react.useCallback)(() => {
|
|
13921
14687
|
if (loginFlow === null) return;
|
|
13922
|
-
API$
|
|
14688
|
+
API$5.cancelLogin(loginFlow.id).then(() => {
|
|
13923
14689
|
setLoginFlow({
|
|
13924
14690
|
...loginFlow,
|
|
13925
14691
|
status: "cancelled"
|
|
@@ -13948,7 +14714,7 @@ window.__ModuleLoader__.load({
|
|
|
13948
14714
|
const trimmed = key.trim();
|
|
13949
14715
|
if (trimmed === "") return;
|
|
13950
14716
|
run("add", async () => {
|
|
13951
|
-
const next = await API$
|
|
14717
|
+
const next = await API$5.accountAction("add", {
|
|
13952
14718
|
apiKey: trimmed,
|
|
13953
14719
|
...alias.trim() === "" ? {} : { alias: alias.trim() },
|
|
13954
14720
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
@@ -13971,7 +14737,7 @@ window.__ModuleLoader__.load({
|
|
|
13971
14737
|
setBusy("test-key");
|
|
13972
14738
|
setError(null);
|
|
13973
14739
|
setNotice(null);
|
|
13974
|
-
API$
|
|
14740
|
+
API$5.testKey({
|
|
13975
14741
|
apiKey: trimmed,
|
|
13976
14742
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
13977
14743
|
}).then((result) => {
|
|
@@ -13982,7 +14748,7 @@ window.__ModuleLoader__.load({
|
|
|
13982
14748
|
setBusy("test:" + accountId);
|
|
13983
14749
|
setError(null);
|
|
13984
14750
|
setNotice(null);
|
|
13985
|
-
API$
|
|
14751
|
+
API$5.testKey({ accountId }).then((result) => {
|
|
13986
14752
|
setNotice(result.authorized ? zh$7.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$7.keyTestFailed.replace("{detail}", result.error));
|
|
13987
14753
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
13988
14754
|
}, []);
|
|
@@ -13994,14 +14760,14 @@ window.__ModuleLoader__.load({
|
|
|
13994
14760
|
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
13995
14761
|
const next = checked ? [.../* @__PURE__ */ new Set([...current, id])] : current.filter((entry) => entry !== id);
|
|
13996
14762
|
run("models", async () => {
|
|
13997
|
-
if (checked) await API$
|
|
13998
|
-
return await API$
|
|
14763
|
+
if (checked) await API$5.setVisibility(id, true);
|
|
14764
|
+
return await API$5.setEnabledModels(next.length === status.models.length ? null : next);
|
|
13999
14765
|
});
|
|
14000
14766
|
}, [status, run]);
|
|
14001
14767
|
const setAllModels = (0, react.useCallback)((selectAll) => {
|
|
14002
14768
|
run("models", async () => {
|
|
14003
|
-
if (selectAll) await API$
|
|
14004
|
-
return await API$
|
|
14769
|
+
if (selectAll) await API$5.setVisibilityAll("all");
|
|
14770
|
+
return await API$5.setEnabledModels(selectAll ? null : []);
|
|
14005
14771
|
});
|
|
14006
14772
|
}, [run]);
|
|
14007
14773
|
const commitContext = (0, react.useCallback)((id) => {
|
|
@@ -14012,7 +14778,7 @@ window.__ModuleLoader__.load({
|
|
|
14012
14778
|
setError(zh$7.error.replace("{detail}", zh$7.defaultContextWindow));
|
|
14013
14779
|
return;
|
|
14014
14780
|
}
|
|
14015
|
-
run("ctx:" + id, () => API$
|
|
14781
|
+
run("ctx:" + id, () => API$5.setContextWindow(id, parsed));
|
|
14016
14782
|
}, [
|
|
14017
14783
|
status,
|
|
14018
14784
|
drafts,
|
|
@@ -14021,7 +14787,7 @@ window.__ModuleLoader__.load({
|
|
|
14021
14787
|
const resetContext = (0, react.useCallback)((id) => {
|
|
14022
14788
|
const fallback = status?.models.find((entry) => entry.id === id)?.defaultContextWindow;
|
|
14023
14789
|
run("ctx:" + id, async () => {
|
|
14024
|
-
const next = await API$
|
|
14790
|
+
const next = await API$5.setContextWindow(id, null);
|
|
14025
14791
|
if (fallback !== void 0) setDrafts((current) => ({
|
|
14026
14792
|
...current,
|
|
14027
14793
|
[id]: formatCapacity$1(fallback)
|
|
@@ -14035,7 +14801,7 @@ window.__ModuleLoader__.load({
|
|
|
14035
14801
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
14036
14802
|
run("ctx-all", async () => {
|
|
14037
14803
|
let next = status;
|
|
14038
|
-
for (const model of overridden) next = await API$
|
|
14804
|
+
for (const model of overridden) next = await API$5.setContextWindow(model.id, null);
|
|
14039
14805
|
setDrafts((current) => {
|
|
14040
14806
|
const draftsNext = { ...current };
|
|
14041
14807
|
for (const model of overridden) draftsNext[model.id] = formatCapacity$1(model.defaultContextWindow);
|
|
@@ -14045,14 +14811,14 @@ window.__ModuleLoader__.load({
|
|
|
14045
14811
|
});
|
|
14046
14812
|
}, [status, run]);
|
|
14047
14813
|
const refreshCatalog = (0, react.useCallback)(() => {
|
|
14048
|
-
run("catalog", async () => (await API$
|
|
14814
|
+
run("catalog", async () => (await API$5.refreshCatalog()).status);
|
|
14049
14815
|
}, [run]);
|
|
14050
14816
|
const searchCatalog = (0, react.useCallback)(() => {
|
|
14051
14817
|
const query = catalogQuery.trim();
|
|
14052
14818
|
if (query === "") return;
|
|
14053
14819
|
setBusy("catalog-search");
|
|
14054
14820
|
setError(null);
|
|
14055
|
-
API$
|
|
14821
|
+
API$5.searchCatalog(query).then((outcome) => {
|
|
14056
14822
|
setCatalogResults(outcome.results);
|
|
14057
14823
|
setCatalogSearched(true);
|
|
14058
14824
|
setCatalogCreditsAck({});
|
|
@@ -14061,7 +14827,7 @@ window.__ModuleLoader__.load({
|
|
|
14061
14827
|
const addCatalogModel = (0, react.useCallback)((id, acknowledgeBilling = false) => {
|
|
14062
14828
|
setBusy("catalog-add:" + id);
|
|
14063
14829
|
setError(null);
|
|
14064
|
-
API$
|
|
14830
|
+
API$5.addCatalogModel(id, acknowledgeBilling).then((outcome) => {
|
|
14065
14831
|
applyStatus(outcome.status);
|
|
14066
14832
|
setCatalogResults((current) => current.map((entry) => entry.id === id ? {
|
|
14067
14833
|
...entry,
|
|
@@ -14071,7 +14837,7 @@ window.__ModuleLoader__.load({
|
|
|
14071
14837
|
}, [applyStatus]);
|
|
14072
14838
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
14073
14839
|
run("usage", async () => {
|
|
14074
|
-
const outcome = await API$
|
|
14840
|
+
const outcome = await API$5.readUsage();
|
|
14075
14841
|
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$7.usageEmpty);
|
|
14076
14842
|
return outcome.status;
|
|
14077
14843
|
});
|
|
@@ -14079,7 +14845,7 @@ window.__ModuleLoader__.load({
|
|
|
14079
14845
|
const loadHistory = (0, react.useCallback)(() => {
|
|
14080
14846
|
setBusy("history");
|
|
14081
14847
|
setError(null);
|
|
14082
|
-
API$
|
|
14848
|
+
API$5.history(50).then(setHistory).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14083
14849
|
}, []);
|
|
14084
14850
|
const saveSettings = (0, react.useCallback)(() => {
|
|
14085
14851
|
if (settingsForm === null) return;
|
|
@@ -14097,7 +14863,7 @@ window.__ModuleLoader__.load({
|
|
|
14097
14863
|
}
|
|
14098
14864
|
setBusy("settings");
|
|
14099
14865
|
setError(null);
|
|
14100
|
-
API$
|
|
14866
|
+
API$5.updateSettings({
|
|
14101
14867
|
baseURL: settingsForm.baseURL,
|
|
14102
14868
|
...numbers
|
|
14103
14869
|
}).then((next) => {
|
|
@@ -14111,7 +14877,7 @@ window.__ModuleLoader__.load({
|
|
|
14111
14877
|
const value = !status.exposeTools;
|
|
14112
14878
|
setBusy("tools");
|
|
14113
14879
|
setError(null);
|
|
14114
|
-
API$
|
|
14880
|
+
API$5.updateSettings({ exposeTools: value }).then((next) => {
|
|
14115
14881
|
applyStatus(next);
|
|
14116
14882
|
setSettingsForm(settingsFormOf$1(next));
|
|
14117
14883
|
setNotice(zh$7.restartRequired);
|
|
@@ -14182,10 +14948,10 @@ window.__ModuleLoader__.load({
|
|
|
14182
14948
|
onLogin: startLogin,
|
|
14183
14949
|
loginBusyLabel: t.loggingIn,
|
|
14184
14950
|
onRelogin: startLogin,
|
|
14185
|
-
onSetPrimary: (id) => void run("set-primary", () => API$
|
|
14186
|
-
onDelete: (id) => void run("delete", () => API$
|
|
14187
|
-
onClearCooldown: (id) => void run("clear-cooldown", () => API$
|
|
14188
|
-
onSetStrategy: (strategy) => void run("strategy", () => API$
|
|
14951
|
+
onSetPrimary: (id) => void run("set-primary", () => API$5.accountAction("set-primary", { accountId: id })),
|
|
14952
|
+
onDelete: (id) => void run("delete", () => API$5.accountAction("delete", { accountId: id })),
|
|
14953
|
+
onClearCooldown: (id) => void run("clear-cooldown", () => API$5.accountAction("clear-cooldown", { accountId: id })),
|
|
14954
|
+
onSetStrategy: (strategy) => void run("strategy", () => API$5.accountAction("strategy", { strategy })),
|
|
14189
14955
|
renderAccountActions: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
14190
14956
|
className: "dsha-btn",
|
|
14191
14957
|
disabled: busyAny,
|
|
@@ -14537,7 +15303,7 @@ window.__ModuleLoader__.load({
|
|
|
14537
15303
|
onTest: () => {
|
|
14538
15304
|
setBusy("test-model:" + model.id);
|
|
14539
15305
|
setError(null);
|
|
14540
|
-
API$
|
|
15306
|
+
API$5.test(model.id).then((outcome) => {
|
|
14541
15307
|
applyStatus(outcome.status);
|
|
14542
15308
|
setResults((current) => ({
|
|
14543
15309
|
...current,
|
|
@@ -16610,7 +17376,7 @@ window.__ModuleLoader__.load({
|
|
|
16610
17376
|
};
|
|
16611
17377
|
//#endregion
|
|
16612
17378
|
//#region src/client/opendesign/OpenDesignSection.tsx
|
|
16613
|
-
const API$
|
|
17379
|
+
const API$4 = new OpenDesignApi();
|
|
16614
17380
|
function detail(error) {
|
|
16615
17381
|
return error instanceof Error ? error.message : String(error);
|
|
16616
17382
|
}
|
|
@@ -16875,7 +17641,7 @@ window.__ModuleLoader__.load({
|
|
|
16875
17641
|
const [loginFlow, setLoginFlow] = (0, react.useState)(null);
|
|
16876
17642
|
const reload = (0, react.useCallback)(async () => {
|
|
16877
17643
|
try {
|
|
16878
|
-
const next = await API$
|
|
17644
|
+
const next = await API$4.status();
|
|
16879
17645
|
setStatus(next);
|
|
16880
17646
|
setSettingsForm((current) => current ?? (next.settings === void 0 ? null : settingsFormOf(next)));
|
|
16881
17647
|
setError(null);
|
|
@@ -16899,7 +17665,7 @@ window.__ModuleLoader__.load({
|
|
|
16899
17665
|
*/
|
|
16900
17666
|
const loadUsage = (0, react.useCallback)(async (silent) => {
|
|
16901
17667
|
try {
|
|
16902
|
-
const outcome = await API$
|
|
17668
|
+
const outcome = await API$4.readUsage();
|
|
16903
17669
|
setStatus(outcome.status);
|
|
16904
17670
|
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$5.usageEmpty);
|
|
16905
17671
|
} catch (cause) {
|
|
@@ -16935,7 +17701,7 @@ window.__ModuleLoader__.load({
|
|
|
16935
17701
|
const flow = loginFlow;
|
|
16936
17702
|
if (flow === null || flow.status !== "pending") return;
|
|
16937
17703
|
const timer = window.setInterval(() => {
|
|
16938
|
-
API$
|
|
17704
|
+
API$4.loginStatus(flow.id).then((next) => {
|
|
16939
17705
|
setLoginFlow(next);
|
|
16940
17706
|
if (next.status === "complete") {
|
|
16941
17707
|
setNotice(zh$5.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
|
|
@@ -16955,7 +17721,7 @@ window.__ModuleLoader__.load({
|
|
|
16955
17721
|
setBusy("login");
|
|
16956
17722
|
setError(null);
|
|
16957
17723
|
setNotice(null);
|
|
16958
|
-
API$
|
|
17724
|
+
API$4.startLogin().then((flow) => {
|
|
16959
17725
|
setLoginFlow(flow);
|
|
16960
17726
|
if (flow.verificationUri !== "" && typeof window !== "undefined" && typeof window.open === "function") try {
|
|
16961
17727
|
window.open(flow.verificationUri, "_blank", "noopener,noreferrer");
|
|
@@ -16964,7 +17730,7 @@ window.__ModuleLoader__.load({
|
|
|
16964
17730
|
}, []);
|
|
16965
17731
|
const cancelLogin = (0, react.useCallback)(() => {
|
|
16966
17732
|
if (loginFlow === null) return;
|
|
16967
|
-
API$
|
|
17733
|
+
API$4.cancelLogin(loginFlow.id).then(() => {
|
|
16968
17734
|
setLoginFlow({
|
|
16969
17735
|
...loginFlow,
|
|
16970
17736
|
status: "cancelled"
|
|
@@ -16983,7 +17749,7 @@ window.__ModuleLoader__.load({
|
|
|
16983
17749
|
const reloginAccount = (0, react.useCallback)((accountId) => {
|
|
16984
17750
|
(async () => {
|
|
16985
17751
|
try {
|
|
16986
|
-
applyStatus(await API$
|
|
17752
|
+
applyStatus(await API$4.accountAction("relogin", { accountId }));
|
|
16987
17753
|
} catch (cause) {
|
|
16988
17754
|
setError(detail(cause));
|
|
16989
17755
|
return;
|
|
@@ -17006,7 +17772,7 @@ window.__ModuleLoader__.load({
|
|
|
17006
17772
|
}, [applyStatus]);
|
|
17007
17773
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
17008
17774
|
run("usage", async () => {
|
|
17009
|
-
const outcome = await API$
|
|
17775
|
+
const outcome = await API$4.readUsage();
|
|
17010
17776
|
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$5.usageEmpty);
|
|
17011
17777
|
return outcome.status;
|
|
17012
17778
|
});
|
|
@@ -17015,7 +17781,7 @@ window.__ModuleLoader__.load({
|
|
|
17015
17781
|
const trimmed = key.trim();
|
|
17016
17782
|
if (trimmed === "") return;
|
|
17017
17783
|
run("add", async () => {
|
|
17018
|
-
const next = await API$
|
|
17784
|
+
const next = await API$4.accountAction("add", {
|
|
17019
17785
|
apiKey: trimmed,
|
|
17020
17786
|
...alias.trim() === "" ? {} : { alias: alias.trim() },
|
|
17021
17787
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
@@ -17038,7 +17804,7 @@ window.__ModuleLoader__.load({
|
|
|
17038
17804
|
setBusy("test-key");
|
|
17039
17805
|
setError(null);
|
|
17040
17806
|
setNotice(null);
|
|
17041
|
-
API$
|
|
17807
|
+
API$4.testKey({
|
|
17042
17808
|
apiKey: trimmed,
|
|
17043
17809
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
17044
17810
|
}).then((result) => {
|
|
@@ -17049,7 +17815,7 @@ window.__ModuleLoader__.load({
|
|
|
17049
17815
|
setBusy("test:" + accountId);
|
|
17050
17816
|
setError(null);
|
|
17051
17817
|
setNotice(null);
|
|
17052
|
-
API$
|
|
17818
|
+
API$4.testKey({ accountId }).then((result) => {
|
|
17053
17819
|
setNotice(result.authorized ? zh$5.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$5.keyTestFailed.replace("{detail}", result.error));
|
|
17054
17820
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
17055
17821
|
}, []);
|
|
@@ -17061,14 +17827,14 @@ window.__ModuleLoader__.load({
|
|
|
17061
17827
|
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
17062
17828
|
const next = checked ? [.../* @__PURE__ */ new Set([...current, id])] : current.filter((entry) => entry !== id);
|
|
17063
17829
|
run("models", async () => {
|
|
17064
|
-
if (checked) await API$
|
|
17065
|
-
return await API$
|
|
17830
|
+
if (checked) await API$4.setVisibility(id, true);
|
|
17831
|
+
return await API$4.setEnabledModels(next.length === status.models.length ? null : next);
|
|
17066
17832
|
});
|
|
17067
17833
|
}, [status, run]);
|
|
17068
17834
|
const setAllModels = (0, react.useCallback)((selectAll) => {
|
|
17069
17835
|
run("models", async () => {
|
|
17070
|
-
if (selectAll) await API$
|
|
17071
|
-
return await API$
|
|
17836
|
+
if (selectAll) await API$4.setVisibilityAll("all");
|
|
17837
|
+
return await API$4.setEnabledModels(selectAll ? null : []);
|
|
17072
17838
|
});
|
|
17073
17839
|
}, [run]);
|
|
17074
17840
|
const commitContext = (0, react.useCallback)((id) => {
|
|
@@ -17079,7 +17845,7 @@ window.__ModuleLoader__.load({
|
|
|
17079
17845
|
setError(zh$5.error.replace("{detail}", zh$5.defaultContextWindow));
|
|
17080
17846
|
return;
|
|
17081
17847
|
}
|
|
17082
|
-
run("ctx:" + id, () => API$
|
|
17848
|
+
run("ctx:" + id, () => API$4.setContextWindow(id, parsed));
|
|
17083
17849
|
}, [
|
|
17084
17850
|
status,
|
|
17085
17851
|
drafts,
|
|
@@ -17088,7 +17854,7 @@ window.__ModuleLoader__.load({
|
|
|
17088
17854
|
const resetContext = (0, react.useCallback)((id) => {
|
|
17089
17855
|
const fallback = status?.models.find((entry) => entry.id === id)?.defaultContextWindow;
|
|
17090
17856
|
run("ctx:" + id, async () => {
|
|
17091
|
-
const next = await API$
|
|
17857
|
+
const next = await API$4.setContextWindow(id, null);
|
|
17092
17858
|
if (fallback !== void 0) setDrafts((current) => ({
|
|
17093
17859
|
...current,
|
|
17094
17860
|
[id]: formatCapacity$1(fallback)
|
|
@@ -17102,7 +17868,7 @@ window.__ModuleLoader__.load({
|
|
|
17102
17868
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
17103
17869
|
run("ctx-all", async () => {
|
|
17104
17870
|
let next = status;
|
|
17105
|
-
for (const model of overridden) next = await API$
|
|
17871
|
+
for (const model of overridden) next = await API$4.setContextWindow(model.id, null);
|
|
17106
17872
|
setDrafts((current) => {
|
|
17107
17873
|
const draftsNext = { ...current };
|
|
17108
17874
|
for (const model of overridden) draftsNext[model.id] = formatCapacity$1(model.defaultContextWindow);
|
|
@@ -17113,7 +17879,7 @@ window.__ModuleLoader__.load({
|
|
|
17113
17879
|
}, [status, run]);
|
|
17114
17880
|
const refreshCatalog = (0, react.useCallback)(() => {
|
|
17115
17881
|
run("catalog", async () => {
|
|
17116
|
-
const outcome = await API$
|
|
17882
|
+
const outcome = await API$4.refreshCatalog();
|
|
17117
17883
|
setNotice(zh$5.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
|
|
17118
17884
|
return outcome.status;
|
|
17119
17885
|
});
|
|
@@ -17133,7 +17899,7 @@ window.__ModuleLoader__.load({
|
|
|
17133
17899
|
}
|
|
17134
17900
|
setBusy("settings");
|
|
17135
17901
|
setError(null);
|
|
17136
|
-
API$
|
|
17902
|
+
API$4.updateSettings({
|
|
17137
17903
|
baseURL: settingsForm.baseURL,
|
|
17138
17904
|
...numbers
|
|
17139
17905
|
}).then((next) => {
|
|
@@ -17197,10 +17963,10 @@ window.__ModuleLoader__.load({
|
|
|
17197
17963
|
onLogin: startLogin,
|
|
17198
17964
|
loginBusyLabel: t.loggingIn,
|
|
17199
17965
|
onRelogin: reloginAccount,
|
|
17200
|
-
onSetPrimary: (id) => void run("set-primary", () => API$
|
|
17201
|
-
onDelete: (id) => void run("delete", () => API$
|
|
17202
|
-
onClearCooldown: (id) => void run("clear-cooldown", () => API$
|
|
17203
|
-
onSetStrategy: (strategy) => void run("strategy", () => API$
|
|
17966
|
+
onSetPrimary: (id) => void run("set-primary", () => API$4.accountAction("set-primary", { accountId: id })),
|
|
17967
|
+
onDelete: (id) => void run("delete", () => API$4.accountAction("delete", { accountId: id })),
|
|
17968
|
+
onClearCooldown: (id) => void run("clear-cooldown", () => API$4.accountAction("clear-cooldown", { accountId: id })),
|
|
17969
|
+
onSetStrategy: (strategy) => void run("strategy", () => API$4.accountAction("strategy", { strategy })),
|
|
17204
17970
|
renderAccountActions: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
17205
17971
|
className: "dsha-btn",
|
|
17206
17972
|
disabled: busyAny,
|
|
@@ -17928,7 +18694,7 @@ window.__ModuleLoader__.load({
|
|
|
17928
18694
|
* `WorkBuddySectionView` — so the contract between the two is visible here
|
|
17929
18695
|
* rather than inferred from the JSX.
|
|
17930
18696
|
*/
|
|
17931
|
-
const API$
|
|
18697
|
+
const API$3 = "/workbuddy/api";
|
|
17932
18698
|
/**
|
|
17933
18699
|
* The shared card's label set.
|
|
17934
18700
|
*
|
|
@@ -17956,7 +18722,7 @@ window.__ModuleLoader__.load({
|
|
|
17956
18722
|
* is exactly what a stale host half produces) be reported as such instead of as
|
|
17957
18723
|
* a bare "Unexpected end of JSON input".
|
|
17958
18724
|
*/
|
|
17959
|
-
const api$5 = createLineApi(API$
|
|
18725
|
+
const api$5 = createLineApi(API$3, "WorkBuddy");
|
|
17960
18726
|
/**
|
|
17961
18727
|
* Reasoning levels the default-effort control may offer.
|
|
17962
18728
|
*
|
|
@@ -19360,6 +20126,12 @@ window.__ModuleLoader__.load({
|
|
|
19360
20126
|
name: "WorkBuddy",
|
|
19361
20127
|
setEnabled: (enabled) => postLineSettings("/workbuddy/api", { enabled }),
|
|
19362
20128
|
renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkBuddySection, { onModelChange })
|
|
20129
|
+
},
|
|
20130
|
+
{
|
|
20131
|
+
id: "antigravity-acp",
|
|
20132
|
+
name: "Antigravity (ACP)",
|
|
20133
|
+
setEnabled: (enabled) => postLineSettings("/antigravity-acp/api", { enabled }),
|
|
20134
|
+
renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AntigravityAcpSection, { onModelChange })
|
|
19363
20135
|
}
|
|
19364
20136
|
];
|
|
19365
20137
|
function hubProviderDescriptor(id) {
|
|
@@ -20082,6 +20854,7 @@ window.__ModuleLoader__.load({
|
|
|
20082
20854
|
"cardName.qoder": "Qoder(订阅)",
|
|
20083
20855
|
"cardName.opendesign": "OpenDesign",
|
|
20084
20856
|
"cardName.workbuddy": "WorkBuddy",
|
|
20857
|
+
"cardName.antigravity-acp": "Antigravity(ACP)",
|
|
20085
20858
|
modelChecklistCount: "已启用 {count}/{total}",
|
|
20086
20859
|
codeRunTitle: "代码",
|
|
20087
20860
|
codeRunOutput: "输出",
|
|
@@ -20304,6 +21077,7 @@ window.__ModuleLoader__.load({
|
|
|
20304
21077
|
"cardName.qoder": "Qoder Subscription",
|
|
20305
21078
|
"cardName.opendesign": "OpenDesign",
|
|
20306
21079
|
"cardName.workbuddy": "WorkBuddy",
|
|
21080
|
+
"cardName.antigravity-acp": "Antigravity (ACP)",
|
|
20307
21081
|
modelChecklistCount: "{count}/{total} enabled",
|
|
20308
21082
|
codeRunTitle: "Code",
|
|
20309
21083
|
codeRunOutput: "Output",
|
|
@@ -20643,7 +21417,7 @@ window.__ModuleLoader__.load({
|
|
|
20643
21417
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
20644
21418
|
* source applies on top of them.
|
|
20645
21419
|
*/
|
|
20646
|
-
const dictionary$
|
|
21420
|
+
const dictionary$14 = {
|
|
20647
21421
|
...accountPoolRu,
|
|
20648
21422
|
title: "Claude (подписка)",
|
|
20649
21423
|
pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
|
|
@@ -20762,7 +21536,7 @@ window.__ModuleLoader__.load({
|
|
|
20762
21536
|
};
|
|
20763
21537
|
//#endregion
|
|
20764
21538
|
//#region src/client/locales-ru/cline-pass.ts
|
|
20765
|
-
const dictionary$
|
|
21539
|
+
const dictionary$13 = {
|
|
20766
21540
|
...accountPoolRu,
|
|
20767
21541
|
relogin: "Войти заново",
|
|
20768
21542
|
needsRelogin: "Вход истёк",
|
|
@@ -20888,7 +21662,7 @@ window.__ModuleLoader__.load({
|
|
|
20888
21662
|
};
|
|
20889
21663
|
//#endregion
|
|
20890
21664
|
//#region src/client/locales-ru/command-code.ts
|
|
20891
|
-
const dictionary$
|
|
21665
|
+
const dictionary$12 = {
|
|
20892
21666
|
...accountPoolRu,
|
|
20893
21667
|
title: "Command Code",
|
|
20894
21668
|
pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
|
|
@@ -20958,7 +21732,7 @@ window.__ModuleLoader__.load({
|
|
|
20958
21732
|
};
|
|
20959
21733
|
//#endregion
|
|
20960
21734
|
//#region src/client/locales-ru/glm-coding-plan.ts
|
|
20961
|
-
const dictionary$
|
|
21735
|
+
const dictionary$11 = {
|
|
20962
21736
|
...accountPoolRu,
|
|
20963
21737
|
title: "GLM (аккаунт ZCode)",
|
|
20964
21738
|
pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
|
|
@@ -21061,7 +21835,7 @@ window.__ModuleLoader__.load({
|
|
|
21061
21835
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
21062
21836
|
* source applies on top of them.
|
|
21063
21837
|
*/
|
|
21064
|
-
const dictionary$
|
|
21838
|
+
const dictionary$10 = {
|
|
21065
21839
|
...accountPoolRu,
|
|
21066
21840
|
title: "ChatGPT",
|
|
21067
21841
|
hubTitle: "Подписки",
|
|
@@ -21268,6 +22042,7 @@ window.__ModuleLoader__.load({
|
|
|
21268
22042
|
"cardName.qoder": "Qoder (подписка)",
|
|
21269
22043
|
"cardName.opendesign": "OpenDesign",
|
|
21270
22044
|
"cardName.workbuddy": "WorkBuddy",
|
|
22045
|
+
"cardName.antigravity-acp": "Antigravity (ACP)",
|
|
21271
22046
|
modelChecklistCount: "Включено {count}/{total}",
|
|
21272
22047
|
codeRunTitle: "Код",
|
|
21273
22048
|
codeRunOutput: "Вывод",
|
|
@@ -21283,7 +22058,7 @@ window.__ModuleLoader__.load({
|
|
|
21283
22058
|
};
|
|
21284
22059
|
//#endregion
|
|
21285
22060
|
//#region src/client/locales-ru/kimi-code.ts
|
|
21286
|
-
const dictionary$
|
|
22061
|
+
const dictionary$9 = {
|
|
21287
22062
|
...accountPoolRu,
|
|
21288
22063
|
title: "Kimi Code",
|
|
21289
22064
|
pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
|
|
@@ -21472,7 +22247,7 @@ window.__ModuleLoader__.load({
|
|
|
21472
22247
|
};
|
|
21473
22248
|
//#endregion
|
|
21474
22249
|
//#region src/client/locales-ru/minimax-code.ts
|
|
21475
|
-
const dictionary$
|
|
22250
|
+
const dictionary$8 = {
|
|
21476
22251
|
...accountPoolRu,
|
|
21477
22252
|
title: "MiniMax Code",
|
|
21478
22253
|
pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
|
|
@@ -21672,7 +22447,7 @@ window.__ModuleLoader__.load({
|
|
|
21672
22447
|
};
|
|
21673
22448
|
//#endregion
|
|
21674
22449
|
//#region src/client/locales-ru/ollama.ts
|
|
21675
|
-
const dictionary$
|
|
22450
|
+
const dictionary$7 = {
|
|
21676
22451
|
...accountPoolRu,
|
|
21677
22452
|
relogin: "Заменить ключ",
|
|
21678
22453
|
needsRelogin: "Ключ отклонён",
|
|
@@ -21725,6 +22500,94 @@ window.__ModuleLoader__.load({
|
|
|
21725
22500
|
usageHint: "Суммируется локально по счётчикам токенов, которые Ollama возвращает в каждом ответе."
|
|
21726
22501
|
};
|
|
21727
22502
|
//#endregion
|
|
22503
|
+
//#region src/client/locales-ru/antigravity-acp.ts
|
|
22504
|
+
const dictionary$6 = {
|
|
22505
|
+
title: "Antigravity (ACP)",
|
|
22506
|
+
pageDesc: "Подключение через официальный Antigravity CLI от Google по Agent Client Protocol (ACP): модель, инструменты и сессии приходят от официального процесса, и он же хранит состояние входа.",
|
|
22507
|
+
routeOwned: "Маршрут моделей обслуживает этот плагин",
|
|
22508
|
+
routeConflict: "Маршрут моделей уже занят другим провайдером: {detail}",
|
|
22509
|
+
binarySection: "Среда выполнения",
|
|
22510
|
+
binarySourceLabel: "Используется",
|
|
22511
|
+
binaryHintSummary: "Откуда берётся исполняемый файл?",
|
|
22512
|
+
binaryKindLocal: "Локальный Antigravity CLI",
|
|
22513
|
+
binaryKindConfigured: "Указанный путь",
|
|
22514
|
+
binaryKindDownloaded: "Официальный ACP-сервер (загружен)",
|
|
22515
|
+
binaryKindMissing: "Рабочий agy не найден",
|
|
22516
|
+
binaryVersion: "версия {version}",
|
|
22517
|
+
binaryMissingHint: "Локальный agy не найден, а официальный ACP-сервер ещё не загружен. Установите Antigravity CLI и откройте эту страницу снова — или укажите путь к исполняемому файлу вручную.",
|
|
22518
|
+
binaryPathLabel: "Путь к исполняемому файлу",
|
|
22519
|
+
binaryPathPlaceholder: "Оставьте пустым для автоматического поиска (локальный agy, затем официальный ACP-сервер)",
|
|
22520
|
+
binaryPathSave: "Сохранить путь",
|
|
22521
|
+
binaryPathReset: "Вернуть автопоиск",
|
|
22522
|
+
authSection: "Вход",
|
|
22523
|
+
statusLabel: "Состояние",
|
|
22524
|
+
signedIn: "Выполнен вход",
|
|
22525
|
+
signedOut: "Вход не выполнен",
|
|
22526
|
+
signIn: "Войти через Google",
|
|
22527
|
+
signInAgain: "Войти снова",
|
|
22528
|
+
signInStarting: "Запуск…",
|
|
22529
|
+
signInSuccess: "Вход запущен: браузер откроет Antigravity CLI, а состояние здесь сменится на «выполнен вход» после подтверждения.",
|
|
22530
|
+
signInAlready: "Вход уже выполнен, повторять его не нужно.",
|
|
22531
|
+
signInHintSummary: "Как проходит вход?",
|
|
22532
|
+
signInHint: "Вход выполняет сам Antigravity CLI: он откроет браузер, после чего вернитесь сюда и обновите состояние. Плагин не читает и не сохраняет ваши учётные данные Google.",
|
|
22533
|
+
signInHeadless: "На хосте без графической среды выполните в терминале agy acp --login, затем обновите страницу.",
|
|
22534
|
+
tierLabel: "Тариф",
|
|
22535
|
+
tierUnknown: "Официальный процесс не сообщил",
|
|
22536
|
+
refreshStatus: "Обновить состояние",
|
|
22537
|
+
runDoctor: "Запустить самопроверку",
|
|
22538
|
+
doctorRunning: "Проверка…",
|
|
22539
|
+
doctorTitle: "Результат самопроверки",
|
|
22540
|
+
modelsSection: "Модели",
|
|
22541
|
+
modelsHint: "Список моделей приходит из живой ACP-сессии и зависит от аккаунта и тарифа; он не поставляется с плагином. Уровни размышления публикует каждая модель сама.",
|
|
22542
|
+
catalogNeverSynced: "Список моделей ещё не синхронизирован. Нажмите «Синхронизировать модели» выше, чтобы получить доступные этому аккаунту модели.",
|
|
22543
|
+
catalogStale: "Показан кэшированный список с прошлой синхронизации.",
|
|
22544
|
+
catalogSync: "Синхронизировать модели",
|
|
22545
|
+
catalogSyncing: "Синхронизация…",
|
|
22546
|
+
catalogFailed: "Не удалось прочитать список моделей: {detail}",
|
|
22547
|
+
modelCount: "Моделей: {count}",
|
|
22548
|
+
noModels: "Официальный процесс не вернул ни одной модели.",
|
|
22549
|
+
selectAll: "Выбрать все",
|
|
22550
|
+
unselectAll: "Снять все",
|
|
22551
|
+
noneSelected: "Ни одна модель не выбрана, поэтому линия не появится в выборе моделей.",
|
|
22552
|
+
effortLabels: "Уровни размышления: {levels}",
|
|
22553
|
+
enhanced: "Дополнительно",
|
|
22554
|
+
defaultReasoningEffort: "Уровень размышления по умолчанию",
|
|
22555
|
+
defaultReasoningEffortHint: "Используется как значение по умолчанию для новых сессий; явный запрос имеет приоритет. Уровень, который модель не принимает, отбрасывается, а не роняет весь ход.",
|
|
22556
|
+
defaultEffortAuto: "Не указывать (по умолчанию у официального клиента)",
|
|
22557
|
+
permissionPolicy: "Разрешения инструментов",
|
|
22558
|
+
permissionPolicyReject: "Отклонять (рекомендуется)",
|
|
22559
|
+
permissionPolicyAllow: "Автоматически разрешать allow_once",
|
|
22560
|
+
permissionPolicyHint: "В основной линии вызовы инструментов Antigravity возвращаются в DSH через локальный MCP-мост, и ими управляют пресеты разрешений DSH. Эта настройка касается собственных запросов разрешений официального процесса и авторазрешения в режиме субагента.",
|
|
22561
|
+
usageSection: "Расход последнего хода",
|
|
22562
|
+
usageInputLabel: "Вход",
|
|
22563
|
+
usageOutputLabel: "Выход",
|
|
22564
|
+
usageCacheLabel: "Чтение из кэша",
|
|
22565
|
+
usageDurationLabel: "Длительность",
|
|
22566
|
+
usageHintSummary: "Почему здесь нет процента квоты?",
|
|
22567
|
+
usageInput: "вход {tokens}",
|
|
22568
|
+
usageOutput: "выход {tokens}",
|
|
22569
|
+
usageCache: "чтение из кэша {tokens}",
|
|
22570
|
+
usageDuration: "{seconds} с",
|
|
22571
|
+
usageNone: "Завершённых ходов пока нет.",
|
|
22572
|
+
usageHint: "Официальный ACP-сервер не публикует остаток квоты или процент тарифа, поэтому карточка показывает только реально возвращённые счётчики токенов.",
|
|
22573
|
+
occupancyLabel: "Заполнение контекста",
|
|
22574
|
+
occupancyDetail: "использовано {used} из {size}",
|
|
22575
|
+
scopeSection: "Границы возможностей",
|
|
22576
|
+
scopeSummary: "Четыре объективных ограничения: нет слота системного промпта, новая сессия каждый ход, официальные инструменты в режиме субагента и отсутствие публикуемой квоты.",
|
|
22577
|
+
scopeHintSummary: "Показать четыре ограничения",
|
|
22578
|
+
scopeHint: "Это объективные ограничения ACP и официального агента; данная линия их не обходит:",
|
|
22579
|
+
scopePrompt: "В ACP нет отдельного слота системного промпта: системный промпт DSH передаётся в начале запроса, а собственный системный промпт официального агента убрать нельзя.",
|
|
22580
|
+
scopeHistory: "Каждый ход заново создаёт ACP-сессию из полной истории DSH; если история сжата или переписана, создаётся новая сессия вместо продолжения той, что может уже не совпадать.",
|
|
22581
|
+
scopeTools: "Как основная модель линия выполняет вызовы инструментов через DSH и под его контролем; как субагент дочерний процесс использует собственные инструменты официального агента.",
|
|
22582
|
+
scopeQuota: "Официальный сервер не публикует остаток квоты, поэтому карточка не показывает ни процентов, ни баланса.",
|
|
22583
|
+
error: "Не удалось выполнить действие: {detail}",
|
|
22584
|
+
complianceSummary: "Риск по условиям (нажмите, чтобы прочитать)",
|
|
22585
|
+
complianceNotice: "Риск по условиям использования: официальный FAQ Google Antigravity указывает, что доступ к Antigravity через стороннее программное обеспечение, инструменты или сервисы нарушает Условия использования и может привести к приостановке или прекращению действия аккаунта; там же сказано, что обёртывание agy в сторонние кодирующие агенты или приложения и автоматическая ротация аккаунтов не поддерживаются на потребительских тарифах. Плагин запускает официальные agy и ACP-сервер Google (без реверс-инжиниринга протокола, без доступа к учётным данным, один аккаунт, без ротации), но эти меры не устраняют риск. Продолжать пользоваться или нет — ваше решение. Если требуется нулевая спорность, используйте Gemini Enterprise или API-ключ Google AI Studio.",
|
|
22586
|
+
disabledHint: "Линия сейчас отключена. Включите её на карточке в обзоре подписок — после этого она появится в выборе моделей.",
|
|
22587
|
+
enabledHint: "Линия включена.",
|
|
22588
|
+
toggleHint: "Отключить её можно в любой момент на карточке в обзоре подписок."
|
|
22589
|
+
};
|
|
22590
|
+
//#endregion
|
|
21728
22591
|
//#region src/client/locales-ru/opendesign.ts
|
|
21729
22592
|
const dictionary$5 = {
|
|
21730
22593
|
...accountPoolRu,
|
|
@@ -22364,20 +23227,21 @@ window.__ModuleLoader__.load({
|
|
|
22364
23227
|
}
|
|
22365
23228
|
}, "dsh-chatgpt-subscription: ru language");
|
|
22366
23229
|
const dictionaries = [
|
|
22367
|
-
[NS, dictionary$
|
|
22368
|
-
[NS_CLAUDE, dictionary$
|
|
22369
|
-
[NS_COMMAND_CODE, dictionary$
|
|
22370
|
-
[NS_KIMI_CODE, dictionary$
|
|
22371
|
-
[NS_MINIMAX_CODE, dictionary$
|
|
22372
|
-
[NS_GLM_CODING_PLAN, dictionary$
|
|
22373
|
-
[NS_OLLAMA, dictionary$
|
|
23230
|
+
[NS, dictionary$10],
|
|
23231
|
+
[NS_CLAUDE, dictionary$14],
|
|
23232
|
+
[NS_COMMAND_CODE, dictionary$12],
|
|
23233
|
+
[NS_KIMI_CODE, dictionary$9],
|
|
23234
|
+
[NS_MINIMAX_CODE, dictionary$8],
|
|
23235
|
+
[NS_GLM_CODING_PLAN, dictionary$11],
|
|
23236
|
+
[NS_OLLAMA, dictionary$7],
|
|
22374
23237
|
[NS_STEP_CODE, dictionary$1],
|
|
22375
|
-
[NS_CLINE_PASS, dictionary$
|
|
23238
|
+
[NS_CLINE_PASS, dictionary$13],
|
|
22376
23239
|
[NS_QODER, dictionary$2],
|
|
22377
23240
|
[NS_OPENDESIGN, dictionary$5],
|
|
22378
23241
|
[NS_PROGRESS_UPDATES, dictionary$3],
|
|
22379
23242
|
[NS_WORKBUDDY, dictionary],
|
|
22380
|
-
[NS_DISPATCH_LEDGER, dictionary$4]
|
|
23243
|
+
[NS_DISPATCH_LEDGER, dictionary$4],
|
|
23244
|
+
[NS_ANTIGRAVITY_ACP, dictionary$6]
|
|
22381
23245
|
];
|
|
22382
23246
|
for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
|
|
22383
23247
|
try {
|
|
@@ -22920,7 +23784,7 @@ window.__ModuleLoader__.load({
|
|
|
22920
23784
|
}
|
|
22921
23785
|
//#endregion
|
|
22922
23786
|
//#region src/client/claude/styles.ts
|
|
22923
|
-
const STYLE_ID$
|
|
23787
|
+
const STYLE_ID$7 = "dsh-claude-settings-style";
|
|
22924
23788
|
/**
|
|
22925
23789
|
* Claude-only additions to the shared settings design system.
|
|
22926
23790
|
*
|
|
@@ -22944,7 +23808,7 @@ window.__ModuleLoader__.load({
|
|
|
22944
23808
|
.dshcl-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;overflow-wrap:anywhere}
|
|
22945
23809
|
.dshcl-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
|
|
22946
23810
|
.dshcl-empty-inline{color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
22947
|
-
`, STYLE_ID$
|
|
23811
|
+
`, STYLE_ID$7);
|
|
22948
23812
|
}
|
|
22949
23813
|
//#endregion
|
|
22950
23814
|
//#region src/client/command-code/CommandCodeComposerQuota.tsx
|
|
@@ -23061,7 +23925,7 @@ window.__ModuleLoader__.load({
|
|
|
23061
23925
|
}
|
|
23062
23926
|
//#endregion
|
|
23063
23927
|
//#region src/client/kimi-code/styles.ts
|
|
23064
|
-
const STYLE_ID$
|
|
23928
|
+
const STYLE_ID$6 = "dsh-kimi-code-settings-style";
|
|
23065
23929
|
/**
|
|
23066
23930
|
* Node the base control styles come from.
|
|
23067
23931
|
*
|
|
@@ -23203,7 +24067,7 @@ window.__ModuleLoader__.load({
|
|
|
23203
24067
|
`;
|
|
23204
24068
|
/** Kimi-specific rules layered on top of the shared control styles. */
|
|
23205
24069
|
function installKimiCodeStyles() {
|
|
23206
|
-
installPluginStyle("kimi-code", BASE, STYLE_ID$
|
|
24070
|
+
installPluginStyle("kimi-code", BASE, STYLE_ID$6);
|
|
23207
24071
|
}
|
|
23208
24072
|
//#endregion
|
|
23209
24073
|
//#region src/client/minimax-code/MinimaxCodeComposerQuota.tsx
|
|
@@ -23339,7 +24203,7 @@ window.__ModuleLoader__.load({
|
|
|
23339
24203
|
//#region src/client/minimax-code/MinimaxVideoDocumentBody.tsx
|
|
23340
24204
|
/** 兜底翻译:只在没有 locale 座位时用到。 */
|
|
23341
24205
|
function translate$1(key) {
|
|
23342
|
-
return zh$
|
|
24206
|
+
return zh$13[key] ?? key;
|
|
23343
24207
|
}
|
|
23344
24208
|
/**
|
|
23345
24209
|
* 一个文件地址里的会话与路径。
|
|
@@ -23475,7 +24339,7 @@ window.__ModuleLoader__.load({
|
|
|
23475
24339
|
*/
|
|
23476
24340
|
/** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
|
|
23477
24341
|
function translate(key) {
|
|
23478
|
-
return zh$
|
|
24342
|
+
return zh$13[key] ?? key;
|
|
23479
24343
|
}
|
|
23480
24344
|
/**
|
|
23481
24345
|
* 一张视频工具卡片。
|
|
@@ -23745,7 +24609,7 @@ window.__ModuleLoader__.load({
|
|
|
23745
24609
|
}
|
|
23746
24610
|
//#endregion
|
|
23747
24611
|
//#region src/client/minimax-code/styles.ts
|
|
23748
|
-
const STYLE_ID$
|
|
24612
|
+
const STYLE_ID$5 = "dsh-minimax-code-settings-style";
|
|
23749
24613
|
/**
|
|
23750
24614
|
* MiniMax Code-only additions to the shared settings design system.
|
|
23751
24615
|
*
|
|
@@ -23914,7 +24778,7 @@ window.__ModuleLoader__.load({
|
|
|
23914
24778
|
.dshm-video-history-meta{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11px;font-variant-numeric:tabular-nums}
|
|
23915
24779
|
@media(max-width:560px){.dshm-video-modal-root{padding:12px 8px}.dshm-video-modal{max-height:calc(100vh - 24px)}.dshm-video-field-row{flex-direction:column;gap:8px}.dshm-video-foot-hint{display:none}}
|
|
23916
24780
|
@media(prefers-reduced-motion:reduce){.dshm-video-skeleton span{animation:none;opacity:.6}}
|
|
23917
|
-
`, STYLE_ID$
|
|
24781
|
+
`, STYLE_ID$5);
|
|
23918
24782
|
}
|
|
23919
24783
|
//#endregion
|
|
23920
24784
|
//#region src/client/glm-coding-plan/GlmCodingPlanComposerQuota.tsx
|
|
@@ -23931,7 +24795,7 @@ window.__ModuleLoader__.load({
|
|
|
23931
24795
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
|
|
23932
24796
|
* 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
|
|
23933
24797
|
*/
|
|
23934
|
-
function selectBadgeFacts$3(status, lookup = (key) => zh$
|
|
24798
|
+
function selectBadgeFacts$3(status, lookup = (key) => zh$12[key]) {
|
|
23935
24799
|
const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
|
|
23936
24800
|
if (measured.length === 0) return null;
|
|
23937
24801
|
const tightest = measured.reduce((best, window) => {
|
|
@@ -23962,14 +24826,14 @@ window.__ModuleLoader__.load({
|
|
|
23962
24826
|
directory,
|
|
23963
24827
|
loadModelDirectory,
|
|
23964
24828
|
providerId: GLM_CODING_PLAN_PROVIDER_ID,
|
|
23965
|
-
readStatus: (refresh) => refresh ? post$
|
|
24829
|
+
readStatus: (refresh) => refresh ? post$4("/quota", {}) : get$2("/status"),
|
|
23966
24830
|
selectFacts: (status) => selectBadgeFacts$3(status, t),
|
|
23967
24831
|
label: t("composerLabel")
|
|
23968
24832
|
});
|
|
23969
24833
|
}
|
|
23970
24834
|
//#endregion
|
|
23971
24835
|
//#region src/client/glm-coding-plan/styles.ts
|
|
23972
|
-
const STYLE_ID$
|
|
24836
|
+
const STYLE_ID$4 = "dsh-glm-coding-plan-settings-style";
|
|
23973
24837
|
/**
|
|
23974
24838
|
* GLM(ZCode 账号)卡片独有的样式。
|
|
23975
24839
|
*
|
|
@@ -24009,6 +24873,92 @@ window.__ModuleLoader__.load({
|
|
|
24009
24873
|
:not(.dsha-btn-primary));通用 hover 修好后它只剩副作用:把 .dsha-btn 的次要
|
|
24010
24874
|
按钮也画成主按钮,故删除。 */
|
|
24011
24875
|
.dsha-account-add-actions{display:flex;flex-wrap:wrap;gap:8px}
|
|
24876
|
+
`, STYLE_ID$4);
|
|
24877
|
+
}
|
|
24878
|
+
//#endregion
|
|
24879
|
+
//#region src/client/antigravity-acp/route.ts
|
|
24880
|
+
/** The provider route id this line serves; shared by the adapter and the client badge. */
|
|
24881
|
+
const PROVIDER_ROUTE_ID = "antigravity-acp";
|
|
24882
|
+
//#endregion
|
|
24883
|
+
//#region src/client/antigravity-acp/AntigravityAcpComposerBadge.tsx
|
|
24884
|
+
const API$2 = new AntigravityAcpApi();
|
|
24885
|
+
/**
|
|
24886
|
+
* The composer badge for the Antigravity line.
|
|
24887
|
+
*
|
|
24888
|
+
* It shows what the official server actually reported - plan tier and the last
|
|
24889
|
+
* turn's token counts - and nothing else. There is deliberately no percentage:
|
|
24890
|
+
* ACP publishes no remaining quota, and a badge that invented one would be the
|
|
24891
|
+
* single most misleading pixel on the page.
|
|
24892
|
+
*/
|
|
24893
|
+
function AntigravityAcpComposerBadge(props) {
|
|
24894
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$9);
|
|
24895
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
|
|
24896
|
+
directory: props.directory,
|
|
24897
|
+
loadModelDirectory: props.loadModelDirectory,
|
|
24898
|
+
providerId: PROVIDER_ROUTE_ID,
|
|
24899
|
+
label: t.title,
|
|
24900
|
+
readStatus: async (refresh) => {
|
|
24901
|
+
const status = refresh ? await API$2.refresh() : await API$2.status();
|
|
24902
|
+
return {
|
|
24903
|
+
...status,
|
|
24904
|
+
authenticated: status.auth.authenticated
|
|
24905
|
+
};
|
|
24906
|
+
},
|
|
24907
|
+
selectFacts: (status) => status === null ? null : factsFor(status, t)
|
|
24908
|
+
});
|
|
24909
|
+
}
|
|
24910
|
+
/** What the badge says for one status read; null means there is nothing honest to show. */
|
|
24911
|
+
function factsFor(status, t) {
|
|
24912
|
+
const tier = status.auth.tier;
|
|
24913
|
+
const usage = status.usage;
|
|
24914
|
+
if (status.auth.authenticated !== true) return null;
|
|
24915
|
+
if (tier === void 0 && usage === void 0) return null;
|
|
24916
|
+
const parts = [];
|
|
24917
|
+
if (tier !== void 0) parts.push(tier.name);
|
|
24918
|
+
if (usage !== void 0) {
|
|
24919
|
+
parts.push(t.usageInput.replace("{tokens}", compact(usage.inputTokens)));
|
|
24920
|
+
parts.push(t.usageOutput.replace("{tokens}", compact(usage.outputTokens)));
|
|
24921
|
+
}
|
|
24922
|
+
return {
|
|
24923
|
+
text: tier?.name ?? compact(usage?.inputTokens ?? 0),
|
|
24924
|
+
tooltip: parts.join(" · ") || t.usageNone,
|
|
24925
|
+
level: "normal"
|
|
24926
|
+
};
|
|
24927
|
+
}
|
|
24928
|
+
function compact(value) {
|
|
24929
|
+
if (!Number.isFinite(value) || value < 0) return "—";
|
|
24930
|
+
if (value < 1e3) return String(Math.floor(value));
|
|
24931
|
+
if (value < 1e6) return (value / 1e3).toFixed(value < 1e4 ? 1 : 0) + "K";
|
|
24932
|
+
return (value / 1e6).toFixed(1) + "M";
|
|
24933
|
+
}
|
|
24934
|
+
//#endregion
|
|
24935
|
+
//#region src/client/antigravity-acp/styles.ts
|
|
24936
|
+
const STYLE_ID$3 = "dsh-antigravity-acp-settings-style";
|
|
24937
|
+
/**
|
|
24938
|
+
* The Antigravity (ACP) card's own styles.
|
|
24939
|
+
*
|
|
24940
|
+
* Shared styles are never declared twice: the model checklist (`.dsh-mcl-*`) comes
|
|
24941
|
+
* from the shared model-checklist stylesheet, the base controls (`.dsha-group`,
|
|
24942
|
+
* `.dsha-pref-row`, `.dsha-select`, the composer pill) from the siblings' installers,
|
|
24943
|
+
* and the account-card skeleton is not used at all here because this line owns no
|
|
24944
|
+
* account pool.
|
|
24945
|
+
*
|
|
24946
|
+
* What is left is the one block nothing else has: the runtime line that states
|
|
24947
|
+
* which executable is in force and where it came from.
|
|
24948
|
+
*/
|
|
24949
|
+
function installAntigravityAcpStyles() {
|
|
24950
|
+
installPluginStyle("antigravity-acp", `
|
|
24951
|
+
.dshagy-runtime{align-items:baseline;display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:4px}
|
|
24952
|
+
.dshagy-runtime-kind{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600}
|
|
24953
|
+
.dshagy-runtime-path{color:var(--dsw-alias-label-tertiary);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;overflow-wrap:anywhere;user-select:all}
|
|
24954
|
+
/* 折叠区:与 qoder / cline-pass 卡同一套写法——summary 是 12px 次要色、展开后正文同尺寸,
|
|
24955
|
+
details 默认不占版面。卡上只留一行结论,长句全部收进这里,不是删掉。 */
|
|
24956
|
+
.dshagy-details{border-top:0.5px solid var(--dsw-alias-border-l2);padding:10px 0 2px}
|
|
24957
|
+
.dshagy-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;line-height:1.5;list-style:none;user-select:none}
|
|
24958
|
+
.dshagy-details>summary::-webkit-details-marker{display:none}
|
|
24959
|
+
.dshagy-details[open]>summary{color:var(--dsw-alias-label-primary)}
|
|
24960
|
+
.dshagy-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
24961
|
+
.dshagy-boundary{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0;padding-left:18px}
|
|
24012
24962
|
`, STYLE_ID$3);
|
|
24013
24963
|
}
|
|
24014
24964
|
//#endregion
|
|
@@ -26274,7 +27224,7 @@ window.__ModuleLoader__.load({
|
|
|
26274
27224
|
}
|
|
26275
27225
|
/** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
|
|
26276
27226
|
function fallbackTranslate$3(key, params) {
|
|
26277
|
-
const template = zh$
|
|
27227
|
+
const template = zh$13[key] ?? key;
|
|
26278
27228
|
if (params === void 0) return template;
|
|
26279
27229
|
return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
|
|
26280
27230
|
}
|
|
@@ -59667,28 +60617,33 @@ window.__ModuleLoader__.load({
|
|
|
59667
60617
|
installModelChecklistStyles();
|
|
59668
60618
|
return () => {};
|
|
59669
60619
|
}, "dsh-chatgpt-subscription: hub styles");
|
|
59670
|
-
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$
|
|
60620
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$11), "dsh-claude: dictionaries");
|
|
59671
60621
|
ctx.effect(() => {
|
|
59672
60622
|
installClaudeStyles();
|
|
59673
60623
|
return () => {};
|
|
59674
60624
|
}, "dsh-claude: styles");
|
|
59675
|
-
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$
|
|
59676
|
-
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$
|
|
60625
|
+
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$15), "dsh-command-code: dictionaries");
|
|
60626
|
+
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$14), "dsh-kimi-code: dictionaries");
|
|
59677
60627
|
ctx.effect(() => {
|
|
59678
60628
|
installKimiCodeStyles();
|
|
59679
60629
|
return () => {};
|
|
59680
60630
|
}, "dsh-kimi-code: styles");
|
|
59681
|
-
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$
|
|
60631
|
+
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$13), "dsh-minimax-code: dictionaries");
|
|
59682
60632
|
ctx.effect(() => {
|
|
59683
60633
|
installMinimaxCodeStyles();
|
|
59684
60634
|
return () => {};
|
|
59685
60635
|
}, "dsh-minimax-code: styles");
|
|
59686
|
-
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$
|
|
60636
|
+
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$12), "dsh-glm-coding-plan: dictionaries");
|
|
59687
60637
|
ctx.effect(() => {
|
|
59688
60638
|
installGlmCodingPlanStyles();
|
|
59689
60639
|
return () => {};
|
|
59690
60640
|
}, "dsh-glm-coding-plan: styles");
|
|
59691
|
-
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$
|
|
60641
|
+
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$10), "dsh-ollama: dictionaries");
|
|
60642
|
+
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$9), "dsh-antigravity-acp: dictionaries");
|
|
60643
|
+
ctx.effect(() => {
|
|
60644
|
+
installAntigravityAcpStyles();
|
|
60645
|
+
return () => {};
|
|
60646
|
+
}, "dsh-antigravity-acp: styles");
|
|
59692
60647
|
ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$1), "dsh-progress-updates: dictionaries");
|
|
59693
60648
|
ctx.effect(() => {
|
|
59694
60649
|
installProgressUpdatesStyles();
|
|
@@ -59830,6 +60785,13 @@ window.__ModuleLoader__.load({
|
|
|
59830
60785
|
locale: NS_WORKBUDDY,
|
|
59831
60786
|
inject: (sessionId) => composerBadgeInject(ctx, sessionId)
|
|
59832
60787
|
}, WorkBuddyComposerQuota));
|
|
60788
|
+
ctx.slots.inject("conversation.input.right", () => ctx.slots.register({
|
|
60789
|
+
name: "conversation.input.right",
|
|
60790
|
+
id: "antigravity-acp-quota",
|
|
60791
|
+
order: 48,
|
|
60792
|
+
locale: NS_ANTIGRAVITY_ACP,
|
|
60793
|
+
inject: (sessionId) => composerBadgeInject(ctx, sessionId)
|
|
60794
|
+
}, AntigravityAcpComposerBadge));
|
|
59833
60795
|
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
59834
60796
|
name: "tool.call.toolview",
|
|
59835
60797
|
key: CODEX_IMAGE_TOOL_NAME,
|