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:
@@ -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>
|
||||
`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user