diff --git a/app/shared/lib/prompts/prompt-variants/new-prompt.ts b/app/shared/lib/prompts/prompt-variants/new-prompt.ts index 00de176e..bb704ca4 100644 --- a/app/shared/lib/prompts/prompt-variants/new-prompt.ts +++ b/app/shared/lib/prompts/prompt-variants/new-prompt.ts @@ -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: - - Update for when updating an existing file - Example: + - Create for when creating a new file - Example: + - Update for when updating an existing file - Example: - Creating/updating files (add filePath and contentType attributes) - If updating a file it should have an update actionType attribute diff --git a/app/workbench/stores/workbench.ts b/app/workbench/stores/workbench.ts index 76e44ed5..ac23faf8 100644 --- a/app/workbench/stores/workbench.ts +++ b/app/workbench/stores/workbench.ts @@ -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);