@mofeng2223/dsh-claude-provider 0.5.1 → 0.5.3
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 +50 -18
- 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-border-l4);border-radius:16px;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);color:var(--dsw-alias-label-secondary);border-radius:4px;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;height:36px;font:inherit;cursor:pointer;border:none;border-radius:18px;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;height:36px;color:var(--dsw-alias-state-error-primary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:18px;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:14px;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-alias-border-l3);outline:none}.zGbnIq_editor{background:var(--dsw-alias-bg-module-platform);border-radius:12px;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;height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:14px;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:16px;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{background:var(--dsw-alias-bg-module-platform);border-radius:12px;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{cursor:pointer;width:fit-content;color:var(--dsw-alias-label-secondary);border-radius:6px;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:10px;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;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;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);text-align:center;border-radius:8px;padding:12px}.zGbnIq_addModelButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);height:28px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;border-radius:14px;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);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;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-brand-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:6px}.zGbnIq_candidateLabel{cursor:pointer;align-items:center;gap:8px;padding:6px 8px;display:flex}.zGbnIq_candidateName{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;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_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}";
|
|
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");
|
|
@@ -76,9 +76,9 @@ window.__ModuleLoader__.load({
|
|
|
76
76
|
"advancedHint": "zGbnIq_advancedHint",
|
|
77
77
|
"candidate": "zGbnIq_candidate",
|
|
78
78
|
"candidateEmpty": "zGbnIq_candidateEmpty",
|
|
79
|
+
"candidateId": "zGbnIq_candidateId",
|
|
79
80
|
"candidateLabel": "zGbnIq_candidateLabel",
|
|
80
81
|
"candidateList": "zGbnIq_candidateList",
|
|
81
|
-
"candidateName": "zGbnIq_candidateName",
|
|
82
82
|
"candidateSearch": "zGbnIq_candidateSearch",
|
|
83
83
|
"candidateToolbar": "zGbnIq_candidateToolbar",
|
|
84
84
|
"credentialDot": "zGbnIq_credentialDot",
|
|
@@ -884,9 +884,9 @@ window.__ModuleLoader__.load({
|
|
|
884
884
|
toggle(candidate.id);
|
|
885
885
|
}
|
|
886
886
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
887
|
-
className: ModelsSection_module_css_default["
|
|
887
|
+
className: ModelsSection_module_css_default["candidateId"],
|
|
888
888
|
title: candidate.name ?? candidate.id,
|
|
889
|
-
children: candidate.
|
|
889
|
+
children: candidate.id
|
|
890
890
|
})]
|
|
891
891
|
})
|
|
892
892
|
}, candidate.id))
|
|
@@ -914,7 +914,7 @@ window.__ModuleLoader__.load({
|
|
|
914
914
|
* Join declared configurable providers with the currently registered routes.
|
|
915
915
|
* @param registered - live provider routes in registration order.
|
|
916
916
|
* @param directory - declared configurable providers in declaration order.
|
|
917
|
-
* @returns
|
|
917
|
+
* @returns account and official routes first, then other routes in their original order.
|
|
918
918
|
*/
|
|
919
919
|
function joinProviderDirectory(registered, directory) {
|
|
920
920
|
const active = new Set(registered.map((provider) => provider.id));
|
|
@@ -938,7 +938,7 @@ window.__ModuleLoader__.load({
|
|
|
938
938
|
active: true
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
|
-
return rows;
|
|
941
|
+
return rows.toSorted((left, right) => (left.provider === "deepseek-account" ? 0 : left.provider === "deepseek-official" ? 1 : 2) - (right.provider === "deepseek-account" ? 0 : right.provider === "deepseek-official" ? 1 : 2));
|
|
942
942
|
}
|
|
943
943
|
/**
|
|
944
944
|
* Derive the conventional credential reference for a provider route: the v1
|
|
@@ -1046,11 +1046,15 @@ window.__ModuleLoader__.load({
|
|
|
1046
1046
|
entry,
|
|
1047
1047
|
configured: namespace !== void 0 && (entry.settingsPath.length === 0 || this.schema.getPath(namespace.value, entry.settingsPath) !== void 0),
|
|
1048
1048
|
removable: namespace !== void 0 && entry.settingsPath.length > 0 && this.schema.hasPath(namespace.user, entry.settingsPath) && !this.schema.hasPath(namespace.base, entry.settingsPath),
|
|
1049
|
-
apiKeyEnv: apiKeyEnvOf(namespace, entry.settingsPath, this.schema),
|
|
1049
|
+
apiKeyEnv: entry.provider === "deepseek-account" ? void 0 : apiKeyEnvOf(namespace, entry.settingsPath, this.schema),
|
|
1050
1050
|
credential: void 0
|
|
1051
1051
|
};
|
|
1052
1052
|
});
|
|
1053
|
-
|
|
1053
|
+
if (rows.some((row) => row.entry.provider === "deepseek-account")) {
|
|
1054
|
+
const catalog = await this.ctx.remote.session.modelCatalog();
|
|
1055
|
+
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
|
+
}
|
|
1057
|
+
const refs = [...new Set(rows.filter((row) => row.entry.provider !== "deepseek-account").map((row) => row.apiKeyEnv ?? deriveKeyRef(row.entry.provider)))];
|
|
1054
1058
|
let credentials = {};
|
|
1055
1059
|
let credentialError = null;
|
|
1056
1060
|
if (refs.length > 0) {
|
|
@@ -1064,7 +1068,8 @@ window.__ModuleLoader__.load({
|
|
|
1064
1068
|
s.error = null;
|
|
1065
1069
|
s.credentialError = credentialError;
|
|
1066
1070
|
s.writable = writable;
|
|
1067
|
-
s.rows = rows.map((row) => {
|
|
1071
|
+
s.rows = rows.filter((row) => row.entry.provider !== "deepseek-account" || row.accountAvailable === true).map((row) => {
|
|
1072
|
+
if (row.entry.provider === "deepseek-account") return row;
|
|
1068
1073
|
const named = row.apiKeyEnv === void 0 ? void 0 : credentials[row.apiKeyEnv];
|
|
1069
1074
|
const derived = row.apiKeyEnv !== void 0 ? void 0 : credentials[deriveKeyRef(row.entry.provider)];
|
|
1070
1075
|
return {
|
|
@@ -1097,6 +1102,7 @@ window.__ModuleLoader__.load({
|
|
|
1097
1102
|
*/
|
|
1098
1103
|
function providerUsable(row) {
|
|
1099
1104
|
if (!row.entry.active) return false;
|
|
1105
|
+
if (row.entry.provider === "deepseek-account") return row.accountAvailable === true;
|
|
1100
1106
|
if (row.apiKeyEnv === void 0) return true;
|
|
1101
1107
|
return row.credential?.configured === true;
|
|
1102
1108
|
}
|
|
@@ -1400,7 +1406,7 @@ window.__ModuleLoader__.load({
|
|
|
1400
1406
|
(0, react_jsx_runtime.jsx)("input", {
|
|
1401
1407
|
className: ModelsSection_module_css_default["input"],
|
|
1402
1408
|
type: "password",
|
|
1403
|
-
autoComplete: "
|
|
1409
|
+
autoComplete: "new-password",
|
|
1404
1410
|
value: keyDraft,
|
|
1405
1411
|
placeholder: t("keyPlaceholder"),
|
|
1406
1412
|
"aria-label": t("keyInput"),
|
|
@@ -1555,7 +1561,8 @@ window.__ModuleLoader__.load({
|
|
|
1555
1561
|
]);
|
|
1556
1562
|
const fallback = schema.getPath(namespace.value, settingsPath);
|
|
1557
1563
|
const disabled = props.readOnly || busy;
|
|
1558
|
-
const
|
|
1564
|
+
const accountProvider = props.provider === "deepseek-account";
|
|
1565
|
+
const layout = accountProvider ? "deepseek" : layoutOf(namespace.ns);
|
|
1559
1566
|
const keyRef = refFor(schema, namespace, settingsPath, props.provider);
|
|
1560
1567
|
const protocols = (0, react.useMemo)(() => layout === "pi-ai" ? protocolChoices(namespace, schema) : [], [
|
|
1561
1568
|
layout,
|
|
@@ -1563,6 +1570,7 @@ window.__ModuleLoader__.load({
|
|
|
1563
1570
|
schema
|
|
1564
1571
|
]);
|
|
1565
1572
|
(0, react.useEffect)(() => {
|
|
1573
|
+
if (accountProvider) return;
|
|
1566
1574
|
let stale = false;
|
|
1567
1575
|
setKeyState(void 0);
|
|
1568
1576
|
operations.describeCredential(keyRef).then((described) => {
|
|
@@ -1572,7 +1580,11 @@ window.__ModuleLoader__.load({
|
|
|
1572
1580
|
return () => {
|
|
1573
1581
|
stale = true;
|
|
1574
1582
|
};
|
|
1575
|
-
}, [
|
|
1583
|
+
}, [
|
|
1584
|
+
operations,
|
|
1585
|
+
keyRef,
|
|
1586
|
+
accountProvider
|
|
1587
|
+
]);
|
|
1576
1588
|
const stringAt = (source, key) => {
|
|
1577
1589
|
const value = schema.getPath(source, [key]);
|
|
1578
1590
|
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
@@ -1693,6 +1705,11 @@ window.__ModuleLoader__.load({
|
|
|
1693
1705
|
setDraft((current) => schema.deletePath(current, ["models"]));
|
|
1694
1706
|
}
|
|
1695
1707
|
};
|
|
1708
|
+
if (accountProvider) return (0, react_jsx_runtime.jsx)(DeepSeekModelsEditor, {
|
|
1709
|
+
...catalogProps,
|
|
1710
|
+
defaultContextWindow: typeof defaultContextWindow === "number" ? defaultContextWindow : void 0,
|
|
1711
|
+
defaultMaxTokens: typeof defaultMaxTokens === "number" ? defaultMaxTokens : void 0
|
|
1712
|
+
});
|
|
1696
1713
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
1697
1714
|
className: ModelsSection_module_css_default["field"],
|
|
1698
1715
|
children: [
|
|
@@ -1703,7 +1720,7 @@ window.__ModuleLoader__.load({
|
|
|
1703
1720
|
(0, react_jsx_runtime.jsx)("input", {
|
|
1704
1721
|
className: ModelsSection_module_css_default["input"],
|
|
1705
1722
|
type: "password",
|
|
1706
|
-
autoComplete: "
|
|
1723
|
+
autoComplete: "new-password",
|
|
1707
1724
|
value: keyDraft,
|
|
1708
1725
|
placeholder: keyPlaceholder,
|
|
1709
1726
|
"aria-label": t("keyInput"),
|
|
@@ -1858,7 +1875,8 @@ window.__ModuleLoader__.load({
|
|
|
1858
1875
|
/**
|
|
1859
1876
|
* Models settings section: the provider rows joined from the configurable
|
|
1860
1877
|
* directory, settings namespaces, and credential states, with one editor
|
|
1861
|
-
* card at a time. Rows
|
|
1878
|
+
* card at a time. Rows retain the account-first order supplied by the store
|
|
1879
|
+
* and expose only confirmed API-key state through accessible
|
|
1862
1880
|
* solid configured or missing dots. A whole-section provider without a
|
|
1863
1881
|
* configured key renders as its open setup card instead of a row, but only in
|
|
1864
1882
|
* the first-run posture — no provider on the page can serve requests yet — and
|
|
@@ -1924,7 +1942,7 @@ window.__ModuleLoader__.load({
|
|
|
1924
1942
|
* @returns whether to render the setup card.
|
|
1925
1943
|
*/
|
|
1926
1944
|
function needsSetup(row, anyUsable) {
|
|
1927
|
-
if (anyUsable) return false;
|
|
1945
|
+
if (anyUsable || row.entry.provider === "deepseek-account") return false;
|
|
1928
1946
|
if (row.entry.settingsPath.length > 0) return false;
|
|
1929
1947
|
return row.credential?.configured !== true;
|
|
1930
1948
|
}
|
|
@@ -2103,7 +2121,17 @@ window.__ModuleLoader__.load({
|
|
|
2103
2121
|
}
|
|
2104
2122
|
function Loaded({ injected, renderSlot }) {
|
|
2105
2123
|
const { controller, operations, schema, t } = injected;
|
|
2106
|
-
const
|
|
2124
|
+
const snapshot = injected.useSnapshot((value) => value);
|
|
2125
|
+
const state = {
|
|
2126
|
+
...snapshot,
|
|
2127
|
+
rows: snapshot.rows.map((row) => row.entry.provider === "deepseek-account" ? {
|
|
2128
|
+
...row,
|
|
2129
|
+
entry: {
|
|
2130
|
+
...row.entry,
|
|
2131
|
+
displayName: t("deepSeekAccount")
|
|
2132
|
+
}
|
|
2133
|
+
} : row)
|
|
2134
|
+
};
|
|
2107
2135
|
const [editing, setEditing] = (0, react.useState)(void 0);
|
|
2108
2136
|
const [addOpen, setAddOpen] = (0, react.useState)(false);
|
|
2109
2137
|
const [addMode, setAddMode] = (0, react.useState)("catalog");
|
|
@@ -2540,7 +2568,7 @@ window.__ModuleLoader__.load({
|
|
|
2540
2568
|
className: ModelsSection_module_css_default["deleteDialog"],
|
|
2541
2569
|
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2542
2570
|
variant: "outline",
|
|
2543
|
-
|
|
2571
|
+
"data-modal-autofocus": true,
|
|
2544
2572
|
disabled: deleting,
|
|
2545
2573
|
onClick: closeDelete,
|
|
2546
2574
|
children: t("cancel")
|
|
@@ -3012,6 +3040,7 @@ window.__ModuleLoader__.load({
|
|
|
3012
3040
|
/** English strings (the key-set source of truth for this pair). */
|
|
3013
3041
|
const en = {
|
|
3014
3042
|
nav: "Models",
|
|
3043
|
+
deepSeekAccount: "DeepSeek Account",
|
|
3015
3044
|
title: "Models",
|
|
3016
3045
|
intro: "Enter your API keys to use models from the following providers.",
|
|
3017
3046
|
edit: "Edit",
|
|
@@ -3140,6 +3169,7 @@ window.__ModuleLoader__.load({
|
|
|
3140
3169
|
/** Chinese strings (same keys as {@link en}). */
|
|
3141
3170
|
const zh = {
|
|
3142
3171
|
nav: "模型",
|
|
3172
|
+
deepSeekAccount: "DeepSeek 账号",
|
|
3143
3173
|
title: "模型",
|
|
3144
3174
|
intro: "填入各提供商的 API 密钥即可使用其模型。",
|
|
3145
3175
|
edit: "编辑",
|
|
@@ -4188,6 +4218,7 @@ window.__ModuleLoader__.load({
|
|
|
4188
4218
|
"remote.credentials",
|
|
4189
4219
|
"remote.llm",
|
|
4190
4220
|
"remote.settings",
|
|
4221
|
+
"remote.session",
|
|
4191
4222
|
"configForms",
|
|
4192
4223
|
"settingsSchema"
|
|
4193
4224
|
];
|
|
@@ -4237,6 +4268,7 @@ window.__ModuleLoader__.load({
|
|
|
4237
4268
|
ctx.remote.$on("settings/document-updated", () => {
|
|
4238
4269
|
refreshModels();
|
|
4239
4270
|
}),
|
|
4271
|
+
ctx.remote.$on("credentials/record-updated", refreshModels),
|
|
4240
4272
|
ctx.remote.$on("credentials/reference-updated", refreshModels),
|
|
4241
4273
|
ctx.remote.$on("credentials/updated", refreshModels),
|
|
4242
4274
|
ctx.remote.$on("llm/adapters-updated", refreshModels),
|
|
@@ -4264,7 +4296,7 @@ window.__ModuleLoader__.load({
|
|
|
4264
4296
|
}
|
|
4265
4297
|
}
|
|
4266
4298
|
}, ModelsSection));
|
|
4267
|
-
ctx.slots.inject("settings.onboarding", () => ctx.slots.register({
|
|
4299
|
+
if (!("dshDesktop" in globalThis)) ctx.slots.inject("settings.onboarding", () => ctx.slots.register({
|
|
4268
4300
|
name: "settings.onboarding",
|
|
4269
4301
|
id: "welcome-notice",
|
|
4270
4302
|
order: -100,
|
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.1.7-
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "Custom Claude provider support for DeepSeek Harness 0.1.7-rc.2",
|
|
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.1.7-
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "0.1.7-rc.2"
|
|
66
66
|
}
|
|
67
67
|
}
|