@deepseek-ai/dsh-client-ui-settings-models 0.1.5-rc.1 → 0.1.6-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.i18n.yaml +2 -2
- package/README.md +3 -1
- package/README.zh.md +4 -2
- package/lib/client.js +29 -16
- package/lib/types/client/locales.d.ts +3 -0
- package/package.json +12 -11
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-settings-models/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: f1314b1db9ee231b2f67777491ac57aefc5ea85a
|
|
6
|
+
README.zh.md: 17861766c52333e90947a6c643c7df8cab4992b4
|
package/README.md
CHANGED
|
@@ -37,6 +37,8 @@ The primary field on an editor card is a single **API key** input — the page n
|
|
|
37
37
|
|
|
38
38
|
The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the deepseek placeholder shows the public endpoint), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. Profile `headers` remain deployment configuration in `settings.yaml` or Cordis config and have no Models-page editor. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. Reasoning effort is deliberately not among the editable fields: it is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each DeepSeek row edits `id`, optional display `name`, and optional `contextWindow`/`maxTokens`; existing fields outside that curated set survive edits.
|
|
39
39
|
|
|
40
|
+
The DeepSeek card edits the shared `llm-deepseek` endpoint, credentials, and model catalog without a protocol selector. When Cordis YAML selects Messages, the public endpoint placeholder is `https://api.deepseek.com/anthropic`. Saving the card preserves protocol configuration.
|
|
41
|
+
|
|
40
42
|
### Adding and deleting providers
|
|
41
43
|
|
|
42
44
|
The add flow is a card carrying the dormant-directory provider select — a bare-mounted `llm-pi-ai` offers its whole installed catalog before any route exists. **Add a custom provider** declares a route pi-ai does not ship; the create card asks for a unique **Provider ID**, an endpoint, a protocol, and at least one uniquely-identified model, because nothing can default those. The endpoint must be a parseable HTTP or HTTPS URL; localhost, IPv4 and IPv6 literals, and custom ports remain valid. A syntax error blocks both discovery and creation at the field, while a request failure remains a separate provider error. **Fetch available models** asks the `llm/discoverModels` Remote about the endpoint the form shows, so adding a provider is one pass instead of save-then-return; the reply opens a searchable picker rather than being written, and nothing is written until **Add selected**. Each selected candidate copies its id, display name, context window, and output-token cap into the editable row when disclosed, while an existing row retains its user-tuned values. Search matches model ids and optional display names without clearing hidden selections. **Select all** adds the visible results, while **Deselect all** clears the entire selection so hidden results cannot be adopted accidentally. A row is deletable only when the user layer alone carries it (removal restores the composition base), and its confirmation dialog names the provider.
|
|
@@ -69,7 +71,7 @@ Each settings write carries the card's current `revision`, so a concurrent write
|
|
|
69
71
|
|
|
70
72
|
### Onboarding coordinator
|
|
71
73
|
|
|
72
|
-
The notice step owns its exact copy in `src/client/locales.ts` and its acknowledgement version in `src/onboarding-copy.ts`; on loopback it compares and writes `ui-onboarding.welcomeNoticeVersion` through the existing settings API, and only an explicit Continue records the current version. A non-loopback browser cannot use that Host-only namespace, so acknowledgement is process-local and the notice returns after reload. The DeepSeek step renders the existing `ProviderEditor` in credential-only mode inside the shared onboarding modal; `credentials.set` stays the only secret write, and no provider settings are changed.
|
|
74
|
+
The notice step owns its exact copy in `src/client/locales.ts` and its acknowledgement version in `src/onboarding-copy.ts`; on loopback it compares and writes `ui-onboarding.welcomeNoticeVersion` through the existing settings API, and only an explicit Continue records the current version. A non-loopback browser cannot use that Host-only namespace, so acknowledgement is process-local and the notice returns after reload. The DeepSeek step targets `deepseek-official` in `llm-deepseek` and renders the existing `ProviderEditor` in credential-only mode inside the shared onboarding modal; `credentials.set` stays the only secret write, and no provider settings are changed.
|
|
73
75
|
|
|
74
76
|
</details>
|
|
75
77
|
|
package/README.zh.md
CHANGED
|
@@ -37,6 +37,8 @@ kind: "package-reference"
|
|
|
37
37
|
|
|
38
38
|
收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(deepseek 的占位符显示公共端点)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。Profile `headers` 仍是 `settings.yaml` 或 Cordis 配置中的部署配置,Models 页面不提供编辑器。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。推理等级刻意不在可编辑字段之列:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个 DeepSeek 行编辑 `id`、可选显示 `name` 与可选 `contextWindow`/`maxTokens`;该精选集之外的现有字段在编辑后仍会保留。
|
|
39
39
|
|
|
40
|
+
`llm-deepseek` 的 DeepSeek 卡片编辑共用的端点、凭据和模型目录,不提供协议选择器。Cordis YAML 选择 Messages 时,官方端点占位符为 `https://api.deepseek.com/anthropic`;保存卡片不会改写协议配置。
|
|
41
|
+
|
|
40
42
|
### 新增与删除提供方
|
|
41
43
|
|
|
42
44
|
「新增」流程是一张承载休眠目录提供方选择框的卡片——裸挂载的 `llm-pi-ai` 在任何路由存在之前就能提供其完整的已安装 catalog。**添加自定义提供方**声明一条 pi-ai 不提供的路由;创建卡片会索要唯一的 **Provider ID**、端点、协议与至少一个可唯一识别的模型,因为没有东西能为它们兜底。端点必须是可解析的 HTTP 或 HTTPS URL;localhost、IPv4 与 IPv6 字面地址以及自定义端口仍然有效。语法错误会在字段处阻止询问与创建,请求失败则继续作为独立的提供方错误显示。**获取可用模型**通过 `llm/discoverModels` Remote 查询表单显示的端点,因此新增提供方一次即可完成,而非先保存再返回;回复打开的是可搜索选择器而非直接写入,只有点击**添加所选**才会写入。每个选中候选会在提供方公布相应信息时,把 id、显示名、上下文窗口与最大输出 token 数复制进可编辑行;已经存在的行保留用户调整过的值。搜索会匹配模型 id 与可选显示名称,且不会清除隐藏项的勾选状态。**全选**会加入可见结果,而**取消全选**会清空全部勾选,以免意外采用隐藏结果。只有用户层单独携带某行时,该行才可删除(删除会恢复组合基线),其确认对话框会指名该提供方。
|
|
@@ -45,7 +47,7 @@ kind: "package-reference"
|
|
|
45
47
|
|
|
46
48
|
版本化声明步骤完成后,DeepSeek 步骤从同一份合并快照投影首次运行就绪状态。用户已经能够到达的**任何**提供方都会直接结束该步骤、不做渲染;只有没有任何提供方的用户才会被询问官方 DeepSeek 密钥。「稍后配置」只完成这次协调器遍历;适配器缺失、路由不活动、合并失败、只读部署或能力不可用时,该步骤不渲染即完成——Models 仍是诊断界面。
|
|
47
49
|
|
|
48
|
-
###
|
|
50
|
+
### 扩展 slot
|
|
49
51
|
|
|
50
52
|
本分区为仓库外分发的插件声明两个席位,类型定义在 [`src/client/slot-contract.ts`](src/client/slot-contract.ts) 并从 `./client` 导出。`settings.models.provider-card`(keyed)渲染在每张展示目录行的卡片内部——已保存行的卡片、其首次运行 setup 形态、以及「添加提供方」草稿卡——以 `entryKey = settingsNs` 分发,owner props 携带该行的 `ConfigurableProviderView`、其 configured 状态与已确认的 api-key 凭据状态,因此以某适配器家族的 namespace 注册一次即可收到该家族的全部卡片,含手工声明的路由;手工声明的草稿卡尚无目录行,保存之前不分发。`settings.models.footer`(list)渲染在行列表与新增控件之后。注册方通过 `ctx.slots.inject` 激活,并以 type-only import 引入本包 `/client` 入口;没有注册方时两个席位均不渲染任何内容。
|
|
51
53
|
|
|
@@ -69,7 +71,7 @@ kind: "package-reference"
|
|
|
69
71
|
|
|
70
72
|
### 引导协调器
|
|
71
73
|
|
|
72
|
-
声明步骤在 `src/client/locales.ts` 中持有精确文案,并在 `src/onboarding-copy.ts` 中持有确认版本;回环时它通过既有 settings API 比较并写入 `ui-onboarding.welcomeNoticeVersion`,且只有显式点击「继续」才会记录当前版本。非回环浏览器无法使用这个仅限宿主的 namespace,因此确认只保留在进程内,刷新后声明会再次出现。DeepSeek
|
|
74
|
+
声明步骤在 `src/client/locales.ts` 中持有精确文案,并在 `src/onboarding-copy.ts` 中持有确认版本;回环时它通过既有 settings API 比较并写入 `ui-onboarding.welcomeNoticeVersion`,且只有显式点击「继续」才会记录当前版本。非回环浏览器无法使用这个仅限宿主的 namespace,因此确认只保留在进程内,刷新后声明会再次出现。DeepSeek 步骤面向 `llm-deepseek` 中的 `deepseek-official`,在共享引导模态框内以仅凭据模式渲染既有 `ProviderEditor`;`credentials.set` 仍是唯一的机密写入,且不改变任何提供方设置。
|
|
73
75
|
|
|
74
76
|
</details>
|
|
75
77
|
|
package/lib/client.js
CHANGED
|
@@ -1402,8 +1402,6 @@ window.__ModuleLoader__.load({
|
|
|
1402
1402
|
* path ops against the stored section — the card names only the fields it can
|
|
1403
1403
|
* see instead of rebuilding the whole subtree from a partial descriptor.
|
|
1404
1404
|
*/
|
|
1405
|
-
/** The public DeepSeek endpoint shown as the deepseek base-URL placeholder. */
|
|
1406
|
-
const DEEPSEEK_PUBLIC_BASE_URL = "https://api.deepseek.com";
|
|
1407
1405
|
/** A user-section subtree as a plain draft object (absent → empty). */
|
|
1408
1406
|
function draftAt(schema, namespace, path) {
|
|
1409
1407
|
const subtree = schema.getPath(namespace.user, path);
|
|
@@ -1661,20 +1659,29 @@ window.__ModuleLoader__.load({
|
|
|
1661
1659
|
}) : null,
|
|
1662
1660
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
1663
1661
|
className: ModelsSection_module_css_default["field"],
|
|
1664
|
-
children: [
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1662
|
+
children: [
|
|
1663
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1664
|
+
className: ModelsSection_module_css_default["fieldLabel"],
|
|
1665
|
+
children: t("baseUrl")
|
|
1666
|
+
}),
|
|
1667
|
+
(0, react_jsx_runtime.jsx)("input", {
|
|
1668
|
+
className: ModelsSection_module_css_default["input"],
|
|
1669
|
+
type: "text",
|
|
1670
|
+
value: stringAt(draft, "baseURL") ?? "",
|
|
1671
|
+
placeholder: family === "deepseek" ? t(stringAt(fallback, "protocol") === "messages" ? "deepSeekMessagesBaseUrl" : "deepSeekChatBaseUrl") : stringAt(fallback, "baseURL") ?? t("baseUrlDefault"),
|
|
1672
|
+
"aria-describedby": family === "deepseek" ? `${props.provider}-endpoint-hint` : void 0,
|
|
1673
|
+
"aria-label": t("baseUrl"),
|
|
1674
|
+
disabled,
|
|
1675
|
+
onChange: (event) => {
|
|
1676
|
+
setField("baseURL", event.target.value === "" ? void 0 : event.target.value);
|
|
1677
|
+
}
|
|
1678
|
+
}),
|
|
1679
|
+
family === "deepseek" ? (0, react_jsx_runtime.jsx)("span", {
|
|
1680
|
+
id: `${props.provider}-endpoint-hint`,
|
|
1681
|
+
className: ModelsSection_module_css_default["advancedHint"],
|
|
1682
|
+
children: t("deepSeekEndpointHint")
|
|
1683
|
+
}) : null
|
|
1684
|
+
]
|
|
1678
1685
|
}),
|
|
1679
1686
|
ownsIdentity ? (0, react_jsx_runtime.jsxs)("div", {
|
|
1680
1687
|
className: ModelsSection_module_css_default["field"],
|
|
@@ -2679,6 +2686,9 @@ window.__ModuleLoader__.load({
|
|
|
2679
2686
|
customized: "Customized settings",
|
|
2680
2687
|
baseUrl: "Base URL",
|
|
2681
2688
|
baseUrlDefault: "Provider default",
|
|
2689
|
+
deepSeekChatBaseUrl: "https://api.deepseek.com",
|
|
2690
|
+
deepSeekMessagesBaseUrl: "https://api.deepseek.com/anthropic",
|
|
2691
|
+
deepSeekEndpointHint: "Use an endpoint compatible with the configured connection.",
|
|
2682
2692
|
models: "Models",
|
|
2683
2693
|
modelsInherited: "Using the adapter defaults",
|
|
2684
2694
|
modelsCustomized: "Customized model catalog",
|
|
@@ -2782,6 +2792,9 @@ window.__ModuleLoader__.load({
|
|
|
2782
2792
|
customized: "自定义设置",
|
|
2783
2793
|
baseUrl: "API 地址",
|
|
2784
2794
|
baseUrlDefault: "提供方默认",
|
|
2795
|
+
deepSeekChatBaseUrl: "https://api.deepseek.com",
|
|
2796
|
+
deepSeekMessagesBaseUrl: "https://api.deepseek.com/anthropic",
|
|
2797
|
+
deepSeekEndpointHint: "请填写与当前连接配置兼容的 API 地址。",
|
|
2785
2798
|
models: "模型目录",
|
|
2786
2799
|
modelsInherited: "正在使用适配器默认模型",
|
|
2787
2800
|
modelsCustomized: "已自定义模型目录",
|
|
@@ -34,6 +34,9 @@ export declare const en: {
|
|
|
34
34
|
customized: string;
|
|
35
35
|
baseUrl: string;
|
|
36
36
|
baseUrlDefault: string;
|
|
37
|
+
deepSeekChatBaseUrl: string;
|
|
38
|
+
deepSeekMessagesBaseUrl: string;
|
|
39
|
+
deepSeekEndpointHint: string;
|
|
37
40
|
models: string;
|
|
38
41
|
modelsInherited: string;
|
|
39
42
|
modelsCustomized: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-settings-models",
|
|
3
3
|
"description": "Models settings and shared product-onboarding dialogs over existing settings and credential joins",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -42,16 +42,17 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "~18.3.1",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-client-
|
|
48
|
-
"@deepseek-ai/dsh-client-
|
|
49
|
-
"@deepseek-ai/dsh-client-
|
|
50
|
-
"@deepseek-ai/dsh-client-ui-
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/
|
|
54
|
-
"@deepseek-ai/
|
|
45
|
+
"@deepseek-ai/dsh-remote-mock": "^0.1.6-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.6-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-client-store": "^0.1.6-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.6-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.6-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.1",
|
|
53
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-util-values": "^0.1.6-alpha.1"
|
|
55
56
|
},
|
|
56
57
|
"files": [
|
|
57
58
|
"lib/index.js",
|