@mofeng2223/dsh-claude-provider 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +192 -98
  2. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -56,7 +56,7 @@ window.__ModuleLoader__.load({
56
56
  }
57
57
  //#endregion
58
58
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-models/src/client/ModelsSection.module.css.mjs
59
- const css$3 = ".zGbnIq_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}.zGbnIq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.zGbnIq_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}.zGbnIq_notice{color:var(--dsw-alias-state-warn-label);margin:0;font-size:12px;line-height:18px}.zGbnIq_savedNotice{color:var(--dsw-alias-state-success-primary);margin:0;font-size:12px;line-height:18px}.zGbnIq_rows{flex-direction:column;gap:8px;margin:12px 0 0;padding:0;list-style:none;display:flex}.zGbnIq_rowCard{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:12px;padding:12px 14px;display:flex}.zGbnIq_rowHead{align-items:center;gap:10px;display:flex}.zGbnIq_rowIdentity{align-items:center;gap:6px;min-width:0;display:inline-flex}.zGbnIq_rowName{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}.zGbnIq_rowTag{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);color:var(--dsw-alias-label-secondary);flex:none;padding:1px 6px;font-size:11px;line-height:16px}.zGbnIq_credentialDot{box-sizing:border-box;corner-shape:round;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.zGbnIq_credentialDotConfigured{background:var(--dsw-alias-state-success-primary)}.zGbnIq_credentialDotMissing{background:var(--dsw-alias-state-error-primary)}.zGbnIq_rowActions{align-items:center;gap:4px;margin-left:auto;display:inline-flex}.zGbnIq_primaryButton,.zGbnIq_secondaryButton,.zGbnIq_addButton{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;font:inherit;cursor:pointer;border:none;justify-content:center;align-items:center;gap:4px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.zGbnIq_primaryButton{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.zGbnIq_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.zGbnIq_secondaryButton,.zGbnIq_addButton{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);background:0 0}.zGbnIq_secondaryButton:hover:not(:disabled),.zGbnIq_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.zGbnIq_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.zGbnIq_dangerButton{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-state-error-primary);font:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.zGbnIq_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.zGbnIq_rowActions .zGbnIq_secondaryButton,.zGbnIq_rowActions .zGbnIq_dangerButton{border-radius:var(--dsw-radius-sm);height:28px;padding:0 10px;font-size:12px;line-height:18px}.zGbnIq_primaryButton:disabled,.zGbnIq_secondaryButton:disabled,.zGbnIq_dangerButton:disabled,.zGbnIq_addButton:disabled,.zGbnIq_linkButton:disabled,.zGbnIq_addModelButton:disabled{opacity:.4;cursor:default}.zGbnIq_primaryButton:focus-visible,.zGbnIq_secondaryButton:focus-visible,.zGbnIq_dangerButton:focus-visible,.zGbnIq_addButton:focus-visible,.zGbnIq_linkButton:focus-visible,.zGbnIq_addModelButton:focus-visible,.zGbnIq_iconButton:focus-visible,.zGbnIq_customizedSummary:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}.zGbnIq_editor{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:14px;padding:14px 16px;display:flex}.zGbnIq_editorHeader{align-items:baseline;gap:8px;display:flex}.zGbnIq_editorTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}.zGbnIq_editorRoute{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.zGbnIq_field{flex-direction:column;gap:6px;display:flex}.zGbnIq_fieldLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:10px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}.zGbnIq_linkButton{box-sizing:border-box;border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;align-items:center;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.zGbnIq_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.zGbnIq_advancedHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.zGbnIq_editorActions{justify-content:flex-end;gap:8px;display:flex}.zGbnIq_addBlock{flex-direction:column;gap:12px;display:flex}.zGbnIq_addActions{display:flex}.zGbnIq_addButton{border:1px dashed var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex:1 1 0;gap:6px;min-width:180px;height:44px}.zGbnIq_addModes{flex-direction:column;align-items:flex-start;gap:8px;display:flex}.zGbnIq_addPanel{flex-direction:column;gap:14px;display:flex}.zGbnIq_addPanel[hidden]{display:none}.zGbnIq_addCard,.zGbnIq_setupCard{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:14px;padding:14px 16px;list-style:none;display:flex}.zGbnIq_addCard .zGbnIq_editor,.zGbnIq_setupCard .zGbnIq_editor{background:0 0;padding:0}.zGbnIq_customized{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:10px}.zGbnIq_customizedSummary{border-radius:var(--dsw-radius-sm);cursor:pointer;width:fit-content;color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;margin-left:-4px;padding:2px 4px;font-size:12px;font-weight:500;line-height:18px;list-style:none;display:flex}.zGbnIq_customizedSummary::-webkit-details-marker{display:none}.zGbnIq_customizedSummary:before{content:\"\";border-bottom:1.5px solid;border-right:1.5px solid;width:5px;height:5px;transition:transform .12s;transform:rotate(-45deg)translate(-1px,-1px)}.zGbnIq_customized[open]>.zGbnIq_customizedSummary:before{transform:rotate(45deg)translate(-1px,-1px)}.zGbnIq_customizedSummary:hover{color:var(--dsw-alias-label-primary)}.zGbnIq_customizedBody{flex-direction:column;gap:12px;padding-top:12px;display:flex}.zGbnIq_modelCatalog{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:10px;padding-top:12px;display:flex}.zGbnIq_modelCatalogHeading{flex-direction:column;gap:2px;display:flex}.zGbnIq_modelCatalogTitle{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.zGbnIq_modelCatalogMeta,.zGbnIq_modelEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.zGbnIq_modelList{flex-direction:column;gap:8px;display:flex}.zGbnIq_modelListHead{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.zGbnIq_modelEntry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);padding:6px}.zGbnIq_modelRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto;align-items:center;gap:6px;display:grid}.zGbnIq_iconButton{box-sizing:border-box;border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}.zGbnIq_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.zGbnIq_iconButton:disabled{cursor:default;opacity:.4}.zGbnIq_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.zGbnIq_modelAdvanced{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 4px 2px;display:grid}.zGbnIq_modelField{flex-direction:column;gap:4px;min-width:0;display:flex}.zGbnIq_modelInputTypes{border:none;grid-column:1/-1;min-width:0;margin:0;padding:0}.zGbnIq_modelInputTypes legend{margin-bottom:4px;padding:0}.zGbnIq_modelInputChoices{flex-wrap:wrap;align-items:center;gap:16px;min-height:32px;display:flex}.zGbnIq_modelFieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.zGbnIq_modelEmpty{border:1px dashed var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);text-align:center;padding:12px}.zGbnIq_addModelButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;align-self:flex-start;align-items:center;gap:4px;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.zGbnIq_addModelButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.zGbnIq_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);padding:0 10px;font-size:14px;line-height:22px}select.zGbnIq_input{cursor:pointer;max-width:240px}.zGbnIq_input:focus{border-color:var(--dsw-alias-state-business-primary);outline:none}.zGbnIq_input::placeholder{color:var(--dsw-alias-label-dimmed)}.zGbnIq_input:disabled{opacity:.6;cursor:default}.zGbnIq_selectInput{appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 12px;padding-right:32px}.zGbnIq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}.zGbnIq_deleteDialog{width:min(480px,100%)}.zGbnIq_deleteConfirm:not(:disabled){border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.zGbnIq_deleteConfirm:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.zGbnIq_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.zGbnIq_customizedSummary:before,.zGbnIq_switchThumb{transition:none}}.zGbnIq_fetchDialog{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);max-width:520px}.zGbnIq_candidateToolbar{align-items:center;gap:8px;margin-bottom:6px;display:flex}.zGbnIq_candidateSearch{flex:240px;min-width:0}.zGbnIq_candidateList{flex-direction:column;gap:2px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.zGbnIq_candidate{border-radius:var(--dsw-radius-md)}.zGbnIq_candidateLabel{cursor:pointer;align-items:center;gap:8px;padding:6px 8px;display:flex}.zGbnIq_candidateId{min-width:0;font-family:var(--ds-font-family-code);text-overflow:ellipsis;white-space:nowrap;flex:auto;font-size:13px;overflow:hidden}.zGbnIq_candidateEmpty{color:var(--dsw-alias-label-secondary);text-align:center;margin:24px 0;font-size:13px;line-height:20px}";
59
+ const css$3 = ".zGbnIq_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}.zGbnIq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.zGbnIq_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}.zGbnIq_notice{color:var(--dsw-alias-state-warn-label);margin:0;font-size:12px;line-height:18px}.zGbnIq_savedNotice{color:var(--dsw-alias-state-success-primary);margin:0;font-size:12px;line-height:18px}.zGbnIq_rows{flex-direction:column;gap:8px;margin:12px 0 0;padding:0;list-style:none;display:flex}.zGbnIq_rowCard{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:12px;padding:12px 14px;display:flex}.zGbnIq_rowHead{align-items:center;gap:10px;display:flex}.zGbnIq_rowIdentity{align-items:center;gap:6px;min-width:0;display:inline-flex}.zGbnIq_rowName{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}.zGbnIq_rowTag{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);color:var(--dsw-alias-label-secondary);flex:none;padding:1px 6px;font-size:11px;line-height:16px}.zGbnIq_credentialDot{box-sizing:border-box;corner-shape:round;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.zGbnIq_credentialDotConfigured{background:var(--dsw-alias-state-success-primary)}.zGbnIq_credentialDotMissing{background:var(--dsw-alias-state-error-primary)}.zGbnIq_accountStatus{color:var(--dsw-alias-state-success-primary);flex:none;align-items:center;gap:6px;font-size:13px;line-height:20px;display:inline-flex}.zGbnIq_rowActions{align-items:center;gap:4px;margin-left:auto;display:inline-flex}.zGbnIq_primaryButton,.zGbnIq_secondaryButton,.zGbnIq_addButton{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;font:inherit;cursor:pointer;border:none;justify-content:center;align-items:center;gap:4px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.zGbnIq_primaryButton{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.zGbnIq_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.zGbnIq_secondaryButton,.zGbnIq_addButton{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);background:0 0}.zGbnIq_secondaryButton:hover:not(:disabled),.zGbnIq_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.zGbnIq_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.zGbnIq_dangerButton{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-state-error-primary);font:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.zGbnIq_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.zGbnIq_rowActions .zGbnIq_secondaryButton,.zGbnIq_rowActions .zGbnIq_dangerButton{border-radius:var(--dsw-radius-sm);height:28px;padding:0 10px;font-size:12px;line-height:18px}.zGbnIq_primaryButton:disabled,.zGbnIq_secondaryButton:disabled,.zGbnIq_dangerButton:disabled,.zGbnIq_addButton:disabled,.zGbnIq_linkButton:disabled,.zGbnIq_addModelButton:disabled{opacity:.4;cursor:default}.zGbnIq_primaryButton:focus-visible,.zGbnIq_secondaryButton:focus-visible,.zGbnIq_dangerButton:focus-visible,.zGbnIq_addButton:focus-visible,.zGbnIq_linkButton:focus-visible,.zGbnIq_addModelButton:focus-visible,.zGbnIq_iconButton:focus-visible,.zGbnIq_customizedSummary:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}.zGbnIq_editor{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:14px;padding:14px 16px;display:flex}.zGbnIq_editorHeader{align-items:baseline;gap:8px;display:flex}.zGbnIq_editorTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}.zGbnIq_editorRoute{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.zGbnIq_field{flex-direction:column;gap:6px;display:flex}.zGbnIq_fieldLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:10px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}.zGbnIq_helpButton{border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);font:inherit;text-align:center;cursor:help;background:0 0;border-radius:50%;padding:0;font-size:11px;line-height:15px}.zGbnIq_helpButton:hover,.zGbnIq_helpButton:focus-visible{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-tertiary)}.zGbnIq_linkButton{box-sizing:border-box;border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;align-items:center;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.zGbnIq_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.zGbnIq_advancedHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.zGbnIq_editorActions{justify-content:flex-end;gap:8px;display:flex}.zGbnIq_addBlock{flex-direction:column;gap:12px;display:flex}.zGbnIq_addActions{display:flex}.zGbnIq_addButton{border:1px dashed var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex:1 1 0;gap:6px;min-width:180px;height:44px}.zGbnIq_addModes{flex-direction:column;align-items:flex-start;gap:8px;display:flex}.zGbnIq_addPanel{flex-direction:column;gap:14px;display:flex}.zGbnIq_addPanel[hidden]{display:none}.zGbnIq_addCard,.zGbnIq_setupCard{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:14px;padding:14px 16px;list-style:none;display:flex}.zGbnIq_addCard .zGbnIq_editor,.zGbnIq_setupCard .zGbnIq_editor{background:0 0;padding:0}.zGbnIq_customized{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:10px}.zGbnIq_customizedSummary{border-radius:var(--dsw-radius-sm);cursor:pointer;width:fit-content;color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;margin-left:-4px;padding:2px 4px;font-size:12px;font-weight:500;line-height:18px;list-style:none;display:flex}.zGbnIq_customizedSummary::-webkit-details-marker{display:none}.zGbnIq_customizedSummary:before{content:\"\";border-bottom:1.5px solid;border-right:1.5px solid;width:5px;height:5px;transition:transform .12s;transform:rotate(-45deg)translate(-1px,-1px)}.zGbnIq_customized[open]>.zGbnIq_customizedSummary:before{transform:rotate(45deg)translate(-1px,-1px)}.zGbnIq_customizedSummary:hover{color:var(--dsw-alias-label-primary)}.zGbnIq_customizedBody{flex-direction:column;gap:12px;padding-top:12px;display:flex}.zGbnIq_modelCatalog{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:10px;padding-top:12px;display:flex}.zGbnIq_modelCatalogHeading{flex-direction:column;gap:2px;display:flex}.zGbnIq_modelCatalogTitle{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.zGbnIq_modelCatalogMeta,.zGbnIq_modelEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.zGbnIq_modelList{flex-direction:column;gap:8px;display:flex}.zGbnIq_modelListHead{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.zGbnIq_modelEntry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);padding:6px}.zGbnIq_modelRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto;align-items:center;gap:6px;display:grid}.zGbnIq_iconButton{box-sizing:border-box;border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}.zGbnIq_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.zGbnIq_iconButton:disabled{cursor:default;opacity:.4}.zGbnIq_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.zGbnIq_modelAdvanced{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 4px 2px;display:grid}.zGbnIq_modelField{flex-direction:column;gap:4px;min-width:0;display:flex}.zGbnIq_modelInputTypes{border:none;grid-column:1/-1;min-width:0;margin:0;padding:0}.zGbnIq_modelInputTypes legend{margin-bottom:4px;padding:0}.zGbnIq_modelInputChoices{flex-wrap:wrap;align-items:center;gap:16px;min-height:32px;display:flex}.zGbnIq_modelFieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.zGbnIq_modelEmpty{border:1px dashed var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);text-align:center;padding:12px}.zGbnIq_addModelButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;align-self:flex-start;align-items:center;gap:4px;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.zGbnIq_addModelButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.zGbnIq_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);padding:0 10px;font-size:14px;line-height:22px}select.zGbnIq_input{cursor:pointer;max-width:240px}.zGbnIq_input:focus{border-color:var(--dsw-alias-state-business-primary);outline:none}.zGbnIq_input::placeholder{color:var(--dsw-alias-label-dimmed)}.zGbnIq_input:disabled{opacity:.6;cursor:default}.zGbnIq_keyInput{position:relative}.zGbnIq_keyInputFilled{padding-right:40px}.zGbnIq_keyToggle{border-radius:var(--dsw-radius-md);width:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset:1px 1px 1px auto}.zGbnIq_keyToggle:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.zGbnIq_keyToggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.zGbnIq_keyToggle:disabled{opacity:.6;cursor:default}.zGbnIq_selectInput{appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 12px;padding-right:32px}.zGbnIq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}.zGbnIq_deleteDialog{width:min(480px,100%)}.zGbnIq_deleteConfirm:not(:disabled){border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.zGbnIq_deleteConfirm:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.zGbnIq_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.zGbnIq_customizedSummary:before,.zGbnIq_switchThumb{transition:none}}.zGbnIq_fetchDialog{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);max-width:520px}.zGbnIq_candidateToolbar{align-items:center;gap:8px;margin-bottom:6px;display:flex}.zGbnIq_candidateSearch{flex:240px;min-width:0}.zGbnIq_candidateList{flex-direction:column;gap:2px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.zGbnIq_candidate{border-radius:var(--dsw-radius-md)}.zGbnIq_candidateLabel{cursor:pointer;align-items:center;gap:8px;padding:6px 8px;display:flex}.zGbnIq_candidateId{min-width:0;font-family:var(--ds-font-family-code);text-overflow:ellipsis;white-space:nowrap;flex:auto;font-size:13px;overflow:hidden}.zGbnIq_candidateEmpty{color:var(--dsw-alias-label-secondary);text-align:center;margin:24px 0;font-size:13px;line-height:20px}";
60
60
  const tagId$3 = "@mofeng2223/dsh-claude-provider/ModelsSection.module.css";
61
61
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
62
62
  const tag = document.createElement("style");
@@ -66,6 +66,7 @@ window.__ModuleLoader__.load({
66
66
  document.head.appendChild(tag);
67
67
  }
68
68
  var ModelsSection_module_css_default = {
69
+ "accountStatus": "zGbnIq_accountStatus",
69
70
  "addActions": "zGbnIq_addActions",
70
71
  "addBlock": "zGbnIq_addBlock",
71
72
  "addButton": "zGbnIq_addButton",
@@ -99,11 +100,15 @@ window.__ModuleLoader__.load({
99
100
  "fetchDialog": "zGbnIq_fetchDialog",
100
101
  "field": "zGbnIq_field",
101
102
  "fieldLabel": "zGbnIq_fieldLabel",
103
+ "helpButton": "zGbnIq_helpButton",
102
104
  "hiddenLabel": "zGbnIq_hiddenLabel",
103
105
  "iconButton": "zGbnIq_iconButton",
104
106
  "iconButtonDanger": "zGbnIq_iconButtonDanger",
105
107
  "input": "zGbnIq_input",
106
108
  "intro": "zGbnIq_intro",
109
+ "keyInput": "zGbnIq_keyInput",
110
+ "keyInputFilled": "zGbnIq_keyInputFilled",
111
+ "keyToggle": "zGbnIq_keyToggle",
107
112
  "linkButton": "zGbnIq_linkButton",
108
113
  "modelAdvanced": "zGbnIq_modelAdvanced",
109
114
  "modelCatalog": "zGbnIq_modelCatalog",
@@ -137,6 +142,55 @@ window.__ModuleLoader__.load({
137
142
  "title": "zGbnIq_title"
138
143
  };
139
144
  //#endregion
145
+ //#region lib/types/client/ApiKeyInput.js
146
+ /** Write-only credential input with the same reveal behavior as masked conversation text. */
147
+ const EYE_CONTOUR = "M1.5 8C2.9 5.25 5.25 3.5 8 3.5C10.75 3.5 13.1 5.25 14.5 8C13.1 10.75 10.75 12.5 8 12.5C5.25 12.5 2.9 10.75 1.5 8Z";
148
+ const EYE_PATH = `${EYE_CONTOUR}M10 8C10 9.1 9.1 10 8 10C6.9 10 6 9.1 6 8C6 6.9 6.9 6 8 6C9.1 6 10 6.9 10 8Z`;
149
+ const EYE_OFF_PATH = `${EYE_CONTOUR}M2.5 2.5L13.5 13.5`;
150
+ /**
151
+ * Reveal only a nonempty draft; a different value starts masked, as in SecretText.
152
+ * @param props - current draft, input attributes, and translated control labels.
153
+ * @returns a password input with an optional reveal button.
154
+ */
155
+ function ApiKeyInput({ value, t, ...props }) {
156
+ const [revealedValue, setRevealedValue] = (0, react.useState)();
157
+ const revealed = value.length > 0 && revealedValue === value;
158
+ return (0, react_jsx_runtime.jsxs)("div", {
159
+ className: ModelsSection_module_css_default["keyInput"],
160
+ children: [(0, react_jsx_runtime.jsx)("input", {
161
+ ...props,
162
+ className: `${ModelsSection_module_css_default["input"]} ${value.length > 0 ? ModelsSection_module_css_default["keyInputFilled"] : ""}`,
163
+ type: revealed ? "text" : "password",
164
+ autoComplete: "new-password",
165
+ value,
166
+ onChange: (event) => {
167
+ setRevealedValue(void 0);
168
+ props.onChange?.(event);
169
+ }
170
+ }), value.length === 0 ? null : (0, react_jsx_runtime.jsx)("button", {
171
+ type: "button",
172
+ className: ModelsSection_module_css_default["keyToggle"],
173
+ "aria-label": t(revealed ? "keyHide" : "keyReveal"),
174
+ "aria-pressed": revealed,
175
+ disabled: props.disabled,
176
+ onClick: () => {
177
+ setRevealedValue(revealed ? void 0 : value);
178
+ },
179
+ children: (0, react_jsx_runtime.jsx)("svg", {
180
+ width: "16",
181
+ height: "16",
182
+ viewBox: "0 0 16 16",
183
+ fill: "none",
184
+ stroke: "currentColor",
185
+ strokeWidth: 1.3,
186
+ strokeLinecap: "round",
187
+ "aria-hidden": "true",
188
+ children: (0, react_jsx_runtime.jsx)("path", { d: revealed ? EYE_OFF_PATH : EYE_PATH })
189
+ })
190
+ })]
191
+ });
192
+ }
193
+ //#endregion
140
194
  //#region lib/types/client/EditorFooter.js
141
195
  /**
142
196
  * Render one provider card's action row.
@@ -926,6 +980,9 @@ window.__ModuleLoader__.load({
926
980
  settingsPath: [...entry.settingsPath],
927
981
  active: active.has(entry.provider),
928
982
  ...entry.declared === void 0 ? {} : { declared: entry.declared },
983
+ ...entry.defaultBaseURL === void 0 ? {} : { defaultBaseURL: entry.defaultBaseURL },
984
+ ...entry.baseURLEnv === void 0 ? {} : { baseURLEnv: entry.baseURLEnv },
985
+ ...entry.nativeAuth === void 0 ? {} : { nativeAuth: entry.nativeAuth },
929
986
  ...entry.error === void 0 ? {} : { error: entry.error }
930
987
  }));
931
988
  for (const provider of registered) {
@@ -1053,7 +1110,9 @@ window.__ModuleLoader__.load({
1053
1110
  }
1054
1111
  const mirrored = this.describeFace.getSnapshot();
1055
1112
  if (mirrored.view === void 0) {
1056
- this.failLoad(mirrored.error ?? "settings are unavailable in this browser");
1113
+ /* v8 ignore next -- SettingsDescribeFace.ensure settles with a view or the read's error */
1114
+ if (mirrored.error === null) throw new Error("settings describe settled with neither a view nor an error");
1115
+ this.failLoad(mirrored.error);
1057
1116
  return;
1058
1117
  }
1059
1118
  const providers = joinProviderDirectory(registered.value, declared.value);
@@ -1074,13 +1133,16 @@ window.__ModuleLoader__.load({
1074
1133
  const catalog = await this.ctx.remote.session.modelCatalog();
1075
1134
  for (const row of rows) if (row.entry.provider === "deepseek-account") row.accountAvailable = catalog.ok && catalog.value.groups.some((group) => group.id === "deepseek-account" && group.models.length > 0);
1076
1135
  }
1077
- const refs = [...new Set(rows.filter((row) => row.entry.provider !== "deepseek-account").map((row) => row.apiKeyEnv ?? deriveKeyRef(row.entry.provider)))];
1078
- let credentials = {};
1136
+ const refs = [...new Set(rows.filter((row) => row.entry.provider !== "deepseek-account").flatMap((row) => row.apiKeyEnv === void 0 ? [deriveKeyRef(row.entry.provider), ...row.entry.nativeAuth?.env ?? []] : [row.apiKeyEnv]))];
1137
+ const credentials = {};
1079
1138
  let credentialError = null;
1080
- if (refs.length > 0) {
1081
- const response = await this.ctx.remote.credentials.describe(refs);
1082
- if (response.ok) credentials = response.value;
1083
- else credentialError = response.error.message;
1139
+ for (let index = 0; index < refs.length; index += 64) {
1140
+ const response = await this.ctx.remote.credentials.describe(refs.slice(index, index + 64));
1141
+ if (response.ok) Object.assign(credentials, response.value);
1142
+ else {
1143
+ credentialError = response.error.message;
1144
+ break;
1145
+ }
1084
1146
  }
1085
1147
  if (generation !== this.generation) return;
1086
1148
  this.store.update((s) => {
@@ -1095,7 +1157,11 @@ window.__ModuleLoader__.load({
1095
1157
  return {
1096
1158
  ...row,
1097
1159
  ...named === void 0 ? {} : { credential: named },
1098
- ...derived === void 0 ? {} : { derivedCredential: derived }
1160
+ ...derived === void 0 ? {} : { derivedCredential: derived },
1161
+ ...credentialError === null ? { credentialChecks: Object.fromEntries((row.apiKeyEnv === void 0 ? row.entry.nativeAuth?.env ?? [] : [row.apiKeyEnv]).flatMap((ref) => {
1162
+ const info = credentials[ref];
1163
+ return info === void 0 ? [] : [[ref, info]];
1164
+ })) } : {}
1099
1165
  };
1100
1166
  });
1101
1167
  s.namespaces = namespaces;
@@ -1429,10 +1495,8 @@ window.__ModuleLoader__.load({
1429
1495
  className: ModelsSection_module_css_default["fieldLabel"],
1430
1496
  children: t("keyInput")
1431
1497
  }),
1432
- (0, react_jsx_runtime.jsx)("input", {
1433
- className: ModelsSection_module_css_default["input"],
1434
- type: "password",
1435
- autoComplete: "new-password",
1498
+ (0, react_jsx_runtime.jsx)(ApiKeyInput, {
1499
+ t,
1436
1500
  value: keyDraft,
1437
1501
  placeholder: t("keyPlaceholder"),
1438
1502
  "aria-label": t("keyInput"),
@@ -1565,7 +1629,6 @@ window.__ModuleLoader__.load({
1565
1629
  const { namespace, schema, settingsPath, operations, t } = props;
1566
1630
  const [draft, setDraft] = (0, react.useState)(() => draftAt(schema, namespace, settingsPath));
1567
1631
  const [keyDraft, setKeyDraft] = (0, react.useState)("");
1568
- const [keyState, setKeyState] = (0, react.useState)(void 0);
1569
1632
  const [busy, setBusy] = (0, react.useState)(false);
1570
1633
  const [listBusy, setListBusy] = (0, react.useState)(false);
1571
1634
  const { onBusyChange } = props;
@@ -1587,30 +1650,13 @@ window.__ModuleLoader__.load({
1587
1650
  ]);
1588
1651
  const fallback = schema.getPath(namespace.value, settingsPath);
1589
1652
  const disabled = props.readOnly || busy;
1590
- const accountProvider = props.provider === "deepseek-account";
1591
- const layout = accountProvider ? "deepseek" : layoutOf(namespace.ns);
1653
+ const layout = layoutOf(namespace.ns);
1592
1654
  const keyRef = refFor(schema, namespace, settingsPath, props.provider);
1593
1655
  const protocols = (0, react.useMemo)(() => layout === "pi-ai" ? protocolChoices(namespace, schema) : [], [
1594
1656
  layout,
1595
1657
  namespace,
1596
1658
  schema
1597
1659
  ]);
1598
- (0, react.useEffect)(() => {
1599
- if (accountProvider) return;
1600
- let stale = false;
1601
- setKeyState(void 0);
1602
- operations.describeCredential(keyRef).then((described) => {
1603
- if (stale) return;
1604
- setKeyState(described);
1605
- });
1606
- return () => {
1607
- stale = true;
1608
- };
1609
- }, [
1610
- operations,
1611
- keyRef,
1612
- accountProvider
1613
- ]);
1614
1660
  const stringAt = (source, key) => {
1615
1661
  const value = schema.getPath(source, [key]);
1616
1662
  return typeof value === "string" && value.trim().length > 0 ? value : void 0;
@@ -1693,7 +1739,6 @@ window.__ModuleLoader__.load({
1693
1739
  props.t("settingsPathUnresolvable")
1694
1740
  ]
1695
1741
  });
1696
- const keyLocked = keyState?.writable === false;
1697
1742
  /**
1698
1743
  * The catalog beneath the user layer: what the composition entry pinned, or
1699
1744
  * else the schema default that `resolve` would supply. The effective value
@@ -1717,7 +1762,38 @@ window.__ModuleLoader__.load({
1717
1762
  const defaultContextWindow = schema.getPath(fallback, ["defaultContextWindow"]);
1718
1763
  const defaultMaxTokens = schema.getPath(fallback, ["maxTokens"]);
1719
1764
  const defaultInput = schema.getPath(fallback, ["defaultInput"]);
1720
- const keyPlaceholder = keyLocked ? t("keyEnvLocked") : keyState?.configured === true && props.credentialRequired !== true ? t("keyStored") : family === "pi-ai" ? t("keyPlaceholderNative") : t("keyPlaceholder");
1765
+ const baseURL = stringAt(fallback, "baseURL") ?? props.defaultBaseURL;
1766
+ const endpointEnv = props.baseURLEnv ?? [];
1767
+ const endpointHint = family === "deepseek" ? t("deepSeekEndpointHint") : baseURL === void 0 && endpointEnv.length > 0 ? t("baseUrlEnvironment").replace("{env}", () => endpointEnv.join(", ")) : void 0;
1768
+ const namedRef = stringAt(fallback, "apiKeyEnv");
1769
+ const nativeAuth = namedRef === void 0 ? props.nativeAuth : void 0;
1770
+ const authRefs = namedRef === void 0 ? (nativeAuth?.env ?? []).filter((ref) => !endpointEnv.includes(ref)) : [namedRef];
1771
+ const visibleRefs = authRefs.filter((ref) => !ref.toLowerCase().includes("oauth"));
1772
+ const keyHint = visibleRefs[0];
1773
+ const checkedRefs = authRefs.map((ref) => [ref, props.credentialChecks?.[ref] ?? (ref === namedRef ? props.credential : void 0)]);
1774
+ const detected = checkedRefs.find(([, info]) => info?.configured === true);
1775
+ const detectedRef = detected?.[0];
1776
+ const detectedVisibleRef = detectedRef === void 0 || !visibleRefs.includes(detectedRef) ? void 0 : detectedRef;
1777
+ const missingRefs = checkedRefs.length > 0 && checkedRefs.every(([, info]) => info?.configured === false);
1778
+ const savedCredential = detected?.[1]?.source === "file";
1779
+ const credentialHint = keyDraft.length > 0 || savedCredential || keyHint === void 0 || props.credentialRequired === true ? void 0 : t(detectedRef === void 0 ? missingRefs ? "keyFallbackMissing" : "keyFallbackUnchecked" : detectedVisibleRef === void 0 ? "keyFallbackDetectedHidden" : "keyFallbackDetected").replace("{hint}", () => detectedVisibleRef ?? keyHint);
1780
+ const keyHelp = visibleRefs.length === 0 ? void 0 : t("keyHelp").replace("{env}", () => visibleRefs.join(" / "));
1781
+ const authHelp = keyHelp === void 0 ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
1782
+ label: keyHelp,
1783
+ side: "right",
1784
+ delayMs: 0,
1785
+ focusDelayMs: 0,
1786
+ portal: true,
1787
+ openOnClick: true,
1788
+ children: (0, react_jsx_runtime.jsx)("button", {
1789
+ type: "button",
1790
+ className: ModelsSection_module_css_default["helpButton"],
1791
+ "aria-label": t("authHelp"),
1792
+ children: "?"
1793
+ })
1794
+ });
1795
+ const keylessNativeAuth = nativeAuth?.env.length === 0 && nativeAuth.oauth;
1796
+ const keyPlaceholder = keyHint === void 0 || props.credentialRequired === true ? t("keyPlaceholder") : t(savedCredential ? "keyPlaceholderSaved" : "keyPlaceholderFallback").replace("{hint}", () => keyHint);
1721
1797
  /** What both family editors take: the rows, whose layer owns them, and the two writes. */
1722
1798
  const catalogProps = {
1723
1799
  models,
@@ -1731,33 +1807,32 @@ window.__ModuleLoader__.load({
1731
1807
  setDraft((current) => schema.deletePath(current, ["models"]));
1732
1808
  }
1733
1809
  };
1734
- if (accountProvider) return (0, react_jsx_runtime.jsx)(DeepSeekModelsEditor, {
1735
- ...catalogProps,
1736
- defaultContextWindow: typeof defaultContextWindow === "number" ? defaultContextWindow : void 0,
1737
- defaultMaxTokens: typeof defaultMaxTokens === "number" ? defaultMaxTokens : void 0
1738
- });
1739
- return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1810
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [keylessNativeAuth ? null : (0, react_jsx_runtime.jsxs)("div", {
1740
1811
  className: ModelsSection_module_css_default["field"],
1741
1812
  children: [
1742
- (0, react_jsx_runtime.jsx)("span", {
1813
+ (0, react_jsx_runtime.jsxs)("span", {
1743
1814
  className: ModelsSection_module_css_default["fieldLabel"],
1744
- children: t("keyInput")
1815
+ children: [t("keyInput"), authHelp]
1745
1816
  }),
1746
- (0, react_jsx_runtime.jsx)("input", {
1747
- className: ModelsSection_module_css_default["input"],
1748
- type: "password",
1749
- autoComplete: "new-password",
1817
+ (0, react_jsx_runtime.jsx)(ApiKeyInput, {
1818
+ t,
1750
1819
  value: keyDraft,
1751
1820
  placeholder: keyPlaceholder,
1752
1821
  "aria-label": t("keyInput"),
1753
1822
  "aria-invalid": shownKeyFailure !== void 0,
1823
+ "aria-describedby": credentialHint === void 0 ? void 0 : `${props.provider}-credential-hint`,
1754
1824
  required: props.credentialRequired === true,
1755
1825
  autoFocus: props.autoFocusCredential === true,
1756
- disabled: disabled || keyLocked,
1826
+ disabled,
1757
1827
  onChange: (event) => {
1758
1828
  setKeyDraft(event.target.value);
1759
1829
  }
1760
1830
  }),
1831
+ credentialHint === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
1832
+ id: `${props.provider}-credential-hint`,
1833
+ className: ModelsSection_module_css_default[missingRefs ? "notice" : detectedRef === void 0 ? "advancedHint" : "savedNotice"],
1834
+ children: credentialHint
1835
+ }),
1761
1836
  shownKeyFailure === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
1762
1837
  className: ModelsSection_module_css_default["error"],
1763
1838
  children: t(shownKeyFailure)
@@ -1799,19 +1874,19 @@ window.__ModuleLoader__.load({
1799
1874
  className: ModelsSection_module_css_default["input"],
1800
1875
  type: "text",
1801
1876
  value: stringAt(draft, "baseURL") ?? "",
1802
- placeholder: family === "deepseek" ? t("deepSeekBaseUrl") : stringAt(fallback, "baseURL") ?? t("baseUrlDefault"),
1803
- "aria-describedby": family === "deepseek" ? `${props.provider}-endpoint-hint` : void 0,
1877
+ placeholder: family === "deepseek" ? t("deepSeekBaseUrl") : baseURL === void 0 ? t(endpointEnv.length > 0 ? "baseUrlConfigured" : "baseUrlDefault") : t("baseUrlPlaceholder").replace("{url}", () => baseURL),
1878
+ "aria-describedby": endpointHint === void 0 ? void 0 : `${props.provider}-endpoint-hint`,
1804
1879
  "aria-label": t("baseUrl"),
1805
1880
  disabled,
1806
1881
  onChange: (event) => {
1807
1882
  setField("baseURL", event.target.value === "" ? void 0 : event.target.value);
1808
1883
  }
1809
1884
  }),
1810
- family === "deepseek" ? (0, react_jsx_runtime.jsx)("span", {
1885
+ endpointHint === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
1811
1886
  id: `${props.provider}-endpoint-hint`,
1812
1887
  className: ModelsSection_module_css_default["advancedHint"],
1813
- children: t("deepSeekEndpointHint")
1814
- }) : null
1888
+ children: endpointHint
1889
+ })
1815
1890
  ]
1816
1891
  }),
1817
1892
  ownsIdentity ? (0, react_jsx_runtime.jsxs)("div", {
@@ -1922,12 +1997,17 @@ window.__ModuleLoader__.load({
1922
1997
  * post-apply reload.
1923
1998
  */
1924
1999
  /** Render an editor for either the setup posture or an expanded provider row. */
1925
- function renderProviderEditor({ target, ...props }) {
2000
+ function renderProviderEditor({ target, row, ...props }) {
1926
2001
  return (0, react_jsx_runtime.jsx)(ProviderEditor, {
1927
2002
  provider: target.provider,
1928
2003
  displayName: target.displayName,
1929
2004
  settingsPath: target.settingsPath,
1930
2005
  ...target.declared === true ? { declared: true } : {},
2006
+ ...target.defaultBaseURL === void 0 ? {} : { defaultBaseURL: target.defaultBaseURL },
2007
+ ...target.baseURLEnv === void 0 ? {} : { baseURLEnv: target.baseURLEnv },
2008
+ ...target.nativeAuth === void 0 ? {} : { nativeAuth: target.nativeAuth },
2009
+ ...row.credential === void 0 ? {} : { credential: row.credential },
2010
+ ...row.credentialChecks === void 0 ? {} : { credentialChecks: row.credentialChecks },
1931
2011
  ...props
1932
2012
  });
1933
2013
  }
@@ -1992,7 +2072,10 @@ window.__ModuleLoader__.load({
1992
2072
  settingsNs: row.entry.settingsNs,
1993
2073
  settingsPath: row.entry.settingsPath,
1994
2074
  ...credentialRef === void 0 ? {} : { credentialRef },
1995
- ...row.entry.declared === true ? { declared: true } : {}
2075
+ ...row.entry.declared === true ? { declared: true } : {},
2076
+ ...row.entry.defaultBaseURL === void 0 ? {} : { defaultBaseURL: row.entry.defaultBaseURL },
2077
+ ...row.entry.baseURLEnv === void 0 ? {} : { baseURLEnv: row.entry.baseURLEnv },
2078
+ ...row.entry.nativeAuth === void 0 ? {} : { nativeAuth: row.entry.nativeAuth }
1996
2079
  };
1997
2080
  }
1998
2081
  const CLAUDE_DISCOVERY_API = "mofeng-anthropic-models";
@@ -2343,9 +2426,10 @@ window.__ModuleLoader__.load({
2343
2426
  error,
2344
2427
  renderProviderEditor({
2345
2428
  target,
2429
+ row,
2430
+ thinkingPresets: isClaudeProvider(row, state),
2346
2431
  namespace,
2347
2432
  schema,
2348
- thinkingPresets: isClaudeProvider(row, state),
2349
2433
  operations,
2350
2434
  t,
2351
2435
  readOnly: !state.writable,
@@ -2384,6 +2468,13 @@ window.__ModuleLoader__.load({
2384
2468
  className: ModelsSection_module_css_default["rowTag"],
2385
2469
  children: t("claudeTypeTag")
2386
2470
  }) : null,
2471
+ row.entry.provider === "deepseek-account" ? (0, react_jsx_runtime.jsxs)("span", {
2472
+ className: ModelsSection_module_css_default["accountStatus"],
2473
+ children: [(0, react_jsx_runtime.jsx)("span", {
2474
+ className: `${ModelsSection_module_css_default["credentialDot"]} ${ModelsSection_module_css_default["credentialDotConfigured"]}`,
2475
+ "aria-hidden": "true"
2476
+ }), t("accountSignedIn")]
2477
+ }) : null,
2387
2478
  credentialConfigured ? (0, react_jsx_runtime.jsx)("span", {
2388
2479
  className: `${ModelsSection_module_css_default["credentialDot"]} ${ModelsSection_module_css_default["credentialDotConfigured"]}`,
2389
2480
  role: "img",
@@ -2398,7 +2489,7 @@ window.__ModuleLoader__.load({
2398
2489
  ]
2399
2490
  }), (0, react_jsx_runtime.jsxs)("span", {
2400
2491
  className: ModelsSection_module_css_default["rowActions"],
2401
- children: [(0, react_jsx_runtime.jsx)("button", {
2492
+ children: [row.entry.provider === "deepseek-account" ? null : (0, react_jsx_runtime.jsx)("button", {
2402
2493
  type: "button",
2403
2494
  className: ModelsSection_module_css_default["secondaryButton"],
2404
2495
  "aria-label": providerCopy(t("editProvider"), target),
@@ -2433,9 +2524,10 @@ window.__ModuleLoader__.load({
2433
2524
  }, { entryKey: row.entry.settingsNs }),
2434
2525
  open ? renderProviderEditor({
2435
2526
  target,
2527
+ row,
2528
+ thinkingPresets: isClaudeProvider(row, state),
2436
2529
  namespace,
2437
2530
  schema,
2438
- thinkingPresets: isClaudeProvider(row, state),
2439
2531
  operations,
2440
2532
  t,
2441
2533
  readOnly: !state.writable,
@@ -2525,6 +2617,10 @@ window.__ModuleLoader__.load({
2525
2617
  schema,
2526
2618
  settingsPath: draft.target.settingsPath,
2527
2619
  operations,
2620
+ ...draft.target.defaultBaseURL === void 0 ? {} : { defaultBaseURL: draft.target.defaultBaseURL },
2621
+ ...draft.target.baseURLEnv === void 0 ? {} : { baseURLEnv: draft.target.baseURLEnv },
2622
+ ...draft.target.nativeAuth === void 0 ? {} : { nativeAuth: draft.target.nativeAuth },
2623
+ ...addRow?.credentialChecks === void 0 ? {} : { credentialChecks: addRow.credentialChecks },
2528
2624
  t,
2529
2625
  readOnly: !state.writable,
2530
2626
  onClose: (changed) => {
@@ -2891,16 +2987,14 @@ window.__ModuleLoader__.load({
2891
2987
  //#endregion
2892
2988
  //#region lib/types/client/welcome-store.js
2893
2989
  /**
2894
- * Welcome-notice state derived from the welcome settings scope. The scope is
2895
- * the transport: a loopback browser follows the durable Host section, while a
2896
- * remote browser's memory-mode scope never answers and the acknowledgement
2897
- * stays process-local here.
2990
+ * Welcome-notice state derived from the welcome settings scope: the notice
2991
+ * follows the Host section and records its acknowledgement through it.
2898
2992
  */
2899
2993
  /* v8 ignore next 3 -- closed-union default only defends future source widening */
2900
2994
  function assertNever(_value) {
2901
2995
  throw new Error("unexpected welcome settings status");
2902
2996
  }
2903
- /** Coordinates durable Host acknowledgement or a process-local remote fallback. */
2997
+ /** Coordinates the durable Host acknowledgement. */
2904
2998
  var WelcomeNoticeStore = class {
2905
2999
  scope;
2906
3000
  /** uSES-safe state source shared by the registered welcome step. */
@@ -2909,13 +3003,8 @@ window.__ModuleLoader__.load({
2909
3003
  acknowledged: false,
2910
3004
  error: null
2911
3005
  });
2912
- localAcknowledged = false;
2913
3006
  saving = false;
2914
3007
  following;
2915
- /**
2916
- * @param scope - the welcome settings namespace scope; its memory mode is
2917
- * what keeps a remote browser process-local.
2918
- */
2919
3008
  constructor(scope) {
2920
3009
  this.scope = scope;
2921
3010
  }
@@ -2931,17 +3020,12 @@ window.__ModuleLoader__.load({
2931
3020
  return Promise.resolve();
2932
3021
  }
2933
3022
  /**
2934
- * Persist this copy version, or advance only this process for a remote
2935
- * browser. Success is judged against the state the write left behind, so a
2936
- * refused or failed write reports false after its recovery read settles.
2937
- * @returns true when the selected persistence mode holds the acknowledgement.
3023
+ * Persist this copy version through the scope. Success is judged against the
3024
+ * state the write left behind, so a refused or failed write reports false
3025
+ * after its recovery read settles.
3026
+ * @returns true when the Host holds the acknowledgement.
2938
3027
  */
2939
3028
  async acknowledge() {
2940
- if (this.scope.getSnapshot().mode === "memory") {
2941
- this.localAcknowledged = true;
2942
- this.derive();
2943
- return true;
2944
- }
2945
3029
  this.saving = true;
2946
3030
  this.store.update((state) => {
2947
3031
  state.status = "saving";
@@ -2968,14 +3052,6 @@ window.__ModuleLoader__.load({
2968
3052
  derive() {
2969
3053
  if (this.saving) return;
2970
3054
  const scope = this.scope.getSnapshot();
2971
- if (scope.mode === "memory") {
2972
- this.store.update((state) => {
2973
- state.status = "ready";
2974
- state.acknowledged = this.localAcknowledged;
2975
- state.error = null;
2976
- });
2977
- return;
2978
- }
2979
3055
  switch (scope.status) {
2980
3056
  case "loading":
2981
3057
  this.store.update((state) => {
@@ -3020,10 +3096,6 @@ window.__ModuleLoader__.load({
3020
3096
  */
3021
3097
  function createModelsOperations(ctx) {
3022
3098
  return {
3023
- describeCredential: async (ref) => {
3024
- const response = await ctx.remote.credentials.describe([ref]);
3025
- return response.ok ? response.value[ref] : void 0;
3026
- },
3027
3099
  storeCredential: async (ref, value) => {
3028
3100
  const response = await ctx.remote.credentials.set(ref, value);
3029
3101
  return response.ok ? void 0 : response.error.message;
@@ -3111,19 +3183,30 @@ window.__ModuleLoader__.load({
3111
3183
  savedProvider: "Saved {provider}.",
3112
3184
  credentialConfigured: "API key configured",
3113
3185
  credentialMissing: "API key missing",
3186
+ accountSignedIn: "Signed in",
3114
3187
  readOnly: "The settings document is read-only in this deployment.",
3115
3188
  loadFailed: "Loading the provider directory failed",
3116
3189
  conflict: "Someone else changed these settings while this card was open. Close it and reopen to edit the current values.",
3117
3190
  retry: "Retry",
3118
3191
  keyInput: "API key",
3192
+ keyReveal: "Show secret",
3193
+ keyHide: "Hide secret",
3119
3194
  keyPlaceholder: "Enter your API key",
3120
- keyPlaceholderNative: "Enter an API key, or leave blank to use environment authentication",
3121
- keyStored: "Configured — enter a new value to replace",
3122
- keyEnvLocked: "Provided by the launch environment (read-only)",
3195
+ keyPlaceholderFallback: "Leave blank to use env as auth ({hint})",
3196
+ keyPlaceholderSaved: "Leave blank to use saved credentials",
3197
+ keyFallbackMissing: "Env var not detected. Enter an API key, or configure {hint} in your env.",
3198
+ keyFallbackDetected: "Env var detected. ({hint})",
3199
+ keyFallbackDetectedHidden: "Env var detected.",
3200
+ keyFallbackUnchecked: "Environment credential status has not been confirmed.",
3201
+ keyHelp: "Saved credentials are used first. Environment fallbacks shown here, in order: {env}. Sources are launch environment, $cwd/.env, then $DSH_HOME/.env.",
3202
+ authHelp: "Authentication details",
3123
3203
  customized: "Customized settings",
3124
3204
  baseUrl: "Base URL",
3125
- baseUrlDefault: "Provider default",
3126
- deepSeekBaseUrl: "https://api.deepseek.com/anthropic",
3205
+ baseUrlDefault: "No default endpoint",
3206
+ baseUrlEnvironment: "Provider endpoint configuration: {env}",
3207
+ baseUrlConfigured: "Provider-configured endpoint",
3208
+ baseUrlPlaceholder: "{url}",
3209
+ deepSeekBaseUrl: "https://api.deepseek.com/anthropic (Default to use DEEPSEEK_BASE_URL)",
3127
3210
  deepSeekEndpointHint: "Use an API endpoint compatible with Anthropic Messages.",
3128
3211
  models: "Models",
3129
3212
  modelsInherited: "Using the adapter defaults",
@@ -3240,19 +3323,30 @@ window.__ModuleLoader__.load({
3240
3323
  savedProvider: "已保存 {provider}。",
3241
3324
  credentialConfigured: "API 密钥已配置",
3242
3325
  credentialMissing: "API 密钥缺失",
3326
+ accountSignedIn: "已登录",
3243
3327
  readOnly: "当前部署的设置文档为只读。",
3244
3328
  loadFailed: "加载提供商目录失败",
3245
3329
  conflict: "这张卡片打开期间,这些设置已被其他地方改动。请关闭后重新打开,在当前值上编辑。",
3246
3330
  retry: "重试",
3247
3331
  keyInput: "API 密钥",
3332
+ keyReveal: "显示密钥",
3333
+ keyHide: "隐藏密钥",
3248
3334
  keyPlaceholder: "输入 API 密钥",
3249
- keyPlaceholderNative: "输入 API 密钥,或留空使用环境认证",
3250
- keyStored: "已配置——输入新值可替换",
3251
- keyEnvLocked: "由启动环境提供(只读)",
3335
+ keyPlaceholderFallback: "留空使用环境认证({hint})",
3336
+ keyPlaceholderSaved: "留空使用已保存凭据",
3337
+ keyFallbackMissing: "未检测到环境变量。请填写 API 密钥,或设置环境变量 {hint}。",
3338
+ keyFallbackDetected: "已检测到环境变量({hint})",
3339
+ keyFallbackDetectedHidden: "已检测到环境变量",
3340
+ keyFallbackUnchecked: "环境凭据状态尚未确认",
3341
+ keyHelp: "优先使用已保存的凭据。此处显示的环境后备按以下顺序排列:{env}。来源依次为启动环境、$cwd/.env、$DSH_HOME/.env。",
3342
+ authHelp: "认证说明",
3252
3343
  customized: "自定义设置",
3253
3344
  baseUrl: "API 地址",
3254
- baseUrlDefault: "提供商默认",
3255
- deepSeekBaseUrl: "https://api.deepseek.com/anthropic",
3345
+ baseUrlDefault: "没有默认地址",
3346
+ baseUrlEnvironment: "提供方地址配置:{env}",
3347
+ baseUrlConfigured: "由提供方配置地址",
3348
+ baseUrlPlaceholder: "{url}",
3349
+ deepSeekBaseUrl: "https://api.deepseek.com/anthropic(默认使用环境 DEEPSEEK_BASE_URL)",
3256
3350
  deepSeekEndpointHint: "请填写兼容 Anthropic Messages 协议的 API 地址。",
3257
3351
  models: "模型目录",
3258
3352
  modelsInherited: "正在使用适配器默认模型",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mofeng2223/dsh-claude-provider",
3
- "version": "0.5.9",
4
- "description": "Custom Claude provider support for DeepSeek Harness 0.2.1-alpha.2",
3
+ "version": "0.5.10",
4
+ "description": "Custom Claude provider support for DeepSeek Harness 0.2.1-alpha.3",
5
5
  "author": "mofeng2223",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -62,6 +62,6 @@
62
62
  }
63
63
  },
64
64
  "devDependencies": {
65
- "@deepseek-ai/dsh-client-ui-settings-models": "0.2.1-alpha.2"
65
+ "@deepseek-ai/dsh-client-ui-settings-models": "0.2.1-alpha.3"
66
66
  }
67
67
  }