Skill

Configure Vue 3 markdown streaming with chat modes

Configures Markstream's Vue 3 renderer beyond install - surface modes, code rendering, streaming lifecycle, and long-message virtualization.

Works with vuenuxtshikimonacomermaid

81
Spark score
out of 100
Updated 3 days ago
Version 15.3.0

Add to Favorites

Why it matters

Set up advanced Vue 3 markdown rendering for AI chat applications with streaming lifecycle control, code syntax highlighting, virtualization support, and multiple display modes tailored to chat interfaces, documentation, or minimal surfaces.

Outcomes

What it gets done

01

Install and configure the markstream-vue package with appropriate CSS imports and peer dependencies

02

Select and wire up rendering modes (chat, docs, minimal) with streaming, typewriter, and fade effects

03

Integrate fenced-code rendering using Shiki, Monaco, or plain pre tags with syntax highlighting

04

Optimize long message transcripts with virtualization and validate builds with incremental stream tests

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-markstream-vue | bash

Overview

Markstream Vue 3

Configures Markstream's Vue 3 renderer beyond a bare install: surface mode, fenced-code rendering strategy, streaming lifecycle, and long-message virtualization. Use for a plain Vue 3 app configuring Markstream beyond installation; use markstream-nuxt instead for Nuxt SSR boundaries.

What it does

This skill configures the Vue 3 renderer beyond generic installation: surface modes, streaming lifecycle, code rendering, long-message virtualization, and scoped overrides, meant for a plain Vue 3 application once the package has already been selected. Its workflow: before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval; confirm Vue 3 and not Nuxt, install only the specifically requested peers, and import markstream-vue/index.css after resets; start with the content prop, using mode="chat" for AI streams, "docs" for rich documents, and "minimal" for lightweight non-chat surfaces; choose fenced-code rendering explicitly, either pre with no peer, shiki paired with stream-markdown, or the compatibility-named monaco backed by stream-diffs; for live chat use smooth streaming set to auto with no fade and an optional cursor, and on completion keep the same mode, set final, and disable pacing/cursor; use nodes only for worker parsing or structural AST ownership; for long transcripts let an existing outer message virtualizer stay in charge, using Markstream's logical height rather than mounted DOM height; use scoped component registration and preserve safe HTML and Mermaid strict mode; and validate with the smallest build/typecheck pass plus one incremental stream case and one long-message case.

Documented limitations: optional peers add bundle and browser-runtime cost, DOM-minimal mode disables wrapper-dependent features, and virtualization integration requires stable content and measurement keys. A security note: review dependency changes, and never enable trusted HTML or loose Mermaid rendering for untrusted model output.

When to use - and when NOT to

Use for a plain Vue 3 application after the package has already been selected. Use markstream-nuxt instead when SSR-specific Nuxt boundaries matter.

Inputs and outputs

Input is an existing plain Vue 3 application. Output is a working MarkdownRender integration with an explicit surface mode, a chosen code-rendering strategy, virtualization-compatible long-message handling, and HTML/Mermaid trust kept at safe defaults.

<script setup lang="ts">
import MarkdownRender from 'markstream-vue'
import 'markstream-vue/index.css'

defineProps<{ content: string; isDone: boolean }>()
</script>

<template>
  <MarkdownRender
    mode="chat"
    :content="content"
    :final="isDone"
    :fade="isDone"
    :typewriter="!isDone"
    :smooth-streaming="isDone ? false : 'auto'"
    html-policy="safe"
  />
</template>

Who it's for

Vue 3 developers configuring Markstream's streaming markdown renderer beyond a basic install - choosing surface mode, code-rendering strategy, and long-message virtualization.

Source README

Markstream Vue 3

Overview

Configure the Vue 3 renderer beyond generic installation: surface modes, streaming lifecycle, code rendering, long-message virtualization, and scoped overrides.

When to Use

Use for a plain Vue 3 application after the package has been selected. Use markstream-nuxt when SSR-specific Nuxt boundaries matter.

Workflow

Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.

  1. Confirm Vue 3 and not Nuxt. Install only requested peers and import markstream-vue/index.css after resets.
  2. Start with content. Use mode="chat" for AI streams, docs for rich documents, and minimal for lightweight non-chat surfaces.
  3. Choose fenced-code rendering explicitly: pre without a peer, shiki with stream-markdown, or compatibility-named monaco backed by stream-diffs.
  4. For live chat use smooth streaming auto, no fade, and an optional cursor. On completion keep the same mode, set final, and disable pacing/cursor.
  5. Use nodes only for worker parsing or structural AST ownership.
  6. For long transcripts, keep an existing outer message virtualizer in charge. Use Markstream logical height rather than mounted DOM height.
  7. Use scoped component registration and preserve safe HTML and Mermaid strict mode.
  8. Validate the smallest build/typecheck plus one incremental stream and one long-message case.

Example

<script setup lang="ts">
import MarkdownRender from 'markstream-vue'
import 'markstream-vue/index.css'

defineProps<{ content: string; isDone: boolean }>()
</script>

<template>
  <MarkdownRender
    mode="chat"
    :content="content"
    :final="isDone"
    :fade="isDone"
    :typewriter="!isDone"
    :smooth-streaming="isDone ? false : 'auto'"
    html-policy="safe"
  />
</template>

Limitations

  • Optional peers add bundle and browser-runtime cost.
  • DOM-minimal mode disables wrapper-dependent features.
  • Virtualization integration requires stable content and measurement keys.

Security & Safety Notes

Review dependency changes. Never enable trusted HTML or loose Mermaid rendering for untrusted model output.

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.