wyuc 1d1ce80e04
feat(maic-agent): editor-agent line (v0) — Pro-mode "Edit with AI" (#777)
Promote the editor-agent line to main: read-then-act editor agent (read_scene_content, regenerate_scene, regenerate_scene_actions, edit_interactive_html), a routable maic-agent model stage, the agent sidebar UI, interactive-scene runtime-error capture, and the timeline/script editor. Cross-reviewed and smoke-verified; see #777.
2026-06-23 16:56:37 +08:00

26 lines
932 B
TypeScript

'use client';
/**
* Assistant text renderer — Streamdown via the official assistant-ui bridge.
*
* Used for its streaming-first RENDERING only: incomplete-markdown repair (no
* mid-stream flicker on unclosed bold/links), memoized block rendering, and
* Shiki code blocks. Deliberately NO library entrance animation and NO caret —
* the tasteful mainstream streaming feel (Claude-style) is a steady, even
* character reveal, which `smooth` (useSmooth interpolation over bursty SSE
* deltas) provides on its own.
*/
import 'streamdown/styles.css';
import { StreamdownTextPrimitive } from '@assistant-ui/react-streamdown';
import { code } from '@streamdown/code';
export function MarkdownText() {
return (
<StreamdownTextPrimitive
className="text-[13.5px] leading-relaxed text-foreground [overflow-wrap:anywhere]"
smooth={{ maxCharIntervalMs: 18, drainMs: 320 }}
plugins={{ code }}
/>
);
}