Repository navigation
Replies: 1 comment
|
+1, we hit the same wall from a different use case: rendering inline code and fenced code blocks in user bubbles (backticks only, everything else stays literal), without changing the text that is sent to the model. Shadowing
So a formatted bubble flashes back to plain text on every send. A |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi team — while building a community plugin (Codex-style answer annotations,
dsh-plugintopic) we ran into two places where the transcript is closed to plugins, and ended up carving generic seams for them. The full implementation ships in that repository as one additive patch against currentmaster(293 lines, annotation-agnostic, with tests passing under both touched packages' suites). Sharing the design here in case it fits the official roadmap.The use case
The plugin lets a user select passages in an assistant answer, attach comments, and send them as one structured batch (a tagged JSON block in the message text). The model is instructed to cite each annotation inline in its reply (
:dsh-annotation{index="1"}). Two rendering problems follow:conversation.chat.nodeuser renderer and re-implementing images, reference chips, timestamps, and icon actions.The two seams we ended up with
Both are generic — the core never learns what an "annotation" is:
1.
conversation.chat.user-body(chain slot). Dispatched by the chat view for every user bubble body, durable and pre-admission steering alike. Currency is{ text: string }— the sent text only. An entry's selector parses the text and elects; all-decline falls through to the existing plain projection. One dispatch line in the bubble; everything else is plugin-side.2.
MarkdownInlineDirectives+ an optionalchatInlineDirectivesservice. The markdown renderer parses:name{key="value"}runs in prose text nodes and asks an owner-supplied resolver; unresolved directives stay literal, directives inside links stay literal, and the whole mechanism only applies to settled renders (same gate as inline-code file mentions, so streaming caches never bake in stale handlers). The conversation package resolves the vocabulary lazily per directive throughctx.get, mirroring the existingchatFileMentionspattern.Why we think these generalize
chainslots with fallback; optional service vocabulary à lachatFileMentions), degrade to exactly today's behavior when nothing registers, and are additive — in our fork the whole change to existing core files is three one-line touchpoints; the rest is new code with per-file test coverage.Would this direction be of interest? The patch above is the concrete proposal; we're happy to adapt naming/shape to your preferences, or describe the edge cases we hit (chain election vs. streaming, steering projections, directive parsing limits) in more detail.
All reactions