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

@@ -103,3 +103,19 @@ export const detectProjectType = async (
return { type: '', setupCommand: '', followupMessage: '' };
};
export const filesToArtifacts = (files: { [path: string]: { content: string } }, id: string): string => {
return `
<boltArtifact id="${id}" title="User Updated Files">
${Object.keys(files)
.map(
(filePath) => `
<boltAction type="file" filePath="${filePath}">
${files[filePath].content}
</boltAction>
`,
)
.join('\n')}
</boltArtifact>
`;
};