feat: make user made changes persistent after reload (#1387)

* feat: save user made changes persistent

* fix: remove artifact from user message on the UI

* fix: message Id generation fix
This commit is contained in:
Anirban Kar
2025-02-27 13:34:57 +05:30
committed by GitHub
parent a33a1268c3
commit b98485d99f
6 changed files with 58 additions and 10 deletions

View File

@@ -43,5 +43,6 @@ export function UserMessage({ content }: UserMessageProps) {
}
function stripMetadata(content: string) {
return content.replace(MODEL_REGEX, '').replace(PROVIDER_REGEX, '');
const artifactRegex = /<boltArtifact\s+[^>]*>[\s\S]*?<\/boltArtifact>/gm;
return content.replace(MODEL_REGEX, '').replace(PROVIDER_REGEX, '').replace(artifactRegex, '');
}