mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-26 11:12:53 +00:00
* fix(app): restore character-paced streaming reveal Restore the v0.8 character reveal model and remove the word-level fade implementation so streamed assistant and reasoning text remains opaque, grapheme-safe, and immediately completes when a turn ends. * fix(android): preserve inverted timeline selection React Native's prebuilt Android library does not consume source patches under node_modules. Register the compiled scroll manager before the core package so inverted child-reveal calculations leave focus and text selection in place while normal and explicit scrolling remain unchanged.
20 lines
735 B
TypeScript
20 lines
735 B
TypeScript
import type MarkdownIt from "markdown-it";
|
|
import { createMarkdownParser } from "@/utils/markdown-parser";
|
|
import { enableStreamingMarkdown } from "@/utils/streaming-markdown";
|
|
|
|
export function createAssistantMarkdownParser({ streaming = false } = {}): MarkdownIt {
|
|
const parser = createMarkdownParser({ linkify: true });
|
|
const defaultValidateLink = parser.validateLink.bind(parser);
|
|
|
|
// Assistant messages are the only surface allowed to link into the
|
|
// filesystem. Every other parser keeps markdown-it's stricter default.
|
|
parser.validateLink = (url: string) =>
|
|
url.trim().toLowerCase().startsWith("file://") || defaultValidateLink(url);
|
|
|
|
if (streaming) {
|
|
enableStreamingMarkdown(parser);
|
|
}
|
|
|
|
return parser;
|
|
}
|