dsh-opencode-go 0.1.22 → 0.1.24

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.
Files changed (37) hide show
  1. package/LICENSE +1 -0
  2. package/README.en.md +70 -147
  3. package/README.md +70 -145
  4. package/THIRD_PARTY_NOTICES.md +6 -2
  5. package/docs/advanced.en.md +137 -0
  6. package/docs/advanced.md +135 -0
  7. package/docs/assets/accounts.png +0 -0
  8. package/docs/assets/advanced-settings.png +0 -0
  9. package/docs/assets/model-settings.png +0 -0
  10. package/docs/assets/usage-panel.png +0 -0
  11. package/docs/development.md +17 -3
  12. package/docs/verification.md +183 -0
  13. package/lib/build-info.json +1 -1
  14. package/lib/client.js +456 -410
  15. package/lib/index.js +50626 -5092
  16. package/lib/types/account-manager.d.ts +2 -0
  17. package/lib/types/accounts.d.ts +3 -1
  18. package/lib/types/adapter.d.ts +5 -3
  19. package/lib/types/catalog.d.ts +1 -1
  20. package/lib/types/client/accounts-controller.d.ts +2 -0
  21. package/lib/types/client/hint-mark.d.ts +17 -0
  22. package/lib/types/client/host-primitives.d.ts +11 -0
  23. package/lib/types/client/locales.d.ts +5 -3
  24. package/lib/types/client/section-controller.d.ts +0 -2
  25. package/lib/types/config-contract.d.ts +3 -2
  26. package/lib/types/config.d.ts +1 -1
  27. package/lib/types/conversion/stream.d.ts +2 -1
  28. package/lib/types/gateway-diagnostics.d.ts +1 -0
  29. package/lib/types/gateway-url.d.ts +6 -0
  30. package/lib/types/google-fetch.d.ts +6 -0
  31. package/lib/types/google-generative-ai.d.ts +3 -0
  32. package/lib/types/index.d.ts +1 -1
  33. package/lib/types/model-metadata.d.ts +2 -2
  34. package/lib/types/request-budget.d.ts +12 -0
  35. package/lib/types/sdk-types.d.ts +1893 -305
  36. package/lib/vendor-licenses.txt +1760 -2
  37. package/package.json +3 -2
package/lib/client.js CHANGED
@@ -40,7 +40,43 @@ module.exports = __toCommonJS(index_exports);
40
40
  // src/client/Section.tsx
41
41
  var import_react3 = require("react");
42
42
  var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
43
- var primitives2 = __toESM(require("@deepseek-ai/dsh-client-ui-primitives"), 1);
43
+ var primitives3 = __toESM(require("@deepseek-ai/dsh-client-ui-primitives"), 1);
44
+
45
+ // src/client/host-primitives.ts
46
+ function hostAtom(host, current, previous) {
47
+ return host[current] ?? host[previous];
48
+ }
49
+
50
+ // src/client/hint-mark.tsx
51
+ var primitives = __toESM(require("@deepseek-ai/dsh-client-ui-primitives"), 1);
52
+
53
+ // plugin-css:src/client/Section.module.css
54
+ var id = "dsh-opencode-go/Section.module.css";
55
+ if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]")) {
56
+ const style = document.createElement("style");
57
+ style.dataset.plugin = "dsh-opencode-go";
58
+ style.dataset.pluginCss = id;
59
+ style.textContent = '.N807zW_accounts{gap:10px;margin:6px 0;padding:6px 0;display:grid}.N807zW_accountRow{border:.5px solid var(--dsw-alias-border-l2);border-radius:10px;position:relative}.N807zW_accountRow[data-dragging=true]{opacity:.55}.N807zW_accountMain{grid-template-columns:16px 112px 92px minmax(0,1fr) 38px 106px 14px;align-items:center;gap:9px;padding:9px 11px;display:grid}.N807zW_accountHandle{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);cursor:grab;-webkit-user-drag:element;background:0 0;border:0;place-items:center;padding:0;display:grid}.N807zW_accountHandle:disabled{cursor:default;opacity:.5}.N807zW_accountHandle:focus-visible,.N807zW_accountToggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;border-radius:4px}.N807zW_accountName{white-space:nowrap;text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-primary);font-size:12.5px;font-weight:600;overflow:hidden}.N807zW_accountState{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:5px;font-size:11.5px;display:inline-flex;overflow:hidden}.N807zW_accountDot{background:#39a878;border-radius:50%;flex:none;width:6px;height:6px}.N807zW_accountDot[data-off=true]{background:#d9a441}.N807zW_accountPercent{text-align:right;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-primary);font-size:12.5px;font-weight:650}.N807zW_accountBar{background:#ffffff1a;border-radius:99px;height:12px;position:relative;overflow:hidden}.N807zW_accountBarFill{background:#39a878;border-radius:99px;position:absolute;inset:0 auto 0 0}.N807zW_accountBar[data-level=high] .N807zW_accountBarFill{background:#e0a100}.N807zW_accountBar[data-level=limited] .N807zW_accountBarFill{background:#e5484d}.N807zW_accountBarTick{background:#fff3;width:1px;position:absolute;top:0;bottom:0}.N807zW_accountReset{text-align:right;color:var(--dsw-alias-label-tertiary);font-size:11.5px}.N807zW_accountIdle{text-align:right;color:var(--dsw-alias-label-tertiary);grid-column:4/7;font-size:11.5px;line-height:1.5}.N807zW_accountToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid}.N807zW_accountProblems{align-items:baseline;gap:8px;padding:0 11px 9px 36px;display:flex}.N807zW_accountRetry{font:inherit;color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border:none;flex:none;padding:0;font-size:11.5px;line-height:1.5}.N807zW_accountRetry:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.N807zW_accountHandle:active{cursor:grabbing}.N807zW_accountDetail{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;padding:9px 11px 10px 36px;display:flex}.N807zW_accountRow:after{content:"";background:var(--dsw-alias-brand-primary);opacity:0;pointer-events:none;border-radius:2px;height:2px;position:absolute;left:0;right:0}.N807zW_accountRow[data-drop=before]:after{opacity:1;top:-6px}.N807zW_accountRow[data-drop=after]:after{opacity:1;bottom:-6px}.N807zW_accountUsage{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;font-size:12px;display:grid}.N807zW_accountUsage progress{accent-color:#39a878;width:100%;height:8px;margin:6px 0;display:block}.N807zW_accountUsage progress[data-level=high]{accent-color:#e0a100}.N807zW_accountUsage progress[data-level=limited]{accent-color:#e5484d}.N807zW_accountUsage .N807zW_hint{overflow-wrap:anywhere;display:block}.N807zW_accountActions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.N807zW_accountEditor{border:.5px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 25%, transparent);border-radius:10px;flex-direction:column;gap:8px;margin:0 11px 10px 36px;padding:10px 12px;display:flex}.N807zW_accountEditorHead{align-items:baseline;gap:6px;min-width:0;display:flex}.N807zW_accountEditorTitle{color:var(--dsw-alias-label-primary);flex:none;font-size:12.5px;font-weight:600;line-height:1.5}.N807zW_accountEditorFor{min-width:0;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:11.5px;line-height:1.5}.N807zW_accountField{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:5px;font-size:11.5px;line-height:1.5;display:flex}.N807zW_accountEditorActions{align-items:center;gap:8px;margin-top:2px;display:flex}@media (width<=480px){.N807zW_accountUsage{grid-template-columns:1fr}}.N807zW_page{flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;container-type:size}.N807zW_pageBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;padding:0 4px 16px 0;display:flex;overflow-y:auto}.N807zW_pageBody,.N807zW_modelList,.N807zW_modelDetails{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l3) transparent}.N807zW_pageBody::-webkit-scrollbar,.N807zW_modelList::-webkit-scrollbar,.N807zW_modelDetails::-webkit-scrollbar{width:8px;height:8px}.N807zW_pageBody::-webkit-scrollbar-track,.N807zW_modelList::-webkit-scrollbar-track,.N807zW_modelDetails::-webkit-scrollbar-track{background:0 0}.N807zW_pageBody::-webkit-scrollbar-thumb,.N807zW_modelList::-webkit-scrollbar-thumb,.N807zW_modelDetails::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l3);background-clip:content-box;border:2px solid #0000;border-radius:999px}.N807zW_pageBody:hover::-webkit-scrollbar-thumb,.N807zW_modelList:hover::-webkit-scrollbar-thumb,.N807zW_modelDetails:hover::-webkit-scrollbar-thumb{background:var(--dsw-alias-label-tertiary);background-clip:content-box}.N807zW_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.N807zW_field+.N807zW_field{border-top:.5px solid var(--dsw-alias-border-l2)}.N807zW_head{align-items:center;gap:8px;display:flex}.N807zW_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.N807zW_trailing{flex:none;align-items:center;gap:8px;display:inline-flex}.N807zW_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.N807zW_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.N807zW_reset:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.N807zW_reset:focus-visible,.N807zW_cardTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.N807zW_input{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.N807zW_input:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.N807zW_inputInvalid:focus-visible{border-color:var(--dsw-alias-label-error);box-shadow:0 0 0 3px color-mix(in srgb, var(--dsw-alias-label-error) 28%, transparent)}.N807zW_input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.N807zW_inputInvalid{border-color:var(--dsw-alias-label-error);}.N807zW_invalid{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.N807zW_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}.N807zW_rows{flex-direction:column;display:flex}.N807zW_row{grid-template-columns:minmax(0,1fr) 300px;align-items:center;gap:6px 14px;padding:10px 0;display:grid}.N807zW_rowLabel{align-items:center;gap:7px;min-width:0;display:flex}.N807zW_rowTitle{overflow-wrap:anywhere;-webkit-line-clamp:2;min-width:0;color:var(--dsw-alias-label-primary);-webkit-box-orient:vertical;font-size:13px;line-height:1.5;display:-webkit-box;overflow:hidden}.N807zW_rowControl{align-items:center;min-width:0;display:flex}.N807zW_rowControl>.N807zW_input{box-sizing:border-box;width:100%}.N807zW_advancedHead{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 12px;display:flex}.N807zW_advancedHead .N807zW_hint{flex:auto;min-width:0}.N807zW_advancedHead .N807zW_reset{flex:none}.N807zW_rowHint,.N807zW_rowInvalid{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5}.N807zW_rowHint{color:var(--dsw-alias-label-tertiary)}.N807zW_rowInvalid{color:var(--dsw-alias-label-error)}.N807zW_groupHead{letter-spacing:.04em;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin:14px 0 0;font-size:11.5px;line-height:1.5;display:flex}.N807zW_groupHead:first-child{margin-top:4px}.N807zW_groupHead:after{content:"";background:var(--dsw-alias-border-l2);flex:1;height:.5px}.N807zW_info{width:16px;height:16px;font:inherit;color:var(--dsw-alias-label-tertiary);cursor:help;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.N807zW_info:hover,.N807zW_info:focus-visible{color:var(--dsw-alias-label-primary)}.N807zW_info:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;border-radius:3px}.N807zW_info svg{width:13px;height:13px}.N807zW_label .N807zW_info,.N807zW_cardTitle .N807zW_info{vertical-align:middle;margin-left:6px}.N807zW_seg{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:1;min-width:0;padding:2px;display:flex;position:relative}.N807zW_segThumb{background:color-mix(in srgb, var(--dsw-alias-label-primary) 16%, transparent);border-radius:6px;width:calc(50% - 2px);transition:transform .16s cubic-bezier(.2,0,0,1);position:absolute;top:2px;bottom:2px;left:2px}.N807zW_seg[data-count="3"] .N807zW_segThumb{width:calc(33.3333% - 1.33333px)}.N807zW_seg[data-index="1"] .N807zW_segThumb{transform:translate(100%)}.N807zW_seg[data-index="2"] .N807zW_segThumb{transform:translate(200%)}.N807zW_segOption{min-width:0;font:inherit;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:6px;flex:1 1 0;padding:4px 8px;font-size:12.5px;line-height:1.5;transition:color .16s;position:relative;overflow:hidden}.N807zW_segOption:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.N807zW_segOption[aria-checked=true]{color:var(--dsw-alias-label-primary);font-weight:600}.N807zW_segOption:disabled{opacity:.55;cursor:default}.N807zW_segOption:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.N807zW_pageTop{flex-direction:column;gap:3px;padding:2px 0 12px;display:flex}.N807zW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:15px;font-weight:600;line-height:1.4}.N807zW_intro{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:1.5}.N807zW_card,.N807zW_cardModels{border:.5px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 40%, transparent);border-radius:12px;padding:8px 0 10px}.N807zW_card{flex:none}.N807zW_card+.N807zW_card,.N807zW_card+.N807zW_cardModels,.N807zW_cardModels+.N807zW_card{margin-top:8px}.N807zW_cardModels{flex-direction:column;flex:1 0 auto;display:flex}.N807zW_cardFolded{flex:none}.N807zW_cardHead{align-items:center;gap:8px;min-height:24px;padding:0 14px;display:flex}.N807zW_cardTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13.5px;font-weight:600;line-height:1.5}.N807zW_cardSub{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11.5px;line-height:1.5}.N807zW_cardStamp{white-space:nowrap;color:var(--dsw-alias-label-tertiary);flex:none;font-size:11.5px;line-height:1.5}.N807zW_cardBody{flex-direction:column;gap:8px;padding:4px 14px 0;display:flex}.N807zW_cardBody>.N807zW_input{box-sizing:border-box;width:100%}.N807zW_cardModels>.N807zW_cardBody{flex:1 0 auto}.N807zW_cardNotes{flex-direction:column;gap:8px;padding:6px 14px 2px;display:flex}.N807zW_cardNotes:empty{display:none}.N807zW_cardDivider{border-top:.5px solid var(--dsw-alias-border-l2);margin:10px 14px}.N807zW_cardTrigger{width:100%;min-height:24px;font:inherit;text-align:left;color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0;padding:0 14px;display:flex}.N807zW_cardTrigger:hover .N807zW_cardTitle{color:var(--dsw-alias-brand-primary)}.N807zW_cardHead>.N807zW_cardTrigger{padding:0}.N807zW_limitsEditor{flex-direction:column;flex:1 0 auto;gap:10px;padding-top:4px;display:flex}.N807zW_limitsFoot{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;margin:2px -14px 0;padding:10px 14px 0;display:flex}.N807zW_limitsSummary{min-width:0;color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:1;font-size:12px;line-height:1.5}.N807zW_modelMeta{align-items:baseline;gap:10px;display:flex}.N807zW_modelMeta .N807zW_limitsModelId{flex:1;min-width:0}.N807zW_releaseDate{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:11px;line-height:1.4}.N807zW_limitsModelId{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.4;display:block;overflow:hidden}.N807zW_visuallyHidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.N807zW_actions{border-top:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:12px 0;display:flex}.N807zW_starLink{max-width:100%;color:var(--dsw-alias-label-secondary);border-radius:4px;align-items:center;gap:7px;margin-left:auto;padding:6px 0;font-size:12px;line-height:1.5;text-decoration:none;display:inline-flex}.N807zW_starLink svg{flex:none}.N807zW_starLink:hover{color:var(--dsw-alias-brand-primary)}.N807zW_starLink:hover span{text-underline-offset:3px;text-decoration:underline}.N807zW_starLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.N807zW_failedNote{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.N807zW_slot{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.N807zW_slot svg{width:15px;height:15px}.N807zW_chevron,.N807zW_chevronOpen{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .15s}.N807zW_chevron{transform:rotate(-90deg)}.N807zW_filters{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.N807zW_filterAction{align-items:center;margin-left:auto;display:inline-flex}.N807zW_filter{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:6px 9px;font-size:12px}.N807zW_filter[aria-pressed=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3)}.N807zW_filter span{color:var(--dsw-alias-label-tertiary);margin-left:4px}.N807zW_modelLayout{border:.5px solid var(--dsw-alias-border-l4);border-radius:10px;flex:auto;grid-template-columns:minmax(0,45fr) minmax(0,55fr);min-height:260px;max-height:560px;display:grid;overflow:hidden}.N807zW_modelList{border-right:.5px solid var(--dsw-alias-border-l2);min-height:0;padding:4px 6px;overflow-y:auto}.N807zW_modelRow{align-items:center;gap:8px;padding-right:6px;display:flex}.N807zW_modelRow+.N807zW_modelRow{border-top:.5px solid var(--dsw-alias-border-l2)}.N807zW_modelRowSelected{background:var(--dsw-alias-bg-layer-3);border-top-color:#0000;border-radius:6px}.N807zW_modelRow>[role=switch]{flex-shrink:0}.N807zW_modelChoice{text-align:left;min-width:0;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:1;align-items:baseline;padding:9px 3px 9px 6px;display:flex}.N807zW_modelRow:hover:not(.N807zW_modelRowSelected){background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 92%, var(--dsw-alias-label-primary));border-top-color:#0000;border-radius:6px}.N807zW_modelName{overflow-wrap:anywhere;flex-wrap:wrap;flex:0 auto;align-items:center;gap:5px;min-width:0;font-size:13px;display:flex}.N807zW_overrideDot{background:var(--dsw-alias-brand-primary);border-radius:50%;flex:none;width:6px;height:6px}.N807zW_modelDetails{flex-direction:column;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.N807zW_modelDetails h3{overflow-wrap:anywhere;margin:0;font-size:14px}.N807zW_modelHeading{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.N807zW_stats{flex-direction:column;gap:10px;display:flex}.N807zW_stat{flex-direction:column;gap:4px;display:flex}.N807zW_statLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5}.N807zW_budgetEditor{margin-top:12px;font-size:12px}.N807zW_budgetEditor summary{cursor:pointer}.N807zW_budgetInput{align-items:center;gap:8px;margin-top:4px;display:flex}.N807zW_budgetPresets{flex-wrap:wrap;gap:6px;margin-top:8px;display:flex}.N807zW_modelDetails .N807zW_input{box-sizing:border-box;width:100%;min-width:0;height:30px;padding:0 9px;font-size:12px}.N807zW_modalities{flex-wrap:wrap;gap:4px;display:flex}.N807zW_modality,.N807zW_modalityOff{border-radius:6px;padding:2px 7px;font-size:11px;line-height:1.5}.N807zW_modality{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-secondary)}.N807zW_modalityOff{border:.5px dashed var(--dsw-alias-border-l4);color:var(--dsw-alias-label-tertiary)}.N807zW_modelDetails .N807zW_reset{align-self:flex-start}.N807zW_paneFoot{color:var(--dsw-alias-label-tertiary);margin:auto 0 0;font-size:11px;line-height:1.5}.N807zW_newBadge{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:4px;padding:2px 4px;font-size:9px}.N807zW_modelChoice:focus-visible,.N807zW_filter:focus-visible,.N807zW_cardTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}@container (width<=440px){.N807zW_row{grid-template-columns:minmax(0,1fr);gap:6px}.N807zW_modelLayout{flex:none;grid-template-columns:minmax(0,1fr);max-height:none}.N807zW_modelList{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l2);max-height:240px}.N807zW_modelDetails{max-height:460px}}@media (prefers-reduced-motion:reduce){.N807zW_chevron,.N807zW_chevronOpen,.N807zW_segThumb,.N807zW_segOption{transition:none}}';
60
+ document.head.appendChild(style);
61
+ }
62
+ var Section_default = { "accountActions": "N807zW_accountActions", "accountBar": "N807zW_accountBar", "accountBarFill": "N807zW_accountBarFill", "accountBarTick": "N807zW_accountBarTick", "accountDetail": "N807zW_accountDetail", "accountDot": "N807zW_accountDot", "accountEditor": "N807zW_accountEditor", "accountEditorActions": "N807zW_accountEditorActions", "accountEditorFor": "N807zW_accountEditorFor", "accountEditorHead": "N807zW_accountEditorHead", "accountEditorTitle": "N807zW_accountEditorTitle", "accountField": "N807zW_accountField", "accountHandle": "N807zW_accountHandle", "accountIdle": "N807zW_accountIdle", "accountMain": "N807zW_accountMain", "accountName": "N807zW_accountName", "accountPercent": "N807zW_accountPercent", "accountProblems": "N807zW_accountProblems", "accountReset": "N807zW_accountReset", "accountRetry": "N807zW_accountRetry", "accountRow": "N807zW_accountRow", "accountState": "N807zW_accountState", "accountToggle": "N807zW_accountToggle", "accountUsage": "N807zW_accountUsage", "accounts": "N807zW_accounts", "actions": "N807zW_actions", "advancedHead": "N807zW_advancedHead", "budgetEditor": "N807zW_budgetEditor", "budgetInput": "N807zW_budgetInput", "budgetPresets": "N807zW_budgetPresets", "card": "N807zW_card", "cardBody": "N807zW_cardBody", "cardDivider": "N807zW_cardDivider", "cardFolded": "N807zW_cardFolded", "cardHead": "N807zW_cardHead", "cardModels": "N807zW_cardModels", "cardNotes": "N807zW_cardNotes", "cardStamp": "N807zW_cardStamp", "cardSub": "N807zW_cardSub", "cardTitle": "N807zW_cardTitle", "cardTrigger": "N807zW_cardTrigger", "chevron": "N807zW_chevron", "chevronOpen": "N807zW_chevronOpen", "failedNote": "N807zW_failedNote", "field": "N807zW_field", "filter": "N807zW_filter", "filterAction": "N807zW_filterAction", "filters": "N807zW_filters", "groupHead": "N807zW_groupHead", "head": "N807zW_head", "hint": "N807zW_hint", "info": "N807zW_info", "input": "N807zW_input", "inputInvalid": "N807zW_inputInvalid N807zW_input", "intro": "N807zW_intro", "invalid": "N807zW_invalid", "label": "N807zW_label", "limitsEditor": "N807zW_limitsEditor", "limitsFoot": "N807zW_limitsFoot", "limitsModelId": "N807zW_limitsModelId", "limitsSummary": "N807zW_limitsSummary", "modalities": "N807zW_modalities", "modality": "N807zW_modality", "modalityOff": "N807zW_modalityOff", "modelChoice": "N807zW_modelChoice", "modelDetails": "N807zW_modelDetails", "modelHeading": "N807zW_modelHeading", "modelLayout": "N807zW_modelLayout", "modelList": "N807zW_modelList", "modelMeta": "N807zW_modelMeta", "modelName": "N807zW_modelName", "modelRow": "N807zW_modelRow", "modelRowSelected": "N807zW_modelRowSelected", "newBadge": "N807zW_newBadge", "overrideDot": "N807zW_overrideDot", "page": "N807zW_page", "pageBody": "N807zW_pageBody", "pageTop": "N807zW_pageTop", "paneFoot": "N807zW_paneFoot", "releaseDate": "N807zW_releaseDate", "reset": "N807zW_reset", "row": "N807zW_row", "rowControl": "N807zW_rowControl", "rowHint": "N807zW_rowHint", "rowInvalid": "N807zW_rowInvalid", "rowLabel": "N807zW_rowLabel", "rowTitle": "N807zW_rowTitle", "rows": "N807zW_rows", "seg": "N807zW_seg", "segOption": "N807zW_segOption", "segThumb": "N807zW_segThumb", "slot": "N807zW_slot", "starLink": "N807zW_starLink", "stat": "N807zW_stat", "statLabel": "N807zW_statLabel", "stats": "N807zW_stats", "title": "N807zW_title", "trailing": "N807zW_trailing", "visuallyHidden": "N807zW_visuallyHidden" };
63
+
64
+ // src/client/hint-mark.tsx
65
+ var import_jsx_runtime = require("react/jsx-runtime");
66
+ var QuestionMark = hostAtom(
67
+ primitives,
68
+ "IconQuestionOutlineRegular",
69
+ "IconQuestionOutline14"
70
+ );
71
+ var HintTooltip = primitives.Tooltip;
72
+ function HintMark(props) {
73
+ const glyph = QuestionMark ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QuestionMark, {}) : "?";
74
+ if (!HintTooltip) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.info, "aria-hidden": "true", children: glyph });
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HintTooltip, { label: props.hint, side: "bottom", maxWidth: 280, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: Section_default.info, "aria-label": props.hint, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: glyph }) }) });
76
+ }
77
+ function HintText(props) {
78
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: props.id, className: HintTooltip ? Section_default.visuallyHidden : Section_default.rowHint, children: props.hint });
79
+ }
44
80
 
45
81
  // src/client/ModelEditor.tsx
46
82
  var import_react = require("react");
@@ -145,19 +181,8 @@ var modelsRemote = {
145
181
  }]
146
182
  };
147
183
 
148
- // plugin-css:src/client/Section.module.css
149
- var id = "dsh-opencode-go/Section.module.css";
150
- if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]")) {
151
- const style = document.createElement("style");
152
- style.dataset.plugin = "dsh-opencode-go";
153
- style.dataset.pluginCss = id;
154
- style.textContent = '.N807zW_accounts{gap:10px;margin:6px 0;padding:6px 0;display:grid}.N807zW_accountRow{border:.5px solid var(--dsw-alias-border-l2);border-radius:10px;position:relative}.N807zW_accountRow[data-dragging=true]{opacity:.55}.N807zW_accountMain{grid-template-columns:16px 112px 92px minmax(0,1fr) 38px 106px 14px;align-items:center;gap:9px;padding:9px 11px;display:grid}.N807zW_accountHandle{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);cursor:grab;-webkit-user-drag:element;background:0 0;border:0;place-items:center;padding:0;display:grid}.N807zW_accountHandle:disabled{cursor:default;opacity:.5}.N807zW_accountHandle:focus-visible,.N807zW_accountToggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;border-radius:4px}.N807zW_accountName{white-space:nowrap;text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-primary);font-size:12.5px;font-weight:600;overflow:hidden}.N807zW_accountState{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:5px;font-size:11.5px;display:inline-flex;overflow:hidden}.N807zW_accountDot{background:#39a878;border-radius:50%;flex:none;width:6px;height:6px}.N807zW_accountDot[data-off=true]{background:#d9a441}.N807zW_accountPercent{text-align:right;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-primary);font-size:12.5px;font-weight:650}.N807zW_accountBar{background:#ffffff1a;border-radius:99px;height:12px;position:relative;overflow:hidden}.N807zW_accountBarFill{background:#39a878;border-radius:99px;position:absolute;inset:0 auto 0 0}.N807zW_accountBar[data-level=high] .N807zW_accountBarFill{background:#e0a100}.N807zW_accountBar[data-level=limited] .N807zW_accountBarFill{background:#e5484d}.N807zW_accountBarTick{background:#fff3;width:1px;position:absolute;top:0;bottom:0}.N807zW_accountReset{text-align:right;color:var(--dsw-alias-label-tertiary);font-size:11.5px}.N807zW_accountIdle{text-align:right;color:var(--dsw-alias-label-tertiary);grid-column:4/7;font-size:11.5px;line-height:1.5}.N807zW_accountToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid}.N807zW_accountProblems{align-items:baseline;gap:8px;padding:0 11px 9px 36px;display:flex}.N807zW_accountRetry{font:inherit;color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border:none;flex:none;padding:0;font-size:11.5px;line-height:1.5}.N807zW_accountRetry:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.N807zW_accountHandle:active{cursor:grabbing}.N807zW_accountDetail{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;padding:9px 11px 10px 36px;display:flex}.N807zW_accountRow:after{content:"";background:var(--dsw-alias-brand-primary);opacity:0;pointer-events:none;border-radius:2px;height:2px;position:absolute;left:0;right:0}.N807zW_accountRow[data-drop=before]:after{opacity:1;top:-6px}.N807zW_accountRow[data-drop=after]:after{opacity:1;bottom:-6px}.N807zW_accountUsage{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;font-size:12px;display:grid}.N807zW_accountUsage progress{accent-color:#39a878;width:100%;height:8px;margin:6px 0;display:block}.N807zW_accountUsage progress[data-level=high]{accent-color:#e0a100}.N807zW_accountUsage progress[data-level=limited]{accent-color:#e5484d}.N807zW_accountUsage .N807zW_hint{overflow-wrap:anywhere;display:block}.N807zW_accountActions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.N807zW_accountEditor{border:.5px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 25%, transparent);border-radius:10px;flex-direction:column;gap:8px;margin:0 11px 10px 36px;padding:10px 12px;display:flex}.N807zW_accountEditorHead{align-items:baseline;gap:6px;min-width:0;display:flex}.N807zW_accountEditorTitle{color:var(--dsw-alias-label-primary);flex:none;font-size:12.5px;font-weight:600;line-height:1.5}.N807zW_accountEditorFor{min-width:0;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:11.5px;line-height:1.5}.N807zW_accountField{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:5px;font-size:11.5px;line-height:1.5;display:flex}.N807zW_accountEditorActions{align-items:center;gap:8px;margin-top:2px;display:flex}@media (width<=480px){.N807zW_accountUsage{grid-template-columns:1fr}}.N807zW_page{flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;container-type:size}.N807zW_pageBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;padding:0 4px 16px 0;display:flex;overflow-y:auto}.N807zW_pageBody,.N807zW_modelList,.N807zW_modelDetails{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l3) transparent}.N807zW_pageBody::-webkit-scrollbar,.N807zW_modelList::-webkit-scrollbar,.N807zW_modelDetails::-webkit-scrollbar{width:8px;height:8px}.N807zW_pageBody::-webkit-scrollbar-track,.N807zW_modelList::-webkit-scrollbar-track,.N807zW_modelDetails::-webkit-scrollbar-track{background:0 0}.N807zW_pageBody::-webkit-scrollbar-thumb,.N807zW_modelList::-webkit-scrollbar-thumb,.N807zW_modelDetails::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l3);background-clip:content-box;border:2px solid #0000;border-radius:999px}.N807zW_pageBody:hover::-webkit-scrollbar-thumb,.N807zW_modelList:hover::-webkit-scrollbar-thumb,.N807zW_modelDetails:hover::-webkit-scrollbar-thumb{background:var(--dsw-alias-label-tertiary);background-clip:content-box}.N807zW_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.N807zW_field+.N807zW_field{border-top:.5px solid var(--dsw-alias-border-l2)}.N807zW_head{align-items:center;gap:8px;display:flex}.N807zW_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.N807zW_badges{align-items:center;gap:8px;display:inline-flex}.N807zW_trailing{flex:none;align-items:center;gap:8px;display:inline-flex}.N807zW_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.N807zW_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.N807zW_reset:disabled{cursor:default}.N807zW_reset:focus-visible,.N807zW_cardTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.N807zW_input{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.N807zW_input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-color:var(--dsw-alias-brand-primary)}.N807zW_input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.N807zW_inputInvalid{border-color:var(--dsw-alias-label-error);}.N807zW_invalid{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.N807zW_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}.N807zW_pageTop{flex-direction:column;gap:3px;padding:2px 0 12px;display:flex}.N807zW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:15px;font-weight:600;line-height:1.4}.N807zW_intro{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:1.5}.N807zW_card,.N807zW_cardModels{border:.5px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 40%, transparent);border-radius:12px;padding:8px 0 10px}.N807zW_card{flex:none}.N807zW_card+.N807zW_card,.N807zW_card+.N807zW_cardModels,.N807zW_cardModels+.N807zW_card{margin-top:8px}.N807zW_cardModels{flex-direction:column;flex:1 0 auto;display:flex}.N807zW_cardFolded{flex:none}.N807zW_cardHead{align-items:center;gap:8px;min-height:24px;padding:0 14px;display:flex}.N807zW_cardTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13.5px;font-weight:600;line-height:1.5}.N807zW_cardSub{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11.5px;line-height:1.5}.N807zW_cardStamp{white-space:nowrap;color:var(--dsw-alias-label-tertiary);flex:none;font-size:11.5px;line-height:1.5}.N807zW_cardBody{flex-direction:column;gap:8px;padding:4px 14px 0;display:flex}.N807zW_cardBody>.N807zW_input{box-sizing:border-box;width:100%}.N807zW_cardModels>.N807zW_cardBody{flex:1 0 auto}.N807zW_cardNotes{flex-direction:column;gap:8px;padding:6px 14px 2px;display:flex}.N807zW_cardNotes:empty{display:none}.N807zW_cardDivider{border-top:.5px solid var(--dsw-alias-border-l2);margin:10px 14px}.N807zW_cardTrigger{width:100%;min-height:24px;font:inherit;text-align:left;color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0;padding:0 14px;display:flex}.N807zW_cardTrigger:hover .N807zW_cardTitle{color:var(--dsw-alias-brand-primary)}.N807zW_cardHead>.N807zW_cardTrigger{padding:0}.N807zW_advancedGrid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 18px;display:grid}.N807zW_advancedGrid .N807zW_field{padding:0}.N807zW_advancedGrid .N807zW_field+.N807zW_field{border-top:none}.N807zW_limitsEditor{flex-direction:column;flex:1 0 auto;gap:10px;padding-top:4px;display:flex}.N807zW_limitsFoot{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;margin:2px -14px 0;padding:10px 14px 0;display:flex}.N807zW_limitsSummary{min-width:0;color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:1;font-size:12px;line-height:1.5}.N807zW_modelMeta{align-items:baseline;gap:10px;display:flex}.N807zW_modelMeta .N807zW_limitsModelId{flex:1;min-width:0}.N807zW_releaseDate{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:11px;line-height:1.4}.N807zW_limitsModelId{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.4;display:block;overflow:hidden}.N807zW_visuallyHidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.N807zW_actions{border-top:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:12px 0;display:flex}.N807zW_starLink{max-width:100%;color:var(--dsw-alias-label-secondary);border-radius:4px;align-items:center;gap:7px;margin-left:auto;padding:6px 0;font-size:12px;line-height:1.5;text-decoration:none;display:inline-flex}.N807zW_starLink svg{flex:none}.N807zW_starLink:hover{color:var(--dsw-alias-brand-primary)}.N807zW_starLink:hover span{text-underline-offset:3px;text-decoration:underline}.N807zW_starLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.N807zW_failedNote{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.N807zW_slot{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.N807zW_slot svg{width:15px;height:15px}.N807zW_chevron,.N807zW_chevronOpen{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .15s}.N807zW_chevron{transform:rotate(-90deg)}.N807zW_filters{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.N807zW_filterAction{align-items:center;margin-left:auto;display:inline-flex}.N807zW_filter{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:6px 9px;font-size:12px}.N807zW_filter[aria-pressed=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3)}.N807zW_filter span{color:var(--dsw-alias-label-tertiary);margin-left:4px}.N807zW_modelLayout{border:.5px solid var(--dsw-alias-border-l4);border-radius:10px;flex:auto;grid-template-columns:minmax(0,45fr) minmax(0,55fr);min-height:260px;max-height:560px;display:grid;overflow:hidden}.N807zW_modelList{border-right:.5px solid var(--dsw-alias-border-l2);min-height:0;padding:4px 6px;overflow-y:auto}.N807zW_modelRow{align-items:center;gap:8px;padding-right:6px;display:flex}.N807zW_modelRow+.N807zW_modelRow{border-top:.5px solid var(--dsw-alias-border-l2)}.N807zW_modelRowSelected{background:var(--dsw-alias-bg-layer-3);border-top-color:#0000;border-radius:6px}.N807zW_modelRow>[role=switch]{flex-shrink:0}.N807zW_modelChoice{text-align:left;min-width:0;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:1;align-items:baseline;padding:9px 3px 9px 6px;display:flex}.N807zW_modelRow:hover:not(.N807zW_modelRowSelected){background:color-mix(in srgb, var(--dsw-alias-bg-layer-3) 92%, var(--dsw-alias-label-primary));border-top-color:#0000;border-radius:6px}.N807zW_modelName{overflow-wrap:anywhere;flex-wrap:wrap;flex:0 auto;align-items:center;gap:5px;min-width:0;font-size:13px;display:flex}.N807zW_overrideDot{background:var(--dsw-alias-brand-primary);border-radius:50%;flex:none;width:6px;height:6px}.N807zW_modelDetails{flex-direction:column;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.N807zW_modelDetails h3{overflow-wrap:anywhere;margin:0;font-size:14px}.N807zW_modelHeading{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.N807zW_stats{flex-direction:column;gap:10px;display:flex}.N807zW_stat{flex-direction:column;gap:4px;display:flex}.N807zW_statLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5}.N807zW_budgetEditor{margin-top:12px;font-size:12px}.N807zW_budgetEditor summary{cursor:pointer}.N807zW_budgetInput{align-items:center;gap:8px;margin-top:4px;display:flex}.N807zW_budgetPresets{flex-wrap:wrap;gap:6px;margin-top:8px;display:flex}.N807zW_modelDetails .N807zW_input{box-sizing:border-box;width:100%;min-width:0;height:30px;padding:0 9px;font-size:12px}.N807zW_modalities{flex-wrap:wrap;gap:4px;display:flex}.N807zW_modality,.N807zW_modalityOff{border-radius:6px;padding:2px 7px;font-size:11px;line-height:1.5}.N807zW_modality{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-secondary)}.N807zW_modalityOff{border:.5px dashed var(--dsw-alias-border-l4);color:var(--dsw-alias-label-tertiary)}.N807zW_modelDetails .N807zW_reset{align-self:flex-start}.N807zW_paneFoot{color:var(--dsw-alias-label-tertiary);margin:auto 0 0;font-size:11px;line-height:1.5}.N807zW_newBadge{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:4px;padding:2px 4px;font-size:9px}.N807zW_modelChoice:focus-visible,.N807zW_filter:focus-visible,.N807zW_cardTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}@container (width<=440px){.N807zW_advancedGrid{grid-template-columns:minmax(0,1fr)}.N807zW_modelLayout{flex:none;grid-template-columns:minmax(0,1fr);max-height:none}.N807zW_modelList{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l2);max-height:240px}.N807zW_modelDetails{max-height:460px}}@media (prefers-reduced-motion:reduce){.N807zW_chevron,.N807zW_chevronOpen{transition:none}}';
155
- document.head.appendChild(style);
156
- }
157
- var Section_default = { "accountActions": "N807zW_accountActions", "accountBar": "N807zW_accountBar", "accountBarFill": "N807zW_accountBarFill", "accountBarTick": "N807zW_accountBarTick", "accountDetail": "N807zW_accountDetail", "accountDot": "N807zW_accountDot", "accountEditor": "N807zW_accountEditor", "accountEditorActions": "N807zW_accountEditorActions", "accountEditorFor": "N807zW_accountEditorFor", "accountEditorHead": "N807zW_accountEditorHead", "accountEditorTitle": "N807zW_accountEditorTitle", "accountField": "N807zW_accountField", "accountHandle": "N807zW_accountHandle", "accountIdle": "N807zW_accountIdle", "accountMain": "N807zW_accountMain", "accountName": "N807zW_accountName", "accountPercent": "N807zW_accountPercent", "accountProblems": "N807zW_accountProblems", "accountReset": "N807zW_accountReset", "accountRetry": "N807zW_accountRetry", "accountRow": "N807zW_accountRow", "accountState": "N807zW_accountState", "accountToggle": "N807zW_accountToggle", "accountUsage": "N807zW_accountUsage", "accounts": "N807zW_accounts", "actions": "N807zW_actions", "advancedGrid": "N807zW_advancedGrid", "badges": "N807zW_badges", "budgetEditor": "N807zW_budgetEditor", "budgetInput": "N807zW_budgetInput", "budgetPresets": "N807zW_budgetPresets", "card": "N807zW_card", "cardBody": "N807zW_cardBody", "cardDivider": "N807zW_cardDivider", "cardFolded": "N807zW_cardFolded", "cardHead": "N807zW_cardHead", "cardModels": "N807zW_cardModels", "cardNotes": "N807zW_cardNotes", "cardStamp": "N807zW_cardStamp", "cardSub": "N807zW_cardSub", "cardTitle": "N807zW_cardTitle", "cardTrigger": "N807zW_cardTrigger", "chevron": "N807zW_chevron", "chevronOpen": "N807zW_chevronOpen", "failedNote": "N807zW_failedNote", "field": "N807zW_field", "filter": "N807zW_filter", "filterAction": "N807zW_filterAction", "filters": "N807zW_filters", "head": "N807zW_head", "hint": "N807zW_hint", "input": "N807zW_input", "inputInvalid": "N807zW_inputInvalid N807zW_input", "intro": "N807zW_intro", "invalid": "N807zW_invalid", "label": "N807zW_label", "limitsEditor": "N807zW_limitsEditor", "limitsFoot": "N807zW_limitsFoot", "limitsModelId": "N807zW_limitsModelId", "limitsSummary": "N807zW_limitsSummary", "modalities": "N807zW_modalities", "modality": "N807zW_modality", "modalityOff": "N807zW_modalityOff", "modelChoice": "N807zW_modelChoice", "modelDetails": "N807zW_modelDetails", "modelHeading": "N807zW_modelHeading", "modelLayout": "N807zW_modelLayout", "modelList": "N807zW_modelList", "modelMeta": "N807zW_modelMeta", "modelName": "N807zW_modelName", "modelRow": "N807zW_modelRow", "modelRowSelected": "N807zW_modelRowSelected", "newBadge": "N807zW_newBadge", "overrideDot": "N807zW_overrideDot", "page": "N807zW_page", "pageBody": "N807zW_pageBody", "pageTop": "N807zW_pageTop", "paneFoot": "N807zW_paneFoot", "releaseDate": "N807zW_releaseDate", "reset": "N807zW_reset", "slot": "N807zW_slot", "starLink": "N807zW_starLink", "stat": "N807zW_stat", "statLabel": "N807zW_statLabel", "stats": "N807zW_stats", "title": "N807zW_title", "trailing": "N807zW_trailing", "visuallyHidden": "N807zW_visuallyHidden" };
158
-
159
184
  // src/client/ModelEditor.tsx
160
- var import_jsx_runtime = require("react/jsx-runtime");
185
+ var import_jsx_runtime2 = require("react/jsx-runtime");
161
186
  var MODALITY_COPY = {
162
187
  text: "modalityText",
163
188
  image: "modalityImage",
@@ -198,15 +223,15 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
198
223
  const current = draft[id3] === null ? { contextWindow: null, maxTokens: null, thinkingBudgets: null } : draft[id3] ?? {};
199
224
  onEdit({ ...draft, [id3]: { ...current, [field]: value ?? null } });
200
225
  };
201
- const badges = (entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
202
- entry.configurationMissing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Tag, { tone: "warning", children: t(metadataUnavailable ? "configurationUnavailable" : "configurationMissing") }) : null,
203
- isNewModel(entry, now) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.newBadge, title: t("newHint"), children: t("newBadge") }) : null,
204
- entry.deprecated ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Tag, { tone: "warning", children: t("deprecatedBadge") }) : null
226
+ const badges = (entry) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
227
+ entry.configurationMissing ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives.Tag, { tone: "warning", children: t(metadataUnavailable ? "configurationUnavailable" : "configurationMissing") }) : null,
228
+ isNewModel(entry, now) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.newBadge, title: t("newHint"), children: t("newBadge") }) : null,
229
+ entry.deprecated ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives.Tag, { tone: "warning", children: t("deprecatedBadge") }) : null
205
230
  ] });
206
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.limitsEditor, children: [
207
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("visibilityHint") }),
208
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: Section_default.visuallyHidden, htmlFor: "opencode-go-model-filter", children: t("limitsFilterLabel") }),
209
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
231
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.limitsEditor, children: [
232
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("visibilityHint") }),
233
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: Section_default.visuallyHidden, htmlFor: "opencode-go-model-filter", children: t("limitsFilterLabel") }),
234
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
210
235
  "input",
211
236
  {
212
237
  id: "opencode-go-model-filter",
@@ -220,8 +245,8 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
220
245
  }
221
246
  }
222
247
  ),
223
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.filters, role: "group", "aria-label": t("filterLabel"), children: [
224
- filters.map(([key, label, count]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
248
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.filters, role: "group", "aria-label": t("filterLabel"), children: [
249
+ filters.map(([key, label, count]) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
225
250
  "button",
226
251
  {
227
252
  type: "button",
@@ -233,20 +258,20 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
233
258
  children: [
234
259
  t(label),
235
260
  " ",
236
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: count })
261
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: count })
237
262
  ]
238
263
  },
239
264
  key
240
265
  )),
241
- filterAction ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.filterAction, children: filterAction }) : null
266
+ filterAction ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.filterAction, children: filterAction }) : null
242
267
  ] }),
243
- model ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelLayout, children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: Section_default.modelList, "aria-label": t("modelsLabel"), children: entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
268
+ model ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.modelLayout, children: [
269
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { className: Section_default.modelList, "aria-label": t("modelsLabel"), children: entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
245
270
  "div",
246
271
  {
247
272
  className: entry.id === model.id ? `${Section_default.modelRow} ${Section_default.modelRowSelected}` : Section_default.modelRow,
248
273
  children: [
249
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
274
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
250
275
  "button",
251
276
  {
252
277
  type: "button",
@@ -255,15 +280,15 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
255
280
  onClick: () => {
256
281
  setSelected(entry.id);
257
282
  },
258
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: Section_default.modelName, children: [
283
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.modelName, children: [
259
284
  entry.name ?? entry.id,
260
285
  " ",
261
286
  badges(entry)
262
287
  ] })
263
288
  }
264
289
  ),
265
- hasCapacityOverride(draft[entry.id]) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.overrideDot, title: t("overridden"), "aria-hidden": "true" }) : null,
266
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
290
+ hasCapacityOverride(draft[entry.id]) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.overrideDot, title: t("overridden"), "aria-hidden": "true" }) : null,
291
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
267
292
  import_dsh_client_ui_primitives.Switch,
268
293
  {
269
294
  label: t("modelVisibleLabel", { name: entry.name ?? entry.id }),
@@ -278,26 +303,26 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
278
303
  },
279
304
  entry.id
280
305
  )) }),
281
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: Section_default.modelDetails, "aria-label": t("modelDetails"), children: [
282
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelHeading, children: [
283
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: model.name ?? model.id }),
306
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: Section_default.modelDetails, "aria-label": t("modelDetails"), children: [
307
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.modelHeading, children: [
308
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { children: model.name ?? model.id }),
284
309
  badges(model)
285
310
  ] }),
286
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelMeta, children: [
287
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: Section_default.limitsModelId, translate: "no", children: model.id }),
288
- model.releaseDate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.releaseDate, title: t("releaseSource", { date: model.releaseDate }), children: model.releaseDate }) : null
311
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.modelMeta, children: [
312
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("code", { className: Section_default.limitsModelId, translate: "no", children: model.id }),
313
+ model.releaseDate ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.releaseDate, title: t("releaseSource", { date: model.releaseDate }), children: model.releaseDate }) : null
289
314
  ] }),
290
- model.configurationMissing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t(metadataUnavailable ? "configurationUnavailableHint" : "configurationMissingHint") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
291
- model.deprecated ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("deprecatedHint") }) : null,
292
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stats, children: [
293
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "contextWindow", limit: draft[model.id], t, locale, disabled, onChange: write }),
294
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "maxTokens", limit: draft[model.id], t, locale, disabled, onChange: write }),
295
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stat, children: [
296
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.statLabel, children: t("modalityLabel") }),
297
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modalities, { model, t })
315
+ model.configurationMissing ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t(metadataUnavailable ? "configurationUnavailableHint" : "configurationMissingHint") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
316
+ model.deprecated ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("deprecatedHint") }) : null,
317
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.stats, children: [
318
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Capacity, { model, field: "contextWindow", limit: draft[model.id], t, locale, disabled, onChange: write }),
319
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Capacity, { model, field: "maxTokens", limit: draft[model.id], t, locale, disabled, onChange: write }),
320
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.stat, children: [
321
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.statLabel, children: t("modalityLabel") }),
322
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Modalities, { model, t })
298
323
  ] })
299
324
  ] }),
300
- model.reasoningBudget ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
325
+ model.reasoningBudget ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
301
326
  BudgetPresets,
302
327
  {
303
328
  model,
@@ -311,7 +336,7 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
311
336
  },
312
337
  model.id
313
338
  ) : null,
314
- hasCapacityOverride(draft[model.id]) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
339
+ hasCapacityOverride(draft[model.id]) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
315
340
  "button",
316
341
  {
317
342
  type: "button",
@@ -323,7 +348,7 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
323
348
  children: t("limitsResetModel")
324
349
  }
325
350
  ) : null,
326
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: Section_default.paneFoot, children: [
351
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { className: Section_default.paneFoot, children: [
327
352
  t("limitsHint"),
328
353
  " ",
329
354
  t("modalitiesSource"),
@@ -331,10 +356,10 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
331
356
  ] })
332
357
  ] })
333
358
  ] })
334
- ] }) : models.status === "ready" && all.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("limitsNoMatches", { query }) }) : null,
335
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.limitsFoot, children: [
336
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.limitsSummary, children: t("limitsSummary", { count: customized }) }),
337
- Object.values(draft).some(hasCapacityOverride) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
359
+ ] }) : models.status === "ready" && all.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("limitsNoMatches", { query }) }) : null,
360
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.limitsFoot, children: [
361
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.limitsSummary, children: t("limitsSummary", { count: customized }) }),
362
+ Object.values(draft).some(hasCapacityOverride) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
338
363
  import_dsh_client_ui_primitives.Button,
339
364
  {
340
365
  variant: "outline",
@@ -351,8 +376,8 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
351
376
  }
352
377
  function Modalities({ model, t }) {
353
378
  const declared = model.inputModalities;
354
- if (declared === void 0 || declared.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.hint, children: t("modalityUnknown") });
355
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.modalities, children: INPUT_MODALITIES.map((modality) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
379
+ if (declared === void 0 || declared.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.hint, children: t("modalityUnknown") });
380
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.modalities, children: INPUT_MODALITIES.map((modality) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
356
381
  "span",
357
382
  {
358
383
  className: declared.includes(modality) ? Section_default.modality : Section_default.modalityOff,
@@ -364,9 +389,9 @@ function Modalities({ model, t }) {
364
389
  function Capacity({ model, field, limit, disabled, t, locale, onChange }) {
365
390
  const id3 = `opencode-go-${field}-${encodeURIComponent(model.id)}`;
366
391
  const defaultValue = model[field];
367
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stat, children: [
368
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: Section_default.statLabel, htmlFor: id3, children: t(field === "contextWindow" ? "limitsContext" : "limitsOutput") }),
369
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
392
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.stat, children: [
393
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: Section_default.statLabel, htmlFor: id3, children: t(field === "contextWindow" ? "limitsContext" : "limitsOutput") }),
394
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
370
395
  "input",
371
396
  {
372
397
  id: id3,
@@ -388,7 +413,7 @@ function Capacity({ model, field, limit, disabled, t, locale, onChange }) {
388
413
  }
389
414
  }
390
415
  ),
391
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { id: `${id3}-default`, className: Section_default.hint, children: [
416
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { id: `${id3}-default`, className: Section_default.hint, children: [
392
417
  t("capacityDefault", { value: defaultValue === void 0 ? t("capacityMissing") : defaultValue.toLocaleString(locale) }),
393
418
  limit?.[field] != null ? ` \xB7 ${t("overridden")}` : ""
394
419
  ] })
@@ -402,12 +427,12 @@ function BudgetPresets({ model, limit, disabled, t, locale, onChange }) {
402
427
  const tokens = Number(text);
403
428
  const valid = text.trim() !== "" && Number.isSafeInteger(tokens) && tokens >= range.min && tokens <= max;
404
429
  const id3 = `opencode-go-thinking-budget-${encodeURIComponent(model.id)}`;
405
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", { className: Section_default.budgetEditor, children: [
406
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: t("thinkingBudgets") }),
407
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("thinkingBudgetsHint", { min: range.min.toLocaleString(locale), max: max.toLocaleString(locale) }) }),
408
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: Section_default.statLabel, htmlFor: id3, children: t("thinkingBudgetAddLabel", { name: model.name ?? model.id }) }),
409
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.budgetInput, children: [
410
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
430
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { className: Section_default.budgetEditor, children: [
431
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("summary", { children: t("thinkingBudgets") }),
432
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("thinkingBudgetsHint", { min: range.min.toLocaleString(locale), max: max.toLocaleString(locale) }) }),
433
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: Section_default.statLabel, htmlFor: id3, children: t("thinkingBudgetAddLabel", { name: model.name ?? model.id }) }),
434
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.budgetInput, children: [
435
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
411
436
  "input",
412
437
  {
413
438
  id: id3,
@@ -426,7 +451,7 @@ function BudgetPresets({ model, limit, disabled, t, locale, onChange }) {
426
451
  }
427
452
  }
428
453
  ),
429
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
454
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
430
455
  import_dsh_client_ui_primitives.Button,
431
456
  {
432
457
  variant: "outline",
@@ -440,7 +465,7 @@ function BudgetPresets({ model, limit, disabled, t, locale, onChange }) {
440
465
  }
441
466
  )
442
467
  ] }),
443
- values.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: Section_default.budgetPresets, children: values.map((value) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
468
+ values.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Section_default.budgetPresets, children: values.map((value) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
444
469
  "button",
445
470
  {
446
471
  type: "button",
@@ -463,7 +488,7 @@ function BudgetPresets({ model, limit, disabled, t, locale, onChange }) {
463
488
 
464
489
  // src/client/AccountsCard.tsx
465
490
  var import_react2 = require("react");
466
- var primitives = __toESM(require("@deepseek-ai/dsh-client-ui-primitives"), 1);
491
+ var primitives2 = __toESM(require("@deepseek-ai/dsh-client-ui-primitives"), 1);
467
492
  var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
468
493
 
469
494
  // src/accounts.ts
@@ -473,21 +498,25 @@ var ACCOUNT_REF_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
473
498
  function accountRefOf(settings) {
474
499
  return settings.apiKeyEnv || DEFAULT_ACCOUNT_REF;
475
500
  }
501
+ function moveAccountFirst(accounts, ref) {
502
+ const index = accounts.findIndex((account) => account.apiKeyEnv === ref);
503
+ return index <= 0 ? accounts : [accounts[index], ...accounts.slice(0, index), ...accounts.slice(index + 1)];
504
+ }
476
505
  function accountsOf(settings) {
477
506
  const ref = accountRefOf(settings);
478
507
  if (settings.accounts?.length === 0) return [];
479
508
  const accounts = settings.accounts ?? [];
480
- return accounts.some((account) => account.apiKeyEnv === ref) ? accounts : [
509
+ return accounts.some((account) => account.apiKeyEnv === ref) ? moveAccountFirst(accounts, ref) : [
481
510
  { id: `legacy:${ref}`, name: "", apiKeyEnv: ref },
482
511
  ...accounts
483
512
  ];
484
513
  }
485
514
 
486
515
  // src/client/AccountsCard.tsx
487
- var import_jsx_runtime2 = require("react/jsx-runtime");
516
+ var import_jsx_runtime3 = require("react/jsx-runtime");
488
517
  var WINDOWS = ["rolling", "weekly", "monthly"];
489
518
  var TICKS = [25, 50, 75];
490
- var ChevronDown = primitives.IconChevronDownOutlineRegular ?? primitives.IconChevronDownOutline14;
519
+ var ChevronDown = primitives2.IconChevronDownOutlineRegular ?? primitives2.IconChevronDownOutline14;
491
520
  function resetText(resetsAt, t) {
492
521
  const remaining = Date.parse(resetsAt) - Date.now();
493
522
  if (!Number.isFinite(remaining)) return t("usageResetUnknown");
@@ -508,13 +537,13 @@ function stampText(at, locale) {
508
537
  return date.toDateString() === (/* @__PURE__ */ new Date()).toDateString() ? time : `${date.toLocaleDateString(locale)} ${time}`;
509
538
  }
510
539
  function GripIcon() {
511
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "10", height: "14", viewBox: "0 0 10 14", fill: "currentColor", "aria-hidden": "true", children: [
512
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "2.5", cy: "2.5", r: "1.3" }),
513
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "2.5", r: "1.3" }),
514
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "2.5", cy: "7", r: "1.3" }),
515
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "7", r: "1.3" }),
516
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "2.5", cy: "11.5", r: "1.3" }),
517
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "11.5", r: "1.3" })
540
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("svg", { width: "10", height: "14", viewBox: "0 0 10 14", fill: "currentColor", "aria-hidden": "true", children: [
541
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "2.5", cy: "2.5", r: "1.3" }),
542
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "7.5", cy: "2.5", r: "1.3" }),
543
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "2.5", cy: "7", r: "1.3" }),
544
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "7.5", cy: "7", r: "1.3" }),
545
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "2.5", cy: "11.5", r: "1.3" }),
546
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "7.5", cy: "11.5", r: "1.3" })
518
547
  ] });
519
548
  }
520
549
  function slotAt(container, clientY) {
@@ -557,11 +586,13 @@ function AccountsCard({ state, actions, writable, t, locale }) {
557
586
  };
558
587
  }, [actions.loadAccounts]);
559
588
  const start = (next, label = "") => {
589
+ if (next.kind === "add") actions.resetAddition?.();
560
590
  setEditor(next);
561
591
  setName(label);
562
592
  setKey("");
563
593
  };
564
594
  const cancel = () => {
595
+ if (editor?.kind === "add") actions.resetAddition?.();
565
596
  setEditor(null);
566
597
  setName("");
567
598
  setKey("");
@@ -585,7 +616,7 @@ function AccountsCard({ state, actions, writable, t, locale }) {
585
616
  };
586
617
  const summary = total ? t("accountsSummary", { count: total, name: preferred ? preferred.name || t("accountDefault") : "" }) : t("accountsSummaryEmpty");
587
618
  const editorTitle = (kind) => t(kind === "add" ? "accountAdd" : kind === "rename" ? "accountRename" : kind === "key" ? "accountReplaceKey" : "accountRemove");
588
- const editorForm = (label = "") => editor ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
619
+ const editorForm = (label = "") => editor ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
589
620
  "form",
590
621
  {
591
622
  className: Section_default.accountEditor,
@@ -600,14 +631,14 @@ function AccountsCard({ state, actions, writable, t, locale }) {
600
631
  }
601
632
  },
602
633
  children: [
603
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountEditorHead, children: [
604
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountEditorTitle, children: editorTitle(editor.kind) }),
605
- label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountEditorFor, children: label }) : null
634
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountEditorHead, children: [
635
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountEditorTitle, children: editorTitle(editor.kind) }),
636
+ label ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountEditorFor, children: label }) : null
606
637
  ] }),
607
- editor.kind === "remove" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("accountRemoveHint", { name }) }) : null,
608
- editor.kind === "add" || editor.kind === "rename" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: Section_default.accountField, children: [
638
+ editor.kind === "remove" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("accountRemoveHint", { name }) }) : null,
639
+ editor.kind === "add" || editor.kind === "rename" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: Section_default.accountField, children: [
609
640
  t("accountName"),
610
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
641
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
611
642
  "input",
612
643
  {
613
644
  className: Section_default.input,
@@ -622,10 +653,10 @@ function AccountsCard({ state, actions, writable, t, locale }) {
622
653
  }
623
654
  )
624
655
  ] }) : null,
625
- editor.kind === "add" || editor.kind === "key" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
626
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: Section_default.accountField, children: [
656
+ editor.kind === "add" || editor.kind === "key" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
657
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: Section_default.accountField, children: [
627
658
  t("keyLabel"),
628
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
659
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
629
660
  "input",
630
661
  {
631
662
  className: Section_default.input,
@@ -641,10 +672,10 @@ function AccountsCard({ state, actions, writable, t, locale }) {
641
672
  }
642
673
  )
643
674
  ] }),
644
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("accountKeyHint") })
675
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("accountKeyHint") })
645
676
  ] }) : null,
646
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountEditorActions, children: [
647
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
677
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountEditorActions, children: [
678
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
648
679
  import_dsh_client_ui_primitives2.Button,
649
680
  {
650
681
  variant: "primary",
@@ -654,20 +685,20 @@ function AccountsCard({ state, actions, writable, t, locale }) {
654
685
  children: t(state.busy ? "saving" : "accountConfirm")
655
686
  }
656
687
  ),
657
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", type: "button", disabled: state.busy, onClick: cancel, children: t("accountCancel") })
688
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", type: "button", disabled: state.busy, onClick: cancel, children: t("accountCancel") })
658
689
  ] })
659
690
  ]
660
691
  }
661
692
  ) : null;
662
- const detail = (account, label) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountDetail, children: [
663
- account.usage ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Section_default.accountUsage, children: WINDOWS.map((window) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
664
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
693
+ const detail = (account, label) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountDetail, children: [
694
+ account.usage ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.accountUsage, children: WINDOWS.map((window) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
695
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
665
696
  t(`usage_${window}`),
666
697
  " \xB7 ",
667
698
  account.usage[window].percent,
668
699
  "%"
669
700
  ] }),
670
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
701
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
671
702
  "progress",
672
703
  {
673
704
  "data-level": barLevel(account.usage[window]),
@@ -676,27 +707,27 @@ function AccountsCard({ state, actions, writable, t, locale }) {
676
707
  "aria-label": `${label} ${t(`usage_${window}`)}`
677
708
  }
678
709
  ),
679
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.hint, children: [
710
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.hint, children: [
680
711
  t("usageResets"),
681
712
  " ",
682
713
  new Date(account.usage[window].resetsAt).toLocaleString(locale)
683
714
  ] })
684
- ] }, window)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t(account.loading ? "usageLoading" : "usageUnavailable") }),
685
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountActions, children: [
686
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled, onClick: () => {
715
+ ] }, window)) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t(account.loading ? "usageLoading" : "usageUnavailable") }),
716
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountActions, children: [
717
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled, onClick: () => {
687
718
  start({ kind: "rename", ref: account.apiKeyEnv }, label);
688
719
  }, children: t("accountRename") }),
689
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled: state.busy || state.blocked || account.writable === false, onClick: () => {
720
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled: state.busy || state.blocked || account.writable === false, onClick: () => {
690
721
  start({ kind: "key", ref: account.apiKeyEnv }, label);
691
722
  }, children: t("accountReplaceKey") }),
692
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled, onClick: () => {
723
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled, onClick: () => {
693
724
  start({ kind: "remove", ref: account.apiKeyEnv }, label);
694
725
  }, children: t("accountRemove") })
695
726
  ] })
696
727
  ] });
697
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: open ? Section_default.card : Section_default.card + " " + Section_default.cardFolded, children: [
698
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.cardHead, children: [
699
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
728
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: open ? Section_default.card : Section_default.card + " " + Section_default.cardFolded, children: [
729
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.cardHead, children: [
730
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
700
731
  "button",
701
732
  {
702
733
  type: "button",
@@ -707,20 +738,20 @@ function AccountsCard({ state, actions, writable, t, locale }) {
707
738
  setOpen(!open);
708
739
  },
709
740
  children: [
710
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.cardTitle, children: t("accountsTitle") }),
711
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.cardSub, children: summary }),
712
- total > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: unreadable > 0 || ready < total ? "warning" : "success", children: t(unreadable > 0 ? "accountsAvailabilityFailed" : "accountsAvailability", { ready, total, failed: unreadable }) }) : null,
713
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDown, { className: open ? Section_default.chevronOpen : Section_default.chevron })
741
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.cardTitle, children: t("accountsTitle") }),
742
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.cardSub, children: summary }),
743
+ total > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: unreadable > 0 || ready < total ? "warning" : "success", children: t(unreadable > 0 ? "accountsAvailabilityFailed" : "accountsAvailability", { ready, total, failed: unreadable }) }) : null,
744
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown, { className: open ? Section_default.chevronOpen : Section_default.chevron })
714
745
  ]
715
746
  }
716
747
  ),
717
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.trailing, children: [
718
- updatedAt > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.cardStamp, title: new Date(updatedAt).toLocaleString(locale), children: [
748
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.trailing, children: [
749
+ updatedAt > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.cardStamp, title: new Date(updatedAt).toLocaleString(locale), children: [
719
750
  t("usageLastUpdated"),
720
751
  " ",
721
752
  stampText(updatedAt, locale)
722
753
  ] }) : null,
723
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
754
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
724
755
  import_dsh_client_ui_primitives2.Button,
725
756
  {
726
757
  variant: "outline",
@@ -732,11 +763,11 @@ function AccountsCard({ state, actions, writable, t, locale }) {
732
763
  )
733
764
  ] })
734
765
  ] }),
735
- open ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id: "opencode-go-accounts", className: Section_default.cardBody, children: [
736
- state.blocked ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("accountsBlocked") }) : null,
737
- state.failure ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(state.failure === "cleanup" ? "accountsCleanupFailed" : state.failure === "remove" ? "accountsRemoveKeyFailed" : state.failure === "read" ? "accountsReadFailed" : "accountsWriteFailed") }) : null,
738
- !total ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("accountsEmpty") }) : null,
739
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
766
+ open ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: "opencode-go-accounts", className: Section_default.cardBody, children: [
767
+ state.blocked ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("accountsBlocked") }) : null,
768
+ state.failure ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(state.failure === "cleanup" ? "accountsCleanupFailed" : state.failure === "remove" ? "accountsRemoveKeyFailed" : state.failure === "read" ? "accountsReadFailed" : "accountsWriteFailed") }) : null,
769
+ !total ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("accountsEmpty") }) : null,
770
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
740
771
  "div",
741
772
  {
742
773
  className: Section_default.accounts,
@@ -771,7 +802,7 @@ function AccountsCard({ state, actions, writable, t, locale }) {
771
802
  const rolling = account.usage?.rolling;
772
803
  const expanded = details === account.apiKeyEnv;
773
804
  const panelId = `opencode-go-account-${index}`;
774
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
805
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
775
806
  "div",
776
807
  {
777
808
  className: Section_default.accountRow,
@@ -793,8 +824,8 @@ function AccountsCard({ state, actions, writable, t, locale }) {
793
824
  setDragging(account.apiKeyEnv);
794
825
  },
795
826
  children: [
796
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountMain, "data-account-main": "", children: [
797
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
827
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountMain, "data-account-main": "", children: [
828
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
798
829
  "button",
799
830
  {
800
831
  type: "button",
@@ -814,16 +845,16 @@ function AccountsCard({ state, actions, writable, t, locale }) {
814
845
  move(account.apiKeyEnv, index + 1);
815
846
  }
816
847
  },
817
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(GripIcon, {})
848
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GripIcon, {})
818
849
  }
819
850
  ),
820
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { className: Section_default.accountName, title: label, children: label }),
821
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.accountState, children: [
822
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountDot, "data-off": account.configured === false ? "true" : void 0 }),
851
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { className: Section_default.accountName, title: label, children: label }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.accountState, children: [
853
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountDot, "data-off": account.configured === false ? "true" : void 0 }),
823
854
  account.configured === void 0 ? t(account.failed ? "accountsStatusUnknown" : "usageLoading") : account.configured ? t("keyConfigured") : t("keyMissing")
824
855
  ] }),
825
- rolling ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
826
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
856
+ rolling ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
857
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
827
858
  "span",
828
859
  {
829
860
  className: Section_default.accountBar,
@@ -834,18 +865,18 @@ function AccountsCard({ state, actions, writable, t, locale }) {
834
865
  "aria-valuenow": Math.min(100, rolling.percent),
835
866
  "aria-label": `${label} ${t("usage_rolling")}`,
836
867
  children: [
837
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountBarFill, style: { width: `${Math.min(100, rolling.percent)}%` } }),
838
- TICKS.map((at) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountBarTick, style: { left: `${at}%` } }, at))
868
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountBarFill, style: { width: `${Math.min(100, rolling.percent)}%` } }),
869
+ TICKS.map((at) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountBarTick, style: { left: `${at}%` } }, at))
839
870
  ]
840
871
  }
841
872
  ),
842
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.accountPercent, children: [
873
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.accountPercent, children: [
843
874
  rolling.percent,
844
875
  "%"
845
876
  ] }),
846
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountReset, children: resetText(rolling.resetsAt, t) })
847
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.accountIdle, children: account.configured === false ? t("accountConfigureHint") : t(account.loading ? "usageLoading" : "usageUnavailable") }),
848
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
877
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountReset, children: resetText(rolling.resetsAt, t) })
878
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.accountIdle, children: account.configured === false ? t("accountConfigureHint") : t(account.loading ? "usageLoading" : "usageUnavailable") }),
879
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
849
880
  "button",
850
881
  {
851
882
  type: "button",
@@ -856,13 +887,13 @@ function AccountsCard({ state, actions, writable, t, locale }) {
856
887
  onClick: () => {
857
888
  setDetails(expanded ? null : account.apiKeyEnv);
858
889
  },
859
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDown, { className: expanded ? Section_default.chevronOpen : Section_default.chevron })
890
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown, { className: expanded ? Section_default.chevronOpen : Section_default.chevron })
860
891
  }
861
892
  )
862
893
  ] }),
863
- account.failed ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.accountProblems, role: "alert", children: [
864
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.failedNote, children: account.problem ?? t(account.stale ? "usageStaleHint" : "usageRefreshFailed") }),
865
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
894
+ account.failed ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.accountProblems, role: "alert", children: [
895
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, children: account.problem ?? t(account.stale ? "usageStaleHint" : "usageRefreshFailed") }),
896
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
866
897
  "button",
867
898
  {
868
899
  type: "button",
@@ -881,7 +912,7 @@ function AccountsCard({ state, actions, writable, t, locale }) {
881
912
  })
882
913
  }
883
914
  ),
884
- editor ? editor.kind === "add" ? editorForm() : null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
915
+ editor ? editor.kind === "add" ? editorForm() : null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
885
916
  import_dsh_client_ui_primitives2.Button,
886
917
  {
887
918
  variant: "outline",
@@ -893,23 +924,24 @@ function AccountsCard({ state, actions, writable, t, locale }) {
893
924
  children: t("accountAdd")
894
925
  }
895
926
  ),
896
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.field, children: [
897
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.head, children: [
898
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.label, children: t("accountAutoSwitch") }),
899
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
900
- import_dsh_client_ui_primitives2.Switch,
901
- {
902
- checked: state.autoSwitch,
903
- disabled,
904
- label: t("accountAutoSwitch"),
905
- onChange: (next) => {
906
- void actions.setAutoSwitch(next);
907
- }
908
- }
909
- )
927
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.field, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.head, children: [
928
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.label, children: [
929
+ t("accountAutoSwitch"),
930
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HintMark, { hint: t("accountAutoSwitchHint") })
910
931
  ] }),
911
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("accountAutoSwitchHint") })
912
- ] })
932
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
933
+ import_dsh_client_ui_primitives2.Switch,
934
+ {
935
+ checked: state.autoSwitch,
936
+ disabled,
937
+ label: t("accountAutoSwitch"),
938
+ title: t("accountAutoSwitchHint"),
939
+ onChange: (next) => {
940
+ void actions.setAutoSwitch(next);
941
+ }
942
+ }
943
+ )
944
+ ] }) })
913
945
  ] }) : null
914
946
  ] });
915
947
  }
@@ -919,50 +951,82 @@ var USAGE_DISPLAY_MODES = ["auto", "always", "off"];
919
951
  var DEFAULT_USAGE_DISPLAY = "auto";
920
952
 
921
953
  // src/client/Section.tsx
922
- var import_jsx_runtime3 = require("react/jsx-runtime");
923
- var ChevronDown2 = primitives2.IconChevronDownOutlineRegular ?? primitives2.IconChevronDownOutline14;
954
+ var import_jsx_runtime4 = require("react/jsx-runtime");
955
+ var ChevronDown2 = hostAtom(
956
+ primitives3,
957
+ "IconChevronDownOutlineRegular",
958
+ "IconChevronDownOutline14"
959
+ ) ?? primitives3.IconChevronDownOutline14;
960
+ var ADVANCED_FIELDS = [
961
+ "usageDisplay",
962
+ "protocolOverrides",
963
+ "baseURL",
964
+ "proxyURL",
965
+ "refreshMinutes",
966
+ "streamIdleTimeoutMs",
967
+ "maxImages",
968
+ "maxRequestImageBytes",
969
+ "requestImagePixelBudget",
970
+ "requestImageMaxBytes"
971
+ ];
924
972
  function ValueField(props) {
925
973
  const hintId = props.id + "-hint";
926
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.field, children: [
927
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.head, children: [
928
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: Section_default.label, htmlFor: props.id, children: props.label }),
929
- props.field.overridden ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: Section_default.badges, children: [
930
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: "neutral", children: props.overriddenLabel }),
931
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
932
- "button",
933
- {
934
- type: "button",
935
- className: Section_default.reset,
936
- disabled: props.disabled,
937
- onClick: props.onReset,
938
- children: props.resetLabel
939
- }
940
- )
941
- ] }) : null
974
+ const errorId = props.id + "-error";
975
+ const labelId = props.id + "-label";
976
+ const options = props.options;
977
+ const selected = options ? options.findIndex((option) => option.value === props.field.text) : -1;
978
+ const describedBy = props.field.invalid ? `${errorId} ${hintId}` : hintId;
979
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.row, children: [
980
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.rowLabel, children: [
981
+ options ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { id: labelId, className: Section_default.rowTitle, children: props.label }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { htmlFor: props.id, className: Section_default.rowTitle, children: props.label }),
982
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HintMark, { hint: props.hint })
942
983
  ] }),
943
- props.options ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
944
- "select",
984
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.rowControl, children: options ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
985
+ "div",
945
986
  {
946
- id: props.id,
947
- name: props.id,
948
- "aria-describedby": hintId,
949
- className: props.field.invalid ? Section_default.inputInvalid : Section_default.input,
950
- "aria-invalid": props.field.invalid || void 0,
951
- value: props.field.text,
952
- disabled: props.disabled,
953
- onChange: (event) => {
954
- props.onEdit(event.target.value);
987
+ className: Section_default.seg,
988
+ role: "radiogroup",
989
+ "aria-labelledby": labelId,
990
+ "aria-describedby": describedBy,
991
+ "data-count": options.length,
992
+ "data-index": selected < 0 ? 0 : selected,
993
+ ...props.field.invalid ? { "aria-invalid": true } : {},
994
+ onKeyDown: (event) => {
995
+ const step = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : event.key === "ArrowLeft" || event.key === "ArrowUp" ? -1 : 0;
996
+ if (step === 0) return;
997
+ event.preventDefault();
998
+ const next = (Math.max(0, selected) + step + options.length) % options.length;
999
+ props.onEdit(options[next].value);
1000
+ event.currentTarget.querySelectorAll('[role="radio"]')[next]?.focus();
955
1001
  },
956
- children: props.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: option.value, children: option.label }, option.value))
1002
+ children: [
1003
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.segThumb, "aria-hidden": "true" }),
1004
+ options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1005
+ "button",
1006
+ {
1007
+ type: "button",
1008
+ role: "radio",
1009
+ "aria-checked": option.value === props.field.text,
1010
+ tabIndex: option.value === props.field.text ? 0 : -1,
1011
+ className: Section_default.segOption,
1012
+ disabled: props.disabled,
1013
+ onClick: () => {
1014
+ props.onEdit(option.value);
1015
+ },
1016
+ children: option.label
1017
+ },
1018
+ option.value
1019
+ ))
1020
+ ]
957
1021
  }
958
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1022
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
959
1023
  "input",
960
1024
  {
961
1025
  id: props.id,
962
1026
  name: props.id,
963
1027
  autoComplete: "off",
964
1028
  placeholder: props.placeholder,
965
- "aria-describedby": hintId,
1029
+ "aria-describedby": describedBy,
966
1030
  className: props.field.invalid ? Section_default.inputInvalid : Section_default.input,
967
1031
  type: props.numeric === true ? "number" : "text",
968
1032
  ...props.numeric === true ? { inputMode: "numeric" } : {},
@@ -973,8 +1037,9 @@ function ValueField(props) {
973
1037
  props.onEdit(event.target.value);
974
1038
  }
975
1039
  }
976
- ),
977
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: hintId, className: props.field.invalid ? Section_default.invalid : Section_default.hint, children: props.field.invalid ? props.invalidLabel : props.hint })
1040
+ ) }),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HintText, { id: hintId, hint: props.hint }),
1042
+ props.field.invalid ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id: errorId, className: Section_default.rowInvalid, role: "alert", children: props.invalidLabel }) : null
978
1043
  ] });
979
1044
  }
980
1045
  function ModelsBody({ models, t, locale }) {
@@ -982,7 +1047,7 @@ function ModelsBody({ models, t, locale }) {
982
1047
  const metadataOnlyFailure = sources?.metadata.error !== void 0 && sources.listing.error === void 0;
983
1048
  const sourceStatus = sources ? ["listing", "metadata"].map((source) => {
984
1049
  const status = sources[source];
985
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: Section_default.hint, children: [
1050
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: Section_default.hint, children: [
986
1051
  t(source === "listing" ? "modelsListingSource" : "modelsMetadataSource"),
987
1052
  ": ",
988
1053
  " ",
@@ -990,38 +1055,38 @@ function ModelsBody({ models, t, locale }) {
990
1055
  ". ",
991
1056
  " ",
992
1057
  status.updatedAt === void 0 ? t("modelsSourceNeverFetched") : t("modelsSourceUpdated", { time: new Date(status.updatedAt).toLocaleString(locale) }),
993
- status.warning ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1058
+ status.warning ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
994
1059
  " ",
995
1060
  status.warning
996
1061
  ] }) : null
997
1062
  ] }, source);
998
1063
  }) : null;
999
1064
  if (models.status === "failed") {
1000
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1001
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(metadataOnlyFailure ? "modelsMetadataFailed" : "modelsFailed") }),
1002
- models.message ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: models.message }) : null,
1065
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1066
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(metadataOnlyFailure ? "modelsMetadataFailed" : "modelsFailed") }),
1067
+ models.message ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: models.message }) : null,
1003
1068
  sourceStatus
1004
1069
  ] });
1005
1070
  }
1006
- if (models.status !== "ready") return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, role: "status", "aria-live": "polite", children: t("modelsLoading") });
1007
- const progress = models.refreshing ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, role: "status", children: t("modelsRefreshing") }) : null;
1008
- if (models.stale) return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1071
+ if (models.status !== "ready") return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, role: "status", "aria-live": "polite", children: t("modelsLoading") });
1072
+ const progress = models.refreshing ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, role: "status", children: t("modelsRefreshing") }) : null;
1073
+ if (models.stale) return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1009
1074
  progress,
1010
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(metadataOnlyFailure ? "modelsMetadataFailed" : "modelsStale") }),
1011
- models.message ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: models.message }) : null,
1075
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t(metadataOnlyFailure ? "modelsMetadataFailed" : "modelsStale") }),
1076
+ models.message ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: models.message }) : null,
1012
1077
  sourceStatus
1013
1078
  ] });
1014
- const warning = sources?.listing.warning ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, role: "alert", children: sources.listing.warning }) : null;
1015
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1079
+ const warning = sources?.listing.warning ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, role: "alert", children: sources.listing.warning }) : null;
1080
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1016
1081
  progress,
1017
1082
  warning,
1018
- models.count === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("modelsEmpty") }) : null
1083
+ models.count === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: t("modelsEmpty") }) : null
1019
1084
  ] });
1020
1085
  }
1021
1086
  function OpencodeGoSection(props) {
1022
1087
  const { useOpencodeGo, edit, resetField, save, discard, loadModels, setEnabled, setModelEnabled, t } = props;
1023
1088
  if (useOpencodeGo === void 0 || edit === void 0 || resetField === void 0 || save === void 0 || discard === void 0 || loadModels === void 0 || setEnabled === void 0 || setModelEnabled === void 0 || t === void 0) return null;
1024
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1089
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1025
1090
  Loaded,
1026
1091
  {
1027
1092
  state: useOpencodeGo((snapshot) => snapshot),
@@ -1038,6 +1103,7 @@ function OpencodeGoSection(props) {
1038
1103
  loadAccounts: props.loadAccounts,
1039
1104
  addAccount: props.addAccount,
1040
1105
  renameAccount: props.renameAccount,
1106
+ resetAddition: props.resetAddition,
1041
1107
  removeAccount: props.removeAccount,
1042
1108
  selectAccount: props.selectAccount,
1043
1109
  setAutoSwitch: props.setAutoSwitch,
@@ -1051,18 +1117,19 @@ function Loaded(props) {
1051
1117
  const { t, state, loadModels } = props;
1052
1118
  const [advanced, setAdvanced] = (0, import_react3.useState)(false);
1053
1119
  const [modelsOpen, setModelsOpen] = (0, import_react3.useState)(false);
1054
- const modelNotices = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1055
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ModelsBody, { models: state.models, t, locale: props.locale }),
1056
- state.pickerFailed ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t("pickerFailed") }) : null
1120
+ const modelNotices = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1121
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ModelsBody, { models: state.models, t, locale: props.locale }),
1122
+ state.pickerFailed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t("pickerFailed") }) : null
1057
1123
  ] });
1058
1124
  (0, import_react3.useEffect)(() => {
1059
1125
  if (state.available && state.models.status === "idle") loadModels();
1060
1126
  }, [state.available, state.models.status, loadModels]);
1061
1127
  if (!state.available) {
1062
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.intro, children: t("unavailable") });
1128
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.intro, children: t("unavailable") });
1063
1129
  }
1064
1130
  const disabled = !state.writable;
1065
- const accountCard = state.accounts && props.accountActions ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1131
+ const enabledHint = state.enabled ? t("enabledHint") : t("enabledOff");
1132
+ const accountCard = state.accounts && props.accountActions ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1066
1133
  AccountsCard,
1067
1134
  {
1068
1135
  state: state.accounts,
@@ -1074,43 +1141,45 @@ function Loaded(props) {
1074
1141
  ) : null;
1075
1142
  const fieldProps = {
1076
1143
  invalidLabel: t("invalidValue"),
1077
- overriddenLabel: t("overridden"),
1078
- resetLabel: t("reset"),
1079
1144
  disabled
1080
1145
  };
1081
- const advancedOverridden = state.usageDisplay.overridden || state.protocolOverrides.overridden || state.apiKeyEnv.overridden || state.baseURL.overridden || state.proxyURL.overridden || state.refreshMinutes.overridden || state.streamIdleTimeoutMs.overridden || state.maxImages.overridden || state.maxRequestImageBytes.overridden || state.requestImagePixelBudget.overridden || state.requestImageMaxBytes.overridden;
1082
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.page, children: [
1083
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.pageBody, children: [
1084
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.pageTop, children: [
1085
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: Section_default.title, children: t("titleLabel") }),
1086
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.intro, children: t("intro") })
1146
+ const advancedOverridden = ADVANCED_FIELDS.some((field) => state[field].overridden);
1147
+ const canResetAdvanced = ADVANCED_FIELDS.some((field) => state[field].overridden || state[field].invalid);
1148
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.page, children: [
1149
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.pageBody, children: [
1150
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.pageTop, children: [
1151
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: Section_default.title, children: t("titleLabel") }),
1152
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.intro, children: t("intro") })
1087
1153
  ] }),
1088
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: Section_default.card, children: [
1089
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.cardHead, children: [
1090
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: Section_default.cardTitle, children: t("enabledLabel") }),
1091
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1154
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: Section_default.card, children: [
1155
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardHead, children: [
1156
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("h3", { className: Section_default.cardTitle, children: [
1157
+ t("enabledLabel"),
1158
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HintMark, { hint: enabledHint })
1159
+ ] }),
1160
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1092
1161
  import_dsh_client_ui_primitives3.Switch,
1093
1162
  {
1094
1163
  checked: state.enabled,
1095
1164
  label: t("enabledLabel"),
1165
+ title: enabledHint,
1096
1166
  disabled: disabled || state.saving || state.pickerSaving,
1097
1167
  onChange: props.setEnabled
1098
1168
  }
1099
1169
  )
1100
1170
  ] }),
1101
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.cardBody, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: state.enabled ? t("enabledHint") : t("enabledOff") }) }),
1102
- accountCard ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1103
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.cardDivider }),
1104
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.cardHead, children: [
1105
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.slot, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", focusable: "false", children: [
1106
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "5.4", cy: "8", r: "3.1" }),
1107
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8.5 8h5.3M11.9 8v2.2M10.2 8v1.6" })
1171
+ accountCard ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1172
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.cardDivider }),
1173
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardHead, children: [
1174
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.slot, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", focusable: "false", children: [
1175
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "5.4", cy: "8", r: "3.1" }),
1176
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8.5 8h5.3M11.9 8v2.2M10.2 8v1.6" })
1108
1177
  ] }) }),
1109
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: Section_default.label, htmlFor: "opencode-go-key", children: t("keyLabel") }),
1110
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.trailing, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: state.apiKeyConfigured ? "success" : "warning", children: state.apiKeyConfigured ? t("keyConfigured") : t("keyMissing") }) })
1178
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { className: Section_default.label, htmlFor: "opencode-go-key", children: t("keyLabel") }),
1179
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.trailing, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: state.apiKeyConfigured ? "success" : "warning", children: state.apiKeyConfigured ? t("keyConfigured") : t("keyMissing") }) })
1111
1180
  ] }),
1112
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.cardBody, children: [
1113
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1181
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardBody, children: [
1182
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1114
1183
  "input",
1115
1184
  {
1116
1185
  id: "opencode-go-key",
@@ -1126,13 +1195,13 @@ function Loaded(props) {
1126
1195
  }
1127
1196
  }
1128
1197
  ),
1129
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
1198
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
1130
1199
  ] })
1131
1200
  ] })
1132
1201
  ] }),
1133
1202
  accountCard,
1134
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: modelsOpen ? Section_default.cardModels : Section_default.cardModels + " " + Section_default.cardFolded, children: [
1135
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1203
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: modelsOpen ? Section_default.cardModels : Section_default.cardModels + " " + Section_default.cardFolded, children: [
1204
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1136
1205
  "button",
1137
1206
  {
1138
1207
  type: "button",
@@ -1143,14 +1212,14 @@ function Loaded(props) {
1143
1212
  setModelsOpen(!modelsOpen);
1144
1213
  },
1145
1214
  children: [
1146
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.cardTitle, children: t("modelsLabel") }),
1147
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown2, { className: modelsOpen ? Section_default.chevronOpen : Section_default.chevron })
1215
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.cardTitle, children: t("modelsLabel") }),
1216
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronDown2, { className: modelsOpen ? Section_default.chevronOpen : Section_default.chevron })
1148
1217
  ]
1149
1218
  }
1150
1219
  ),
1151
- modelsOpen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: "opencode-go-models", className: Section_default.cardBody, children: [
1220
+ modelsOpen ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id: "opencode-go-models", className: Section_default.cardBody, children: [
1152
1221
  modelNotices,
1153
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1222
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1154
1223
  ModelEditor,
1155
1224
  {
1156
1225
  models: state.models,
@@ -1160,7 +1229,7 @@ function Loaded(props) {
1160
1229
  disabled: disabled || state.saving,
1161
1230
  modelVisibility: state.modelVisibility,
1162
1231
  visibilitySaving: state.pickerSaving,
1163
- filterAction: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1232
+ filterAction: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1164
1233
  import_dsh_client_ui_primitives3.Button,
1165
1234
  {
1166
1235
  variant: "outline",
@@ -1176,10 +1245,10 @@ function Loaded(props) {
1176
1245
  }
1177
1246
  }
1178
1247
  )
1179
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.cardNotes, children: modelNotices })
1248
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.cardNotes, children: modelNotices })
1180
1249
  ] }),
1181
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: Section_default.card, children: [
1182
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1250
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: Section_default.card, children: [
1251
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1183
1252
  "button",
1184
1253
  {
1185
1254
  type: "button",
@@ -1190,17 +1259,33 @@ function Loaded(props) {
1190
1259
  setAdvanced(!advanced);
1191
1260
  },
1192
1261
  children: [
1193
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.cardTitle, children: t("advancedLabel") }),
1194
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Section_default.cardSub, children: t("advancedSummary") }),
1195
- advancedOverridden ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: "neutral", children: t("overridden") }) : null,
1196
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown2, { className: advanced ? Section_default.chevronOpen : Section_default.chevron })
1262
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.cardTitle, children: t("advancedLabel") }),
1263
+ advancedOverridden ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: "neutral", children: t("overridden") }) : null,
1264
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronDown2, { className: advanced ? Section_default.chevronOpen : Section_default.chevron })
1197
1265
  ]
1198
1266
  }
1199
1267
  ),
1200
- advanced ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: "opencode-go-advanced", className: Section_default.cardBody, children: [
1201
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("advancedHint") }),
1202
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.advancedGrid, children: [
1203
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1268
+ advanced ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id: "opencode-go-advanced", className: Section_default.cardBody, children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.advancedHead, children: [
1270
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: t("advancedHint") }),
1271
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1272
+ "button",
1273
+ {
1274
+ type: "button",
1275
+ className: Section_default.reset,
1276
+ disabled: disabled || !canResetAdvanced,
1277
+ onClick: () => {
1278
+ for (const field of ADVANCED_FIELDS) {
1279
+ if (state[field].overridden || state[field].invalid) props.resetField(field);
1280
+ }
1281
+ },
1282
+ children: t("advancedResetAll")
1283
+ }
1284
+ )
1285
+ ] }),
1286
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.rows, children: [
1287
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupUsageProtocol") }),
1288
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1204
1289
  ValueField,
1205
1290
  {
1206
1291
  id: "opencode-go-usage-display",
@@ -1211,13 +1296,10 @@ function Loaded(props) {
1211
1296
  ...fieldProps,
1212
1297
  onEdit: (text) => {
1213
1298
  props.edit("usageDisplay", text);
1214
- },
1215
- onReset: () => {
1216
- props.resetField("usageDisplay");
1217
1299
  }
1218
1300
  }
1219
1301
  ),
1220
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1302
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1221
1303
  ValueField,
1222
1304
  {
1223
1305
  id: "opencode-go-protocol-overrides",
@@ -1231,29 +1313,11 @@ function Loaded(props) {
1231
1313
  ...fieldProps,
1232
1314
  onEdit: (text) => {
1233
1315
  props.edit("protocolOverrides", text);
1234
- },
1235
- onReset: () => {
1236
- props.resetField("protocolOverrides");
1237
- }
1238
- }
1239
- ),
1240
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1241
- ValueField,
1242
- {
1243
- id: "opencode-go-api-key-env",
1244
- label: t("apiKeyEnvLabel"),
1245
- hint: t("apiKeyEnvHint"),
1246
- field: state.apiKeyEnv,
1247
- ...fieldProps,
1248
- onEdit: (text) => {
1249
- props.edit("apiKeyEnv", text);
1250
- },
1251
- onReset: () => {
1252
- props.resetField("apiKeyEnv");
1253
1316
  }
1254
1317
  }
1255
1318
  ),
1256
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1319
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupConnection") }),
1320
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1257
1321
  ValueField,
1258
1322
  {
1259
1323
  id: "opencode-go-base-url",
@@ -1263,13 +1327,10 @@ function Loaded(props) {
1263
1327
  ...fieldProps,
1264
1328
  onEdit: (text) => {
1265
1329
  props.edit("baseURL", text);
1266
- },
1267
- onReset: () => {
1268
- props.resetField("baseURL");
1269
1330
  }
1270
1331
  }
1271
1332
  ),
1272
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1333
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1273
1334
  ValueField,
1274
1335
  {
1275
1336
  id: "opencode-go-proxy-url",
@@ -1281,13 +1342,11 @@ function Loaded(props) {
1281
1342
  invalidLabel: t("proxyURLInvalid"),
1282
1343
  onEdit: (text) => {
1283
1344
  props.edit("proxyURL", text);
1284
- },
1285
- onReset: () => {
1286
- props.resetField("proxyURL");
1287
1345
  }
1288
1346
  }
1289
1347
  ),
1290
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1348
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupCacheTimeouts") }),
1349
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1291
1350
  ValueField,
1292
1351
  {
1293
1352
  id: "opencode-go-refresh-minutes",
@@ -1298,13 +1357,10 @@ function Loaded(props) {
1298
1357
  ...fieldProps,
1299
1358
  onEdit: (text) => {
1300
1359
  props.edit("refreshMinutes", text);
1301
- },
1302
- onReset: () => {
1303
- props.resetField("refreshMinutes");
1304
1360
  }
1305
1361
  }
1306
1362
  ),
1307
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1363
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1308
1364
  ValueField,
1309
1365
  {
1310
1366
  id: "opencode-go-stream-idle",
@@ -1315,13 +1371,11 @@ function Loaded(props) {
1315
1371
  ...fieldProps,
1316
1372
  onEdit: (text) => {
1317
1373
  props.edit("streamIdleTimeoutMs", text);
1318
- },
1319
- onReset: () => {
1320
- props.resetField("streamIdleTimeoutMs");
1321
1374
  }
1322
1375
  }
1323
1376
  ),
1324
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1377
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupImages") }),
1378
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1325
1379
  ValueField,
1326
1380
  {
1327
1381
  id: "opencode-go-max-images",
@@ -1332,13 +1386,10 @@ function Loaded(props) {
1332
1386
  ...fieldProps,
1333
1387
  onEdit: (text) => {
1334
1388
  props.edit("maxImages", text);
1335
- },
1336
- onReset: () => {
1337
- props.resetField("maxImages");
1338
1389
  }
1339
1390
  }
1340
1391
  ),
1341
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1392
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1342
1393
  ValueField,
1343
1394
  {
1344
1395
  id: "opencode-go-max-request-image-bytes",
@@ -1349,13 +1400,10 @@ function Loaded(props) {
1349
1400
  ...fieldProps,
1350
1401
  onEdit: (text) => {
1351
1402
  props.edit("maxRequestImageBytes", text);
1352
- },
1353
- onReset: () => {
1354
- props.resetField("maxRequestImageBytes");
1355
1403
  }
1356
1404
  }
1357
1405
  ),
1358
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1406
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1359
1407
  ValueField,
1360
1408
  {
1361
1409
  id: "opencode-go-image-pixel-budget",
@@ -1366,13 +1414,10 @@ function Loaded(props) {
1366
1414
  ...fieldProps,
1367
1415
  onEdit: (text) => {
1368
1416
  props.edit("requestImagePixelBudget", text);
1369
- },
1370
- onReset: () => {
1371
- props.resetField("requestImagePixelBudget");
1372
1417
  }
1373
1418
  }
1374
1419
  ),
1375
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1420
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1376
1421
  ValueField,
1377
1422
  {
1378
1423
  id: "opencode-go-image-max-bytes",
@@ -1383,21 +1428,18 @@ function Loaded(props) {
1383
1428
  ...fieldProps,
1384
1429
  onEdit: (text) => {
1385
1430
  props.edit("requestImageMaxBytes", text);
1386
- },
1387
- onReset: () => {
1388
- props.resetField("requestImageMaxBytes");
1389
1431
  }
1390
1432
  }
1391
1433
  )
1392
1434
  ] })
1393
1435
  ] }) : null
1394
1436
  ] }),
1395
- disabled ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("readOnly") }) : null
1437
+ disabled ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: t("readOnly") }) : null
1396
1438
  ] }),
1397
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.actions, children: [
1398
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "primary", size: "md", disabled: disabled || !state.dirty || state.invalid || state.saving || state.pickerSaving, onClick: props.save, children: state.saving ? t("saving") : t("save") }),
1399
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", size: "md", disabled: disabled || !state.dirty || state.saving, onClick: props.discard, children: t("discard") }),
1400
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1439
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.actions, children: [
1440
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "primary", size: "md", disabled: disabled || !state.dirty || state.invalid || state.saving || state.pickerSaving, onClick: props.save, children: state.saving ? t("saving") : t("save") }),
1441
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", size: "md", disabled: disabled || !state.dirty || state.saving, onClick: props.discard, children: t("discard") }),
1442
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1401
1443
  "a",
1402
1444
  {
1403
1445
  className: Section_default.starLink,
@@ -1406,12 +1448,12 @@ function Loaded(props) {
1406
1448
  rel: "noopener noreferrer",
1407
1449
  title: t("starProjectTitle"),
1408
1450
  children: [
1409
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) }),
1410
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: t("starProject") })
1451
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) }),
1452
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: t("starProject") })
1411
1453
  ]
1412
1454
  }
1413
1455
  ),
1414
- state.failed ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, children: t("savedFailed") }) : null
1456
+ state.failed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, children: t("savedFailed") }) : null
1415
1457
  ] })
1416
1458
  ] });
1417
1459
  }
@@ -1605,10 +1647,12 @@ var GoAccountsController = class {
1605
1647
  loadAccounts: () => {
1606
1648
  void this.refresh();
1607
1649
  },
1650
+ resetAddition: () => {
1651
+ this.addition = void 0;
1652
+ },
1608
1653
  addAccount: (name, key) => this.run(async () => {
1609
1654
  if (!name.trim() || name.trim().length > 80 || !key.trim()) return false;
1610
- const resumed = this.scope.getSnapshot().value?.accountOperations?.find((entry) => entry.kind === "add" && entry.account.name === name.trim());
1611
- if (this.addition?.name !== name.trim()) this.addition = { name: name.trim(), id: resumed?.account.id ?? operationId() };
1655
+ if (this.addition?.name !== name.trim()) this.addition = { name: name.trim(), id: operationId() };
1612
1656
  const accepted = await command({ kind: "add", id: this.addition.id, name, key });
1613
1657
  if (accepted) this.addition = void 0;
1614
1658
  return accepted;
@@ -1961,7 +2005,6 @@ var OpencodeGoSectionController = class {
1961
2005
  format: (value) => value?.[RESPONSES_OVERRIDE_MODEL] ?? "auto",
1962
2006
  parse: (text) => text === "auto" || text === "openai-responses" ? { kind: "set", value: { [RESPONSES_OVERRIDE_MODEL]: text === "auto" ? null : text } } : void 0
1963
2007
  },
1964
- textField("apiKeyEnv"),
1965
2008
  textField("baseURL"),
1966
2009
  {
1967
2010
  ...textField("proxyURL"),
@@ -2047,7 +2090,6 @@ var OpencodeGoSectionController = class {
2047
2090
  modelVisibility: this.scope.getSnapshot().value?.modelVisibility ?? {},
2048
2091
  pickerSaving: this.pickerSaving,
2049
2092
  pickerFailed: this.pickerFailed,
2050
- apiKeyEnv: this.form.field("apiKeyEnv"),
2051
2093
  baseURL: this.form.field("baseURL"),
2052
2094
  proxyURL: this.form.field("proxyURL"),
2053
2095
  refreshMinutes: this.form.field("refreshMinutes"),
@@ -2321,12 +2363,12 @@ var en = {
2321
2363
  accountConfirm: "Confirm",
2322
2364
  accountCancel: "Cancel",
2323
2365
  accountAutoSwitch: "Automatic fallback",
2324
- accountAutoSwitchHint: "When a quota runs out or a key is unusable, the other accounts are tried in the Settings page order before any content or tool call is emitted; once an account starts producing output, it becomes the current account.",
2366
+ accountAutoSwitchHint: "When a quota runs out or a key is unusable, the other accounts are tried in order; the account that starts producing output moves to the first position and becomes current.",
2325
2367
  accountPreferredTag: "Current",
2326
2368
  accountSwitchAction: "Switch",
2327
2369
  accountSwitchTitle: "Switch account",
2328
2370
  accountSwitchBack: "Back to usage",
2329
- accountSwitchHint: "Later requests in this profile use this account. The consumption order stays on the Settings page.",
2371
+ accountSwitchHint: "This account moves to the first position and serves later requests in this profile. The other accounts keep their relative order.",
2330
2372
  accountSwitchFailed: "Could not switch account. Please retry.",
2331
2373
  accountFallbackQuota: "The current account reached its quota; switched to",
2332
2374
  accountFallbackCredential: "The current key was unavailable or rejected; switched to",
@@ -2367,8 +2409,8 @@ var en = {
2367
2409
  starProject: "Enjoying the plugin? Star it on GitHub",
2368
2410
  starProjectTitle: "Open the GitHub project in a new tab",
2369
2411
  enabledLabel: "Enable OpenCode Go",
2370
- enabledHint: "While this is on, OpenCode Go appears in every model picker and can serve requests. Turning it off withdraws the provider and its models immediately; this page stays reachable so you can turn it back on.",
2371
- enabledOff: "OpenCode Go is off. Its models are withdrawn from every picker and no request reaches the gateway. Turn the switch back on to use it again.",
2412
+ enabledHint: "While on, it appears in every model picker and can serve requests; turning it off withdraws it immediately and this page stays reachable.",
2413
+ enabledOff: "OpenCode Go is off: its models are withdrawn from every picker and no request reaches the gateway.",
2372
2414
  enabledUnavailable: "This deployment pins the switch on in its composition, so it cannot be changed here.",
2373
2415
  keyLabel: "API key",
2374
2416
  keyHint: "From your OpenCode Go subscription (opencode.ai). Leaving this blank keeps the key already saved, and a saved key applies to the next request without a restart.",
@@ -2437,37 +2479,39 @@ var en = {
2437
2479
  limitsEmpty: "Read the model list first; capacities are edited per model the gateway serves.",
2438
2480
  limitsContextLabel: "Context window for {name}",
2439
2481
  limitsOutputLabel: "Max output for {name}",
2440
- advancedSummary: "Usage display \xB7 Protocol \xB7 Credential name \xB7 Gateway URL \xB7 Refresh \xB7 Idle timeout \xB7 Image limits",
2482
+ advancedResetAll: "Reset all to defaults",
2441
2483
  advancedLabel: "Advanced settings",
2442
- advancedHint: "Usage display, credential name, gateway URL, and adapter tuning. The inherited values work as they are; change them only if you know you need to.",
2484
+ groupUsageProtocol: "Usage and protocol",
2485
+ groupConnection: "Connection",
2486
+ groupCacheTimeouts: "Cache and timeouts",
2487
+ groupImages: "Image handling",
2488
+ advancedHint: "The inherited values work as they are; below are only the settings you may need to change.",
2443
2489
  usageDisplayLabel: "Usage display",
2444
- usageDisplayHint: "Auto shows usage only when a DSH OpenCode Go model is selected. Always keeps it visible with any model, including the built-in OpenCode Go provider. Off hides it and stops polling. While visible, usage refreshes every minute and the panel opens on click. Disabling OpenCode Go hides it in every mode. Save to apply.",
2490
+ usageDisplayHint: "Auto shows it only for DSH OpenCode Go models; Always keeps it visible with any model; Off hides it and stops polling. While visible it refreshes every minute.",
2445
2491
  usageDisplay_auto: "Auto (default)",
2446
2492
  usageDisplay_always: "Always",
2447
2493
  usageDisplay_off: "Off",
2448
2494
  protocolOverridesLabel: "DeepSeek V4.1 Flash protocol",
2449
- protocolOverridesHint: "Auto follows the model catalog. Responses is experimental and applies only to DeepSeek V4.1 Flash; speed depends on the gateway. Save to apply to new requests. Choose Auto to restore catalog routing.",
2495
+ protocolOverridesHint: "Auto follows the model catalog; Responses is experimental and applies only to DeepSeek V4.1 Flash. Save to apply to new requests.",
2450
2496
  protocolOverridesAuto: "Auto (default)",
2451
2497
  protocolOverridesResponses: "Responses (experimental)",
2452
- apiKeyEnvLabel: "Credential reference",
2453
- apiKeyEnvHint: "The name the key is resolved from, addressed through the credentials service.",
2454
2498
  baseURLLabel: "Gateway URL",
2455
- baseURLHint: "The endpoint that serves requests and the live model list.",
2499
+ baseURLHint: "The endpoint that serves model requests and the live model listing.",
2456
2500
  proxyURLLabel: "Proxy address",
2457
- proxyURLHint: "HTTP(S) or SOCKS5 proxy for conversations, model updates and usage. For example, socks5://127.0.0.1:1080. Leave blank to use the default network settings. The address is relative to the machine running DSH.",
2501
+ proxyURLHint: "The HTTP(S) or SOCKS5 proxy for conversations, catalog refreshes and usage queries; leave empty for the default network.",
2458
2502
  proxyURLInvalid: "Enter an http://, https:// or socks5:// proxy address without a path, query or fragment.",
2459
2503
  refreshMinutesLabel: "Catalog refresh (minutes)",
2460
- refreshMinutesHint: "Catalog cache lifetime for conversations and model pickers. Opening this settings page or clicking Refresh checks the gateway and online model metadata immediately.",
2504
+ refreshMinutesHint: "How long the model catalog is cached; opening this page or refreshing re-checks it immediately.",
2461
2505
  streamIdleTimeoutMsLabel: "Stream idle timeout (ms)",
2462
- streamIdleTimeoutMsHint: "Largest quiet gap between stream events before the request fails.",
2506
+ streamIdleTimeoutMsHint: "The longest silence between stream events; a longer gap fails the request.",
2463
2507
  maxImagesLabel: "Request image count cap (maxImages)",
2464
- maxImagesHint: "Optional positive integer; no count cap by default. Excess oldest images become text placeholders so the conversation can continue. Original attachments are kept. On DSH 0.1.6+, raising or clearing the cap does not restore images already offloaded. Clearing inherits the base configuration.",
2508
+ maxImagesHint: "Leave empty to inherit the base configuration (uncapped only when the base sets none); above the cap the oldest images become text placeholders.",
2465
2509
  maxRequestImageBytesLabel: "Request image payload cap (bytes)",
2466
- maxRequestImageBytesHint: "Accumulated base64 image payload bound for one request.",
2510
+ maxRequestImageBytesHint: "The cap on the accumulated base64 image payload in one request.",
2467
2511
  requestImagePixelBudgetLabel: "Image pixel budget",
2468
- requestImagePixelBudgetHint: "Total-pixel budget for one converted request image.",
2512
+ requestImagePixelBudgetHint: "The total pixel budget of one image after conversion.",
2469
2513
  requestImageMaxBytesLabel: "Image byte target (bytes)",
2470
- requestImageMaxBytesHint: "Raw encoded-byte target for one request image before base64 expansion.",
2514
+ requestImageMaxBytesHint: "The original byte target of one image before base64 expansion.",
2471
2515
  overridden: "Customized",
2472
2516
  reset: "Reset to default",
2473
2517
  invalidValue: "Not a valid value",
@@ -2499,12 +2543,12 @@ var zh = {
2499
2543
  accountConfirm: "\u786E\u8BA4",
2500
2544
  accountCancel: "\u53D6\u6D88",
2501
2545
  accountAutoSwitch: "\u81EA\u52A8\u4F7F\u7528\u5907\u7528\u8D26\u53F7",
2502
- accountAutoSwitchHint: "\u989D\u5EA6\u8017\u5C3D\u6216 Key \u4E0D\u53EF\u7528\u65F6\uFF0C\u5728\u5C1A\u672A\u8F93\u51FA\u5185\u5BB9\u6216\u5DE5\u5177\u8C03\u7528\u524D\uFF0C\u6309\u8BBE\u7F6E\u9875\u7684\u8D26\u53F7\u987A\u5E8F\u5C1D\u8BD5\u5176\u4ED6\u8D26\u53F7\uFF1B\u4E00\u65E6\u67D0\u4E2A\u8D26\u53F7\u5F00\u59CB\u6B63\u5E38\u8F93\u51FA\uFF0C\u5F53\u524D\u8D26\u53F7\u5373\u5207\u6362\u4E3A\u5B83\u3002",
2546
+ accountAutoSwitchHint: "\u989D\u5EA6\u8017\u5C3D\u6216 Key \u4E0D\u53EF\u7528\u65F6\uFF0C\u6309\u987A\u5E8F\u5C1D\u8BD5\u5176\u4ED6\u8D26\u53F7\uFF1B\u5F00\u59CB\u6B63\u5E38\u8F93\u51FA\u7684\u8D26\u53F7\u4F1A\u79FB\u81F3\u9996\u4F4D\u5E76\u6210\u4E3A\u5F53\u524D\u8D26\u53F7\u3002",
2503
2547
  accountPreferredTag: "\u5F53\u524D\u8D26\u53F7",
2504
2548
  accountSwitchAction: "\u5207\u6362",
2505
2549
  accountSwitchTitle: "\u5207\u6362\u8D26\u53F7",
2506
2550
  accountSwitchBack: "\u8FD4\u56DE\u989D\u5EA6",
2507
- accountSwitchHint: "\u5207\u6362\u540E\uFF0C\u672C profile \u7684\u540E\u7EED\u8BF7\u6C42\u4F7F\u7528\u8BE5\u8D26\u53F7\uFF1B\u989D\u5EA6\u6D88\u8017\u987A\u5E8F\u5728\u8BBE\u7F6E\u9875\u8C03\u6574\u3002",
2551
+ accountSwitchHint: "\u5207\u6362\u540E\uFF0C\u8BE5\u8D26\u53F7\u79FB\u81F3\u9996\u4F4D\uFF0C\u4F9B\u672C profile \u7684\u540E\u7EED\u8BF7\u6C42\u4F7F\u7528\uFF1B\u5176\u4ED6\u8D26\u53F7\u7684\u76F8\u5BF9\u987A\u5E8F\u4FDD\u6301\u4E0D\u53D8\u3002",
2508
2552
  accountSwitchFailed: "\u8D26\u53F7\u5207\u6362\u672A\u751F\u6548\uFF0C\u8BF7\u91CD\u8BD5\u3002",
2509
2553
  accountFallbackQuota: "\u5F53\u524D\u8D26\u53F7\u989D\u5EA6\u8017\u5C3D\uFF0C\u5DF2\u81EA\u52A8\u5207\u6362\u4E3A\uFF1A",
2510
2554
  accountFallbackCredential: "\u5F53\u524D Key \u4E0D\u53EF\u7528\u6216\u88AB\u62D2\u7EDD\uFF0C\u5DF2\u81EA\u52A8\u5207\u6362\u4E3A\uFF1A",
@@ -2545,8 +2589,8 @@ var zh = {
2545
2589
  starProject: "\u559C\u6B22\u8FD9\u4E2A\u63D2\u4EF6\uFF1F\u53BB GitHub \u70B9\u4E2A Star",
2546
2590
  starProjectTitle: "\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00 GitHub \u9879\u76EE",
2547
2591
  enabledLabel: "\u542F\u7528 OpenCode Go",
2548
- enabledHint: "\u5F00\u542F\u65F6\uFF0COpenCode Go \u4F1A\u51FA\u73B0\u5728\u6240\u6709\u6A21\u578B\u9009\u62E9\u5668\u4E2D\u5E76\u53EF\u5904\u7406\u8BF7\u6C42\u3002\u5173\u95ED\u540E\u5C06\u7ACB\u5373\u64A4\u4E0B\u8BE5\u63D0\u4F9B\u65B9\u53CA\u5176\u6A21\u578B\uFF1B\u672C\u9875\u4ECD\u53EF\u8BBF\u95EE\uFF0C\u65B9\u4FBF\u4F60\u968F\u65F6\u91CD\u65B0\u5F00\u542F\u3002",
2549
- enabledOff: "OpenCode Go \u5DF2\u5173\u95ED\u3002\u5176\u6A21\u578B\u5DF2\u4ECE\u6240\u6709\u9009\u62E9\u5668\u4E2D\u64A4\u4E0B\uFF0C\u4E5F\u4E0D\u4F1A\u6709\u8BF7\u6C42\u53D1\u5F80\u7F51\u5173\u3002\u9700\u8981\u65F6\u628A\u5F00\u5173\u91CD\u65B0\u6253\u5F00\u5373\u53EF\u3002",
2592
+ enabledHint: "\u5F00\u542F\u540E\u51FA\u73B0\u5728\u6240\u6709\u6A21\u578B\u9009\u62E9\u5668\u4E2D\u5E76\u53EF\u5904\u7406\u8BF7\u6C42\uFF1B\u5173\u95ED\u7ACB\u5373\u64A4\u4E0B\uFF0C\u672C\u9875\u4ECD\u53EF\u8BBF\u95EE\u3002",
2593
+ enabledOff: "OpenCode Go \u5DF2\u5173\u95ED\uFF1A\u6A21\u578B\u5DF2\u4ECE\u6240\u6709\u9009\u62E9\u5668\u64A4\u4E0B\uFF0C\u4E5F\u6CA1\u6709\u8BF7\u6C42\u53D1\u5F80\u7F51\u5173\u3002",
2550
2594
  enabledUnavailable: "\u6B64\u90E8\u7F72\u5728\u7EC4\u5408\u5C42\u56FA\u5B9A\u5F00\u542F\u4E86\u8BE5\u5F00\u5173\uFF0C\u65E0\u6CD5\u5728\u6B64\u4FEE\u6539\u3002",
2551
2595
  keyLabel: "API key",
2552
2596
  keyHint: "\u6765\u81EA\u4F60\u7684 OpenCode Go \u8BA2\u9605\uFF08opencode.ai\uFF09\u3002\u7559\u7A7A\u8868\u793A\u4FDD\u6301\u5DF2\u4FDD\u5B58\u7684 key\uFF1B\u4FDD\u5B58\u540E\u4E0B\u4E00\u6B21\u8BF7\u6C42\u5373\u751F\u6548\uFF0C\u65E0\u9700\u91CD\u542F\u3002",
@@ -2615,37 +2659,39 @@ var zh = {
2615
2659
  limitsEmpty: "\u8BF7\u5148\u8BFB\u53D6\u6A21\u578B\u5217\u8868\uFF1B\u5BB9\u91CF\u6309\u7F51\u5173\u63D0\u4F9B\u7684\u6A21\u578B\u9010\u4E2A\u7F16\u8F91\u3002",
2616
2660
  limitsContextLabel: "{name} \u7684\u4E0A\u4E0B\u6587\u7A97\u53E3",
2617
2661
  limitsOutputLabel: "{name} \u7684\u6700\u5927\u8F93\u51FA",
2618
- advancedSummary: "\u989D\u5EA6\u663E\u793A \xB7 \u534F\u8BAE \xB7 \u51ED\u8BC1\u5F15\u7528\u540D \xB7 \u7F51\u5173\u5730\u5740 \xB7 \u76EE\u5F55\u5237\u65B0 \xB7 \u6D41\u7A7A\u95F2\u8D85\u65F6 \xB7 \u56FE\u7247 4 \u9879",
2662
+ advancedResetAll: "\u5168\u90E8\u6062\u590D\u9ED8\u8BA4",
2619
2663
  advancedLabel: "\u9AD8\u7EA7\u8BBE\u7F6E",
2620
- advancedHint: "\u989D\u5EA6\u663E\u793A\u3001\u51ED\u8BC1\u540D\u79F0\u3001\u7F51\u5173\u5730\u5740\u4E0E\u9002\u914D\u5668\u8C03\u4F18\u53C2\u6570\u3002\u7EE7\u627F\u6765\u7684\u53D6\u503C\u5373\u53EF\u6B63\u5E38\u4F7F\u7528\uFF0C\u6309\u9700\u4FEE\u6539\u3002",
2664
+ groupUsageProtocol: "\u7528\u91CF\u4E0E\u534F\u8BAE",
2665
+ groupConnection: "\u8FDE\u63A5",
2666
+ groupCacheTimeouts: "\u7F13\u5B58\u4E0E\u8D85\u65F6",
2667
+ groupImages: "\u56FE\u7247\u5904\u7406",
2668
+ advancedHint: "\u7EE7\u627F\u6765\u7684\u53D6\u503C\u5373\u53EF\u6B63\u5E38\u4F7F\u7528\uFF1B\u4E0B\u9762\u53EA\u5217\u9700\u8981\u6539\u7684\u9879\u3002",
2621
2669
  usageDisplayLabel: "\u989D\u5EA6\u663E\u793A",
2622
- usageDisplayHint: "\u81EA\u52A8\uFF1A\u4EC5\u9009\u4E2D DSH OpenCode Go \u6A21\u578B\u65F6\u663E\u793A\u3002\u5E38\u9A7B\uFF1A\u4F7F\u7528\u4EFB\u610F\u6A21\u578B\u65F6\u5747\u663E\u793A\uFF0C\u5305\u62EC\u5BBF\u4E3B\u81EA\u5E26\u7684 OpenCode Go\u3002\u5173\u95ED\uFF1A\u9690\u85CF\u5E76\u505C\u6B62\u8F6E\u8BE2\u3002\u663E\u793A\u65F6\u6BCF\u5206\u949F\u5237\u65B0\uFF0C\u70B9\u51FB\u80F6\u56CA\u624D\u5C55\u5F00\u9762\u677F\uFF1B\u505C\u7528 OpenCode Go \u540E\u6240\u6709\u6A21\u5F0F\u5747\u9690\u85CF\u3002\u4FDD\u5B58\u540E\u751F\u6548\u3002",
2670
+ usageDisplayHint: "\u81EA\u52A8\uFF1A\u4EC5\u9009\u4E2D DSH OpenCode Go \u6A21\u578B\u65F6\u663E\u793A\uFF1B\u5E38\u9A7B\uFF1A\u4EFB\u610F\u6A21\u578B\u90FD\u663E\u793A\uFF1B\u5173\u95ED\uFF1A\u9690\u85CF\u5E76\u505C\u6B62\u5237\u65B0\u3002\u663E\u793A\u65F6\u6BCF\u5206\u949F\u5237\u65B0\u3002",
2623
2671
  usageDisplay_auto: "\u81EA\u52A8\uFF08\u9ED8\u8BA4\uFF09",
2624
2672
  usageDisplay_always: "\u5E38\u9A7B",
2625
2673
  usageDisplay_off: "\u5173\u95ED",
2626
2674
  protocolOverridesLabel: "DeepSeek V4.1 Flash \u534F\u8BAE",
2627
- protocolOverridesHint: "\u81EA\u52A8\u8DDF\u968F\u6A21\u578B\u76EE\u5F55\u3002Responses \u4E3A\u5B9E\u9A8C\u6027\u9009\u9879\uFF0C\u4EC5\u5F71\u54CD DeepSeek V4.1 Flash\uFF0C\u901F\u5EA6\u53D6\u51B3\u4E8E\u7F51\u5173\u3002\u4FDD\u5B58\u540E\u5BF9\u65B0\u8BF7\u6C42\u751F\u6548\uFF1B\u9009\u62E9\u81EA\u52A8\u53EF\u6062\u590D\u76EE\u5F55\u8DEF\u7531\u3002",
2675
+ protocolOverridesHint: "\u81EA\u52A8\u8DDF\u968F\u6A21\u578B\u76EE\u5F55\uFF1BResponses \u4E3A\u5B9E\u9A8C\u6027\uFF0C\u4EC5\u5F71\u54CD DeepSeek V4.1 Flash\uFF0C\u4FDD\u5B58\u540E\u5BF9\u65B0\u8BF7\u6C42\u751F\u6548\u3002",
2628
2676
  protocolOverridesAuto: "\u81EA\u52A8\uFF08\u9ED8\u8BA4\uFF09",
2629
2677
  protocolOverridesResponses: "Responses\uFF08\u5B9E\u9A8C\u6027\uFF09",
2630
- apiKeyEnvLabel: "\u51ED\u8BC1\u5F15\u7528\u540D",
2631
- apiKeyEnvHint: "key \u89E3\u6790\u6240\u4F9D\u636E\u7684\u5F15\u7528\u540D\uFF0C\u7ECF\u51ED\u8BC1\u670D\u52A1\u5BFB\u5740\u3002",
2632
2678
  baseURLLabel: "\u7F51\u5173\u5730\u5740",
2633
- baseURLHint: "\u540C\u65F6\u63D0\u4F9B\u6A21\u578B\u8BF7\u6C42\u4E0E\u5B9E\u65F6\u6A21\u578B\u5217\u8868\u7684\u7AEF\u70B9\u3002",
2679
+ baseURLHint: "\u6A21\u578B\u8BF7\u6C42\u4E0E\u5B9E\u65F6\u6A21\u578B\u5217\u8868\u5171\u7528\u7684\u7AEF\u70B9\u3002",
2634
2680
  proxyURLLabel: "\u4EE3\u7406\u5730\u5740",
2635
- proxyURLHint: "\u5BF9\u8BDD\u3001\u6A21\u578B\u66F4\u65B0\u548C\u7528\u91CF\u67E5\u8BE2\u4F7F\u7528\u7684 HTTP(S) \u6216 SOCKS5 \u4EE3\u7406\uFF0C\u4F8B\u5982 socks5://127.0.0.1:1080\u3002\u7559\u7A7A\u4F7F\u7528\u9ED8\u8BA4\u7F51\u7EDC\u8BBE\u7F6E\u3002\u5730\u5740\u4EE5\u8FD0\u884C DSH \u7684\u673A\u5668\u4E3A\u51C6\u3002",
2681
+ proxyURLHint: "\u5BF9\u8BDD\u3001\u76EE\u5F55\u5237\u65B0\u4E0E\u7528\u91CF\u67E5\u8BE2\u4F7F\u7528\u7684 HTTP(S)/SOCKS5 \u4EE3\u7406\uFF1B\u7559\u7A7A\u4F7F\u7528\u9ED8\u8BA4\u7F51\u7EDC\u3002",
2636
2682
  proxyURLInvalid: "\u8BF7\u8F93\u5165 http://\u3001https:// \u6216 socks5:// \u4EE3\u7406\u5730\u5740\uFF0C\u4E0D\u5305\u542B\u8DEF\u5F84\u3001\u67E5\u8BE2\u53C2\u6570\u6216\u7247\u6BB5\u3002",
2637
2683
  refreshMinutesLabel: "\u76EE\u5F55\u5237\u65B0\uFF08\u5206\u949F\uFF09",
2638
- refreshMinutesHint: "\u4F1A\u8BDD\u8BF7\u6C42\u548C\u6A21\u578B\u9009\u62E9\u5668\u7684\u76EE\u5F55\u7F13\u5B58\u65F6\u957F\u3002\u6253\u5F00\u672C\u8BBE\u7F6E\u9875\u6216\u70B9\u51FB\u5237\u65B0\u65F6\uFF0C\u4F1A\u7ACB\u5373\u6838\u5BF9\u7F51\u5173\u4E0E\u5728\u7EBF\u6A21\u578B\u914D\u7F6E\u3002",
2684
+ refreshMinutesHint: "\u6A21\u578B\u76EE\u5F55\u7684\u7F13\u5B58\u65F6\u957F\uFF1B\u6253\u5F00\u672C\u9875\u6216\u70B9\u51FB\u5237\u65B0\u4F1A\u7ACB\u5373\u91CD\u65B0\u6838\u5BF9\u3002",
2639
2685
  streamIdleTimeoutMsLabel: "\u6D41\u7A7A\u95F2\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",
2640
- streamIdleTimeoutMsHint: "\u6D41\u4E8B\u4EF6\u95F4\u5141\u8BB8\u7684\u6700\u5927\u9759\u9ED8\u95F4\u9694\uFF0C\u8D85\u51FA\u540E\u8BF7\u6C42\u5931\u8D25\u3002",
2686
+ streamIdleTimeoutMsHint: "\u6D41\u4E8B\u4EF6\u4E4B\u95F4\u7684\u6700\u5927\u9759\u9ED8\u95F4\u9694\uFF0C\u8D85\u51FA\u5219\u8BF7\u6C42\u5931\u8D25\u3002",
2641
2687
  maxImagesLabel: "\u8BF7\u6C42\u56FE\u7247\u6570\u91CF\u4E0A\u9650\uFF08maxImages\uFF09",
2642
- maxImagesHint: "\u53EF\u9009\u6B63\u6574\u6570\uFF0C\u9ED8\u8BA4\u4E0D\u9650\u5236\u5F20\u6570\u3002\u8D85\u9650\u65F6\u5C06\u6700\u65E7\u56FE\u7247\u66FF\u6362\u4E3A\u6587\u5B57\u5360\u4F4D\u5E76\u7EE7\u7EED\u4F1A\u8BDD\uFF0C\u539F\u59CB\u9644\u4EF6\u4FDD\u7559\u3002DSH 0.1.6 \u53CA\u4EE5\u4E0A\u7248\u672C\u5DF2\u5378\u8F7D\u7684\u56FE\u7247\u4E0D\u4F1A\u56E0\u8C03\u9AD8\u6216\u6E05\u7A7A\u4E0A\u9650\u81EA\u52A8\u6062\u590D\u3002\u6E05\u7A7A\u540E\u7EE7\u627F\u57FA\u7840\u914D\u7F6E\u3002",
2688
+ maxImagesHint: "\u7559\u7A7A\u7EE7\u627F\u57FA\u7840\u914D\u7F6E\uFF08\u57FA\u7840\u672A\u8BBE\u4E0A\u9650\u65F6\u624D\u4E0D\u9650\u5236\u5F20\u6570\uFF09\uFF1B\u8D85\u9650\u65F6\u6700\u65E7\u7684\u56FE\u7247\u4F1A\u88AB\u66FF\u6362\u4E3A\u6587\u5B57\u5360\u4F4D\u3002",
2643
2689
  maxRequestImageBytesLabel: "\u8BF7\u6C42\u56FE\u7247\u8F7D\u8377\u4E0A\u9650\uFF08\u5B57\u8282\uFF09",
2644
2690
  maxRequestImageBytesHint: "\u5355\u4E2A\u8BF7\u6C42\u7D2F\u8BA1 base64 \u56FE\u7247\u8F7D\u8377\u7684\u4E0A\u9650\u3002",
2645
2691
  requestImagePixelBudgetLabel: "\u56FE\u7247\u50CF\u7D20\u9884\u7B97",
2646
- requestImagePixelBudgetHint: "\u5355\u5F20\u8F6C\u6362\u540E\u8BF7\u6C42\u56FE\u7247\u7684\u603B\u50CF\u7D20\u9884\u7B97\u3002",
2692
+ requestImagePixelBudgetHint: "\u5355\u5F20\u56FE\u7247\u8F6C\u6362\u540E\u7684\u603B\u50CF\u7D20\u9884\u7B97\u3002",
2647
2693
  requestImageMaxBytesLabel: "\u56FE\u7247\u5B57\u8282\u76EE\u6807\uFF08\u5B57\u8282\uFF09",
2648
- requestImageMaxBytesHint: "\u5355\u5F20\u8BF7\u6C42\u56FE\u7247 base64 \u6269\u5C55\u524D\u7684\u539F\u59CB\u7F16\u7801\u5B57\u8282\u76EE\u6807\u3002",
2694
+ requestImageMaxBytesHint: "\u5355\u5F20\u56FE\u7247 base64 \u6269\u5C55\u524D\u7684\u539F\u59CB\u7F16\u7801\u5B57\u8282\u76EE\u6807\u3002",
2649
2695
  overridden: "\u5DF2\u81EA\u5B9A\u4E49",
2650
2696
  reset: "\u6062\u590D\u9ED8\u8BA4",
2651
2697
  invalidValue: "\u4E0D\u662F\u6709\u6548\u503C",
@@ -2788,13 +2834,13 @@ if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id2) + "]"
2788
2834
  const style = document.createElement("style");
2789
2835
  style.dataset.plugin = "dsh-opencode-go";
2790
2836
  style.dataset.pluginCss = id2;
2791
- style.textContent = '.mAjYhq_root{min-width:0;display:inline-flex;position:relative}.mAjYhq_trigger{color:inherit;opacity:.75;font:inherit;cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:6px;padding:4px 6px;font-size:12px}.mAjYhq_trigger:hover,.mAjYhq_trigger:focus-visible{opacity:1;background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_account{text-overflow:ellipsis;vertical-align:bottom;max-width:12ch;display:inline-block;overflow:hidden}@container (width<=460px){.mAjYhq_brand,.mAjYhq_stale,.mAjYhq_account,.mAjYhq_fallback{display:none}.mAjYhq_reading[data-stale]:after{content:"*"}.mAjYhq_trigger[data-fallback]:after{content:" \u21B3"}}@container (width<=360px){.mAjYhq_unit{display:none}}.mAjYhq_panel{z-index:100;box-sizing:border-box;border-radius:var(--dsw-radius-lg,16px);width:320px;max-width:calc(100vw - 32px);max-height:70vh;color:var(--dsw-alias-label-primary,CanvasText);isolation:isolate;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1,color-mix(in srgb, currentColor 10%, transparent));box-shadow:var(--dsw-elevation-prominent,0 8px 30px #0003);border:0;flex-direction:column;font-size:12px;display:flex;position:absolute;bottom:calc(100% + 12px);right:0}.mAjYhq_material{z-index:-1;border-radius:inherit;pointer-events:none;background:var(--dsw-menu-surface-fill,var(--dsw-specific-menu,#43454a73));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));position:absolute;inset:0}@supports not (backdrop-filter:blur(1px)){.mAjYhq_material{background:var(--dsw-alias-bg-layer-2,Canvas)}}.mAjYhq_body{overscroll-behavior:contain;box-sizing:border-box;flex-direction:column;flex:1;gap:6px;min-height:0;padding:10px;display:flex;overflow-y:auto}.mAjYhq_panelTitle,.mAjYhq_panelHead{color:var(--dsw-alias-label-tertiary,currentColor);flex:none;padding:2px 6px 0;font-size:11.5px;line-height:1.6}.mAjYhq_panelHead{align-items:center;gap:6px;display:flex}.mAjYhq_panelHead strong{color:var(--dsw-alias-label-primary,CanvasText);font-size:12px;font-weight:600}.mAjYhq_back{width:18px;height:18px;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:5px;place-items:center;padding:0;display:grid}.mAjYhq_back:hover{background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_icon{flex:none;width:14px;height:14px}.mAjYhq_tick{color:#39a878;flex:none;width:14px;height:14px}.mAjYhq_tile{background:color-mix(in srgb, currentColor 6%, transparent);border-radius:10px;flex:none;overflow:hidden}.mAjYhq_divider{background:color-mix(in srgb, currentColor 10%, transparent);height:.5px;margin:0 12px}.mAjYhq_accHead{align-items:center;gap:8px;min-height:42px;padding:0 12px;display:flex}.mAjYhq_dot{background:#39a878;border-radius:50%;flex:none;width:7px;height:7px}.mAjYhq_accName{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:13.5px;font-weight:600;overflow:hidden}.mAjYhq_tag{color:#39a878;background:#39a8781f;border:.5px solid #39a87873;border-radius:999px;flex:none;padding:0 7px;font-size:10.5px;line-height:1.7}.mAjYhq_switch{font:inherit;color:var(--dsw-alias-label-tertiary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;align-items:center;gap:3px;padding:3px 6px;font-size:11.5px;display:inline-flex}.mAjYhq_switch:hover:not(:disabled){background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_switch:disabled{opacity:.55;cursor:default}.mAjYhq_option{width:100%;min-height:38px;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:0 12px;display:flex}.mAjYhq_option:hover:not(:disabled){background:color-mix(in srgb, currentColor 6%, transparent)}.mAjYhq_option:disabled{opacity:.6;cursor:default}.mAjYhq_optionName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,currentColor);flex:1;font-size:13px;overflow:hidden}.mAjYhq_option[data-selected] .mAjYhq_optionName{color:var(--dsw-alias-label-primary,CanvasText);font-weight:600}.mAjYhq_hint{opacity:.65;font-size:11px;line-height:1.6}.mAjYhq_warning{background:color-mix(in srgb, currentColor 6%, transparent);overflow-wrap:anywhere;border-radius:6px;margin:10px 0;padding:10px;line-height:1.5}.mAjYhq_warning p{margin:5px 0 0}.mAjYhq_retry{border:1px solid color-mix(in srgb, currentColor 25%, transparent);color:inherit;font:inherit;cursor:pointer;background:0 0;border-radius:6px;padding:5px 9px}.mAjYhq_retry:disabled{opacity:.6;cursor:default}.mAjYhq_back:focus-visible,.mAjYhq_switch:focus-visible,.mAjYhq_option:focus-visible,.mAjYhq_retry:focus-visible{outline-offset:2px;outline:2px solid}.mAjYhq_window{padding:10px 12px}.mAjYhq_windowRow{align-items:center;gap:10px;display:flex}.mAjYhq_windowLabel{width:48px;color:var(--dsw-alias-label-secondary,currentColor);flex:none;font-size:12.5px}.mAjYhq_windowPercent{text-align:right;font-variant-numeric:tabular-nums;flex:none;width:38px;font-size:13px;font-weight:650}.mAjYhq_window progress{appearance:none;background:color-mix(in srgb, currentColor 15%, transparent);border:0;border-radius:99px;flex:1;min-width:60px;height:10px;display:block}.mAjYhq_window progress::-webkit-progress-bar{background:0 0;border-radius:99px}.mAjYhq_window progress::-webkit-progress-value{background:#39a878;border-radius:99px}.mAjYhq_window progress::-moz-progress-bar{background:#39a878;border-radius:99px}.mAjYhq_windowReset{color:var(--dsw-alias-label-tertiary,currentColor);margin-top:6px;font-size:11px;line-height:1.6}.mAjYhq_foot{color:var(--dsw-alias-label-tertiary,currentColor);justify-content:space-between;align-items:center;gap:8px;padding:3px 6px 1px;font-size:11px;display:flex}.mAjYhq_window progress.mAjYhq_high::-webkit-progress-value{background:#e0a100}.mAjYhq_window progress.mAjYhq_high::-moz-progress-bar{background:#e0a100}.mAjYhq_window progress.mAjYhq_limited::-webkit-progress-value{background:#e5484d}.mAjYhq_window progress.mAjYhq_limited::-moz-progress-bar{background:#e5484d}.mAjYhq_limitedText{color:#e5484d;margin-top:2px;font-weight:600}';
2837
+ style.textContent = '.mAjYhq_root{min-width:0;display:inline-flex;position:relative}.mAjYhq_trigger{color:inherit;opacity:.75;font:inherit;cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:6px;padding:4px 6px;font-size:12px}.mAjYhq_trigger:hover,.mAjYhq_trigger:focus-visible{opacity:1;background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_account{text-overflow:ellipsis;vertical-align:bottom;max-width:12ch;display:inline-block;overflow:hidden}@container (width<=460px){.mAjYhq_brand,.mAjYhq_stale,.mAjYhq_account,.mAjYhq_fallback{display:none}.mAjYhq_reading[data-stale]:after{content:"*"}.mAjYhq_trigger[data-fallback]:after{content:" \u21B3"}}@container (width<=360px){.mAjYhq_unit{display:none}}.mAjYhq_panel{z-index:100;box-sizing:border-box;border-radius:var(--dsw-radius-lg,16px);width:320px;max-width:calc(100vw - 32px);max-height:70vh;color:var(--dsw-alias-label-primary,CanvasText);isolation:isolate;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1,color-mix(in srgb, currentColor 10%, transparent));box-shadow:var(--dsw-elevation-prominent,0 8px 30px #0003);border:0;flex-direction:column;font-size:12px;display:flex;position:absolute;bottom:calc(100% + 12px);right:0}.mAjYhq_material{z-index:-1;border-radius:inherit;pointer-events:none;background:var(--dsw-menu-surface-fill,var(--dsw-specific-menu,#43454a73));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));position:absolute;inset:0}@supports not (backdrop-filter:blur(1px)){.mAjYhq_material{background:var(--dsw-alias-bg-layer-2,Canvas)}}.mAjYhq_body{overscroll-behavior:contain;box-sizing:border-box;flex-direction:column;flex:1;gap:6px;min-height:0;padding:10px;display:flex;overflow-y:auto}.mAjYhq_panelTitle,.mAjYhq_panelHead{color:var(--dsw-alias-label-tertiary,currentColor);flex:none;padding:2px 6px 0;font-size:11.5px;line-height:1.6}.mAjYhq_panelHead{align-items:center;gap:6px;display:flex}.mAjYhq_panelHead strong{color:var(--dsw-alias-label-primary,CanvasText);font-size:12px;font-weight:600}.mAjYhq_back{width:18px;height:18px;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:5px;place-items:center;padding:0;display:grid}.mAjYhq_back:hover{background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_icon{flex:none;width:14px;height:14px}.mAjYhq_tick{color:#39a878;flex:none;width:14px;height:14px}.mAjYhq_tile{background:color-mix(in srgb, currentColor 6%, transparent);border-radius:10px;flex:none;overflow:hidden}.mAjYhq_divider{background:color-mix(in srgb, currentColor 10%, transparent);height:.5px;margin:0 12px}.mAjYhq_accHead{align-items:center;gap:8px;min-height:42px;padding:0 12px;display:flex}.mAjYhq_dot{background:#39a878;border-radius:50%;flex:none;width:7px;height:7px}.mAjYhq_accName{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:13.5px;font-weight:600;overflow:hidden}.mAjYhq_tag{color:#39a878;background:#39a8781f;border:.5px solid #39a87873;border-radius:999px;flex:none;padding:0 7px;font-size:10.5px;line-height:1.7}.mAjYhq_switch{font:inherit;color:var(--dsw-alias-label-tertiary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;align-items:center;gap:3px;padding:3px 6px;font-size:11.5px;display:inline-flex}.mAjYhq_switch:hover:not(:disabled){background:color-mix(in srgb, currentColor 8%, transparent)}.mAjYhq_switch:disabled{opacity:.55;cursor:default}.mAjYhq_switch svg{display:block;transform:translateY(.5px)}.mAjYhq_option{width:100%;min-height:38px;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:0 12px;display:flex}.mAjYhq_option:hover:not(:disabled){background:color-mix(in srgb, currentColor 6%, transparent)}.mAjYhq_option:disabled{opacity:.6;cursor:default}.mAjYhq_optionName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,currentColor);flex:1;font-size:13px;overflow:hidden}.mAjYhq_option[data-selected] .mAjYhq_optionName{color:var(--dsw-alias-label-primary,CanvasText);font-weight:600}.mAjYhq_hint{opacity:.65;font-size:11px;line-height:1.6}.mAjYhq_warning{background:color-mix(in srgb, currentColor 6%, transparent);overflow-wrap:anywhere;border-radius:6px;margin:10px 0;padding:10px;line-height:1.5}.mAjYhq_warning p{margin:5px 0 0}.mAjYhq_retry{border:1px solid color-mix(in srgb, currentColor 25%, transparent);color:inherit;font:inherit;cursor:pointer;background:0 0;border-radius:6px;padding:5px 9px}.mAjYhq_retry:disabled{opacity:.6;cursor:default}.mAjYhq_back:focus-visible,.mAjYhq_switch:focus-visible,.mAjYhq_option:focus-visible,.mAjYhq_retry:focus-visible{outline-offset:2px;outline:2px solid}.mAjYhq_window{padding:10px 12px}.mAjYhq_windowRow{align-items:center;gap:10px;display:flex}.mAjYhq_windowLabel{width:48px;color:var(--dsw-alias-label-secondary,currentColor);flex:none;font-size:12.5px}.mAjYhq_windowPercent{text-align:right;font-variant-numeric:tabular-nums;flex:none;width:38px;font-size:13px;font-weight:650}.mAjYhq_window progress{appearance:none;background:color-mix(in srgb, currentColor 15%, transparent);border:0;border-radius:99px;flex:1;min-width:60px;height:10px;display:block}.mAjYhq_window progress::-webkit-progress-bar{background:0 0;border-radius:99px}.mAjYhq_window progress::-webkit-progress-value{background:#39a878;border-radius:99px}.mAjYhq_window progress::-moz-progress-bar{background:#39a878;border-radius:99px}.mAjYhq_windowReset{color:var(--dsw-alias-label-tertiary,currentColor);margin-top:6px;font-size:11px;line-height:1.6}.mAjYhq_foot{color:var(--dsw-alias-label-tertiary,currentColor);justify-content:space-between;align-items:center;gap:8px;padding:3px 6px 1px;font-size:11px;display:flex}.mAjYhq_window progress.mAjYhq_high::-webkit-progress-value{background:#e0a100}.mAjYhq_window progress.mAjYhq_high::-moz-progress-bar{background:#e0a100}.mAjYhq_window progress.mAjYhq_limited::-webkit-progress-value{background:#e5484d}.mAjYhq_window progress.mAjYhq_limited::-moz-progress-bar{background:#e5484d}.mAjYhq_limitedText{color:#e5484d;margin-top:2px;font-weight:600}';
2792
2838
  document.head.appendChild(style);
2793
2839
  }
2794
2840
  var UsagePill_default = { "accHead": "mAjYhq_accHead", "accName": "mAjYhq_accName", "account": "mAjYhq_account", "back": "mAjYhq_back", "body": "mAjYhq_body", "brand": "mAjYhq_brand", "divider": "mAjYhq_divider", "dot": "mAjYhq_dot", "fallback": "mAjYhq_fallback", "foot": "mAjYhq_foot", "high": "mAjYhq_high", "hint": "mAjYhq_hint", "icon": "mAjYhq_icon", "limited": "mAjYhq_limited", "limitedText": "mAjYhq_limitedText", "material": "mAjYhq_material", "option": "mAjYhq_option", "optionName": "mAjYhq_optionName", "panel": "mAjYhq_panel", "panelHead": "mAjYhq_panelHead", "panelTitle": "mAjYhq_panelTitle", "reading": "mAjYhq_reading", "retry": "mAjYhq_retry", "root": "mAjYhq_root", "stale": "mAjYhq_stale", "switch": "mAjYhq_switch", "tag": "mAjYhq_tag", "tick": "mAjYhq_tick", "tile": "mAjYhq_tile", "trigger": "mAjYhq_trigger", "unit": "mAjYhq_unit", "warning": "mAjYhq_warning", "window": "mAjYhq_window", "windowLabel": "mAjYhq_windowLabel", "windowPercent": "mAjYhq_windowPercent", "windowReset": "mAjYhq_windowReset", "windowRow": "mAjYhq_windowRow" };
2795
2841
 
2796
2842
  // src/client/UsagePill.tsx
2797
- var import_jsx_runtime4 = require("react/jsx-runtime");
2843
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2798
2844
  var unchanged = () => 0;
2799
2845
  var noSubscription = () => () => {
2800
2846
  };
@@ -2820,13 +2866,13 @@ function usageLevel(window) {
2820
2866
  return window.percent >= 80 ? UsagePill_default.high : void 0;
2821
2867
  }
2822
2868
  function ChevronRight() {
2823
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: UsagePill_default.icon, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M6 4l4 4-4 4" }) });
2869
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: UsagePill_default.icon, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M6 4l4 4-4 4" }) });
2824
2870
  }
2825
2871
  function ChevronLeft() {
2826
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: UsagePill_default.icon, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 4 6 8l4 4" }) });
2872
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: UsagePill_default.icon, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 4 6 8l4 4" }) });
2827
2873
  }
2828
2874
  function Tick() {
2829
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: UsagePill_default.tick, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3.5 8.5 6.5 11.5 12.5 4.5" }) });
2875
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: UsagePill_default.tick, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3.5 8.5 6.5 11.5 12.5 4.5" }) });
2830
2876
  }
2831
2877
  function UsagePill({ directory, settings, credentialChanges, ...props }) {
2832
2878
  const state = (0, import_react4.useSyncExternalStore)(directory.subscribe, directory.getSnapshot, directory.getSnapshot);
@@ -2840,7 +2886,7 @@ function UsagePill({ directory, settings, credentialChanges, ...props }) {
2840
2886
  const visible = config.status === "ready" && config.value?.enabled !== false && (mode === "always" || mode === "auto" && state.current?.provider === PROVIDER_ID);
2841
2887
  const accounts = accountsOf(config.value ?? {});
2842
2888
  const activeRef = accountRefOf(config.value ?? {});
2843
- return visible ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2889
+ return visible ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2844
2890
  ActiveUsage,
2845
2891
  {
2846
2892
  ...props,
@@ -2947,49 +2993,49 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
2947
2993
  });
2948
2994
  };
2949
2995
  const label = usage ? `Go \xB7 ${t("usageRollingShort")} ${usage.rolling.percent}% \xB7 ${t("usageWeekShort")} ${usage.weekly.percent}%${failure ? ` \xB7 ${t("usageStaleShort")}` : ""}${notice ? ` \xB7 ${t("usageFallbackShort")}` : ""}${accounts.length > 1 ? ` \xB7 ${accountName}` : ""}` : `Go \xB7 ${failure ? t("usageUnavailable") : "\u2026"}${notice ? ` \xB7 ${t("usageFallbackShort")}` : ""}${accounts.length > 1 ? ` \xB7 ${accountName}` : ""}`;
2950
- const segments = usage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2951
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
2952
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.reading, "data-stale": failure ? "" : void 0, children: [
2953
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.unit, children: [
2996
+ const segments = usage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2997
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
2998
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.reading, "data-stale": failure ? "" : void 0, children: [
2999
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.unit, children: [
2954
3000
  t("usageRollingShort"),
2955
3001
  " "
2956
3002
  ] }),
2957
3003
  usage.rolling.percent,
2958
3004
  "%",
2959
3005
  " \xB7 ",
2960
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.unit, children: [
3006
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.unit, children: [
2961
3007
  t("usageWeekShort"),
2962
3008
  " "
2963
3009
  ] }),
2964
3010
  usage.weekly.percent,
2965
3011
  "%"
2966
3012
  ] }),
2967
- failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.stale, children: [
3013
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.stale, children: [
2968
3014
  " \xB7 ",
2969
3015
  t("usageStaleShort")
2970
3016
  ] }) : null,
2971
- notice ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.fallback, children: [
3017
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.fallback, children: [
2972
3018
  " \xB7 ",
2973
3019
  t("usageFallbackShort")
2974
3020
  ] }) : null,
2975
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.account, children: [
3021
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.account, children: [
2976
3022
  " \xB7 ",
2977
3023
  accountName
2978
3024
  ] }) : null
2979
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2980
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
3025
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3026
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
2981
3027
  failure ? t("usageUnavailable") : "\u2026",
2982
- notice ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.fallback, children: [
3028
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.fallback, children: [
2983
3029
  " \xB7 ",
2984
3030
  t("usageFallbackShort")
2985
3031
  ] }) : null,
2986
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.account, children: [
3032
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.account, children: [
2987
3033
  " \xB7 ",
2988
3034
  accountName
2989
3035
  ] }) : null
2990
3036
  ] });
2991
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.root, ref: root, children: [
2992
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3037
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.root, ref: root, children: [
3038
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2993
3039
  "button",
2994
3040
  {
2995
3041
  type: "button",
@@ -3006,16 +3052,16 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3006
3052
  children: segments
3007
3053
  }
3008
3054
  ),
3009
- open && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.panel, role: "dialog", "aria-label": t("usageTitle"), "aria-busy": refreshing, children: [
3010
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.material, "aria-hidden": "true" }),
3011
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.body, children: accountsView ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3012
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.panelHead, children: [
3013
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: UsagePill_default.back, "aria-label": t("accountSwitchBack"), onClick: () => {
3055
+ open && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.panel, role: "dialog", "aria-label": t("usageTitle"), "aria-busy": refreshing, children: [
3056
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.material, "aria-hidden": "true" }),
3057
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.body, children: accountsView ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3058
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.panelHead, children: [
3059
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: UsagePill_default.back, "aria-label": t("accountSwitchBack"), onClick: () => {
3014
3060
  setView("usage");
3015
- }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronLeft, {}) }),
3016
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: t("accountSwitchTitle") })
3061
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronLeft, {}) }),
3062
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: t("accountSwitchTitle") })
3017
3063
  ] }),
3018
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3064
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3019
3065
  "div",
3020
3066
  {
3021
3067
  className: UsagePill_default.tile,
@@ -3034,9 +3080,9 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3034
3080
  const at = options.indexOf(document.activeElement);
3035
3081
  options[(at + step + options.length) % options.length]?.focus();
3036
3082
  },
3037
- children: accounts.map((account, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react4.Fragment, { children: [
3038
- index ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.divider }) : null,
3039
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3083
+ children: accounts.map((account, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react4.Fragment, { children: [
3084
+ index ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.divider }) : null,
3085
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3040
3086
  "button",
3041
3087
  {
3042
3088
  type: "button",
@@ -3049,23 +3095,23 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3049
3095
  switchTo(account.apiKeyEnv);
3050
3096
  },
3051
3097
  children: [
3052
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.optionName, children: account.name || t("accountDefault") }),
3053
- account.apiKeyEnv === activeRef ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Tick, {}) : null
3098
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.optionName, children: account.name || t("accountDefault") }),
3099
+ account.apiKeyEnv === activeRef ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Tick, {}) : null
3054
3100
  ]
3055
3101
  }
3056
3102
  )
3057
3103
  ] }, account.id))
3058
3104
  }
3059
3105
  ),
3060
- switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3061
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: UsagePill_default.hint, children: t("accountSwitchHint") })
3062
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3063
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.panelTitle, children: t("usageTitle") }),
3064
- accounts.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.tile, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.accHead, children: [
3065
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.dot }),
3066
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.accName, children: accountName }),
3067
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.tag, children: t("accountPreferredTag") }) : null,
3068
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3106
+ switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3107
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.hint, children: t("accountSwitchHint") })
3108
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3109
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.panelTitle, children: t("usageTitle") }),
3110
+ accounts.length ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.tile, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.accHead, children: [
3111
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.dot }),
3112
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.accName, children: accountName }),
3113
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.tag, children: t("accountPreferredTag") }) : null,
3114
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3069
3115
  "button",
3070
3116
  {
3071
3117
  type: "button",
@@ -3077,25 +3123,25 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3077
3123
  },
3078
3124
  children: [
3079
3125
  t("accountSwitchAction"),
3080
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronRight, {})
3126
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronRight, {})
3081
3127
  ]
3082
3128
  }
3083
3129
  ) : null
3084
3130
  ] }) }) : null,
3085
- switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3086
- notice ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: UsagePill_default.warning, role: "status", children: [
3131
+ switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3132
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: UsagePill_default.warning, role: "status", children: [
3087
3133
  t(notice.reason === "quota" ? "accountFallbackQuota" : "accountFallbackCredential"),
3088
3134
  " ",
3089
3135
  accounts.find((account) => account.apiKeyEnv === notice.toRef)?.name || t("accountDefault"),
3090
3136
  " \xB7 ",
3091
3137
  new Date(notice.at).toLocaleString(getLocale?.())
3092
3138
  ] }) : null,
3093
- failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.warning, role: "alert", children: [
3094
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: t("usageRefreshFailed") }),
3095
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: failure.message ?? t("usageUnavailable") }),
3096
- usage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: t("usageStaleHint") }) : null
3139
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.warning, role: "alert", children: [
3140
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: t("usageRefreshFailed") }),
3141
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: failure.message ?? t("usageUnavailable") }),
3142
+ usage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t("usageStaleHint") }) : null
3097
3143
  ] }) : null,
3098
- failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3144
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3099
3145
  "button",
3100
3146
  {
3101
3147
  type: "button",
@@ -3107,26 +3153,26 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3107
3153
  children: t(refreshing ? "usageRefreshing" : "usageRetry")
3108
3154
  }
3109
3155
  ) : null,
3110
- usage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.tile, children: ["rolling", "weekly", "monthly"].map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react4.Fragment, { children: [
3111
- index ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.divider }) : null,
3112
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.window, children: [
3113
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.windowRow, children: [
3114
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: UsagePill_default.windowLabel, children: t(`usage_${key}`) }),
3115
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("progress", { className: usageLevel(usage[key]), "aria-label": t(`usage_${key}`), max: 100, value: Math.min(100, usage[key].percent) }),
3116
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("strong", { className: UsagePill_default.windowPercent, children: [
3156
+ usage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.tile, children: ["rolling", "weekly", "monthly"].map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react4.Fragment, { children: [
3157
+ index ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.divider }) : null,
3158
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.window, children: [
3159
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.windowRow, children: [
3160
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.windowLabel, children: t(`usage_${key}`) }),
3161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("progress", { className: usageLevel(usage[key]), "aria-label": t(`usage_${key}`), max: 100, value: Math.min(100, usage[key].percent) }),
3162
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("strong", { className: UsagePill_default.windowPercent, children: [
3117
3163
  usage[key].percent,
3118
3164
  "%"
3119
3165
  ] })
3120
3166
  ] }),
3121
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.windowReset, children: [
3167
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.windowReset, children: [
3122
3168
  t("usageResets"),
3123
3169
  " ",
3124
3170
  new Date(usage[key].resetsAt).toLocaleString(getLocale?.())
3125
3171
  ] }),
3126
- usage[key].status === "rate-limited" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.limitedText, children: t("usageLimited") })
3172
+ usage[key].status === "rate-limited" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.limitedText, children: t("usageLimited") })
3127
3173
  ] })
3128
- ] }, key)) }) : failure ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: UsagePill_default.hint, children: t("usageLoading") }),
3129
- current ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.foot, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
3174
+ ] }, key)) }) : failure ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.hint, children: t("usageLoading") }),
3175
+ current ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.foot, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
3130
3176
  t("usageLastUpdated"),
3131
3177
  " ",
3132
3178
  new Date(current.updatedAt).toLocaleString(getLocale?.())