Skip to content

Releases: DDDMUC/dsh-markdown-bubble

v0.1.5 - 按 0.2.1 新契约移植:引用 chip 与图片都回来了

Choose a tag to compare

@DDDMUC DDDMUC released this 23 Oct 14:54

0.1.5 —— 按 DSH 0.2.1-rc.2 的新契约移植,并把 engines.dsh 从开口的 >=0.2.0-rc.1 收成 >=0.2.1-rc.2(旧区间会让它在 0.2.1 上照样安装、只静默降级)。

  • 引用 chip 回来了:primitives.projectUserText 在 0.2.1 被删除(真机报 TypeError: primitives.projectUserText is not a function),投影改成调用宿主的文本工厂槽 conversation.user.text(facts.sessionLabels / facts.skillNames + interactive),chip 拆分逻辑不变。真机复验:控制台里那条降级告警不再出现(0 条),25/25 条用户气泡仍由本插件渲染。
  • 图片附件回来了:座位 props 里的 renderMessageImages 已不存在,改调图片画廊工厂槽 conversation.images.content(附件插件自己注册的那个;它的 MessageImages 也只是这一步调用)。三条看起来更顺的路都被堵着,README 的「兼容性」一节记了实测报错原文。
  • 性能:降级投影从「每帧算两次」改成只算一次(MarkdownBoundary 的 fallback 改成惰性 thunk,只有真失败时才构造);toMarkdown() 加 64 条 LRU 缓存(流式期间同一条消息会被反复重排,而准备源码是 split/join + 逐行正则);传给 MarkdownText 的 labels 对象按 t 记忆化(宿主自己的 ReasoningContent 正是这么做的,每次新建对象会让下游 memo 失效)。

v0.1.4 - one degradation function, not three copies

Choose a tag to compare

@DDDMUC DDDMUC released this 09 Oct 14:11

The degradation paths are one function now, not three copies.

"Composition failed", "the host projection threw" and "the last resort" each carried their own copy of
the fallback logic - one called the host projection, one inlined plain text - so three places had to be
kept in sync by hand. There is only degradedBody() now: it tries the host's own projection first
(which keeps reference chips and the rest of the host rendering), and falls back to plain text only if
the projection throws too. Content-first is part of the function's contract: plain text is the last
step, reached only when the host itself refuses to project.

New regression: projectUserText is called exactly once in the whole repo, the plain-text span is
constructed in exactly one place, and every degradation caller goes through the same function -
writing a second degradation copy turns the test red.