@mofeng2223/dsh-claude-provider 0.5.8 → 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.
- package/lib/client.js +245 -107
- 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) {
|
|
@@ -993,6 +1050,8 @@ window.__ModuleLoader__.load({
|
|
|
993
1050
|
});
|
|
994
1051
|
/** Latest load wins; an older response never overwrites a newer one. */
|
|
995
1052
|
generation = 0;
|
|
1053
|
+
/** Callers follow the current refresh's outcome, including callers whose read was superseded. */
|
|
1054
|
+
pendingLoads = /* @__PURE__ */ new Set();
|
|
996
1055
|
/**
|
|
997
1056
|
* @param ctx - the page plugin's context, whose `remote.llm` and
|
|
998
1057
|
* `remote.credentials` namespaces carry the directory and credential reads.
|
|
@@ -1009,11 +1068,28 @@ window.__ModuleLoader__.load({
|
|
|
1009
1068
|
* settings answer in parallel, then one batched credential describe over
|
|
1010
1069
|
* every referenced ref. Provider failure or absence of an initial settings
|
|
1011
1070
|
* answer keeps the last good rows and surfaces an error; a failed settings
|
|
1012
|
-
* refresh reuses the mirror's held view.
|
|
1013
|
-
*
|
|
1071
|
+
* refresh reuses the mirror's held view. Concurrent callers resolve only
|
|
1072
|
+
* after the current refresh publishes its ready or error snapshot.
|
|
1073
|
+
* @returns resolution after the current snapshot is published.
|
|
1074
|
+
* @throws the current read's unexpected rejection; superseded rejections are ignored.
|
|
1014
1075
|
*/
|
|
1015
|
-
|
|
1076
|
+
load() {
|
|
1077
|
+
const pending = Promise.withResolvers();
|
|
1078
|
+
this.pendingLoads.add(pending);
|
|
1016
1079
|
const generation = ++this.generation;
|
|
1080
|
+
this.read(generation).then(() => {
|
|
1081
|
+
this.settleLoads(generation, (load) => {
|
|
1082
|
+
load.resolve();
|
|
1083
|
+
});
|
|
1084
|
+
}, (error) => {
|
|
1085
|
+
this.settleLoads(generation, (load) => {
|
|
1086
|
+
load.reject(error);
|
|
1087
|
+
});
|
|
1088
|
+
});
|
|
1089
|
+
return pending.promise;
|
|
1090
|
+
}
|
|
1091
|
+
/** Publish one joined answer; stale answers leave the current refresh in charge. */
|
|
1092
|
+
async read(generation) {
|
|
1017
1093
|
this.store.update((s) => {
|
|
1018
1094
|
s.status = "loading";
|
|
1019
1095
|
s.error = null;
|
|
@@ -1023,17 +1099,20 @@ window.__ModuleLoader__.load({
|
|
|
1023
1099
|
this.ctx.remote.llm.listConfigurableProviders(),
|
|
1024
1100
|
this.describeFace.ensure()
|
|
1025
1101
|
]);
|
|
1102
|
+
if (generation !== this.generation) return;
|
|
1026
1103
|
if (!registered.ok) {
|
|
1027
|
-
this.failLoad(
|
|
1104
|
+
this.failLoad(registered.error.message);
|
|
1028
1105
|
return;
|
|
1029
1106
|
}
|
|
1030
1107
|
if (!declared.ok) {
|
|
1031
|
-
this.failLoad(
|
|
1108
|
+
this.failLoad(declared.error.message);
|
|
1032
1109
|
return;
|
|
1033
1110
|
}
|
|
1034
1111
|
const mirrored = this.describeFace.getSnapshot();
|
|
1035
1112
|
if (mirrored.view === void 0) {
|
|
1036
|
-
|
|
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);
|
|
1037
1116
|
return;
|
|
1038
1117
|
}
|
|
1039
1118
|
const providers = joinProviderDirectory(registered.value, declared.value);
|
|
@@ -1054,13 +1133,16 @@ window.__ModuleLoader__.load({
|
|
|
1054
1133
|
const catalog = await this.ctx.remote.session.modelCatalog();
|
|
1055
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);
|
|
1056
1135
|
}
|
|
1057
|
-
const refs = [...new Set(rows.filter((row) => row.entry.provider !== "deepseek-account").
|
|
1058
|
-
|
|
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 = {};
|
|
1059
1138
|
let credentialError = null;
|
|
1060
|
-
|
|
1061
|
-
const response = await this.ctx.remote.credentials.describe(refs);
|
|
1062
|
-
if (response.ok) credentials
|
|
1063
|
-
else
|
|
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
|
+
}
|
|
1064
1146
|
}
|
|
1065
1147
|
if (generation !== this.generation) return;
|
|
1066
1148
|
this.store.update((s) => {
|
|
@@ -1075,15 +1157,25 @@ window.__ModuleLoader__.load({
|
|
|
1075
1157
|
return {
|
|
1076
1158
|
...row,
|
|
1077
1159
|
...named === void 0 ? {} : { credential: named },
|
|
1078
|
-
...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
|
+
})) } : {}
|
|
1079
1165
|
};
|
|
1080
1166
|
});
|
|
1081
1167
|
s.namespaces = namespaces;
|
|
1082
1168
|
});
|
|
1083
1169
|
}
|
|
1084
|
-
/**
|
|
1085
|
-
|
|
1170
|
+
/** Settle callers only while this read still owns the current refresh. */
|
|
1171
|
+
settleLoads(generation, settle) {
|
|
1086
1172
|
if (generation !== this.generation) return;
|
|
1173
|
+
const pending = [...this.pendingLoads];
|
|
1174
|
+
this.pendingLoads.clear();
|
|
1175
|
+
for (const load of pending) settle(load);
|
|
1176
|
+
}
|
|
1177
|
+
/** Publish the current joined read's failure text. */
|
|
1178
|
+
failLoad(message) {
|
|
1087
1179
|
this.store.update((s) => {
|
|
1088
1180
|
s.status = "error";
|
|
1089
1181
|
s.error = message;
|
|
@@ -1403,10 +1495,8 @@ window.__ModuleLoader__.load({
|
|
|
1403
1495
|
className: ModelsSection_module_css_default["fieldLabel"],
|
|
1404
1496
|
children: t("keyInput")
|
|
1405
1497
|
}),
|
|
1406
|
-
(0, react_jsx_runtime.jsx)(
|
|
1407
|
-
|
|
1408
|
-
type: "password",
|
|
1409
|
-
autoComplete: "new-password",
|
|
1498
|
+
(0, react_jsx_runtime.jsx)(ApiKeyInput, {
|
|
1499
|
+
t,
|
|
1410
1500
|
value: keyDraft,
|
|
1411
1501
|
placeholder: t("keyPlaceholder"),
|
|
1412
1502
|
"aria-label": t("keyInput"),
|
|
@@ -1539,7 +1629,6 @@ window.__ModuleLoader__.load({
|
|
|
1539
1629
|
const { namespace, schema, settingsPath, operations, t } = props;
|
|
1540
1630
|
const [draft, setDraft] = (0, react.useState)(() => draftAt(schema, namespace, settingsPath));
|
|
1541
1631
|
const [keyDraft, setKeyDraft] = (0, react.useState)("");
|
|
1542
|
-
const [keyState, setKeyState] = (0, react.useState)(void 0);
|
|
1543
1632
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
1544
1633
|
const [listBusy, setListBusy] = (0, react.useState)(false);
|
|
1545
1634
|
const { onBusyChange } = props;
|
|
@@ -1561,30 +1650,13 @@ window.__ModuleLoader__.load({
|
|
|
1561
1650
|
]);
|
|
1562
1651
|
const fallback = schema.getPath(namespace.value, settingsPath);
|
|
1563
1652
|
const disabled = props.readOnly || busy;
|
|
1564
|
-
const
|
|
1565
|
-
const layout = accountProvider ? "deepseek" : layoutOf(namespace.ns);
|
|
1653
|
+
const layout = layoutOf(namespace.ns);
|
|
1566
1654
|
const keyRef = refFor(schema, namespace, settingsPath, props.provider);
|
|
1567
1655
|
const protocols = (0, react.useMemo)(() => layout === "pi-ai" ? protocolChoices(namespace, schema) : [], [
|
|
1568
1656
|
layout,
|
|
1569
1657
|
namespace,
|
|
1570
1658
|
schema
|
|
1571
1659
|
]);
|
|
1572
|
-
(0, react.useEffect)(() => {
|
|
1573
|
-
if (accountProvider) return;
|
|
1574
|
-
let stale = false;
|
|
1575
|
-
setKeyState(void 0);
|
|
1576
|
-
operations.describeCredential(keyRef).then((described) => {
|
|
1577
|
-
if (stale) return;
|
|
1578
|
-
setKeyState(described);
|
|
1579
|
-
});
|
|
1580
|
-
return () => {
|
|
1581
|
-
stale = true;
|
|
1582
|
-
};
|
|
1583
|
-
}, [
|
|
1584
|
-
operations,
|
|
1585
|
-
keyRef,
|
|
1586
|
-
accountProvider
|
|
1587
|
-
]);
|
|
1588
1660
|
const stringAt = (source, key) => {
|
|
1589
1661
|
const value = schema.getPath(source, [key]);
|
|
1590
1662
|
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
@@ -1667,7 +1739,6 @@ window.__ModuleLoader__.load({
|
|
|
1667
1739
|
props.t("settingsPathUnresolvable")
|
|
1668
1740
|
]
|
|
1669
1741
|
});
|
|
1670
|
-
const keyLocked = keyState?.writable === false;
|
|
1671
1742
|
/**
|
|
1672
1743
|
* The catalog beneath the user layer: what the composition entry pinned, or
|
|
1673
1744
|
* else the schema default that `resolve` would supply. The effective value
|
|
@@ -1691,7 +1762,38 @@ window.__ModuleLoader__.load({
|
|
|
1691
1762
|
const defaultContextWindow = schema.getPath(fallback, ["defaultContextWindow"]);
|
|
1692
1763
|
const defaultMaxTokens = schema.getPath(fallback, ["maxTokens"]);
|
|
1693
1764
|
const defaultInput = schema.getPath(fallback, ["defaultInput"]);
|
|
1694
|
-
const
|
|
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);
|
|
1695
1797
|
/** What both family editors take: the rows, whose layer owns them, and the two writes. */
|
|
1696
1798
|
const catalogProps = {
|
|
1697
1799
|
models,
|
|
@@ -1705,33 +1807,32 @@ window.__ModuleLoader__.load({
|
|
|
1705
1807
|
setDraft((current) => schema.deletePath(current, ["models"]));
|
|
1706
1808
|
}
|
|
1707
1809
|
};
|
|
1708
|
-
|
|
1709
|
-
...catalogProps,
|
|
1710
|
-
defaultContextWindow: typeof defaultContextWindow === "number" ? defaultContextWindow : void 0,
|
|
1711
|
-
defaultMaxTokens: typeof defaultMaxTokens === "number" ? defaultMaxTokens : void 0
|
|
1712
|
-
});
|
|
1713
|
-
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", {
|
|
1714
1811
|
className: ModelsSection_module_css_default["field"],
|
|
1715
1812
|
children: [
|
|
1716
|
-
(0, react_jsx_runtime.
|
|
1813
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
1717
1814
|
className: ModelsSection_module_css_default["fieldLabel"],
|
|
1718
|
-
children: t("keyInput")
|
|
1815
|
+
children: [t("keyInput"), authHelp]
|
|
1719
1816
|
}),
|
|
1720
|
-
(0, react_jsx_runtime.jsx)(
|
|
1721
|
-
|
|
1722
|
-
type: "password",
|
|
1723
|
-
autoComplete: "new-password",
|
|
1817
|
+
(0, react_jsx_runtime.jsx)(ApiKeyInput, {
|
|
1818
|
+
t,
|
|
1724
1819
|
value: keyDraft,
|
|
1725
1820
|
placeholder: keyPlaceholder,
|
|
1726
1821
|
"aria-label": t("keyInput"),
|
|
1727
1822
|
"aria-invalid": shownKeyFailure !== void 0,
|
|
1823
|
+
"aria-describedby": credentialHint === void 0 ? void 0 : `${props.provider}-credential-hint`,
|
|
1728
1824
|
required: props.credentialRequired === true,
|
|
1729
1825
|
autoFocus: props.autoFocusCredential === true,
|
|
1730
|
-
disabled
|
|
1826
|
+
disabled,
|
|
1731
1827
|
onChange: (event) => {
|
|
1732
1828
|
setKeyDraft(event.target.value);
|
|
1733
1829
|
}
|
|
1734
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
|
+
}),
|
|
1735
1836
|
shownKeyFailure === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
1736
1837
|
className: ModelsSection_module_css_default["error"],
|
|
1737
1838
|
children: t(shownKeyFailure)
|
|
@@ -1773,19 +1874,19 @@ window.__ModuleLoader__.load({
|
|
|
1773
1874
|
className: ModelsSection_module_css_default["input"],
|
|
1774
1875
|
type: "text",
|
|
1775
1876
|
value: stringAt(draft, "baseURL") ?? "",
|
|
1776
|
-
placeholder: family === "deepseek" ? t("deepSeekBaseUrl") :
|
|
1777
|
-
"aria-describedby":
|
|
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`,
|
|
1778
1879
|
"aria-label": t("baseUrl"),
|
|
1779
1880
|
disabled,
|
|
1780
1881
|
onChange: (event) => {
|
|
1781
1882
|
setField("baseURL", event.target.value === "" ? void 0 : event.target.value);
|
|
1782
1883
|
}
|
|
1783
1884
|
}),
|
|
1784
|
-
|
|
1885
|
+
endpointHint === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
1785
1886
|
id: `${props.provider}-endpoint-hint`,
|
|
1786
1887
|
className: ModelsSection_module_css_default["advancedHint"],
|
|
1787
|
-
children:
|
|
1788
|
-
})
|
|
1888
|
+
children: endpointHint
|
|
1889
|
+
})
|
|
1789
1890
|
]
|
|
1790
1891
|
}),
|
|
1791
1892
|
ownsIdentity ? (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1896,12 +1997,17 @@ window.__ModuleLoader__.load({
|
|
|
1896
1997
|
* post-apply reload.
|
|
1897
1998
|
*/
|
|
1898
1999
|
/** Render an editor for either the setup posture or an expanded provider row. */
|
|
1899
|
-
function renderProviderEditor({ target, ...props }) {
|
|
2000
|
+
function renderProviderEditor({ target, row, ...props }) {
|
|
1900
2001
|
return (0, react_jsx_runtime.jsx)(ProviderEditor, {
|
|
1901
2002
|
provider: target.provider,
|
|
1902
2003
|
displayName: target.displayName,
|
|
1903
2004
|
settingsPath: target.settingsPath,
|
|
1904
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 },
|
|
1905
2011
|
...props
|
|
1906
2012
|
});
|
|
1907
2013
|
}
|
|
@@ -1966,7 +2072,10 @@ window.__ModuleLoader__.load({
|
|
|
1966
2072
|
settingsNs: row.entry.settingsNs,
|
|
1967
2073
|
settingsPath: row.entry.settingsPath,
|
|
1968
2074
|
...credentialRef === void 0 ? {} : { credentialRef },
|
|
1969
|
-
...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 }
|
|
1970
2079
|
};
|
|
1971
2080
|
}
|
|
1972
2081
|
const CLAUDE_DISCOVERY_API = "mofeng-anthropic-models";
|
|
@@ -2135,6 +2244,10 @@ window.__ModuleLoader__.load({
|
|
|
2135
2244
|
}
|
|
2136
2245
|
} : row)
|
|
2137
2246
|
};
|
|
2247
|
+
/** A new or failed surface waits for a current snapshot; background refreshes preserve its drafts. */
|
|
2248
|
+
const [hasReadySnapshot, setHasReadySnapshot] = (0, react.useState)(state.status === "ready");
|
|
2249
|
+
if (state.status === "ready" && !hasReadySnapshot) setHasReadySnapshot(true);
|
|
2250
|
+
if (state.status === "error" && hasReadySnapshot) setHasReadySnapshot(false);
|
|
2138
2251
|
const [editing, setEditing] = (0, react.useState)(void 0);
|
|
2139
2252
|
const [addOpen, setAddOpen] = (0, react.useState)(false);
|
|
2140
2253
|
const [addMode, setAddMode] = (0, react.useState)("catalog");
|
|
@@ -2224,6 +2337,16 @@ window.__ModuleLoader__.load({
|
|
|
2224
2337
|
})]
|
|
2225
2338
|
});
|
|
2226
2339
|
}
|
|
2340
|
+
if (!hasReadySnapshot && state.status !== "ready") return (0, react_jsx_runtime.jsxs)("div", {
|
|
2341
|
+
className: ModelsSection_module_css_default["section"],
|
|
2342
|
+
children: [(0, react_jsx_runtime.jsx)("h2", {
|
|
2343
|
+
className: ModelsSection_module_css_default["title"],
|
|
2344
|
+
children: t("title")
|
|
2345
|
+
}), (0, react_jsx_runtime.jsx)("p", {
|
|
2346
|
+
className: ModelsSection_module_css_default["intro"],
|
|
2347
|
+
children: t("intro")
|
|
2348
|
+
})]
|
|
2349
|
+
});
|
|
2227
2350
|
const savedRow = savedTarget === void 0 ? void 0 : state.rows.find((row) => row.entry.provider === savedTarget.provider);
|
|
2228
2351
|
const savedIdentity = savedRow === void 0 ? savedTarget : {
|
|
2229
2352
|
provider: savedRow.entry.provider,
|
|
@@ -2303,9 +2426,10 @@ window.__ModuleLoader__.load({
|
|
|
2303
2426
|
error,
|
|
2304
2427
|
renderProviderEditor({
|
|
2305
2428
|
target,
|
|
2429
|
+
row,
|
|
2430
|
+
thinkingPresets: isClaudeProvider(row, state),
|
|
2306
2431
|
namespace,
|
|
2307
2432
|
schema,
|
|
2308
|
-
thinkingPresets: isClaudeProvider(row, state),
|
|
2309
2433
|
operations,
|
|
2310
2434
|
t,
|
|
2311
2435
|
readOnly: !state.writable,
|
|
@@ -2344,6 +2468,13 @@ window.__ModuleLoader__.load({
|
|
|
2344
2468
|
className: ModelsSection_module_css_default["rowTag"],
|
|
2345
2469
|
children: t("claudeTypeTag")
|
|
2346
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,
|
|
2347
2478
|
credentialConfigured ? (0, react_jsx_runtime.jsx)("span", {
|
|
2348
2479
|
className: `${ModelsSection_module_css_default["credentialDot"]} ${ModelsSection_module_css_default["credentialDotConfigured"]}`,
|
|
2349
2480
|
role: "img",
|
|
@@ -2358,11 +2489,13 @@ window.__ModuleLoader__.load({
|
|
|
2358
2489
|
]
|
|
2359
2490
|
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
2360
2491
|
className: ModelsSection_module_css_default["rowActions"],
|
|
2361
|
-
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
2492
|
+
children: [row.entry.provider === "deepseek-account" ? null : (0, react_jsx_runtime.jsx)("button", {
|
|
2362
2493
|
type: "button",
|
|
2363
2494
|
className: ModelsSection_module_css_default["secondaryButton"],
|
|
2364
2495
|
"aria-label": providerCopy(t("editProvider"), target),
|
|
2496
|
+
disabled: !open && state.status !== "ready",
|
|
2365
2497
|
onClick: () => {
|
|
2498
|
+
if (!open && controller.store.getSnapshot().status !== "ready") return;
|
|
2366
2499
|
setSavedTarget(void 0);
|
|
2367
2500
|
setAddOpen(false);
|
|
2368
2501
|
setEditing(open ? void 0 : target);
|
|
@@ -2372,8 +2505,9 @@ window.__ModuleLoader__.load({
|
|
|
2372
2505
|
type: "button",
|
|
2373
2506
|
className: ModelsSection_module_css_default["dangerButton"],
|
|
2374
2507
|
"aria-label": providerCopy(t("removeProvider"), target),
|
|
2375
|
-
disabled: !state.writable,
|
|
2508
|
+
disabled: !state.writable || state.status !== "ready",
|
|
2376
2509
|
onClick: () => {
|
|
2510
|
+
if (controller.store.getSnapshot().status !== "ready") return;
|
|
2377
2511
|
setSavedTarget(void 0);
|
|
2378
2512
|
setDeleteFailure(void 0);
|
|
2379
2513
|
setDeleteTarget(target);
|
|
@@ -2390,9 +2524,10 @@ window.__ModuleLoader__.load({
|
|
|
2390
2524
|
}, { entryKey: row.entry.settingsNs }),
|
|
2391
2525
|
open ? renderProviderEditor({
|
|
2392
2526
|
target,
|
|
2527
|
+
row,
|
|
2528
|
+
thinkingPresets: isClaudeProvider(row, state),
|
|
2393
2529
|
namespace,
|
|
2394
2530
|
schema,
|
|
2395
|
-
thinkingPresets: isClaudeProvider(row, state),
|
|
2396
2531
|
operations,
|
|
2397
2532
|
t,
|
|
2398
2533
|
readOnly: !state.writable,
|
|
@@ -2482,6 +2617,10 @@ window.__ModuleLoader__.load({
|
|
|
2482
2617
|
schema,
|
|
2483
2618
|
settingsPath: draft.target.settingsPath,
|
|
2484
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 },
|
|
2485
2624
|
t,
|
|
2486
2625
|
readOnly: !state.writable,
|
|
2487
2626
|
onClose: (changed) => {
|
|
@@ -2547,8 +2686,9 @@ window.__ModuleLoader__.load({
|
|
|
2547
2686
|
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
2548
2687
|
type: "button",
|
|
2549
2688
|
className: ModelsSection_module_css_default["addButton"],
|
|
2550
|
-
disabled: !state.writable || !catalogEnabled && !customEnabled,
|
|
2689
|
+
disabled: !state.writable || state.status !== "ready" || !catalogEnabled && !customEnabled,
|
|
2551
2690
|
onClick: () => {
|
|
2691
|
+
if (controller.store.getSnapshot().status !== "ready") return;
|
|
2552
2692
|
const first = addable[0];
|
|
2553
2693
|
const initial = catalogEnabled ? "catalog" : "custom";
|
|
2554
2694
|
setSavedTarget(void 0);
|
|
@@ -2847,16 +2987,14 @@ window.__ModuleLoader__.load({
|
|
|
2847
2987
|
//#endregion
|
|
2848
2988
|
//#region lib/types/client/welcome-store.js
|
|
2849
2989
|
/**
|
|
2850
|
-
* Welcome-notice state derived from the welcome settings scope
|
|
2851
|
-
* the
|
|
2852
|
-
* remote browser's memory-mode scope never answers and the acknowledgement
|
|
2853
|
-
* 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.
|
|
2854
2992
|
*/
|
|
2855
2993
|
/* v8 ignore next 3 -- closed-union default only defends future source widening */
|
|
2856
2994
|
function assertNever(_value) {
|
|
2857
2995
|
throw new Error("unexpected welcome settings status");
|
|
2858
2996
|
}
|
|
2859
|
-
/** Coordinates durable Host acknowledgement
|
|
2997
|
+
/** Coordinates the durable Host acknowledgement. */
|
|
2860
2998
|
var WelcomeNoticeStore = class {
|
|
2861
2999
|
scope;
|
|
2862
3000
|
/** uSES-safe state source shared by the registered welcome step. */
|
|
@@ -2865,13 +3003,8 @@ window.__ModuleLoader__.load({
|
|
|
2865
3003
|
acknowledged: false,
|
|
2866
3004
|
error: null
|
|
2867
3005
|
});
|
|
2868
|
-
localAcknowledged = false;
|
|
2869
3006
|
saving = false;
|
|
2870
3007
|
following;
|
|
2871
|
-
/**
|
|
2872
|
-
* @param scope - the welcome settings namespace scope; its memory mode is
|
|
2873
|
-
* what keeps a remote browser process-local.
|
|
2874
|
-
*/
|
|
2875
3008
|
constructor(scope) {
|
|
2876
3009
|
this.scope = scope;
|
|
2877
3010
|
}
|
|
@@ -2887,17 +3020,12 @@ window.__ModuleLoader__.load({
|
|
|
2887
3020
|
return Promise.resolve();
|
|
2888
3021
|
}
|
|
2889
3022
|
/**
|
|
2890
|
-
* Persist this copy version
|
|
2891
|
-
*
|
|
2892
|
-
*
|
|
2893
|
-
* @returns true when the
|
|
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.
|
|
2894
3027
|
*/
|
|
2895
3028
|
async acknowledge() {
|
|
2896
|
-
if (this.scope.getSnapshot().mode === "memory") {
|
|
2897
|
-
this.localAcknowledged = true;
|
|
2898
|
-
this.derive();
|
|
2899
|
-
return true;
|
|
2900
|
-
}
|
|
2901
3029
|
this.saving = true;
|
|
2902
3030
|
this.store.update((state) => {
|
|
2903
3031
|
state.status = "saving";
|
|
@@ -2924,14 +3052,6 @@ window.__ModuleLoader__.load({
|
|
|
2924
3052
|
derive() {
|
|
2925
3053
|
if (this.saving) return;
|
|
2926
3054
|
const scope = this.scope.getSnapshot();
|
|
2927
|
-
if (scope.mode === "memory") {
|
|
2928
|
-
this.store.update((state) => {
|
|
2929
|
-
state.status = "ready";
|
|
2930
|
-
state.acknowledged = this.localAcknowledged;
|
|
2931
|
-
state.error = null;
|
|
2932
|
-
});
|
|
2933
|
-
return;
|
|
2934
|
-
}
|
|
2935
3055
|
switch (scope.status) {
|
|
2936
3056
|
case "loading":
|
|
2937
3057
|
this.store.update((state) => {
|
|
@@ -2976,10 +3096,6 @@ window.__ModuleLoader__.load({
|
|
|
2976
3096
|
*/
|
|
2977
3097
|
function createModelsOperations(ctx) {
|
|
2978
3098
|
return {
|
|
2979
|
-
describeCredential: async (ref) => {
|
|
2980
|
-
const response = await ctx.remote.credentials.describe([ref]);
|
|
2981
|
-
return response.ok ? response.value[ref] : void 0;
|
|
2982
|
-
},
|
|
2983
3099
|
storeCredential: async (ref, value) => {
|
|
2984
3100
|
const response = await ctx.remote.credentials.set(ref, value);
|
|
2985
3101
|
return response.ok ? void 0 : response.error.message;
|
|
@@ -3067,19 +3183,30 @@ window.__ModuleLoader__.load({
|
|
|
3067
3183
|
savedProvider: "Saved {provider}.",
|
|
3068
3184
|
credentialConfigured: "API key configured",
|
|
3069
3185
|
credentialMissing: "API key missing",
|
|
3186
|
+
accountSignedIn: "Signed in",
|
|
3070
3187
|
readOnly: "The settings document is read-only in this deployment.",
|
|
3071
3188
|
loadFailed: "Loading the provider directory failed",
|
|
3072
3189
|
conflict: "Someone else changed these settings while this card was open. Close it and reopen to edit the current values.",
|
|
3073
3190
|
retry: "Retry",
|
|
3074
3191
|
keyInput: "API key",
|
|
3192
|
+
keyReveal: "Show secret",
|
|
3193
|
+
keyHide: "Hide secret",
|
|
3075
3194
|
keyPlaceholder: "Enter your API key",
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
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",
|
|
3079
3203
|
customized: "Customized settings",
|
|
3080
3204
|
baseUrl: "Base URL",
|
|
3081
|
-
baseUrlDefault: "
|
|
3082
|
-
|
|
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)",
|
|
3083
3210
|
deepSeekEndpointHint: "Use an API endpoint compatible with Anthropic Messages.",
|
|
3084
3211
|
models: "Models",
|
|
3085
3212
|
modelsInherited: "Using the adapter defaults",
|
|
@@ -3196,19 +3323,30 @@ window.__ModuleLoader__.load({
|
|
|
3196
3323
|
savedProvider: "已保存 {provider}。",
|
|
3197
3324
|
credentialConfigured: "API 密钥已配置",
|
|
3198
3325
|
credentialMissing: "API 密钥缺失",
|
|
3326
|
+
accountSignedIn: "已登录",
|
|
3199
3327
|
readOnly: "当前部署的设置文档为只读。",
|
|
3200
3328
|
loadFailed: "加载提供商目录失败",
|
|
3201
3329
|
conflict: "这张卡片打开期间,这些设置已被其他地方改动。请关闭后重新打开,在当前值上编辑。",
|
|
3202
3330
|
retry: "重试",
|
|
3203
3331
|
keyInput: "API 密钥",
|
|
3332
|
+
keyReveal: "显示密钥",
|
|
3333
|
+
keyHide: "隐藏密钥",
|
|
3204
3334
|
keyPlaceholder: "输入 API 密钥",
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
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: "认证说明",
|
|
3208
3343
|
customized: "自定义设置",
|
|
3209
3344
|
baseUrl: "API 地址",
|
|
3210
|
-
baseUrlDefault: "
|
|
3211
|
-
|
|
3345
|
+
baseUrlDefault: "没有默认地址",
|
|
3346
|
+
baseUrlEnvironment: "提供方地址配置:{env}",
|
|
3347
|
+
baseUrlConfigured: "由提供方配置地址",
|
|
3348
|
+
baseUrlPlaceholder: "{url}",
|
|
3349
|
+
deepSeekBaseUrl: "https://api.deepseek.com/anthropic(默认使用环境 DEEPSEEK_BASE_URL)",
|
|
3212
3350
|
deepSeekEndpointHint: "请填写兼容 Anthropic Messages 协议的 API 地址。",
|
|
3213
3351
|
models: "模型目录",
|
|
3214
3352
|
modelsInherited: "正在使用适配器默认模型",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mofeng2223/dsh-claude-provider",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Custom Claude provider support for DeepSeek Harness 0.2.1-alpha.
|
|
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.
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.1-alpha.3"
|
|
66
66
|
}
|
|
67
67
|
}
|