Markstream Vue 3
SkillDev toolsLets your agent add a Vue 3 component that renders streaming markdown with options for code display and rendering performance.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Markstream Vue 3 skill
About this capability
Integrate markstream-vue into a Vue 3 app. Use when Codex needs to add the Vue 3 renderer, import CSS in the right order, choose renderer and DOM modes, choose built-in, plain, or custom code-block paths, choose between `content` and `nodes`, coordinate long AI timelines with `MarkstreamVirtualTimel
What this skill tells your AI
The instructions your AI receives, as published by simon-he95/markstream-vue in .agents/skills/markstream-vue/SKILL.md and read by ahel’s review.
Use this skill when the host app is plain Vue 3, typically Vite-based, and not Nuxt.
Workflow
- Confirm the repo is Vue 3 and not Nuxt.
- Install
markstream-vueplus only the optional peers required by the requested features. - Import
markstream-vue/index.cssafter resets.- In Tailwind or UnoCSS projects, use
@import 'markstream-vue/index.css' layer(components);. - The root JS import does not inject styles; use
markstream-vue/index.cssormarkstream-vue/index.px.cssexplicitly.
- In Tailwind or UnoCSS projects, use
- Start with
contentand choose the renderer mode by surface.- Use
mode="chat"for AI chat or SSE output. It uses lightweight batches,fade=false, andmax-live-nodes=0;smooth-streaming="auto"paces visible output. - Use
mode="docs"for rich document surfaces. It is the default and enables larger batches, tooltips, and fade. - Use
mode="minimal"when the surface is lightweight but not chat. - Regular fenced code uses the built-in
CodeBlockNode, enhanced bystream-diffswhen that optional peer is installed and otherwise falling back to<pre><code>. Setrender-code-blocks-as-pre=trueto force the plain path, or replacecode_blockthrough scopedsetCustomComponents(...)when the app owns the renderer. - Use
dom-mode="minimal"only when the surface can also disable wrapper-dependent features such as fade, batching, deferral, virtualization, typewriter, and custom components; otherwise it falls back to full DOM. typewriteronly controls the blinking cursor and defaults tofalse. Prefertypewriter="simple"for high-frequency chat and precise mode for complex inline cursor placement.- Set
:smooth-streaming="false"to preserve raw chunk cadence; set:smooth-streaming="true"to force smooth pacing even on first-screen content (may cause hydration mismatch in SSR). - In Vue 3 (including Nuxt),
smooth-streamingcontrols output pacing andfadecontrols opacity; they can be enabled together.mode="chat"keepsfade=falseas a lightweight default. Addfadewhen gradual text reveal is desired; keep it off when animation cost matters more. Vue 3 append fades use stable batches (200 ms, 50 ms coalescing window, at most four batches per text node); later appends do not restart earlier batches. - Streaming vs recovering history: in chat UIs the same
MarkdownRenderstarts streaming and later switches to history whenfinal=true.- Streaming: start with
mode="chat"andfinal; addfadefor text reveal andtypewriteronly when a cursor is wanted. - Recovering/completed chat history: keep
mode="chat"on the same chat row to avoid switching layout strategy whenfinal=true; use:smooth-streaming="false",typewriter=false, and choosefadeindependently for the desired entry/reveal effect. Do not bind it to the inverse of streaming state unless that visual policy is intentional. - Use
mode="minimal"for lightweight non-chat recovered content, and usemode="docs"only for rich document surfaces, not for finalizing an existing chat message.
- Streaming: start with
- Switch to
nodesplusfinalonly when the app needs custom AST control, worker preparsing, or structural updates beyond pacing. - Remember that
html-policynow defaults tosafe, and Mermaid strict mode is on by default throughmermaid-props.
- Use
- For long AI transcripts or existing message virtualizers, choose the virtual-scroll path.
- Prefer
MarkstreamVirtualTimelinewhen the app does not already own timeline virtualization. - If the app already uses
vue-virtual-scrollerDynamicScroller, useuseMarkstreamVirtualAdapter()and bindadapter.markdownProps(item, index)to Markdown items. - Put
adapter.measureItem(item, index, el)on the outer timeline row so row chrome is included in item height. - Use Markstream's reported logical height (
metrics.totalHeightthrough the adapter/virtualizer), not the renderer element's currentoffsetHeight, because Markdown node virtualization may only mount the live window. - On thread switches, save
adapter.captureThreadState()together with the scroller cache; restore the scroller cache before restoring the Markstream anchor.
- Prefer
- Use
custom-idplus scopedsetCustomComponents(...)for local overrides, or import{ VueRendererMarkdown }frommarkstream-vueand install it when the repo already has an app-level plugin entry. - Validate with the smallest useful dev, build, or typecheck command.
Default Decisions
- Vue 3 apps default to
content; choosemodebefore fine-tuning lower-level render props. - Omit
modeonly when the surface should use rich docs defaults. - Smooth streaming (
smooth-streaming="auto") is on by default whentypewriterormax-live-nodes <= 0. It only paces thecontentpath;nodesmode is never affected. - For manual pacing with
nodes, useuseSmoothMarkdownStreamdirectly:enqueue()chunks,finish()when done, render fromvisible, and wait forcaughtUpbefore final parsing. - For a non-virtual chat scroller that should follow streaming output, import
useStickToBottomfrommarkstream-vue/utilsand callscheduleScrollToBottom()after Vue commits new content. It coalesces writes and preserves manual scrollback; do not runscrollIntoView({ behavior: 'smooth' })for every token. For long mixed timelines, useMarkstreamVirtualTimelinewithstick-to-bottom="auto"instead. - Streaming vs recovering history: keep the same renderer mode for a given chat row; completed history can disable pacing/cursor; fade is an independent visual choice and may remain enabled throughout streaming and completion. Switch to
mode="docs"only when moving content into a separate rich document surface. Seedocs/guide/ai-chat-streaming.mdfor full examples. - Prefer local component registration unless the repo already uses a shared plugin entry.
- If a Vue 3 app already virtualizes messages, keep that outer virtualizer in charge and enable
virtual-scrollonly on large Markdown messages. - For
vue-virtual-scroller, keepsessionKeytied to content identity (thread:item:revision) andmeasurementKeytied to layout identity such as width, theme, font, and density. - When enhanced code blocks need app-level preloading, use
preloadCodeBlockRuntime. For intentional low-level controller use, import the advanced API directly fromstream-diffs; do not depend on a raw-runtime getter frommarkstream-vue. - The Vue 3 enhanced code surface uses
stream-diffsonly; do not installstream-monaco. - For large code blocks (tens of thousands of lines) in Vue 3, offload Shiki tokenization to Web Workers by injecting an upstream
@pierre/diffsWorkerPoolManagerviasetStreamDiffsWorkerPool(...)frommarkstream-vue. The host builds the pool with its own bundler (@pierre/diffs/worker/worker.js?worker) and adds@pierre/diffsas a direct dependency; markstream-vue forwards it as theworkerManagerruntime option and syncs the activeisDark/theme/themestheme to the pool on every change. Without injection, or when the pool reports itself unavailable, highlighting stays on the main thread (unchanged behavior). Do not bundle or spawn the worker inside the library. - Configure the built-in surface through top-level
code-block-optionsor directCodeBlockNode.codeBlockOptions. Keep header/toolbar props incode-block-props; Markstream retains ownership of theme, code/language, streaming lifecycle, header, mount/reveal timing, and disposal. - Keep
html-policy="safe"and Mermaid strict mode unless the task is explicitly preserving trusted legacy behavior. - If a trusted surface needs pre-hardening behavior, opt out locally with
html-policy="trusted"and:mermaid-props="{ isStrict: false }", and call out the trust boundary in the final handoff. - If the host is actually Nuxt, leave SSR-specific setup to
markstream-nuxt.
Useful Doc Targets
docs/guide/quick-start.mddocs/guide/installation.mddocs/guide/usage.mddocs/guide/ai-chat-streaming.mddocs/guide/performance.mddocs/guide/component-overrides.mddocs/guide/code-block-runtime.md
Signals
- GitHub stars
- 3k
- Forks
- 182
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
markstream-vue- Source
- github.com/simon-he95/markstream-vue