@deepseek-ai/dsh-client-ui-model-selection 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 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-model-selection/README.md
5
- README.md: ae939ce678bcc50aa69c6c260f1782830eea103f
6
- README.zh.md: d9826f55a48f141f8baa65f230e24ea8d0254e30
5
+ README.md: f3c373619fec0482876d8ac540f06e188b5b34d9
6
+ README.zh.md: b8ee9cd73bb3fd5cdf0d0ecd8559b271c5abc933
package/README.md CHANGED
@@ -43,7 +43,7 @@ When the Host reports that no adapter serves the session's route, this plugin ra
43
43
  <details>
44
44
  <summary>Implementation internals — click to expand</summary>
45
45
 
46
- Two entries over ONE per-session directory owned by `ModelDirectoryResolver` (`ctx.modelDirectories`): the `/model` popupSelect contribution (registered through `ctx.commandUi`) and the composer's named `conversation.input.model` seat both load the session's advisory directory through `session.models` and submit through `session.selectModel` via the same `ModelDirectory` instance, so a switch made in either entry is what the other shows next. Directory loads and selections share a generation counter so an older response never overwrites a newer one; a connection reset drops every resident projection and repulls the Host-restored selection. Directories are per-session, resolved lazily, and disposed with the session scope; addressed subagent sessions expose neither entry. Every resident directory refetches directly on forwarded `llm/adapters-updated` and `settings/document-updated` owner events.
46
+ Two entries over ONE per-session directory owned by `ModelDirectoryResolver` (`ctx.modelDirectories`): the `/model` popupSelect contribution (registered through `ctx.commandUi`) and the composer's named `conversation.input.model` seat both load the session's advisory directory through `session.models` and submit through `session.selectModel` via the same `ModelDirectory` instance, so a switch made in either entry is what the other shows next. Directory loads and selections share a generation counter so an older response never overwrites a newer one; a connection reset drops every resident projection and repulls the Host-restored selection before display. Directories are per-session, resolved lazily, and disposed with the session scope; addressed subagent sessions expose neither entry. Every resident directory refetches directly on forwarded `llm/adapters-updated` and `settings/document-updated` owner events.
47
47
 
48
48
  </details>
49
49
 
@@ -91,4 +91,4 @@ None.
91
91
 
92
92
  </details>
93
93
 
94
- **Runtime invariant:** No companion is published. A single command contribution registration whose disposal is proven by the HMR-safety spec — it emits no cordis events and owns no cross-plugin mutable state.
94
+ **Runtime invariant:** No companion is published. The plugin registers a single command contribution, and the HMR-safety spec proves that the registration is disposed correctly. The plugin emits no Cordis events and owns no cross-plugin mutable state.
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有会话使用的模型与推理强度。两个界面呈现同一组按提供方分组的选择;所选模型决定可用的推理强度名称与默认值。完整选择从下一次请求开始生效;运行中的步骤保留其启动时的模型与推理强度。如果没有适配器可以服务会话路由,composer 会保持停用,直至路由恢复可用。
12
+ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有会话使用的模型与推理(reasoning)强度。两个界面呈现同一组按提供方分组的选择;所选模型决定可用的推理强度名称与默认值。完整选择从下一次请求开始生效;运行中的步骤保留其启动时的模型与推理强度。如果没有适配器可以服务会话路由,composer 会保持停用,直至路由恢复可用。
13
13
 
14
14
  ## 目录
15
15
 
@@ -25,7 +25,7 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
- 与 `ui-conversation` 及命令包一起挂载本插件;composer 随即在待处理指示器旁显示模型位,`/model` 则以弹窗打开同一份目录。当确切提供方/模型对仍在已公布分组中时,两个表面都显示宿主报告的当前选择;目录行缺席时,可路由的选择保持不变,触发器提示 `Select model`。
28
+ 与 `ui-conversation` 及命令包一起挂载本插件;composer 随即在待处理指示器旁显示模型位,`/model` 则以弹窗打开同一份目录。当确切提供方/模型对仍在已公布分组中时,两个界面都显示 Host 报告的当前选择;目录行缺席时,可路由的选择保持不变,触发器提示 `Select model`。
29
29
 
30
30
  ### 模型与推理强度
31
31
 
@@ -33,7 +33,7 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
33
33
 
34
34
  ### 不可路由的会话
35
35
 
36
- 当宿主报告没有适配器服务该会话的路由时,本插件注册一个 composer 阻塞块,输入随本插件自己的文案停用;恢复后无需重新加载即清除。首次加载之前或加载失败之后的 `null` 绝不阻断;目录成员关系同样不阻断——一条仍在服务、只是不公布该模型的路由不在分组里,却可用。
36
+ 当 Host 报告没有适配器服务该会话的路由时,本插件注册一个 composer 阻塞块,输入框随之停用并显示本插件自己的文案;恢复后无需重新加载即清除。首次加载之前或加载失败之后的 `null` 绝不阻断;目录成员关系同样不阻断——一条仍在服务、只是不公布该模型的路由不在分组里,却可用。
37
37
 
38
38
  -----
39
39
 
@@ -43,7 +43,7 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
43
43
  <details>
44
44
  <summary>实现细节——点击展开</summary>
45
45
 
46
- 两个入口共用一份由 `ModelDirectoryResolver`(`ctx.modelDirectories`)持有的会话级目录:`/model` popupSelect 贡献项(经 `ctx.commandUi` 注册)与 composer 的具名 `conversation.input.model` 位都经 `session.models` 加载会话的建议目录、经 `session.selectModel` 通过同一个 `ModelDirectory` 实例提交,因此任一人口所做的切换正是另一个入口接下来显示的。目录加载与选择共享一个代次计数器,旧响应不会覆盖新结果;连接重置丢弃所有常驻投影,并在显示前重新拉取宿主恢复的选择。目录按会话惰性解析,随会话作用域一并释放;已寻址 subagent 会话不公开任一入口。每份常驻目录都会直接在转发的 `llm/adapters-updated` 与 `settings/document-updated` owner 事件上重拉。
46
+ 两个入口共用一份由 `ModelDirectoryResolver`(`ctx.modelDirectories`)持有的会话级目录:`/model` popupSelect 贡献项(经 `ctx.commandUi` 注册)与 composer 的具名 `conversation.input.model` 位都经 `session.models` 加载会话的建议目录、经 `session.selectModel` 通过同一个 `ModelDirectory` 实例提交,因此任一入口所做的切换正是另一个入口接下来显示的。目录加载与选择共享一个代次计数器,旧响应不会覆盖新结果;连接重置丢弃所有常驻投影,并在显示前重新拉取 Host 恢复的选择。目录按会话惰性解析,随会话作用域一并 dispose(资源释放);已寻址 subagent 会话不公开任一入口。每份常驻目录都会直接在转发的 `llm/adapters-updated` 与 `settings/document-updated` owner 事件上重拉。
47
47
 
48
48
  </details>
49
49
 
@@ -52,7 +52,7 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
52
52
  <a id="further-exploration"></a>
53
53
  ## 进一步探索
54
54
 
55
- 当模型面不够用时阅读以下页面。它们从浏览器表面进入命令弹窗外壳与选择约定。
55
+ 当仅了解模型界面还不够时,请阅读以下页面。这些页面从浏览器界面逐步深入到命令弹窗外壳与选择约定。
56
56
 
57
57
  - [ui-commands](../ui-commands/README.zh.md)——`/model` 贡献项注册进的 popupSelect 外壳。
58
58
  - [ui-conversation](../ui-conversation/README.zh.md)——声明 composer 的 `conversation.input.model` 位与 composer 阻塞块。
@@ -64,7 +64,7 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
64
64
  <a id="model-experience"></a>
65
65
  ## 模型体验
66
66
 
67
- 间接影响。两个入口都提交 `session.selectModel` 选择;宿主在下一次提示词组装边界对完整 `ModelSelection` 快照并拥有模型可见效果,而运行中的步骤保留已组装选择。
67
+ 两个入口提交的 `session.selectModel` 选择会间接影响模型:Host 会在下一次提示词组装边界为完整的 `ModelSelection` 创建快照,并负责使其对模型生效;运行中的步骤则保留已组装的选择。
68
68
 
69
69
  #### KV Cache 影响
70
70
 
@@ -75,9 +75,9 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
75
75
  <a id="known-limitations-and-deferred-work"></a>
76
76
 
77
77
 
78
- 这些限制界定了当前模型表面。它们是当前包约束,不是通用模型路由器对比或任务积压。
78
+ 这些限制界定了当前模型选择界面。它们是当前包约束,不是通用模型路由器对比或任务积压。
79
79
 
80
- - **无创建期或已寻址 subagent 选择**——两个入口都要求既有普通会话的 agent;没有可纳入会话创建的草稿阶段模型选择,subagent 继续执行也有意不公开独立的模型选择约定。
80
+ - **无创建期或已寻址 subagent 选择**——两个入口都要求既有普通会话的 agent(智能体);没有可纳入会话创建的草稿阶段模型选择,subagent 继续执行也有意不公开独立的模型选择约定。
81
81
  - **目录名仅供呈现**——选择与持久化使用提供方/模型/推理强度 id;目录查询或确切模型元数据查询失败的提供方以不可选失败行列出,重新加载前保持原样。
82
82
  - **不能任意输入推理强度**——composer 仅提供确切模型由适配器公布的推理强度;适配器没有推理元数据时不显示 Effort 行。
83
83
 
@@ -91,4 +91,4 @@ Web GUI 允许用户通过 `/model` 弹窗或 composer 模型控件切换既有
91
91
 
92
92
  </details>
93
93
 
94
- **运行时不变式:** 不发布伴生入口。插件只注册一个 command contribution,HMR 测试覆盖释放;它不发出 Cordis 事件,也不持有跨插件可变状态。
94
+ **运行时不变式:** 不发布伴生入口。插件只注册一个 command contribution,HMR(热模块替换)安全性测试证明该注册的 dispose 能正确完成;它不发出 Cordis 事件,也不持有跨插件可变状态。
package/lib/client.js CHANGED
@@ -4,12 +4,12 @@ window.__ModuleLoader__.load({
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
7
8
  let _deepseek_ai_cordis = require("@deepseek-ai/cordis");
8
9
  let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
9
10
  let react_jsx_runtime = require("react/jsx-runtime");
10
11
  let react = require("react");
11
12
  let react_dom = require("react-dom");
12
- let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
13
13
  //#region lib/types/client/catalog.js
14
14
  /** One Host-generation model catalog shared by every Session selector. */
15
15
  /** Loads at most one model catalog for the current Host generation. */
@@ -793,6 +793,7 @@ window.__ModuleLoader__.load({
793
793
  */
794
794
  /** Simplified Chinese dictionary (the key-set source of truth). */
795
795
  const zh = {
796
+ "command.label": "模型",
796
797
  "command.description": "选择本会话使用的模型",
797
798
  "option.loadError": "目录加载失败:{message}",
798
799
  "option.deepseekV4Flash.description": "快速、高效且经济;适合目标明确、常规或并行任务。",
@@ -816,6 +817,7 @@ window.__ModuleLoader__.load({
816
817
  };
817
818
  /** English dictionary, checked complete against the zh key set. */
818
819
  const en = {
820
+ "command.label": "Model",
819
821
  "command.description": "Select the model for this conversation",
820
822
  "option.loadError": "Catalog failed to load: {message}",
821
823
  "option.deepseekV4Flash.description": "Fast, efficient, and economical; suited to focused, routine, or parallel tasks.",
@@ -918,7 +920,9 @@ window.__ModuleLoader__.load({
918
920
  const sessions = scope.sessions;
919
921
  scope.effect(() => command.register({
920
922
  name: "model",
923
+ label: () => t("command.label"),
921
924
  description: () => t("command.description"),
925
+ icon: _deepseek_ai_dsh_client_ui_primitives.IconDataOutline16,
922
926
  available: (session) => sessions.subagentAddress(session.sessionId) === void 0,
923
927
  ui: {
924
928
  kind: "popupSelect",
@@ -9,6 +9,7 @@
9
9
  */
10
10
  /** Simplified Chinese dictionary (the key-set source of truth). */
11
11
  export declare const zh: {
12
+ 'command.label': string;
12
13
  'command.description': string;
13
14
  'option.loadError': string;
14
15
  'option.deepseekV4Flash.description': string;
@@ -34,6 +35,7 @@ export declare const zh: {
34
35
  export type ModelKey = keyof typeof zh;
35
36
  /** English dictionary, checked complete against the zh key set. */
36
37
  export declare const en: {
38
+ 'command.label': string;
37
39
  'command.description': string;
38
40
  'option.loadError': string;
39
41
  'option.deepseekV4Flash.description': string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-model-selection",
3
3
  "description": "Model selection over the shared model catalog, Session projection, and session.selectModel",
4
- "version": "0.1.5-rc.1",
4
+ "version": "0.1.6-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -46,21 +46,21 @@
46
46
  "react-dom": "^18.2.0",
47
47
  "@types/react-dom": "~18.3.0",
48
48
  "clsx": "^2.1.1",
49
- "@deepseek-ai/dsh-api-remotes": "^0.1.5-rc.1",
50
- "@deepseek-ai/dsh-api-session-controller": "^0.1.5-rc.1",
51
- "@deepseek-ai/dsh-client-locale": "^0.1.5-rc.1",
52
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.5-rc.1",
53
- "@deepseek-ai/dsh-client-ui-commands": "^0.1.5-rc.1",
54
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.1",
55
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.1",
56
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.1",
49
+ "@deepseek-ai/dsh-api-remotes": "^0.1.6-alpha.1",
50
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.6-alpha.1",
51
+ "@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.1",
52
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.6-alpha.1",
53
+ "@deepseek-ai/dsh-client-ui-commands": "^0.1.6-alpha.1",
54
+ "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.6-alpha.1",
55
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.6-alpha.1",
56
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.1",
57
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.1",
57
58
  "@deepseek-ai/cordis": "^4.0.2",
58
- "@deepseek-ai/dsh-client-store": "^0.1.5-rc.1",
59
- "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
60
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.1",
61
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.1",
62
- "@deepseek-ai/dsh-client-ui-session": "^0.1.5-rc.1",
63
- "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.5-rc.1"
59
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
60
+ "@deepseek-ai/dsh-client-store": "^0.1.6-alpha.1",
61
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
62
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.1",
63
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.6-alpha.1"
64
64
  },
65
65
  "files": [
66
66
  "lib/index.js",