You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
背景
客户端插件可以把界面里的一条消息换成改写后的版本。我的
dsh-edit-turn就是这么做的:改写用户提示词后,在那一行插一条气泡显示改后的文本。这类「插件自己插入的气泡」目前只能由插件自己画 DOM —— 它不在宿主的消息座位里(宿主只为日志里的消息画座位),因此任何渲染层插件都接管不到它。撞上的具体问题:
dsh-markdown-bubble让用户气泡按 Markdown 渲染(替换conversation.chat.node的user/steering座位)。于是同一个界面里:没改写过的提示词是渲染态,改写过的是纯文本(white-space: pre-wrap),看起来像两种不同的东西。这不是某个插件的 bug,而是两个扩展点之间没有交接面。现象(0.2.1-rc.2 实测)
.dshet-revision,纯文本),markdown 插件不会渲染它;建议
ctx.slots里提供一个「渲染一条用户消息」的公开接口(例如把conversation.chat.user.content暴露成插件可调用的渲染函数),插件插入的气泡就能与宿主保持一致;primitives.projectUserText删掉、把用户气泡内容拆成工厂槽之后,第三方座位替换类插件的降级是静默的(只在控制台留一条 warnOnce)。这类跨版本契约变更如果能留一个弃用期或迁移说明,会省很多排查时间。复现
All reactions