dsh-opencode-go 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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,44 @@ 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 = state.usageDisplay.overridden || state.protocolOverrides.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;
1147
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.page, children: [
1148
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.pageBody, children: [
1149
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.pageTop, children: [
1150
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: Section_default.title, children: t("titleLabel") }),
1151
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.intro, children: t("intro") })
1087
1152
  ] }),
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)(
1153
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: Section_default.card, children: [
1154
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardHead, children: [
1155
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("h3", { className: Section_default.cardTitle, children: [
1156
+ t("enabledLabel"),
1157
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HintMark, { hint: enabledHint })
1158
+ ] }),
1159
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1092
1160
  import_dsh_client_ui_primitives3.Switch,
1093
1161
  {
1094
1162
  checked: state.enabled,
1095
1163
  label: t("enabledLabel"),
1164
+ title: enabledHint,
1096
1165
  disabled: disabled || state.saving || state.pickerSaving,
1097
1166
  onChange: props.setEnabled
1098
1167
  }
1099
1168
  )
1100
1169
  ] }),
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" })
1170
+ accountCard ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1171
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.cardDivider }),
1172
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardHead, children: [
1173
+ /* @__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: [
1174
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "5.4", cy: "8", r: "3.1" }),
1175
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8.5 8h5.3M11.9 8v2.2M10.2 8v1.6" })
1108
1176
  ] }) }),
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") }) })
1177
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { className: Section_default.label, htmlFor: "opencode-go-key", children: t("keyLabel") }),
1178
+ /* @__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
1179
  ] }),
1112
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: Section_default.cardBody, children: [
1113
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1180
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.cardBody, children: [
1181
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1114
1182
  "input",
1115
1183
  {
1116
1184
  id: "opencode-go-key",
@@ -1126,13 +1194,13 @@ function Loaded(props) {
1126
1194
  }
1127
1195
  }
1128
1196
  ),
1129
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
1197
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
1130
1198
  ] })
1131
1199
  ] })
1132
1200
  ] }),
1133
1201
  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)(
1202
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: modelsOpen ? Section_default.cardModels : Section_default.cardModels + " " + Section_default.cardFolded, children: [
1203
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1136
1204
  "button",
1137
1205
  {
1138
1206
  type: "button",
@@ -1143,14 +1211,14 @@ function Loaded(props) {
1143
1211
  setModelsOpen(!modelsOpen);
1144
1212
  },
1145
1213
  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 })
1214
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.cardTitle, children: t("modelsLabel") }),
1215
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronDown2, { className: modelsOpen ? Section_default.chevronOpen : Section_default.chevron })
1148
1216
  ]
1149
1217
  }
1150
1218
  ),
1151
- modelsOpen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: "opencode-go-models", className: Section_default.cardBody, children: [
1219
+ modelsOpen ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id: "opencode-go-models", className: Section_default.cardBody, children: [
1152
1220
  modelNotices,
1153
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1221
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1154
1222
  ModelEditor,
1155
1223
  {
1156
1224
  models: state.models,
@@ -1160,7 +1228,7 @@ function Loaded(props) {
1160
1228
  disabled: disabled || state.saving,
1161
1229
  modelVisibility: state.modelVisibility,
1162
1230
  visibilitySaving: state.pickerSaving,
1163
- filterAction: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1231
+ filterAction: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1164
1232
  import_dsh_client_ui_primitives3.Button,
1165
1233
  {
1166
1234
  variant: "outline",
@@ -1176,10 +1244,10 @@ function Loaded(props) {
1176
1244
  }
1177
1245
  }
1178
1246
  )
1179
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Section_default.cardNotes, children: modelNotices })
1247
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.cardNotes, children: modelNotices })
1180
1248
  ] }),
1181
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: Section_default.card, children: [
1182
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1249
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: Section_default.card, children: [
1250
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1183
1251
  "button",
1184
1252
  {
1185
1253
  type: "button",
@@ -1190,17 +1258,33 @@ function Loaded(props) {
1190
1258
  setAdvanced(!advanced);
1191
1259
  },
1192
1260
  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 })
1261
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: Section_default.cardTitle, children: t("advancedLabel") }),
1262
+ advancedOverridden ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Tag, { tone: "neutral", children: t("overridden") }) : null,
1263
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronDown2, { className: advanced ? Section_default.chevronOpen : Section_default.chevron })
1197
1264
  ]
1198
1265
  }
1199
1266
  ),
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)(
1267
+ advanced ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id: "opencode-go-advanced", className: Section_default.cardBody, children: [
1268
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.advancedHead, children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: t("advancedHint") }),
1270
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1271
+ "button",
1272
+ {
1273
+ type: "button",
1274
+ className: Section_default.reset,
1275
+ disabled: disabled || !advancedOverridden,
1276
+ onClick: () => {
1277
+ for (const field of ADVANCED_FIELDS) {
1278
+ if (state[field].overridden) props.resetField(field);
1279
+ }
1280
+ },
1281
+ children: t("advancedResetAll")
1282
+ }
1283
+ )
1284
+ ] }),
1285
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.rows, children: [
1286
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupUsageProtocol") }),
1287
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1204
1288
  ValueField,
1205
1289
  {
1206
1290
  id: "opencode-go-usage-display",
@@ -1211,13 +1295,10 @@ function Loaded(props) {
1211
1295
  ...fieldProps,
1212
1296
  onEdit: (text) => {
1213
1297
  props.edit("usageDisplay", text);
1214
- },
1215
- onReset: () => {
1216
- props.resetField("usageDisplay");
1217
1298
  }
1218
1299
  }
1219
1300
  ),
1220
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1301
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1221
1302
  ValueField,
1222
1303
  {
1223
1304
  id: "opencode-go-protocol-overrides",
@@ -1231,29 +1312,11 @@ function Loaded(props) {
1231
1312
  ...fieldProps,
1232
1313
  onEdit: (text) => {
1233
1314
  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
1315
  }
1254
1316
  }
1255
1317
  ),
1256
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1318
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupConnection") }),
1319
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1257
1320
  ValueField,
1258
1321
  {
1259
1322
  id: "opencode-go-base-url",
@@ -1263,13 +1326,10 @@ function Loaded(props) {
1263
1326
  ...fieldProps,
1264
1327
  onEdit: (text) => {
1265
1328
  props.edit("baseURL", text);
1266
- },
1267
- onReset: () => {
1268
- props.resetField("baseURL");
1269
1329
  }
1270
1330
  }
1271
1331
  ),
1272
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1332
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1273
1333
  ValueField,
1274
1334
  {
1275
1335
  id: "opencode-go-proxy-url",
@@ -1281,13 +1341,11 @@ function Loaded(props) {
1281
1341
  invalidLabel: t("proxyURLInvalid"),
1282
1342
  onEdit: (text) => {
1283
1343
  props.edit("proxyURL", text);
1284
- },
1285
- onReset: () => {
1286
- props.resetField("proxyURL");
1287
1344
  }
1288
1345
  }
1289
1346
  ),
1290
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1347
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupCacheTimeouts") }),
1348
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1291
1349
  ValueField,
1292
1350
  {
1293
1351
  id: "opencode-go-refresh-minutes",
@@ -1298,13 +1356,10 @@ function Loaded(props) {
1298
1356
  ...fieldProps,
1299
1357
  onEdit: (text) => {
1300
1358
  props.edit("refreshMinutes", text);
1301
- },
1302
- onReset: () => {
1303
- props.resetField("refreshMinutes");
1304
1359
  }
1305
1360
  }
1306
1361
  ),
1307
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1362
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1308
1363
  ValueField,
1309
1364
  {
1310
1365
  id: "opencode-go-stream-idle",
@@ -1315,13 +1370,11 @@ function Loaded(props) {
1315
1370
  ...fieldProps,
1316
1371
  onEdit: (text) => {
1317
1372
  props.edit("streamIdleTimeoutMs", text);
1318
- },
1319
- onReset: () => {
1320
- props.resetField("streamIdleTimeoutMs");
1321
1373
  }
1322
1374
  }
1323
1375
  ),
1324
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1376
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Section_default.groupHead, children: t("groupImages") }),
1377
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1325
1378
  ValueField,
1326
1379
  {
1327
1380
  id: "opencode-go-max-images",
@@ -1332,13 +1385,10 @@ function Loaded(props) {
1332
1385
  ...fieldProps,
1333
1386
  onEdit: (text) => {
1334
1387
  props.edit("maxImages", text);
1335
- },
1336
- onReset: () => {
1337
- props.resetField("maxImages");
1338
1388
  }
1339
1389
  }
1340
1390
  ),
1341
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1391
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1342
1392
  ValueField,
1343
1393
  {
1344
1394
  id: "opencode-go-max-request-image-bytes",
@@ -1349,13 +1399,10 @@ function Loaded(props) {
1349
1399
  ...fieldProps,
1350
1400
  onEdit: (text) => {
1351
1401
  props.edit("maxRequestImageBytes", text);
1352
- },
1353
- onReset: () => {
1354
- props.resetField("maxRequestImageBytes");
1355
1402
  }
1356
1403
  }
1357
1404
  ),
1358
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1405
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1359
1406
  ValueField,
1360
1407
  {
1361
1408
  id: "opencode-go-image-pixel-budget",
@@ -1366,13 +1413,10 @@ function Loaded(props) {
1366
1413
  ...fieldProps,
1367
1414
  onEdit: (text) => {
1368
1415
  props.edit("requestImagePixelBudget", text);
1369
- },
1370
- onReset: () => {
1371
- props.resetField("requestImagePixelBudget");
1372
1416
  }
1373
1417
  }
1374
1418
  ),
1375
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1419
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1376
1420
  ValueField,
1377
1421
  {
1378
1422
  id: "opencode-go-image-max-bytes",
@@ -1383,21 +1427,18 @@ function Loaded(props) {
1383
1427
  ...fieldProps,
1384
1428
  onEdit: (text) => {
1385
1429
  props.edit("requestImageMaxBytes", text);
1386
- },
1387
- onReset: () => {
1388
- props.resetField("requestImageMaxBytes");
1389
1430
  }
1390
1431
  }
1391
1432
  )
1392
1433
  ] })
1393
1434
  ] }) : null
1394
1435
  ] }),
1395
- disabled ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.hint, children: t("readOnly") }) : null
1436
+ disabled ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.hint, children: t("readOnly") }) : null
1396
1437
  ] }),
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)(
1438
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: Section_default.actions, children: [
1439
+ /* @__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") }),
1440
+ /* @__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") }),
1441
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1401
1442
  "a",
1402
1443
  {
1403
1444
  className: Section_default.starLink,
@@ -1406,12 +1447,12 @@ function Loaded(props) {
1406
1447
  rel: "noopener noreferrer",
1407
1448
  title: t("starProjectTitle"),
1408
1449
  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") })
1450
+ /* @__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" }) }),
1451
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: t("starProject") })
1411
1452
  ]
1412
1453
  }
1413
1454
  ),
1414
- state.failed ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: Section_default.failedNote, children: t("savedFailed") }) : null
1455
+ state.failed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: Section_default.failedNote, children: t("savedFailed") }) : null
1415
1456
  ] })
1416
1457
  ] });
1417
1458
  }
@@ -1605,10 +1646,12 @@ var GoAccountsController = class {
1605
1646
  loadAccounts: () => {
1606
1647
  void this.refresh();
1607
1648
  },
1649
+ resetAddition: () => {
1650
+ this.addition = void 0;
1651
+ },
1608
1652
  addAccount: (name, key) => this.run(async () => {
1609
1653
  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() };
1654
+ if (this.addition?.name !== name.trim()) this.addition = { name: name.trim(), id: operationId() };
1612
1655
  const accepted = await command({ kind: "add", id: this.addition.id, name, key });
1613
1656
  if (accepted) this.addition = void 0;
1614
1657
  return accepted;
@@ -1961,7 +2004,6 @@ var OpencodeGoSectionController = class {
1961
2004
  format: (value) => value?.[RESPONSES_OVERRIDE_MODEL] ?? "auto",
1962
2005
  parse: (text) => text === "auto" || text === "openai-responses" ? { kind: "set", value: { [RESPONSES_OVERRIDE_MODEL]: text === "auto" ? null : text } } : void 0
1963
2006
  },
1964
- textField("apiKeyEnv"),
1965
2007
  textField("baseURL"),
1966
2008
  {
1967
2009
  ...textField("proxyURL"),
@@ -2047,7 +2089,6 @@ var OpencodeGoSectionController = class {
2047
2089
  modelVisibility: this.scope.getSnapshot().value?.modelVisibility ?? {},
2048
2090
  pickerSaving: this.pickerSaving,
2049
2091
  pickerFailed: this.pickerFailed,
2050
- apiKeyEnv: this.form.field("apiKeyEnv"),
2051
2092
  baseURL: this.form.field("baseURL"),
2052
2093
  proxyURL: this.form.field("proxyURL"),
2053
2094
  refreshMinutes: this.form.field("refreshMinutes"),
@@ -2321,12 +2362,12 @@ var en = {
2321
2362
  accountConfirm: "Confirm",
2322
2363
  accountCancel: "Cancel",
2323
2364
  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.",
2365
+ 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
2366
  accountPreferredTag: "Current",
2326
2367
  accountSwitchAction: "Switch",
2327
2368
  accountSwitchTitle: "Switch account",
2328
2369
  accountSwitchBack: "Back to usage",
2329
- accountSwitchHint: "Later requests in this profile use this account. The consumption order stays on the Settings page.",
2370
+ accountSwitchHint: "This account moves to the first position and serves later requests in this profile. The other accounts keep their relative order.",
2330
2371
  accountSwitchFailed: "Could not switch account. Please retry.",
2331
2372
  accountFallbackQuota: "The current account reached its quota; switched to",
2332
2373
  accountFallbackCredential: "The current key was unavailable or rejected; switched to",
@@ -2367,8 +2408,8 @@ var en = {
2367
2408
  starProject: "Enjoying the plugin? Star it on GitHub",
2368
2409
  starProjectTitle: "Open the GitHub project in a new tab",
2369
2410
  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.",
2411
+ enabledHint: "While on, it appears in every model picker and can serve requests; turning it off withdraws it immediately and this page stays reachable.",
2412
+ enabledOff: "OpenCode Go is off: its models are withdrawn from every picker and no request reaches the gateway.",
2372
2413
  enabledUnavailable: "This deployment pins the switch on in its composition, so it cannot be changed here.",
2373
2414
  keyLabel: "API key",
2374
2415
  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 +2478,39 @@ var en = {
2437
2478
  limitsEmpty: "Read the model list first; capacities are edited per model the gateway serves.",
2438
2479
  limitsContextLabel: "Context window for {name}",
2439
2480
  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",
2481
+ advancedResetAll: "Reset all to defaults",
2441
2482
  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.",
2483
+ groupUsageProtocol: "Usage and protocol",
2484
+ groupConnection: "Connection",
2485
+ groupCacheTimeouts: "Cache and timeouts",
2486
+ groupImages: "Image handling",
2487
+ advancedHint: "The inherited values work as they are; below are only the settings you may need to change.",
2443
2488
  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.",
2489
+ 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
2490
  usageDisplay_auto: "Auto (default)",
2446
2491
  usageDisplay_always: "Always",
2447
2492
  usageDisplay_off: "Off",
2448
2493
  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.",
2494
+ protocolOverridesHint: "Auto follows the model catalog; Responses is experimental and applies only to DeepSeek V4.1 Flash. Save to apply to new requests.",
2450
2495
  protocolOverridesAuto: "Auto (default)",
2451
2496
  protocolOverridesResponses: "Responses (experimental)",
2452
- apiKeyEnvLabel: "Credential reference",
2453
- apiKeyEnvHint: "The name the key is resolved from, addressed through the credentials service.",
2454
2497
  baseURLLabel: "Gateway URL",
2455
- baseURLHint: "The endpoint that serves requests and the live model list.",
2498
+ baseURLHint: "The endpoint that serves model requests and the live model listing.",
2456
2499
  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.",
2500
+ proxyURLHint: "The HTTP(S) or SOCKS5 proxy for conversations, catalog refreshes and usage queries; leave empty for the default network.",
2458
2501
  proxyURLInvalid: "Enter an http://, https:// or socks5:// proxy address without a path, query or fragment.",
2459
2502
  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.",
2503
+ refreshMinutesHint: "How long the model catalog is cached; opening this page or refreshing re-checks it immediately.",
2461
2504
  streamIdleTimeoutMsLabel: "Stream idle timeout (ms)",
2462
- streamIdleTimeoutMsHint: "Largest quiet gap between stream events before the request fails.",
2505
+ streamIdleTimeoutMsHint: "The longest silence between stream events; a longer gap fails the request.",
2463
2506
  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.",
2507
+ 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
2508
  maxRequestImageBytesLabel: "Request image payload cap (bytes)",
2466
- maxRequestImageBytesHint: "Accumulated base64 image payload bound for one request.",
2509
+ maxRequestImageBytesHint: "The cap on the accumulated base64 image payload in one request.",
2467
2510
  requestImagePixelBudgetLabel: "Image pixel budget",
2468
- requestImagePixelBudgetHint: "Total-pixel budget for one converted request image.",
2511
+ requestImagePixelBudgetHint: "The total pixel budget of one image after conversion.",
2469
2512
  requestImageMaxBytesLabel: "Image byte target (bytes)",
2470
- requestImageMaxBytesHint: "Raw encoded-byte target for one request image before base64 expansion.",
2513
+ requestImageMaxBytesHint: "The original byte target of one image before base64 expansion.",
2471
2514
  overridden: "Customized",
2472
2515
  reset: "Reset to default",
2473
2516
  invalidValue: "Not a valid value",
@@ -2499,12 +2542,12 @@ var zh = {
2499
2542
  accountConfirm: "\u786E\u8BA4",
2500
2543
  accountCancel: "\u53D6\u6D88",
2501
2544
  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",
2545
+ 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
2546
  accountPreferredTag: "\u5F53\u524D\u8D26\u53F7",
2504
2547
  accountSwitchAction: "\u5207\u6362",
2505
2548
  accountSwitchTitle: "\u5207\u6362\u8D26\u53F7",
2506
2549
  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",
2550
+ 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
2551
  accountSwitchFailed: "\u8D26\u53F7\u5207\u6362\u672A\u751F\u6548\uFF0C\u8BF7\u91CD\u8BD5\u3002",
2509
2552
  accountFallbackQuota: "\u5F53\u524D\u8D26\u53F7\u989D\u5EA6\u8017\u5C3D\uFF0C\u5DF2\u81EA\u52A8\u5207\u6362\u4E3A\uFF1A",
2510
2553
  accountFallbackCredential: "\u5F53\u524D Key \u4E0D\u53EF\u7528\u6216\u88AB\u62D2\u7EDD\uFF0C\u5DF2\u81EA\u52A8\u5207\u6362\u4E3A\uFF1A",
@@ -2545,8 +2588,8 @@ var zh = {
2545
2588
  starProject: "\u559C\u6B22\u8FD9\u4E2A\u63D2\u4EF6\uFF1F\u53BB GitHub \u70B9\u4E2A Star",
2546
2589
  starProjectTitle: "\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00 GitHub \u9879\u76EE",
2547
2590
  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",
2591
+ 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",
2592
+ 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
2593
  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
2594
  keyLabel: "API key",
2552
2595
  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 +2658,39 @@ var zh = {
2615
2658
  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
2659
  limitsContextLabel: "{name} \u7684\u4E0A\u4E0B\u6587\u7A97\u53E3",
2617
2660
  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",
2661
+ advancedResetAll: "\u5168\u90E8\u6062\u590D\u9ED8\u8BA4",
2619
2662
  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",
2663
+ groupUsageProtocol: "\u7528\u91CF\u4E0E\u534F\u8BAE",
2664
+ groupConnection: "\u8FDE\u63A5",
2665
+ groupCacheTimeouts: "\u7F13\u5B58\u4E0E\u8D85\u65F6",
2666
+ groupImages: "\u56FE\u7247\u5904\u7406",
2667
+ 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
2668
  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",
2669
+ 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
2670
  usageDisplay_auto: "\u81EA\u52A8\uFF08\u9ED8\u8BA4\uFF09",
2624
2671
  usageDisplay_always: "\u5E38\u9A7B",
2625
2672
  usageDisplay_off: "\u5173\u95ED",
2626
2673
  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",
2674
+ 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
2675
  protocolOverridesAuto: "\u81EA\u52A8\uFF08\u9ED8\u8BA4\uFF09",
2629
2676
  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
2677
  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",
2678
+ baseURLHint: "\u6A21\u578B\u8BF7\u6C42\u4E0E\u5B9E\u65F6\u6A21\u578B\u5217\u8868\u5171\u7528\u7684\u7AEF\u70B9\u3002",
2634
2679
  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",
2680
+ 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
2681
  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
2682
  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",
2683
+ 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
2684
  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",
2685
+ streamIdleTimeoutMsHint: "\u6D41\u4E8B\u4EF6\u4E4B\u95F4\u7684\u6700\u5927\u9759\u9ED8\u95F4\u9694\uFF0C\u8D85\u51FA\u5219\u8BF7\u6C42\u5931\u8D25\u3002",
2641
2686
  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",
2687
+ 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
2688
  maxRequestImageBytesLabel: "\u8BF7\u6C42\u56FE\u7247\u8F7D\u8377\u4E0A\u9650\uFF08\u5B57\u8282\uFF09",
2644
2689
  maxRequestImageBytesHint: "\u5355\u4E2A\u8BF7\u6C42\u7D2F\u8BA1 base64 \u56FE\u7247\u8F7D\u8377\u7684\u4E0A\u9650\u3002",
2645
2690
  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",
2691
+ requestImagePixelBudgetHint: "\u5355\u5F20\u56FE\u7247\u8F6C\u6362\u540E\u7684\u603B\u50CF\u7D20\u9884\u7B97\u3002",
2647
2692
  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",
2693
+ requestImageMaxBytesHint: "\u5355\u5F20\u56FE\u7247 base64 \u6269\u5C55\u524D\u7684\u539F\u59CB\u7F16\u7801\u5B57\u8282\u76EE\u6807\u3002",
2649
2694
  overridden: "\u5DF2\u81EA\u5B9A\u4E49",
2650
2695
  reset: "\u6062\u590D\u9ED8\u8BA4",
2651
2696
  invalidValue: "\u4E0D\u662F\u6709\u6548\u503C",
@@ -2788,13 +2833,13 @@ if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id2) + "]"
2788
2833
  const style = document.createElement("style");
2789
2834
  style.dataset.plugin = "dsh-opencode-go";
2790
2835
  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}';
2836
+ 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
2837
  document.head.appendChild(style);
2793
2838
  }
2794
2839
  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
2840
 
2796
2841
  // src/client/UsagePill.tsx
2797
- var import_jsx_runtime4 = require("react/jsx-runtime");
2842
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2798
2843
  var unchanged = () => 0;
2799
2844
  var noSubscription = () => () => {
2800
2845
  };
@@ -2820,13 +2865,13 @@ function usageLevel(window) {
2820
2865
  return window.percent >= 80 ? UsagePill_default.high : void 0;
2821
2866
  }
2822
2867
  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" }) });
2868
+ 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
2869
  }
2825
2870
  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" }) });
2871
+ 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
2872
  }
2828
2873
  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" }) });
2874
+ 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
2875
  }
2831
2876
  function UsagePill({ directory, settings, credentialChanges, ...props }) {
2832
2877
  const state = (0, import_react4.useSyncExternalStore)(directory.subscribe, directory.getSnapshot, directory.getSnapshot);
@@ -2840,7 +2885,7 @@ function UsagePill({ directory, settings, credentialChanges, ...props }) {
2840
2885
  const visible = config.status === "ready" && config.value?.enabled !== false && (mode === "always" || mode === "auto" && state.current?.provider === PROVIDER_ID);
2841
2886
  const accounts = accountsOf(config.value ?? {});
2842
2887
  const activeRef = accountRefOf(config.value ?? {});
2843
- return visible ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2888
+ return visible ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2844
2889
  ActiveUsage,
2845
2890
  {
2846
2891
  ...props,
@@ -2947,49 +2992,49 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
2947
2992
  });
2948
2993
  };
2949
2994
  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: [
2995
+ const segments = usage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2996
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
2997
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.reading, "data-stale": failure ? "" : void 0, children: [
2998
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.unit, children: [
2954
2999
  t("usageRollingShort"),
2955
3000
  " "
2956
3001
  ] }),
2957
3002
  usage.rolling.percent,
2958
3003
  "%",
2959
3004
  " \xB7 ",
2960
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.unit, children: [
3005
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.unit, children: [
2961
3006
  t("usageWeekShort"),
2962
3007
  " "
2963
3008
  ] }),
2964
3009
  usage.weekly.percent,
2965
3010
  "%"
2966
3011
  ] }),
2967
- failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.stale, children: [
3012
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.stale, children: [
2968
3013
  " \xB7 ",
2969
3014
  t("usageStaleShort")
2970
3015
  ] }) : null,
2971
- notice ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.fallback, children: [
3016
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.fallback, children: [
2972
3017
  " \xB7 ",
2973
3018
  t("usageFallbackShort")
2974
3019
  ] }) : null,
2975
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.account, children: [
3020
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.account, children: [
2976
3021
  " \xB7 ",
2977
3022
  accountName
2978
3023
  ] }) : 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 " }),
3024
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3025
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.brand, children: "Go \xB7 " }),
2981
3026
  failure ? t("usageUnavailable") : "\u2026",
2982
- notice ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.fallback, children: [
3027
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.fallback, children: [
2983
3028
  " \xB7 ",
2984
3029
  t("usageFallbackShort")
2985
3030
  ] }) : null,
2986
- accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.account, children: [
3031
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.account, children: [
2987
3032
  " \xB7 ",
2988
3033
  accountName
2989
3034
  ] }) : null
2990
3035
  ] });
2991
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: UsagePill_default.root, ref: root, children: [
2992
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3036
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: UsagePill_default.root, ref: root, children: [
3037
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2993
3038
  "button",
2994
3039
  {
2995
3040
  type: "button",
@@ -3006,16 +3051,16 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3006
3051
  children: segments
3007
3052
  }
3008
3053
  ),
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: () => {
3054
+ open && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.panel, role: "dialog", "aria-label": t("usageTitle"), "aria-busy": refreshing, children: [
3055
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.material, "aria-hidden": "true" }),
3056
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.body, children: accountsView ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3057
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.panelHead, children: [
3058
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: UsagePill_default.back, "aria-label": t("accountSwitchBack"), onClick: () => {
3014
3059
  setView("usage");
3015
- }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronLeft, {}) }),
3016
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: t("accountSwitchTitle") })
3060
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronLeft, {}) }),
3061
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: t("accountSwitchTitle") })
3017
3062
  ] }),
3018
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3063
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3019
3064
  "div",
3020
3065
  {
3021
3066
  className: UsagePill_default.tile,
@@ -3034,9 +3079,9 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3034
3079
  const at = options.indexOf(document.activeElement);
3035
3080
  options[(at + step + options.length) % options.length]?.focus();
3036
3081
  },
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)(
3082
+ children: accounts.map((account, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react4.Fragment, { children: [
3083
+ index ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.divider }) : null,
3084
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3040
3085
  "button",
3041
3086
  {
3042
3087
  type: "button",
@@ -3049,23 +3094,23 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3049
3094
  switchTo(account.apiKeyEnv);
3050
3095
  },
3051
3096
  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
3097
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.optionName, children: account.name || t("accountDefault") }),
3098
+ account.apiKeyEnv === activeRef ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Tick, {}) : null
3054
3099
  ]
3055
3100
  }
3056
3101
  )
3057
3102
  ] }, account.id))
3058
3103
  }
3059
3104
  ),
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)(
3105
+ switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3106
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.hint, children: t("accountSwitchHint") })
3107
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3108
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.panelTitle, children: t("usageTitle") }),
3109
+ 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: [
3110
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.dot }),
3111
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.accName, children: accountName }),
3112
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.tag, children: t("accountPreferredTag") }) : null,
3113
+ accounts.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3069
3114
  "button",
3070
3115
  {
3071
3116
  type: "button",
@@ -3077,25 +3122,25 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3077
3122
  },
3078
3123
  children: [
3079
3124
  t("accountSwitchAction"),
3080
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChevronRight, {})
3125
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronRight, {})
3081
3126
  ]
3082
3127
  }
3083
3128
  ) : null
3084
3129
  ] }) }) : 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: [
3130
+ switchFailed ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.warning, role: "alert", children: t("accountSwitchFailed") }) : null,
3131
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: UsagePill_default.warning, role: "status", children: [
3087
3132
  t(notice.reason === "quota" ? "accountFallbackQuota" : "accountFallbackCredential"),
3088
3133
  " ",
3089
3134
  accounts.find((account) => account.apiKeyEnv === notice.toRef)?.name || t("accountDefault"),
3090
3135
  " \xB7 ",
3091
3136
  new Date(notice.at).toLocaleString(getLocale?.())
3092
3137
  ] }) : 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
3138
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.warning, role: "alert", children: [
3139
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: t("usageRefreshFailed") }),
3140
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: failure.message ?? t("usageUnavailable") }),
3141
+ usage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t("usageStaleHint") }) : null
3097
3142
  ] }) : null,
3098
- failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3143
+ failure ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3099
3144
  "button",
3100
3145
  {
3101
3146
  type: "button",
@@ -3107,26 +3152,26 @@ function ActiveUsage({ readUsage, t, getLocale, accounts, activeRef, writable, s
3107
3152
  children: t(refreshing ? "usageRefreshing" : "usageRetry")
3108
3153
  }
3109
3154
  ) : 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: [
3155
+ 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: [
3156
+ index ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.divider }) : null,
3157
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.window, children: [
3158
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.windowRow, children: [
3159
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: UsagePill_default.windowLabel, children: t(`usage_${key}`) }),
3160
+ /* @__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) }),
3161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("strong", { className: UsagePill_default.windowPercent, children: [
3117
3162
  usage[key].percent,
3118
3163
  "%"
3119
3164
  ] })
3120
3165
  ] }),
3121
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: UsagePill_default.windowReset, children: [
3166
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: UsagePill_default.windowReset, children: [
3122
3167
  t("usageResets"),
3123
3168
  " ",
3124
3169
  new Date(usage[key].resetsAt).toLocaleString(getLocale?.())
3125
3170
  ] }),
3126
- usage[key].status === "rate-limited" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: UsagePill_default.limitedText, children: t("usageLimited") })
3171
+ usage[key].status === "rate-limited" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.limitedText, children: t("usageLimited") })
3127
3172
  ] })
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: [
3173
+ ] }, key)) }) : failure ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: UsagePill_default.hint, children: t("usageLoading") }),
3174
+ current ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: UsagePill_default.foot, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
3130
3175
  t("usageLastUpdated"),
3131
3176
  " ",
3132
3177
  new Date(current.updatedAt).toLocaleString(getLocale?.())