mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
fix: ensure file is saved before running action
- update file path examples in prompt
This commit is contained in:
parent
c5804a4ab9
commit
29a9f0bc79
@ -163,8 +163,8 @@ The year is 2025.
|
||||
- start: Starting project (use ONLY for project startup, LAST action)
|
||||
- file:
|
||||
- Two actionTypes are available for file actions:
|
||||
- Create for when creating a new file - Example: <boltAction type="file" actionType="create" filePath="/home/project/src/App.tsx">
|
||||
- Update for when updating an existing file - Example: <boltAction type="file" actionType="update" filePath="/home/project/src/App.tsx">
|
||||
- Create for when creating a new file - Example: <boltAction type="file" actionType="create" filePath="/src/App.tsx">
|
||||
- Update for when updating an existing file - Example: <boltAction type="file" actionType="update" filePath="/src/App.tsx">
|
||||
- Creating/updating files (add filePath and contentType attributes)
|
||||
- If updating a file it should have an update actionType attribute
|
||||
|
||||
|
@ -580,10 +580,13 @@ export class WorkbenchStore {
|
||||
|
||||
this.#editorStore.updateFile(fullPath, data.action.content);
|
||||
|
||||
await this.saveFile(fullPath);
|
||||
|
||||
if (!isStreaming) {
|
||||
await artifact.runner.runAction(data);
|
||||
await this.saveFile(fullPath);
|
||||
this.resetAllFileModifications();
|
||||
} else {
|
||||
await artifact.runner.runAction(data, isStreaming);
|
||||
}
|
||||
} else {
|
||||
await artifact.runner.runAction(data);
|
||||
|
Loading…
Reference in New Issue
Block a user