fix: LaTeX formulas flash and disappear during streaming response (#1056)
Replace token-by-token rendering (marked.lexer + v-for + marked.parser) with single-pass marked.parse() in botmsg.vue and AgentStreamDisplay.vue. This prevents Vue's v-for keyed diffing from destroying KaTeX DOM nodes on each streaming update. Also adds a dev-only markdown test page (/platform/dev/markdown) with LaTeX, code, tables, Mermaid, and streaming simulation for visual regression testing.
This commit is contained in:
@@ -131,6 +131,13 @@ const router = createRouter({
|
||||
},
|
||||
],
|
||||
},
|
||||
// Dev-only markdown rendering test page
|
||||
...(import.meta.env.DEV ? [{
|
||||
path: '/platform/dev/markdown',
|
||||
name: 'markdownTest',
|
||||
component: () => import('../views/dev/MarkdownTestPage.vue'),
|
||||
meta: { requiresAuth: false, requiresInit: false }
|
||||
}] : []),
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user