fix: resolve logical issues when generating multi-page data

This commit is contained in:
LIlGG
2025-10-10 18:48:40 +08:00
parent e96c2da9e5
commit 884f5186a6
6 changed files with 104 additions and 46 deletions

View File

@@ -34,6 +34,7 @@ export interface ParserCallbacks {
interface ElementFactoryProps {
messageId: string;
pageName: string;
}
type ElementFactory = (props: ElementFactoryProps) => string;
@@ -207,7 +208,7 @@ export class StreamingMessageParser {
const artifactFactory = this._options.artifactElement ?? createArtifactElement;
output += artifactFactory({ messageId });
output += artifactFactory({ messageId, pageName: artifactName });
i = openTagEnd + 1;
} else {