Repository navigation
[Idea] conversation.input.model.label 建议由 single 改为 list:多连接器插件共存时该槽位会导致功能静默丢失 #12571
Replies: 3 comments
|
Thanks — the mechanism you measured is right, and I can confirm it on both faces: the source tree at What is legal here, and why none of the three plugins gets an error
The drop is in the projection, not the registry: for One thing worth adding to your report, because it raises the severity: the winner paints for every provider, not only its own. The slot is rendered once per label instance —
|
|
I'm one of the three plugin authors in the original report (dsh-connect-workbuddy). Adding one thing that the analysis above does not cover, because it changes what "minimum core change" has to include. The
|
|
Thanks — you found the half my change list was missing, and you found it by driving the real The break reaches further than third-party: the host's own documentation teaches the keyless shape. Your argument runs from installed contributors ("every shipped third-party contributor registers a keyless entry", "all three of ours do"). I measured the host side, and it says the same thing about the slot's published contract. No Two smaller confirmations from the same read:
Your options 1 and 2 need one more edit than they state, and it is in the renderer, not the registry. Reserving A keyless entry's cell is The missing piece is a miss path: when no entry matches
Without that line, your option 3 is the honest one: a hard break needs the CHANGELOG entry naming the symptom in the words you used, plus the README fix above. Your adaptive build does not close this on its own — it fixes new installs, and the break window is precisely installed old build × new host, which is the pair a reserved cell covers. On the parent seat: you are right, and I understated it. I re-read On your offer: yes, please run it — and add one check. Your four are the right set, and One boundary, stated plainly so nobody waits on us: the whole fix is core — the declaration, the owner's dispatch, the registry warning and the renderer miss path all live in the host tree, and this repository's pull requests are closed, so it reaches the code through your maintainers rather than through a contribution from this account. What I can add is measurement and specification, which is what the above is. |
Uh oh!
There was an error while loading. Please reload this page.
背景
这是一个可复现的槽位设计问题,不是某个插件的 bug。三个社区连接器插件(WorkBuddy / Trae / Qoder)在同一 profile 下共存时,功能会静默丢失,并且三方已经被迫陷入优先级竞赛。
我这里是 WorkBuddy 的作者,但下面的结论对三方都成立——换个顺序,失效的是别的插件。
问题
conversation.input.model.label被声明为kind: 'single',但它的真实使用场景是多个连接器插件各自装饰自己的模型行(WorkBuddy / Trae / Qoder 等,每个都注册 provider + 模型目录)。在single语义下只能有一个注册生效,其余静默失效,且没有任何报错。结果是同一类功能在插件之间变成优先级竞赛,且每轮都要读别人的源码来确认自己排第几。
实测:三个插件的优先级演进
@deepseek-ai/dsh-client-ui-renderer的scoped-slots.tsx:这个组件被调用 N 次(每个模型行一次),而不是每行各有一个组件。所以胜者独自负责画所有插件的行。
本机实测(同一 profile,三个插件同时安装):
-0.5-1-0.25-100-101-102三方代码里都把对方的名字和优先级写进了注释,说明这是被迫的军备竞赛,不是个别插件的选择。例如 qoder 的注释:
trae 的注释:
用户可见的后果
优先级垫底的插件,其促销胶囊、负载图标、新模型标记在模型选择器里一次都不出现,而设置卡片里正常显示,因此用户报告的是「胶囊为什么没了」,且没有任何日志可查。
现有的两个「解法」都不可取
1. 胜者替所有人画(qoder / trae 的做法)
胜者用
slots.entries()找到别人的组件并代渲染。问题:t席位(slots.bindLocale(entry.locale)),一处不对就抛错;jsx(Other, …)让它在自己的 fiber 里跑);2. 各自实现「超集」
即每个插件都画出所有其他插件的信息。这在信息上不可得:WorkBuddy 知道促销活动的数据结构,Trae 不知道 Trae 之外的字段,反之亦然;而且每方都要无限追赶别人的新功能。
二者都不是插件应该承担的责任。
建议
把这个槽位从
single改成list。宿主已经实现了
list(每行一个 id 单元、各自 shadowing),机制是现成的。改成list后:如果
list的多个贡献者在同一行(同一个 provider/model)上都想画东西,那才是真正需要叠加语义的场合;可以用chain,或由list的order决定顺序并全部渲染。环境
packages/client/ui-model-selection/src/client/index.ts:176packages/client/ui-renderer/src/client/scoped-slots.tsx(if (spec.kind === 'single'))补充
同类问题还有一处:
conversation.input.model(父槽位)也是single,dsh-codex-subscription以priority: -10接管它后,若注册时不声明children,宿主就不会注入renderSlot,导致它下面的整个子槽位树永远不被渲染。该插件的 bug 已单独报给作者(它是可以修的),但这里同样说明:一个连接器插件接管父槽位,会让所有下游装饰插件一起消失——根因仍是槽位类型不合适。All reactions