fix: git import issue when importing bolt on bolt (#1020)

* fix: import bolt on bolt fix

* added escape on folder import

* type fix
This commit is contained in:
Anirban Kar
2025-01-27 18:05:55 +05:30
committed by GitHub
parent 6d4196a2b4
commit bbae032a37
5 changed files with 49 additions and 7 deletions

View File

@@ -64,6 +64,10 @@ function cleanoutMarkdownSyntax(content: string) {
return content;
}
}
function cleanEscapedTags(content: string) {
return content.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
}
export class StreamingMessageParser {
#messages = new Map<string, MessageState>();
@@ -110,6 +114,7 @@ export class StreamingMessageParser {
// Remove markdown code block syntax if present and file is not markdown
if (!currentAction.filePath.endsWith('.md')) {
content = cleanoutMarkdownSyntax(content);
content = cleanEscapedTags(content);
}
content += '\n';
@@ -141,6 +146,7 @@ export class StreamingMessageParser {
if (!currentAction.filePath.endsWith('.md')) {
content = cleanoutMarkdownSyntax(content);
content = cleanEscapedTags(content);
}
this._options.callbacks?.onActionStream?.({