dsh-nvidia-models-panel 1.3.20 → 1.3.21
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/package.json +1 -1
- package/src/index.js +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-nvidia-models-panel",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Nvidia 模型面板 — 检测 NVIDIA NIM 可用模型、逐个真实试调用验证、面板内保存 API Key,一键配置进 DeepSeek Harness 设置",
|
|
6
6
|
"description.en": "Detects available NVIDIA NIM models, verifies each with a real streaming call, saves the API key in-panel, and one-click configures DeepSeek Harness settings.",
|
package/src/index.js
CHANGED
|
@@ -842,19 +842,28 @@ async function dockStatusSnapshot(ctx, sessionId) {
|
|
|
842
842
|
// 当前会话已切到别的模型时隐藏徽标:读会话最新 request/header 的 provider。
|
|
843
843
|
// best-effort:读不到 header 时保持原逻辑,避免误隐藏。
|
|
844
844
|
let currentProvider = '';
|
|
845
|
+
let currentModel = '';
|
|
845
846
|
try {
|
|
846
847
|
const session = sessionFor(ctx, sessionId);
|
|
847
848
|
const header = session && typeof session.requestHeader === 'function' ? session.requestHeader() : null;
|
|
848
|
-
if (header && header.config
|
|
849
|
-
|
|
849
|
+
if (header && header.config) {
|
|
850
|
+
if (typeof header.config.provider === 'string') {
|
|
851
|
+
currentProvider = header.config.provider;
|
|
852
|
+
}
|
|
853
|
+
if (typeof header.config.model === 'string') {
|
|
854
|
+
currentModel = header.config.model;
|
|
855
|
+
}
|
|
850
856
|
}
|
|
851
857
|
} catch {
|
|
852
858
|
currentProvider = '';
|
|
859
|
+
currentModel = '';
|
|
853
860
|
}
|
|
854
861
|
const usingGroup = !currentProvider || currentProvider === 'nvidia-group';
|
|
862
|
+
// best-effort: 读不到 model 信息时不隐藏;只有明确选了非 auto 的具体模型才隐藏。
|
|
863
|
+
const isAutoModel = !currentModel || isAutoMemberId(currentModel);
|
|
855
864
|
return {
|
|
856
865
|
ok: true,
|
|
857
|
-
active: Boolean(dockGroupState.memberName) && usingGroup,
|
|
866
|
+
active: Boolean(dockGroupState.memberName) && usingGroup && isAutoModel,
|
|
858
867
|
memberName: dockGroupState.memberName || '',
|
|
859
868
|
memberId: dockGroupState.memberId || '',
|
|
860
869
|
switchFrom: justSwitched ? dockGroupState.switchFrom : '',
|