T-FDZ3-agent-chat-markdown-answers
State: closed/done · Impact: medium · Complexity: small
Agent answers in the agent-chat experience are shown as pre-wrap text, so lists, fences and
emphasis the model writes arrive as raw syntax. This task renders the answer turn through
MdViewer; user turns and tool traces stay plain.
| Location | Role today |
|---|---|
solutions/determined/experiences/agent-chat/app/components/AgentChatMessage.vue | Answer is <p class="turn-agent__text">{{ row.text }}</p> with white-space: pre-wrap |
solutions/determined/experiences/agent-chat/package.json | Depends on @determined/platform only |
solutions/determined/experiences/agent-chat/nuxt.config.ts | Empty layer config |
solutions/determined/products/agent-chat/nuxt.config.ts | Extends shell, vaults and the agent-chat experience; moon id product-agent-chat |
Proposed
Section titled “Proposed”The answer block is <MdViewer :source="row.text" :provider="chatProvider" /> where
chatProvider.resolveLink returns { kind: 'missing' } for every target: agent output is
untrusted and has no vault index behind it, so wikilinks render as unresolved text with no href.
highlight, math and mermaid stay at the viewer defaults (off). The turn-agent__text
rule is deleted. User turns, thinking steps and tool results are unchanged.
Approach
Section titled “Approach”package.json: add@sksizer/markdown-ui(workspace:*);nuxt.config.ts:extends: ['@sksizer/markdown-ui'].AgentChatMessage.vue: replace the answer<p>withMdViewerand a module-level provider whoseresolveLinkalways answersmissing; delete theturn-agent__textstyle.- Root
bun install;bun install --frozen-lockfile. - Verify:
moon run product-agent-chat:check; a conversation whose answer has a list, a fence and awikilinkin light and dark (screenshots);nuxi analyzeon the product shows mermaid and KaTeX as lazy chunks only;moon run :check :test --affected.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/determined/experiences/agent-chat/package.json | modify | Add @sksizer/markdown-ui |
solutions/determined/experiences/agent-chat/nuxt.config.ts | modify | Extend the layer |
solutions/determined/experiences/agent-chat/app/components/AgentChatMessage.vue | modify | Answer through MdViewer; delete the pre-wrap answer rule |
bun.lock | modify | Root lockfile regen |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
AgentChatMessage.vuehas noturn-agent__textelement and mountsMdViewerfor the answer. - AC-2: An answer containing
Homerenders the wikilink without anhrefattribute. - AC-3:
moon run product-agent-chat:checkpasses. - AC-4: Light and dark screenshots of an answer with a list, a fence and a wikilink are attached to the PR.
- AC-5:
bun install --frozen-lockfilepasses at the root.
Out of scope
Section titled “Out of scope”- Rendering user turns or tool-call results as markdown.
- Resolving wikilinks against the vault the agent read; a later task can pass the notes provider.
- Streaming re-render tuning; the viewer re-renders on each text change as today’s
<p>did.
Dependencies
Section titled “Dependencies”- T-A0HT-md-ui-layer-skeleton supplies
MdViewer. - Gate: the sanitize and routing fixes from T-8H57-obsidian-md-review-bug-triage land first; agent output is untrusted content.
D-7VMX-markdown-ecosystem-strategyd.10: thepre-wraptext render is removed.- S-0010-design-language-consumption.
Discovery context
Section titled “Discovery context”Member of milestone M-931L; wave 3a of D-K3EM-markdown-editor-chrome-and-plugin-environment.