dsh-opencode-go 0.1.15 → 0.1.17

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
@@ -47,6 +47,13 @@ var import_react = require("react");
47
47
  var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
48
48
 
49
49
  // src/models-contract.ts
50
+ var INPUT_MODALITIES = ["text", "image", "audio", "video", "pdf"];
51
+ function normalizeInputModalities(value) {
52
+ if (!Array.isArray(value)) return void 0;
53
+ const declared = new Set(value.filter((item) => typeof item === "string").map((item) => item.toLowerCase()));
54
+ const ordered = INPUT_MODALITIES.filter((modality) => declared.has(modality));
55
+ return ordered.length === 0 ? void 0 : ordered;
56
+ }
50
57
  function isModelEnabled(model, modelVisibility) {
51
58
  if (model.configurationMissing) return false;
52
59
  const enabled = modelVisibility && Object.hasOwn(modelVisibility, model.id) ? modelVisibility[model.id] : void 0;
@@ -78,6 +85,8 @@ function parseGoModels(value) {
78
85
  if (typeof row.deprecated === "boolean") model.deprecated = row.deprecated;
79
86
  if (typeof row.configurationMissing === "boolean") model.configurationMissing = row.configurationMissing;
80
87
  if (validReleaseDate(row.releaseDate)) model.releaseDate = row.releaseDate;
88
+ const modalities = normalizeInputModalities(row.inputModalities);
89
+ if (modalities !== void 0) model.inputModalities = modalities;
81
90
  return model;
82
91
  });
83
92
  }
@@ -130,23 +139,30 @@ var modelsRemote = {
130
139
  }]
131
140
  };
132
141
 
133
- // plugin-css:/Users/tanglei/Desktop/dsh-opencode-go/src/client/Section.module.css
142
+ // plugin-css:src/client/Section.module.css
134
143
  var id = "dsh-opencode-go/Section.module.css";
135
144
  if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]")) {
136
145
  const style = document.createElement("style");
137
146
  style.dataset.plugin = "dsh-opencode-go";
138
147
  style.dataset.pluginCss = id;
139
- style.textContent = '.BtKYva_page{flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;container-type:size}.BtKYva_pageBody{scrollbar-gutter:stable;flex:1;min-height:0;padding-right:4px;overflow-y:auto}.BtKYva_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.BtKYva_field+.BtKYva_field{border-top:.5px solid var(--dsw-alias-border-l2)}.BtKYva_head{align-items:center;gap:8px;display:flex}.BtKYva_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.BtKYva_badges{align-items:center;gap:8px;display:inline-flex}.BtKYva_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}.BtKYva_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.BtKYva_reset:disabled{cursor:default}.BtKYva_reset:focus-visible,.BtKYva_disclosure:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.BtKYva_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}.BtKYva_input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-color:var(--dsw-alias-brand-primary)}.BtKYva_input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.BtKYva_inputInvalid{border-color:var(--dsw-alias-label-error);}.BtKYva_invalid{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.BtKYva_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}.BtKYva_intro{color:var(--dsw-alias-label-secondary);margin:0 0 8px;font-size:13px;line-height:1.5}.BtKYva_disclosure{font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0;padding:0;display:flex}.BtKYva_disclosure:hover .BtKYva_label{color:var(--dsw-alias-brand-primary)}.BtKYva_chevron,.BtKYva_chevronOpen{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none}.BtKYva_chevron{transform:rotate(-90deg)}.BtKYva_advanced{flex-direction:column;gap:4px;padding:4px 0 0 22px;display:flex}.BtKYva_advanced .BtKYva_field+.BtKYva_field{border-top:none}.BtKYva_chips{flex-wrap:wrap;gap:6px;display:flex}.BtKYva_limitsEditor{flex-direction:column;gap:10px;padding-top:4px;display:flex}.BtKYva_limitsToolbar{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px 10px;display:grid}.BtKYva_limitsFilterLabel{color:var(--dsw-alias-label-secondary);grid-column:1/-1;font-size:12px;font-weight:500;line-height:1.5}.BtKYva_limitsSummary{color:var(--dsw-alias-label-tertiary);white-space:nowrap;padding-bottom:8px;font-size:12px;line-height:1.5}.BtKYva_limitsId,.BtKYva_limitsModelId{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.BtKYva_limitsId{color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.4}.BtKYva_limitsModelId{color:var(--dsw-alias-label-tertiary);margin-top:2px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.4}.BtKYva_visuallyHidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (width<=560px){.BtKYva_limitsToolbar{grid-template-columns:1fr}.BtKYva_limitsSummary{padding-bottom:0}}.BtKYva_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}.BtKYva_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}.BtKYva_starLink svg{flex:none}.BtKYva_starLink:hover{color:var(--dsw-alias-brand-primary)}.BtKYva_starLink:hover span{text-underline-offset:3px;text-decoration:underline}.BtKYva_starLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px}.BtKYva_failedNote{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.BtKYva_pageTop{align-items:flex-start;gap:16px;display:flex}.BtKYva_pageTop .BtKYva_intro{flex:1}.BtKYva_advancedTrigger{flex-shrink:0;margin-left:auto;}.BtKYva_advancedTrigger .BtKYva_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.BtKYva_filters{flex-wrap:wrap;gap:6px;display:flex}.BtKYva_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}.BtKYva_filter[aria-pressed=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3)}.BtKYva_filter span{color:var(--dsw-alias-label-tertiary);margin-left:4px}.BtKYva_modelLayout{border:.5px solid var(--dsw-alias-border-l4);border-radius:10px;grid-template-columns:minmax(0,43fr) minmax(0,57fr);height:clamp(240px,100cqh - 460px,480px);display:grid;overflow:hidden}.BtKYva_modelList{border-right:.5px solid var(--dsw-alias-border-l2);min-height:0;padding:6px;overflow-y:auto}.BtKYva_modelRow{align-items:center;gap:8px;padding-right:6px;display:flex}.BtKYva_modelRow>[role=switch]{flex-shrink:0}.BtKYva_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;padding:12px 9px;display:block}.BtKYva_modelChoice[aria-pressed=true],.BtKYva_modelChoice:hover{background:var(--dsw-alias-bg-layer-3)}.BtKYva_modelName{overflow-wrap:anywhere;flex-wrap:wrap;align-items:center;gap:5px;font-size:13px;display:flex}.BtKYva_modelDetails{flex-direction:column;align-items:stretch;gap:10px;min-width:0;padding:18px;display:flex;overflow-y:auto}.BtKYva_modelDetails h3{overflow-wrap:anywhere;margin:0;font-size:16px}.BtKYva_modelHeading{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.BtKYva_modelDetails .BtKYva_field{border:0;padding:8px 0}.BtKYva_modelDetails .BtKYva_input{box-sizing:border-box;width:100%;min-width:0}.BtKYva_modelDetails .BtKYva_reset{align-self:flex-start}.BtKYva_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}.BtKYva_releaseDate{color:var(--dsw-alias-label-tertiary);margin-top:4px;font-size:10px;display:block}.BtKYva_modelChoice:focus-visible,.BtKYva_filter:focus-visible,.BtKYva_advancedTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}@container (width<=440px){.BtKYva_pageTop{flex-wrap:wrap}.BtKYva_modelLayout{grid-template-columns:minmax(0,1fr);height:auto}.BtKYva_modelList{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l2);max-height:240px}.BtKYva_modelDetails{max-height:460px}}.BtKYva_keySection{border-top:.5px solid var(--dsw-alias-border-l2);padding:12px 0}.BtKYva_keySection summary{cursor:pointer;list-style:none}.BtKYva_keySection summary:after{content:"\u2304";color:var(--dsw-alias-label-tertiary)}.BtKYva_keySection summary::-webkit-details-marker{display:none}.BtKYva_keySection>.BtKYva_input{box-sizing:border-box;width:100%;margin:10px 0 6px}.BtKYva_keySection summary:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}';
148
+ style.textContent = ".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_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_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_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}}";
140
149
  document.head.appendChild(style);
141
150
  }
142
- var Section_default = { "actions": "BtKYva_actions", "filter": "BtKYva_filter", "modelLayout": "BtKYva_modelLayout", "disclosure": "BtKYva_disclosure", "limitsEditor": "BtKYva_limitsEditor", "limitsModelId": "BtKYva_limitsModelId", "hint": "BtKYva_hint", "pageBody": "BtKYva_pageBody", "modelHeading": "BtKYva_modelHeading", "reset": "BtKYva_reset", "modelChoice": "BtKYva_modelChoice", "modelRow": "BtKYva_modelRow", "filters": "BtKYva_filters", "page": "BtKYva_page", "visuallyHidden": "BtKYva_visuallyHidden", "advancedTrigger": "BtKYva_advancedTrigger BtKYva_disclosure", "chevronOpen": "BtKYva_chevronOpen", "inputInvalid": "BtKYva_inputInvalid BtKYva_input", "invalid": "BtKYva_invalid", "field": "BtKYva_field", "modelList": "BtKYva_modelList", "badges": "BtKYva_badges", "limitsSummary": "BtKYva_limitsSummary", "label": "BtKYva_label", "starLink": "BtKYva_starLink", "limitsId": "BtKYva_limitsId", "modelDetails": "BtKYva_modelDetails", "intro": "BtKYva_intro", "releaseDate": "BtKYva_releaseDate", "input": "BtKYva_input", "head": "BtKYva_head", "limitsFilterLabel": "BtKYva_limitsFilterLabel", "pageTop": "BtKYva_pageTop", "newBadge": "BtKYva_newBadge", "failedNote": "BtKYva_failedNote", "advanced": "BtKYva_advanced", "chips": "BtKYva_chips", "modelName": "BtKYva_modelName", "keySection": "BtKYva_keySection", "chevron": "BtKYva_chevron", "limitsToolbar": "BtKYva_limitsToolbar" };
151
+ var Section_default = { "actions": "N807zW_actions", "advancedGrid": "N807zW_advancedGrid", "badges": "N807zW_badges", "card": "N807zW_card", "cardBody": "N807zW_cardBody", "cardDivider": "N807zW_cardDivider", "cardFolded": "N807zW_cardFolded", "cardHead": "N807zW_cardHead", "cardModels": "N807zW_cardModels", "cardNotes": "N807zW_cardNotes", "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" };
143
152
 
144
153
  // src/client/ModelEditor.tsx
145
154
  var import_jsx_runtime = require("react/jsx-runtime");
155
+ var MODALITY_COPY = {
156
+ text: "modalityText",
157
+ image: "modalityImage",
158
+ audio: "modalityAudio",
159
+ video: "modalityVideo",
160
+ pdf: "modalityPdf"
161
+ };
146
162
  function hasCapacityOverride(limit) {
147
163
  return limit?.contextWindow != null || limit?.maxTokens != null;
148
164
  }
149
- function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visibilitySaving, onEdit, onModelEnabled }) {
165
+ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visibilitySaving, filterAction, onEdit, onModelEnabled }) {
150
166
  const [query, setQuery] = (0, import_react.useState)("");
151
167
  const [filter, setFilter] = (0, import_react.useState)("all");
152
168
  const [selected, setSelected] = (0, import_react.useState)();
@@ -198,67 +214,83 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
198
214
  }
199
215
  }
200
216
  ),
201
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: Section_default.filters, role: "group", "aria-label": t("filterLabel"), children: filters.map(([key, label, count]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
202
- "button",
203
- {
204
- type: "button",
205
- className: Section_default.filter,
206
- "aria-pressed": filter === key,
207
- onClick: () => {
208
- setFilter(key);
217
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.filters, role: "group", "aria-label": t("filterLabel"), children: [
218
+ filters.map(([key, label, count]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
219
+ "button",
220
+ {
221
+ type: "button",
222
+ className: Section_default.filter,
223
+ "aria-pressed": filter === key,
224
+ onClick: () => {
225
+ setFilter(key);
226
+ },
227
+ children: [
228
+ t(label),
229
+ " ",
230
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: count })
231
+ ]
209
232
  },
210
- children: [
211
- t(label),
212
- " ",
213
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: count })
214
- ]
215
- },
216
- key
217
- )) }),
233
+ key
234
+ )),
235
+ filterAction ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.filterAction, children: filterAction }) : null
236
+ ] }),
218
237
  model ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelLayout, children: [
219
- /* @__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)("div", { className: Section_default.modelRow, children: [
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
221
- "button",
222
- {
223
- type: "button",
224
- className: Section_default.modelChoice,
225
- "aria-pressed": entry.id === model.id,
226
- onClick: () => {
227
- setSelected(entry.id);
228
- },
229
- children: [
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: Section_default.modelName, children: [
231
- entry.name ?? entry.id,
232
- " ",
233
- badges(entry)
234
- ] }),
235
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: Section_default.limitsModelId, translate: "no", children: entry.id }),
236
- isNewModel(entry, now) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.releaseDate, children: t("releasedOn", { date: entry.releaseDate }) }) : null
237
- ]
238
- }
239
- ),
240
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
241
- import_dsh_client_ui_primitives.Switch,
242
- {
243
- label: t("modelVisibleLabel", { name: entry.name ?? entry.id }),
244
- checked: isModelEnabled(entry, modelVisibility),
245
- disabled: visibilityDisabled || entry.configurationMissing,
246
- onChange: (enabled) => {
247
- onModelEnabled(entry.id, enabled);
248
- }
249
- }
250
- )
251
- ] }, entry.id)) }),
238
+ /* @__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)(
239
+ "div",
240
+ {
241
+ className: entry.id === model.id ? `${Section_default.modelRow} ${Section_default.modelRowSelected}` : Section_default.modelRow,
242
+ children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
244
+ "button",
245
+ {
246
+ type: "button",
247
+ className: Section_default.modelChoice,
248
+ "aria-pressed": entry.id === model.id,
249
+ onClick: () => {
250
+ setSelected(entry.id);
251
+ },
252
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: Section_default.modelName, children: [
253
+ entry.name ?? entry.id,
254
+ " ",
255
+ badges(entry)
256
+ ] })
257
+ }
258
+ ),
259
+ hasCapacityOverride(draft[entry.id]) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.overrideDot, title: t("overridden"), "aria-hidden": "true" }) : null,
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
261
+ import_dsh_client_ui_primitives.Switch,
262
+ {
263
+ label: t("modelVisibleLabel", { name: entry.name ?? entry.id }),
264
+ checked: isModelEnabled(entry, modelVisibility),
265
+ disabled: visibilityDisabled || entry.configurationMissing,
266
+ onChange: (enabled) => {
267
+ onModelEnabled(entry.id, enabled);
268
+ }
269
+ }
270
+ )
271
+ ]
272
+ },
273
+ entry.id
274
+ )) }),
252
275
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: Section_default.modelDetails, "aria-label": t("modelDetails"), children: [
253
276
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelHeading, children: [
254
277
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: model.name ?? model.id }),
255
278
  badges(model)
256
279
  ] }),
257
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: Section_default.limitsModelId, translate: "no", children: model.id }),
280
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.modelMeta, children: [
281
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: Section_default.limitsModelId, translate: "no", children: model.id }),
282
+ model.releaseDate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.releaseDate, title: t("releaseSource", { date: model.releaseDate }), children: model.releaseDate }) : null
283
+ ] }),
258
284
  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: [
259
285
  model.deprecated ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("deprecatedHint") }) : null,
260
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "contextWindow", limit: draft[model.id], t, locale, disabled, onChange: write }),
261
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "maxTokens", limit: draft[model.id], t, locale, disabled, onChange: write }),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stats, children: [
287
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "contextWindow", limit: draft[model.id], t, locale, disabled, onChange: write }),
288
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Capacity, { model, field: "maxTokens", limit: draft[model.id], t, locale, disabled, onChange: write }),
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stat, children: [
290
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.statLabel, children: t("modalityLabel") }),
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modalities, { model, t })
292
+ ] })
293
+ ] }),
262
294
  hasCapacityOverride(draft[model.id]) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
263
295
  "button",
264
296
  {
@@ -271,18 +303,22 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
271
303
  children: t("limitsResetModel")
272
304
  }
273
305
  ) : null,
274
- model.releaseDate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("releaseSource", { date: model.releaseDate }) }) : null,
275
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("limitsHint") })
306
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: Section_default.paneFoot, children: [
307
+ t("limitsHint"),
308
+ " ",
309
+ t("modalitiesSource"),
310
+ model.inputModalities?.some((modality) => modality !== "text" && modality !== "image") === true ? ` ${t("modalitiesForwarding")}` : ""
311
+ ] })
276
312
  ] })
277
313
  ] })
278
314
  ] }) : models.status === "ready" && all.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: Section_default.hint, children: t("limitsNoMatches", { query }) }) : null,
279
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.head, children: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.limitsFoot, children: [
280
316
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.limitsSummary, children: t("limitsSummary", { count: customized }) }),
281
317
  Object.values(draft).some(hasCapacityOverride) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
282
- "button",
318
+ import_dsh_client_ui_primitives.Button,
283
319
  {
284
- type: "button",
285
- className: Section_default.reset,
320
+ variant: "outline",
321
+ size: "sm",
286
322
  disabled,
287
323
  onClick: () => {
288
324
  onEdit(Object.fromEntries(Object.keys(draft).map((id3) => [id3, null])));
@@ -293,11 +329,23 @@ function ModelEditor({ models, draft, modelVisibility, t, locale, disabled, visi
293
329
  ] })
294
330
  ] });
295
331
  }
332
+ function Modalities({ model, t }) {
333
+ const declared = model.inputModalities;
334
+ if (declared === void 0 || declared.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.hint, children: t("modalityUnknown") });
335
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Section_default.modalities, children: INPUT_MODALITIES.map((modality) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
336
+ "span",
337
+ {
338
+ className: declared.includes(modality) ? Section_default.modality : Section_default.modalityOff,
339
+ children: t(MODALITY_COPY[modality])
340
+ },
341
+ modality
342
+ )) });
343
+ }
296
344
  function Capacity({ model, field, limit, disabled, t, locale, onChange }) {
297
345
  const id3 = `opencode-go-${field}-${encodeURIComponent(model.id)}`;
298
346
  const defaultValue = model[field];
299
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.field, children: [
300
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: Section_default.label, htmlFor: id3, children: t(field === "contextWindow" ? "limitsContext" : "limitsOutput") }),
347
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Section_default.stat, children: [
348
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: Section_default.statLabel, htmlFor: id3, children: t(field === "contextWindow" ? "limitsContext" : "limitsOutput") }),
301
349
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
302
350
  "input",
303
351
  {
@@ -331,7 +379,7 @@ function Capacity({ model, field, limit, disabled, t, locale, onChange }) {
331
379
  var import_jsx_runtime2 = require("react/jsx-runtime");
332
380
  var ChevronDown = primitives.IconChevronDownOutlineRegular ?? primitives.IconChevronDownOutline14;
333
381
  function ValueField(props) {
334
- const hintId = `${props.id}-hint`;
382
+ const hintId = props.id + "-hint";
335
383
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.field, children: [
336
384
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.head, children: [
337
385
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: Section_default.label, htmlFor: props.id, children: props.label }),
@@ -426,6 +474,11 @@ function OpencodeGoSection(props) {
426
474
  function Loaded(props) {
427
475
  const { t, state, loadModels } = props;
428
476
  const [advanced, setAdvanced] = (0, import_react2.useState)(false);
477
+ const [modelsOpen, setModelsOpen] = (0, import_react2.useState)(false);
478
+ const modelNotices = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
479
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ModelsBody, { models: state.models, t, locale: props.locale }),
480
+ state.pickerFailed ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t("pickerFailed") }) : null
481
+ ] });
429
482
  (0, import_react2.useEffect)(() => {
430
483
  if (state.available && state.models.status === "idle") loadModels();
431
484
  }, [state.available, state.models.status, loadModels]);
@@ -443,238 +496,257 @@ function Loaded(props) {
443
496
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.page, children: [
444
497
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.pageBody, children: [
445
498
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.pageTop, children: [
446
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.intro, children: t("intro") }),
499
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: Section_default.title, children: t("titleLabel") }),
500
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.intro, children: t("intro") })
501
+ ] }),
502
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: Section_default.card, children: [
503
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.cardHead, children: [
504
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: Section_default.cardTitle, children: t("enabledLabel") }),
505
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
506
+ import_dsh_client_ui_primitives2.Switch,
507
+ {
508
+ checked: state.enabled,
509
+ label: t("enabledLabel"),
510
+ disabled: disabled || state.saving || state.pickerSaving,
511
+ onChange: props.setEnabled
512
+ }
513
+ )
514
+ ] }),
515
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Section_default.cardBody, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: state.enabled ? t("enabledHint") : t("enabledOff") }) }),
516
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Section_default.cardDivider }),
517
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.cardHead, children: [
518
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.slot, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", focusable: "false", children: [
519
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "5.4", cy: "8", r: "3.1" }),
520
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8.5 8h5.3M11.9 8v2.2M10.2 8v1.6" })
521
+ ] }) }),
522
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: Section_default.label, htmlFor: "opencode-go-key", children: t("keyLabel") }),
523
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.trailing, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: state.apiKeyConfigured ? "success" : "warning", children: state.apiKeyConfigured ? t("keyConfigured") : t("keyMissing") }) })
524
+ ] }),
525
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.cardBody, children: [
526
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
527
+ "input",
528
+ {
529
+ id: "opencode-go-key",
530
+ name: "api-key",
531
+ className: Section_default.input,
532
+ type: "password",
533
+ autoComplete: "off",
534
+ "aria-describedby": "opencode-go-key-hint",
535
+ value: state.apiKey.text,
536
+ disabled: !state.apiKeyWritable,
537
+ onChange: (event) => {
538
+ props.edit("apiKey", event.target.value);
539
+ }
540
+ }
541
+ ),
542
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
543
+ ] })
544
+ ] }),
545
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: modelsOpen ? Section_default.cardModels : Section_default.cardModels + " " + Section_default.cardFolded, children: [
447
546
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
448
547
  "button",
449
548
  {
450
549
  type: "button",
451
- className: Section_default.advancedTrigger,
452
- "aria-expanded": advanced,
453
- "aria-controls": "opencode-go-advanced",
550
+ className: Section_default.cardTrigger,
551
+ "aria-expanded": modelsOpen,
552
+ "aria-controls": "opencode-go-models",
454
553
  onClick: () => {
455
- setAdvanced(!advanced);
554
+ setModelsOpen(!modelsOpen);
456
555
  },
457
556
  children: [
458
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDown, { className: advanced ? Section_default.chevronOpen : Section_default.chevron }),
459
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.label, children: t("advancedLabel") }),
460
- advancedOverridden ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: "neutral", children: t("overridden") }) : null
557
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.cardTitle, children: t("modelsLabel") }),
558
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDown, { className: modelsOpen ? Section_default.chevronOpen : Section_default.chevron })
461
559
  ]
462
560
  }
463
- )
464
- ] }),
465
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: advanced ? Section_default.field : void 0, children: advanced ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id: "opencode-go-advanced", className: Section_default.advanced, children: [
466
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("advancedHint") }),
467
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
468
- ValueField,
469
- {
470
- id: "opencode-go-api-key-env",
471
- label: t("apiKeyEnvLabel"),
472
- hint: t("apiKeyEnvHint"),
473
- field: state.apiKeyEnv,
474
- ...fieldProps,
475
- onEdit: (text) => {
476
- props.edit("apiKeyEnv", text);
477
- },
478
- onReset: () => {
479
- props.resetField("apiKeyEnv");
480
- }
481
- }
482
561
  ),
483
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
484
- ValueField,
485
- {
486
- id: "opencode-go-base-url",
487
- label: t("baseURLLabel"),
488
- hint: t("baseURLHint"),
489
- field: state.baseURL,
490
- ...fieldProps,
491
- onEdit: (text) => {
492
- props.edit("baseURL", text);
493
- },
494
- onReset: () => {
495
- props.resetField("baseURL");
496
- }
497
- }
498
- ),
499
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
500
- ValueField,
501
- {
502
- id: "opencode-go-refresh-minutes",
503
- label: t("refreshMinutesLabel"),
504
- hint: t("refreshMinutesHint"),
505
- field: state.refreshMinutes,
506
- numeric: true,
507
- ...fieldProps,
508
- onEdit: (text) => {
509
- props.edit("refreshMinutes", text);
510
- },
511
- onReset: () => {
512
- props.resetField("refreshMinutes");
513
- }
514
- }
515
- ),
516
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
517
- ValueField,
518
- {
519
- id: "opencode-go-stream-idle",
520
- label: t("streamIdleTimeoutMsLabel"),
521
- hint: t("streamIdleTimeoutMsHint"),
522
- field: state.streamIdleTimeoutMs,
523
- numeric: true,
524
- ...fieldProps,
525
- onEdit: (text) => {
526
- props.edit("streamIdleTimeoutMs", text);
527
- },
528
- onReset: () => {
529
- props.resetField("streamIdleTimeoutMs");
530
- }
531
- }
532
- ),
533
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
534
- ValueField,
535
- {
536
- id: "opencode-go-max-images",
537
- label: t("maxImagesLabel"),
538
- hint: t("maxImagesHint"),
539
- field: state.maxImages,
540
- numeric: true,
541
- ...fieldProps,
542
- onEdit: (text) => {
543
- props.edit("maxImages", text);
544
- },
545
- onReset: () => {
546
- props.resetField("maxImages");
547
- }
548
- }
549
- ),
550
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
551
- ValueField,
552
- {
553
- id: "opencode-go-max-request-image-bytes",
554
- label: t("maxRequestImageBytesLabel"),
555
- hint: t("maxRequestImageBytesHint"),
556
- field: state.maxRequestImageBytes,
557
- numeric: true,
558
- ...fieldProps,
559
- onEdit: (text) => {
560
- props.edit("maxRequestImageBytes", text);
561
- },
562
- onReset: () => {
563
- props.resetField("maxRequestImageBytes");
564
- }
565
- }
566
- ),
567
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
568
- ValueField,
569
- {
570
- id: "opencode-go-image-pixel-budget",
571
- label: t("requestImagePixelBudgetLabel"),
572
- hint: t("requestImagePixelBudgetHint"),
573
- field: state.requestImagePixelBudget,
574
- numeric: true,
575
- ...fieldProps,
576
- onEdit: (text) => {
577
- props.edit("requestImagePixelBudget", text);
578
- },
579
- onReset: () => {
580
- props.resetField("requestImagePixelBudget");
581
- }
582
- }
583
- ),
584
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
585
- ValueField,
586
- {
587
- id: "opencode-go-image-max-bytes",
588
- label: t("requestImageMaxBytesLabel"),
589
- hint: t("requestImageMaxBytesHint"),
590
- field: state.requestImageMaxBytes,
591
- numeric: true,
592
- ...fieldProps,
593
- onEdit: (text) => {
594
- props.edit("requestImageMaxBytes", text);
595
- },
596
- onReset: () => {
597
- props.resetField("requestImageMaxBytes");
598
- }
599
- }
600
- )
601
- ] }) : null }),
602
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.field, children: [
603
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.head, children: [
604
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.label, children: t("enabledLabel") }),
562
+ modelsOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id: "opencode-go-models", className: Section_default.cardBody, children: [
563
+ modelNotices,
605
564
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
606
- import_dsh_client_ui_primitives2.Switch,
565
+ ModelEditor,
607
566
  {
608
- checked: state.enabled,
609
- label: t("enabledLabel"),
610
- disabled: disabled || state.saving || state.pickerSaving,
611
- onChange: props.setEnabled
567
+ models: state.models,
568
+ draft: state.modelLimitDraft,
569
+ t,
570
+ locale: props.locale,
571
+ disabled: disabled || state.saving,
572
+ modelVisibility: state.modelVisibility,
573
+ visibilitySaving: state.pickerSaving,
574
+ filterAction: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
575
+ import_dsh_client_ui_primitives2.Button,
576
+ {
577
+ variant: "outline",
578
+ size: "sm",
579
+ disabled: state.models.status === "loading" || state.models.status === "ready" && state.models.refreshing,
580
+ onClick: loadModels,
581
+ children: t("modelsRefresh")
582
+ }
583
+ ),
584
+ onModelEnabled: props.setModelEnabled,
585
+ onEdit: (next) => {
586
+ props.edit("modelLimits", JSON.stringify(next));
587
+ }
612
588
  }
613
589
  )
614
- ] }),
615
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: state.enabled ? t("enabledHint") : t("enabledOff") })
590
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Section_default.cardNotes, children: modelNotices })
616
591
  ] }),
617
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { className: Section_default.keySection, open: !state.apiKeyConfigured || state.apiKey.text.length > 0, children: [
618
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("summary", { className: Section_default.head, children: [
619
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.label, children: t("keyLabel") }),
620
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.badges, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: state.apiKeyConfigured ? "success" : "warning", children: state.apiKeyConfigured ? t("keyConfigured") : t("keyMissing") }) })
621
- ] }),
622
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
623
- "input",
592
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: Section_default.card, children: [
593
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
594
+ "button",
624
595
  {
625
- id: "opencode-go-key",
626
- "aria-label": t("keyLabel"),
627
- name: "api-key",
628
- className: Section_default.input,
629
- type: "password",
630
- autoComplete: "off",
631
- "aria-describedby": "opencode-go-key-hint",
632
- value: state.apiKey.text,
633
- disabled: !state.apiKeyWritable,
634
- onChange: (event) => {
635
- props.edit("apiKey", event.target.value);
636
- }
596
+ type: "button",
597
+ className: Section_default.cardTrigger,
598
+ "aria-expanded": advanced,
599
+ "aria-controls": "opencode-go-advanced",
600
+ onClick: () => {
601
+ setAdvanced(!advanced);
602
+ },
603
+ children: [
604
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.cardTitle, children: t("advancedLabel") }),
605
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.cardSub, children: t("advancedSummary") }),
606
+ advancedOverridden ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: "neutral", children: t("overridden") }) : null,
607
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDown, { className: advanced ? Section_default.chevronOpen : Section_default.chevron })
608
+ ]
637
609
  }
638
610
  ),
639
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id: "opencode-go-key-hint", className: Section_default.hint, children: state.apiKeyWritable ? t("keyHint") : t("keyNotWritable") })
640
- ] }),
641
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.field, children: [
642
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.head, children: [
643
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Section_default.label, children: t("modelsLabel") }),
644
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: Section_default.badges, children: [
645
- state.models.status === "ready" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tag, { tone: "neutral", children: t("modelsCount", { count: state.models.count }) }) : null,
611
+ advanced ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id: "opencode-go-advanced", className: Section_default.cardBody, children: [
612
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("advancedHint") }),
613
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.advancedGrid, children: [
646
614
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
647
- "button",
615
+ ValueField,
648
616
  {
649
- type: "button",
650
- className: Section_default.reset,
651
- disabled: state.models.status === "loading" || state.models.status === "ready" && state.models.refreshing,
652
- onClick: loadModels,
653
- children: t("modelsRefresh")
617
+ id: "opencode-go-api-key-env",
618
+ label: t("apiKeyEnvLabel"),
619
+ hint: t("apiKeyEnvHint"),
620
+ field: state.apiKeyEnv,
621
+ ...fieldProps,
622
+ onEdit: (text) => {
623
+ props.edit("apiKeyEnv", text);
624
+ },
625
+ onReset: () => {
626
+ props.resetField("apiKeyEnv");
627
+ }
628
+ }
629
+ ),
630
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
631
+ ValueField,
632
+ {
633
+ id: "opencode-go-base-url",
634
+ label: t("baseURLLabel"),
635
+ hint: t("baseURLHint"),
636
+ field: state.baseURL,
637
+ ...fieldProps,
638
+ onEdit: (text) => {
639
+ props.edit("baseURL", text);
640
+ },
641
+ onReset: () => {
642
+ props.resetField("baseURL");
643
+ }
644
+ }
645
+ ),
646
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
647
+ ValueField,
648
+ {
649
+ id: "opencode-go-refresh-minutes",
650
+ label: t("refreshMinutesLabel"),
651
+ hint: t("refreshMinutesHint"),
652
+ field: state.refreshMinutes,
653
+ numeric: true,
654
+ ...fieldProps,
655
+ onEdit: (text) => {
656
+ props.edit("refreshMinutes", text);
657
+ },
658
+ onReset: () => {
659
+ props.resetField("refreshMinutes");
660
+ }
661
+ }
662
+ ),
663
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
664
+ ValueField,
665
+ {
666
+ id: "opencode-go-stream-idle",
667
+ label: t("streamIdleTimeoutMsLabel"),
668
+ hint: t("streamIdleTimeoutMsHint"),
669
+ field: state.streamIdleTimeoutMs,
670
+ numeric: true,
671
+ ...fieldProps,
672
+ onEdit: (text) => {
673
+ props.edit("streamIdleTimeoutMs", text);
674
+ },
675
+ onReset: () => {
676
+ props.resetField("streamIdleTimeoutMs");
677
+ }
678
+ }
679
+ ),
680
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
681
+ ValueField,
682
+ {
683
+ id: "opencode-go-max-images",
684
+ label: t("maxImagesLabel"),
685
+ hint: t("maxImagesHint"),
686
+ field: state.maxImages,
687
+ numeric: true,
688
+ ...fieldProps,
689
+ onEdit: (text) => {
690
+ props.edit("maxImages", text);
691
+ },
692
+ onReset: () => {
693
+ props.resetField("maxImages");
694
+ }
695
+ }
696
+ ),
697
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
698
+ ValueField,
699
+ {
700
+ id: "opencode-go-max-request-image-bytes",
701
+ label: t("maxRequestImageBytesLabel"),
702
+ hint: t("maxRequestImageBytesHint"),
703
+ field: state.maxRequestImageBytes,
704
+ numeric: true,
705
+ ...fieldProps,
706
+ onEdit: (text) => {
707
+ props.edit("maxRequestImageBytes", text);
708
+ },
709
+ onReset: () => {
710
+ props.resetField("maxRequestImageBytes");
711
+ }
712
+ }
713
+ ),
714
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
715
+ ValueField,
716
+ {
717
+ id: "opencode-go-image-pixel-budget",
718
+ label: t("requestImagePixelBudgetLabel"),
719
+ hint: t("requestImagePixelBudgetHint"),
720
+ field: state.requestImagePixelBudget,
721
+ numeric: true,
722
+ ...fieldProps,
723
+ onEdit: (text) => {
724
+ props.edit("requestImagePixelBudget", text);
725
+ },
726
+ onReset: () => {
727
+ props.resetField("requestImagePixelBudget");
728
+ }
729
+ }
730
+ ),
731
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
732
+ ValueField,
733
+ {
734
+ id: "opencode-go-image-max-bytes",
735
+ label: t("requestImageMaxBytesLabel"),
736
+ hint: t("requestImageMaxBytesHint"),
737
+ field: state.requestImageMaxBytes,
738
+ numeric: true,
739
+ ...fieldProps,
740
+ onEdit: (text) => {
741
+ props.edit("requestImageMaxBytes", text);
742
+ },
743
+ onReset: () => {
744
+ props.resetField("requestImageMaxBytes");
745
+ }
654
746
  }
655
747
  )
656
748
  ] })
657
- ] }),
658
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ModelsBody, { models: state.models, t, locale: props.locale })
659
- ] }),
660
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Section_default.field, children: [
661
- state.pickerFailed ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.failedNote, role: "alert", children: t("pickerFailed") }) : null,
662
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
663
- ModelEditor,
664
- {
665
- models: state.models,
666
- draft: state.modelLimitDraft,
667
- t,
668
- locale: props.locale,
669
- disabled: disabled || state.saving,
670
- modelVisibility: state.modelVisibility,
671
- visibilitySaving: state.pickerSaving,
672
- onModelEnabled: props.setModelEnabled,
673
- onEdit: (next) => {
674
- props.edit("modelLimits", JSON.stringify(next));
675
- }
676
- }
677
- )
749
+ ] }) : null
678
750
  ] }),
679
751
  disabled ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: Section_default.hint, children: t("readOnly") }) : null
680
752
  ] }),
@@ -700,6 +772,9 @@ function Loaded(props) {
700
772
  ] });
701
773
  }
702
774
 
775
+ // src/provider-identity.ts
776
+ var PROVIDER_ID = "dsh-opencode-go";
777
+
703
778
  // src/client/staged-form.ts
704
779
  var import_dsh_client_store = require("@deepseek-ai/dsh-client-store");
705
780
  function numberField(field, validate = () => true) {
@@ -956,7 +1031,6 @@ function sameJsonValue(left, right) {
956
1031
  var OPENCODE_GO_NS = "llm-opencode-go";
957
1032
  var DEFAULT_API_KEY_REF = "OPENCODE_API_KEY";
958
1033
  var API_KEY_FIELD = "apiKey";
959
- var OPENCODE_GO_PROVIDER = "opencode-go";
960
1034
  var OpencodeGoSectionController = class {
961
1035
  /**
962
1036
  * @param scope - the bound settings scope for the `llm-opencode-go` namespace.
@@ -964,7 +1038,7 @@ var OpencodeGoSectionController = class {
964
1038
  * answers for the credential the section references.
965
1039
  */
966
1040
  constructor(scope, ctx, readModels = async () => {
967
- const result = await ctx.remote.llm.discoverModels(OPENCODE_GO_NS, { provider: OPENCODE_GO_PROVIDER });
1041
+ const result = await ctx.remote.llm.discoverModels(OPENCODE_GO_NS, { provider: PROVIDER_ID });
968
1042
  return result.ok ? { ok: true, value: { models: result.value, stale: false } } : result;
969
1043
  }) {
970
1044
  this.scope = scope;
@@ -1267,6 +1341,7 @@ var en = {
1267
1341
  usageRefreshing: "Refreshing\u2026",
1268
1342
  nav: "OpenCode Go",
1269
1343
  title: "OpenCode Go",
1344
+ titleLabel: "OpenCode Go",
1270
1345
  intro: "Choose the OpenCode Go models shown in conversations and adjust their capacities.",
1271
1346
  starProject: "Enjoying the plugin? Star it on GitHub",
1272
1347
  starProjectTitle: "Open the GitHub project in a new tab",
@@ -1293,9 +1368,8 @@ var en = {
1293
1368
  modelsSourceUpdated: "Last successful check: {time}",
1294
1369
  modelsRefreshing: "Refreshing\u2026 Keeping the last fetched models visible.",
1295
1370
  modelsEmpty: "The gateway currently serves no model this adapter can route.",
1296
- modelsCount: "{count} models",
1297
1371
  limitsLabel: "Model capacities",
1298
- limitsHint: "Capacities come from the model API. Leave blank to use the default; save to apply your overrides.",
1372
+ limitsHint: "Capacities come from the online configuration; blank keeps the default and Save applies your overrides.",
1299
1373
  limitsFilterLabel: "Find a model",
1300
1374
  limitsFilterPlaceholder: "Search by model name or id\u2026",
1301
1375
  limitsSummary: "{count} customized",
@@ -1304,6 +1378,15 @@ var en = {
1304
1378
  limitsOutput: "Max output",
1305
1379
  capacityDefault: "Default: {value} tokens",
1306
1380
  capacityMissing: "API did not provide a value",
1381
+ modalityLabel: "Input modalities",
1382
+ modalityText: "Text",
1383
+ modalityImage: "Image",
1384
+ modalityAudio: "Audio",
1385
+ modalityVideo: "Video",
1386
+ modalityPdf: "PDF",
1387
+ modalityUnknown: "Not declared",
1388
+ modalitiesSource: "Input modalities come from the online models.dev configuration.",
1389
+ modalitiesForwarding: "This plugin converts and forwards image attachments only.",
1307
1390
  visibilityHint: "Only enabled models appear in conversation pickers. Changes apply immediately. Deprecated models are off by default and can be enabled individually.",
1308
1391
  modelVisibleLabel: "Show {name} in conversations",
1309
1392
  configurationMissing: "Configuration missing",
@@ -1315,7 +1398,6 @@ var en = {
1315
1398
  deprecatedHint: "Marked deprecated by models.dev, but still provided by this gateway.",
1316
1399
  newHint: "Released within the last seven UTC calendar days, according to models.dev.",
1317
1400
  newBadge: "NEW",
1318
- releasedOn: "Released {date}",
1319
1401
  releaseSource: "Release date: {date} \xB7 models.dev",
1320
1402
  modelDetails: "Model configuration",
1321
1403
  filterLabel: "Filter models",
@@ -1329,6 +1411,7 @@ var en = {
1329
1411
  limitsEmpty: "Read the model list first; capacities are edited per model the gateway serves.",
1330
1412
  limitsContextLabel: "Context window for {name}",
1331
1413
  limitsOutputLabel: "Max output for {name}",
1414
+ advancedSummary: "Credential name \xB7 Gateway URL \xB7 Refresh \xB7 Idle timeout \xB7 Image limits",
1332
1415
  advancedLabel: "Advanced settings",
1333
1416
  advancedHint: "Credential name, gateway URL, and adapter tuning. The inherited values work as they are; change them only if you know you need to.",
1334
1417
  apiKeyEnvLabel: "Credential reference",
@@ -1377,6 +1460,7 @@ var zh = {
1377
1460
  usageRefreshing: "\u6B63\u5728\u5237\u65B0\u2026",
1378
1461
  nav: "OpenCode Go",
1379
1462
  title: "OpenCode Go",
1463
+ titleLabel: "OpenCode Go",
1380
1464
  intro: "\u9009\u62E9\u4F1A\u8BDD\u4E2D\u663E\u793A\u7684 OpenCode Go \u6A21\u578B\uFF0C\u5E76\u8C03\u6574\u5176\u5BB9\u91CF\u3002",
1381
1465
  starProject: "\u559C\u6B22\u8FD9\u4E2A\u63D2\u4EF6\uFF1F\u53BB GitHub \u70B9\u4E2A Star",
1382
1466
  starProjectTitle: "\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00 GitHub \u9879\u76EE",
@@ -1403,9 +1487,8 @@ var zh = {
1403
1487
  modelsSourceUpdated: "\u4E0A\u6B21\u6210\u529F\u68C0\u67E5\uFF1A{time}",
1404
1488
  modelsRefreshing: "\u6B63\u5728\u5237\u65B0\uFF0C\u6682\u65F6\u4FDD\u7559\u4E0A\u6B21\u83B7\u53D6\u7684\u6A21\u578B\u3002",
1405
1489
  modelsEmpty: "\u7F51\u5173\u5F53\u524D\u6CA1\u6709\u672C\u9002\u914D\u5668\u53EF\u8DEF\u7531\u7684\u6A21\u578B\u3002",
1406
- modelsCount: "{count} \u4E2A\u6A21\u578B",
1407
1490
  limitsLabel: "\u6A21\u578B\u5BB9\u91CF",
1408
- limitsHint: "\u5BB9\u91CF\u6765\u81EA\u6A21\u578B API\u3002\u7559\u7A7A\u4F7F\u7528\u9ED8\u8BA4\u503C\uFF0C\u4FEE\u6539\u540E\u4FDD\u5B58\u751F\u6548\u3002",
1491
+ limitsHint: "\u5BB9\u91CF\u6765\u81EA\u5728\u7EBF\u6A21\u578B\u914D\u7F6E\uFF1B\u7559\u7A7A\u7528\u9ED8\u8BA4\u503C\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002",
1409
1492
  limitsFilterLabel: "\u67E5\u627E\u6A21\u578B",
1410
1493
  limitsFilterPlaceholder: "\u6309\u6A21\u578B\u540D\u79F0\u6216 ID \u641C\u7D22\u2026",
1411
1494
  limitsSummary: "{count} \u4E2A\u5DF2\u81EA\u5B9A\u4E49",
@@ -1414,6 +1497,15 @@ var zh = {
1414
1497
  limitsOutput: "\u6700\u5927\u8F93\u51FA",
1415
1498
  capacityDefault: "\u9ED8\u8BA4\uFF1A{value} tokens",
1416
1499
  capacityMissing: "API \u672A\u63D0\u4F9B",
1500
+ modalityLabel: "\u8F93\u5165\u6A21\u6001",
1501
+ modalityText: "\u6587\u672C",
1502
+ modalityImage: "\u56FE\u50CF",
1503
+ modalityAudio: "\u97F3\u9891",
1504
+ modalityVideo: "\u89C6\u9891",
1505
+ modalityPdf: "PDF",
1506
+ modalityUnknown: "\u672A\u58F0\u660E",
1507
+ modalitiesSource: "\u8F93\u5165\u6A21\u6001\u6765\u81EA models.dev \u7684\u5728\u7EBF\u914D\u7F6E\u3002",
1508
+ modalitiesForwarding: "\u672C\u63D2\u4EF6\u76EE\u524D\u4EC5\u8F6C\u6362\u5E76\u8F6C\u53D1\u56FE\u50CF\u9644\u4EF6\u3002",
1417
1509
  visibilityHint: "\u5F00\u542F\u7684\u6A21\u578B\u624D\u4F1A\u663E\u793A\u5728\u4F1A\u8BDD\u9009\u62E9\u5668\u4E2D\uFF0C\u4FEE\u6539\u7ACB\u5373\u751F\u6548\u3002\u8FC7\u65F6\u6A21\u578B\u9ED8\u8BA4\u5173\u95ED\uFF0C\u53EF\u5355\u72EC\u5F00\u542F\u3002",
1418
1510
  modelVisibleLabel: "\u5728\u4F1A\u8BDD\u4E2D\u663E\u793A {name}",
1419
1511
  configurationMissing: "\u914D\u7F6E\u7F3A\u5931",
@@ -1425,7 +1517,6 @@ var zh = {
1425
1517
  deprecatedHint: "models.dev \u6807\u8BB0\u4E3A\u5DF2\u5F03\u7528\uFF0C\u5F53\u524D\u7F51\u5173\u4ECD\u63D0\u4F9B\u6B64\u6A21\u578B\u3002",
1426
1518
  newHint: "\u4F9D\u636E models.dev \u53D1\u5E03\u65E5\u671F\uFF0C\u8FD1\u4E03\u4E2A UTC \u65E5\u5386\u65E5\u5185\u53D1\u5E03\u3002",
1427
1519
  newBadge: "\u65B0",
1428
- releasedOn: "{date} \u53D1\u5E03",
1429
1520
  releaseSource: "\u53D1\u5E03\u65E5\u671F\uFF1A{date} \xB7 models.dev",
1430
1521
  modelDetails: "\u6A21\u578B\u914D\u7F6E",
1431
1522
  filterLabel: "\u7B5B\u9009\u6A21\u578B",
@@ -1439,6 +1530,7 @@ var zh = {
1439
1530
  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",
1440
1531
  limitsContextLabel: "{name} \u7684\u4E0A\u4E0B\u6587\u7A97\u53E3",
1441
1532
  limitsOutputLabel: "{name} \u7684\u6700\u5927\u8F93\u51FA",
1533
+ advancedSummary: "\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",
1442
1534
  advancedLabel: "\u9AD8\u7EA7\u8BBE\u7F6E",
1443
1535
  advancedHint: "\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\u9664\u975E\u4F60\u660E\u786E\u77E5\u9053\u9700\u8981\u4FEE\u6539\uFF0C\u5426\u5219\u4E0D\u5FC5\u52A8\u8FD9\u91CC\u3002",
1444
1536
  apiKeyEnvLabel: "\u51ED\u8BC1\u5F15\u7528\u540D",
@@ -1516,16 +1608,16 @@ var goRemote = {
1516
1608
  // src/client/UsagePill.tsx
1517
1609
  var import_react3 = require("react");
1518
1610
 
1519
- // plugin-css:/Users/tanglei/Desktop/dsh-opencode-go/src/client/UsagePill.module.css
1611
+ // plugin-css:src/client/UsagePill.module.css
1520
1612
  var id2 = "dsh-opencode-go/UsagePill.module.css";
1521
1613
  if (!document.querySelector("style[data-plugin-css=" + JSON.stringify(id2) + "]")) {
1522
1614
  const style = document.createElement("style");
1523
1615
  style.dataset.plugin = "dsh-opencode-go";
1524
1616
  style.dataset.pluginCss = id2;
1525
- style.textContent = ".dmPm3q_root{min-width:0;display:inline-flex;position:relative}.dmPm3q_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}.dmPm3q_trigger:hover,.dmPm3q_trigger:focus-visible{opacity:1;background:color-mix(in srgb, currentColor 8%, transparent)}.dmPm3q_panel{z-index:100;box-sizing:border-box;border:1px solid color-mix(in srgb, currentColor 18%, transparent);width:280px;max-width:calc(100vw - 32px);max-height:70vh;color:var(--dsw-alias-label-primary,CanvasText);isolation:isolate;background-color:canvas;background-image:linear-gradient(var(--dsw-specific-menu,transparent), var(--dsw-specific-menu,transparent)), linear-gradient(var(--dsw-alias-bg-layer-2,Canvas), var(--dsw-alias-bg-layer-2,Canvas));border-radius:12px;padding:16px;font-size:12px;position:absolute;bottom:calc(100% + 12px);right:0;overflow-y:auto;box-shadow:0 8px 30px #0003}.dmPm3q_hint{opacity:.65;font-size:11px;line-height:1.6}.dmPm3q_warning{background:color-mix(in srgb, currentColor 6%, transparent);overflow-wrap:anywhere;border-radius:6px;margin:10px 0;padding:10px;line-height:1.5}.dmPm3q_warning p{margin:5px 0 0}.dmPm3q_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}.dmPm3q_retry:disabled{opacity:.6;cursor:default}.dmPm3q_retry:focus-visible{outline-offset:2px;outline:2px solid}.dmPm3q_window{margin-top:14px}.dmPm3q_row{justify-content:space-between;margin-bottom:5px;display:flex}.dmPm3q_window progress{appearance:none;background:color-mix(in srgb, currentColor 15%, transparent);border:0;border-radius:4px;width:100%;height:5px;margin-bottom:5px;display:block}.dmPm3q_window progress::-webkit-progress-bar{background:0 0;border-radius:4px}.dmPm3q_window progress::-webkit-progress-value{background:#39a878;border-radius:4px}.dmPm3q_window progress::-moz-progress-bar{background:#39a878;border-radius:4px}.dmPm3q_window progress.dmPm3q_high::-webkit-progress-value{background:#e0a100}.dmPm3q_window progress.dmPm3q_high::-moz-progress-bar{background:#e0a100}.dmPm3q_window progress.dmPm3q_limited::-webkit-progress-value{background:#e5484d}.dmPm3q_window progress.dmPm3q_limited::-moz-progress-bar{background:#e5484d}.dmPm3q_limitedText{color:#e5484d;margin-top:2px;font-weight:600}";
1617
+ 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_panel{z-index:100;box-sizing:border-box;border:1px solid color-mix(in srgb, currentColor 18%, transparent);width:280px;max-width:calc(100vw - 32px);max-height:70vh;color:var(--dsw-alias-label-primary,CanvasText);isolation:isolate;background-color:canvas;background-image:linear-gradient(var(--dsw-specific-menu,transparent), var(--dsw-specific-menu,transparent)), linear-gradient(var(--dsw-alias-bg-layer-2,Canvas), var(--dsw-alias-bg-layer-2,Canvas));border-radius:12px;padding:16px;font-size:12px;position:absolute;bottom:calc(100% + 12px);right:0;overflow-y:auto;box-shadow:0 8px 30px #0003}.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_retry:focus-visible{outline-offset:2px;outline:2px solid}.mAjYhq_window{margin-top:14px}.mAjYhq_row{justify-content:space-between;margin-bottom:5px;display:flex}.mAjYhq_window progress{appearance:none;background:color-mix(in srgb, currentColor 15%, transparent);border:0;border-radius:4px;width:100%;height:5px;margin-bottom:5px;display:block}.mAjYhq_window progress::-webkit-progress-bar{background:0 0;border-radius:4px}.mAjYhq_window progress::-webkit-progress-value{background:#39a878;border-radius:4px}.mAjYhq_window progress::-moz-progress-bar{background:#39a878;border-radius:4px}.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}";
1526
1618
  document.head.appendChild(style);
1527
1619
  }
1528
- var UsagePill_default = { "row": "dmPm3q_row", "limitedText": "dmPm3q_limitedText", "high": "dmPm3q_high", "hint": "dmPm3q_hint", "warning": "dmPm3q_warning", "window": "dmPm3q_window", "panel": "dmPm3q_panel", "root": "dmPm3q_root", "retry": "dmPm3q_retry", "limited": "dmPm3q_limited", "trigger": "dmPm3q_trigger" };
1620
+ var UsagePill_default = { "high": "mAjYhq_high", "hint": "mAjYhq_hint", "limited": "mAjYhq_limited", "limitedText": "mAjYhq_limitedText", "panel": "mAjYhq_panel", "retry": "mAjYhq_retry", "root": "mAjYhq_root", "row": "mAjYhq_row", "trigger": "mAjYhq_trigger", "warning": "mAjYhq_warning", "window": "mAjYhq_window" };
1529
1621
 
1530
1622
  // src/client/UsagePill.tsx
1531
1623
  var import_jsx_runtime3 = require("react/jsx-runtime");
@@ -1546,7 +1638,7 @@ function usageLevel(window) {
1546
1638
  }
1547
1639
  function UsagePill({ directory, ...props }) {
1548
1640
  const state = (0, import_react3.useSyncExternalStore)(directory.subscribe, directory.getSnapshot, directory.getSnapshot);
1549
- return state.current?.provider === "opencode-go" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ActiveUsage, { ...props }) : null;
1641
+ return state.current?.provider === PROVIDER_ID ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ActiveUsage, { ...props }) : null;
1550
1642
  }
1551
1643
  function ActiveUsage({ readUsage, t, getLocale }) {
1552
1644
  const [snapshot, setSnapshot] = (0, import_react3.useState)(null);