dsh-model-extension 1.2.1 → 1.2.3-alpha.1
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/README.md +4 -1
- package/lib/client.js +28 -17
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# dsh-model-extension
|
|
2
2
|
> 基于 deepseek-harness 的模型扩展插件
|
|
3
3
|
|
|
4
|
-
[](./LICENSE) [](https://www.npmjs.com/package/dsh-model-extension) [](./LICENSE) [](https://www.npmjs.com/package/dsh-model-extension) [](https://github.com/deepseek-ai/deepseek-harness)
|
|
5
5
|
|
|
6
6
|
| 供应商 | 模型 |
|
|
7
7
|
| --- | --- |
|
|
@@ -48,6 +48,9 @@ npm run build
|
|
|
48
48
|
|
|
49
49
|
## 版本历史
|
|
50
50
|
|
|
51
|
+
- **1.2.2**
|
|
52
|
+
- **1.2.3-alpha.1**
|
|
53
|
+
- 🐛修复 llm-deepseek 获取模型错误的问题
|
|
51
54
|
- **1.2.1**
|
|
52
55
|
- 🐛修复非 openai-completions API 协议网关保存报错
|
|
53
56
|
- 💪快速装入 model id 显示对应的API协议
|
package/lib/client.js
CHANGED
|
@@ -2145,7 +2145,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2145
2145
|
disabled,
|
|
2146
2146
|
onClick: props.onReset,
|
|
2147
2147
|
children: "恢复默认模型"
|
|
2148
|
-
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2148
|
+
}) : null, props.hideFetch === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2149
2149
|
type: "button",
|
|
2150
2150
|
className: models_plus_module_default["linkButton"],
|
|
2151
2151
|
disabled: disabled || busy || !askable || props.probeBlocked !== void 0,
|
|
@@ -2357,8 +2357,11 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2357
2357
|
* write — the draft comes from the user layer, so a wholesale replace can
|
|
2358
2358
|
* never delete fields outside the card.
|
|
2359
2359
|
*/
|
|
2360
|
-
/** The
|
|
2361
|
-
|
|
2360
|
+
/** The official DeepSeek roots, chosen by the profile's resolved protocol.
|
|
2361
|
+
* Mirrors the host's locales keys deepSeekChatBaseUrl / deepSeekMessagesBaseUrl
|
|
2362
|
+
* (@ 0.1.6-alpha.2), where the Messages protocol became the default. */
|
|
2363
|
+
const DEEPSEEK_CHAT_BASE_URL = "https://api.deepseek.com";
|
|
2364
|
+
const DEEPSEEK_MESSAGES_BASE_URL = "https://api.deepseek.com/anthropic";
|
|
2362
2365
|
/** The editor layout the owning namespace selects. */
|
|
2363
2366
|
function layoutOf(ns) {
|
|
2364
2367
|
if (ns === "llm-deepseek") return "deepseek";
|
|
@@ -2631,20 +2634,27 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2631
2634
|
}),
|
|
2632
2635
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2633
2636
|
className: models_plus_module_default["field"],
|
|
2634
|
-
children: [
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2637
|
+
children: [
|
|
2638
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
2639
|
+
className: models_plus_module_default["fieldLabel"],
|
|
2640
|
+
children: "API 地址"
|
|
2641
|
+
}),
|
|
2642
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2643
|
+
className: models_plus_module_default["input"],
|
|
2644
|
+
type: "text",
|
|
2645
|
+
value: stringAt(draft, "baseURL") ?? "",
|
|
2646
|
+
placeholder: layout === "deepseek" ? stringAt(fallback, "protocol") === "messages" ? DEEPSEEK_MESSAGES_BASE_URL : DEEPSEEK_CHAT_BASE_URL : stringAt(fallback, "baseURL") ?? "提供方默认",
|
|
2647
|
+
"aria-label": "API 地址",
|
|
2648
|
+
disabled,
|
|
2649
|
+
onChange: (event) => {
|
|
2650
|
+
setField("baseURL", event.target.value === "" ? void 0 : event.target.value);
|
|
2651
|
+
}
|
|
2652
|
+
}),
|
|
2653
|
+
layout === "deepseek" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2654
|
+
className: models_plus_module_default["advancedHint"],
|
|
2655
|
+
children: "请填写与当前连接配置兼容的 API 地址。"
|
|
2656
|
+
}) : null
|
|
2657
|
+
]
|
|
2648
2658
|
}),
|
|
2649
2659
|
layout === "pi-ai" && props.declared === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2650
2660
|
className: models_plus_module_default["field"],
|
|
@@ -2682,6 +2692,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2682
2692
|
defaultMaxTokens: typeof defaultMaxTokens === "number" ? defaultMaxTokens : void 0,
|
|
2683
2693
|
probe,
|
|
2684
2694
|
probeBlocked: keyFailure,
|
|
2695
|
+
hideFetch: layout === "deepseek",
|
|
2685
2696
|
operations,
|
|
2686
2697
|
disabled,
|
|
2687
2698
|
onChange: (rows) => {
|