@dsh-plus/llm-pi 0.1.44 → 0.1.45
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 +42 -31
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -7,6 +7,42 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10
|
+
//#region ../shared/src/client/fields.tsx
|
|
11
|
+
/** 卡片按钮(与 CardChrome 页脚同一套类名与视觉)。 */
|
|
12
|
+
function Button(props) {
|
|
13
|
+
const p = props.prefix ?? "dshp";
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
className: `${p}-btn ${props.variant === "primary" ? `${p}-btnPrimary` : `${p}-btnGhost`}`,
|
|
17
|
+
disabled: props.disabled === true,
|
|
18
|
+
onClick: props.onClick,
|
|
19
|
+
children: props.label
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 勾选行:自绘圆角扁平开关(switch),对齐官方 WebUI 无原生 checkbox 的
|
|
24
|
+
* 设计语言(官方选择类控件全走胶囊/菜单,见 cardCss 的 -switch 规则)。
|
|
25
|
+
* 语义保持 checkbox(无障碍树与表单语义不变),视觉自绘。
|
|
26
|
+
*/
|
|
27
|
+
function CheckRow(props) {
|
|
28
|
+
const p = props.prefix ?? "dshp";
|
|
29
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
30
|
+
className: `${p}-checkRow`,
|
|
31
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
32
|
+
id: props.id,
|
|
33
|
+
type: "checkbox",
|
|
34
|
+
role: "switch",
|
|
35
|
+
"aria-checked": props.checked,
|
|
36
|
+
checked: props.checked,
|
|
37
|
+
disabled: props.disabled === true,
|
|
38
|
+
onChange: (event) => props.onEdit(event.target.checked)
|
|
39
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
40
|
+
htmlFor: props.id,
|
|
41
|
+
children: props.label
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
10
46
|
//#region ../shared/src/client/card.tsx
|
|
11
47
|
const IDLE_STATUS = {
|
|
12
48
|
kind: "idle",
|
|
@@ -55,12 +91,12 @@ window.__ModuleLoader__.load({
|
|
|
55
91
|
className: `${p}-status${props.status.kind === "error" ? ` ${p}-statusError` : ""}`,
|
|
56
92
|
role: "status",
|
|
57
93
|
children: props.status.text
|
|
58
|
-
}) : null, props.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
94
|
+
}) : null, props.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
95
|
+
prefix: p,
|
|
96
|
+
label: action.label,
|
|
97
|
+
variant: action.variant,
|
|
98
|
+
disabled: action.disabled,
|
|
99
|
+
onClick: action.onClick
|
|
64
100
|
}, action.key))]
|
|
65
101
|
})
|
|
66
102
|
]
|
|
@@ -139,31 +175,6 @@ window.__ModuleLoader__.load({
|
|
|
139
175
|
* @module @dsh-plus/shared/client/draft
|
|
140
176
|
*/
|
|
141
177
|
//#endregion
|
|
142
|
-
//#region ../shared/src/client/fields.tsx
|
|
143
|
-
/**
|
|
144
|
-
* 勾选行:自绘圆角扁平开关(switch),对齐官方 WebUI 无原生 checkbox 的
|
|
145
|
-
* 设计语言(官方选择类控件全走胶囊/菜单,见 cardCss 的 -switch 规则)。
|
|
146
|
-
* 语义保持 checkbox(无障碍树与表单语义不变),视觉自绘。
|
|
147
|
-
*/
|
|
148
|
-
function CheckRow(props) {
|
|
149
|
-
const p = props.prefix ?? "dshp";
|
|
150
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
151
|
-
className: `${p}-checkRow`,
|
|
152
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
153
|
-
id: props.id,
|
|
154
|
-
type: "checkbox",
|
|
155
|
-
role: "switch",
|
|
156
|
-
"aria-checked": props.checked,
|
|
157
|
-
checked: props.checked,
|
|
158
|
-
disabled: props.disabled === true,
|
|
159
|
-
onChange: (event) => props.onEdit(event.target.checked)
|
|
160
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
161
|
-
htmlFor: props.id,
|
|
162
|
-
children: props.label
|
|
163
|
-
})]
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
//#endregion
|
|
167
178
|
//#region ../shared/src/client/i18n.ts
|
|
168
179
|
/** 卡片通用文案(save/discard/unsaved/loading 等四插件共有键)。 */
|
|
169
180
|
const commonZh = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/llm-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"description": "dsh-plus service+ui plugin: 基于 PiAiAdapter 的自定义 LLM 路由(全量 compat、模型继承、pi-ai 内置目录;协议/compat/字段集现场推导,自动跟随已装 dsh)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@dsh-plus/shared": "0.1.
|
|
34
|
+
"@dsh-plus/shared": "0.1.35"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.5-alpha.1",
|