dsh-model-flatmap 1.0.3 → 1.1.0

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 CHANGED
@@ -31,6 +31,13 @@ levels, and the agent-teamwork switch on one surface:
31
31
 
32
32
  - **One surface.** The trigger opens one panel capped at 320 px. The header, the
33
33
  reasoning row, and the teamwork row stay fixed; only the model grid scrolls.
34
+ - **The trigger shows what the native one shows.** Its name is not a string: the
35
+ shipped picker renders the `conversation.input.model.label` slot there, and
36
+ connection plugins use it for a promotion chip (`夜间折扣`), a rate, or a load
37
+ mark (queued people / a rocket when idle). This plugin renders that slot's
38
+ winning component on its own trigger — with the seats it needs — so the two
39
+ modes show the same content. A missing or crashing occupant falls back to the
40
+ catalog name plus the model's own `model.badge`.
34
41
  - **Global search.** Filters across every provider and every family. Groups that
35
42
  end up empty are dropped, so no stray headings remain. Prefix matches rank
36
43
  first, then substring matches, then ordered character matches.
@@ -86,6 +93,21 @@ levels, and the agent-teamwork switch on one surface:
86
93
  by a later call or by age.
87
94
  - **Theme-aware.** Styled with host theme tokens only; looks correct in both
88
95
  light and dark themes.
96
+ - **Native mode.** The panel's bottom-right `Default style` button hands the
97
+ composer's model seat back to the **host's own** picker — the real shipped
98
+ `ModelSelect`, not a reproduction of it. The plugin does this by *stepping
99
+ aside*: it disposes its own `conversation.input.model` registration, so the
100
+ host's entry underneath wins the slot and renders itself. Nothing is
101
+ imported, copied, or re-mounted, which means an upgraded DSH shows its own
102
+ newest picker and this mode can never drift out of date. The way back is a
103
+ separated action band at the bottom of that picker's own menu — it reuses the
104
+ `conversation.input.model.options` child slot the shipped `ModelSelect`
105
+ declares, so it belongs to the panel it acts on and renders nothing at all
106
+ while the flat panel is shown. It is drawn as an outlined button, not as one
107
+ more menu row: the rows above it pick a value, this one performs an action.
108
+ The choice is remembered across reloads. If the host ships no picker to hand
109
+ over to, the button stays disabled and the panel stays — the composer never
110
+ ends up without a model control.
89
111
 
90
112
  See [`docs/DETAIL.md`](./docs/DETAIL.md) for the full behaviour spec and
91
113
  [`DECISIONS.md`](./DECISIONS.md) for the decision log behind the design.
package/README.zh.md CHANGED
@@ -27,6 +27,11 @@
27
27
 
28
28
  - **一块平面。** 触发器打开一个高度上限 320 px 的面板。头部、推理等级行与协作行
29
29
  固定常驻,只有模型网格可滚动。
30
+ - **触发器显示的内容与原生一致。** 触发器上的模型名不是一个字符串:出厂 picker 在那里
31
+ 渲染 `conversation.input.model.label` 插槽,连接器插件用它在名字旁放促销 chip
32
+ (如 `夜间折扣`)、倍率,或负载标记(排队人数的小人图标 / 空闲时的火箭)。本插件
33
+ 在自己的触发器上渲染该插槽的胜出组件(并补齐它需要的座位),因此两种模式显示同样的
34
+ 内容。占用者缺失或崩溃时回退到目录名 + 模型自带的 `model.badge`。
30
35
  - **全局搜索。** 跨所有 provider 与 family 过滤。过滤后为空的组会被丢弃,不会留下
31
36
  空标题。命中排序:前缀优先,其次子串,最后有序字符匹配。
32
37
  - **分词搜索。** 空白把查询拆成多个 token,每个 token 都要在名称中命中;一次命中的
@@ -65,6 +70,15 @@
65
70
  时间」,因此一天之后再打开列表,那一行就是干净的。观察按同一个时间排序,最新的一条说了算,
66
71
  所以回放更早的历史既不能让一条已被后续调用清除的划线复活,也不能让一条已经过期的复活。
67
72
  - **跟随主题。** 仅使用宿主主题令牌着色,在浅色与深色主题下都正确。
73
+ - **原生模式。** 面板右下角的 `默认样式` 按钮把输入框的模型座位交还给**宿主自己的**选择器——真正
74
+ 出厂的 `ModelSelect`,不是它的复制品。做法是**让位**:本插件 dispose 掉自己在
75
+ `conversation.input.model` 的注册,槽于是选中下方那条出厂条目,由宿主渲染它自己的组件。没有
76
+ import、没有拷贝、没有 re-mount,所以 DSH 升级后出现的自然是它最新的 picker,这个模式**结构上
77
+ 不可能过期**。切回面板的入口长在**原生选择器自己的菜单底部**(复用出厂 `ModelSelect` 声明的
78
+ `conversation.input.model.options` 子插槽),所以它属于那个面板、而不是输入框工具栏;平铺模式下
79
+ 它渲染 `null`,原生菜单与出厂状态完全一致。它**不模仿菜单行**:上方一条分隔线,下面是一个带描边
80
+ 的整宽按钮——上面的行是「选一个值」,这个是「执行一个动作」。选择跨重载保留。若宿主没有可交出的选择器,按钮会
81
+ 置灰、面板保持显示——composer 永远不会失去模型控件。
68
82
 
69
83
  完整行为规格见 [`docs/DETAIL.md`](./docs/DETAIL.md),设计决策见
70
84
  [`DECISIONS.md`](./DECISIONS.md)。