fix: fix enhance prompt to stop implementing full project instead of enhancing (#1383) #release

* fix: enhance prompt fix

* fix: added error capture on api error

* fix: replaced error with log for wrong files selected by bolt
This commit is contained in:
Anirban Kar
2025-03-01 01:34:35 +05:30
committed by GitHub
parent b98485d99f
commit 3c28e8ad88
9 changed files with 758 additions and 685 deletions

View File

@@ -319,21 +319,23 @@ export class ActionRunner {
const webcontainer = await this.#webcontainer;
const historyPath = this.#getHistoryPath(filePath);
const content = await webcontainer.fs.readFile(historyPath, 'utf-8');
return JSON.parse(content);
} catch (error) {
logger.error('Failed to get file history:', error);
return null;
}
}
async saveFileHistory(filePath: string, history: FileHistory) {
const webcontainer = await this.#webcontainer;
// const webcontainer = await this.#webcontainer;
const historyPath = this.#getHistoryPath(filePath);
await this.#runFileAction({
type: 'file',
filePath: historyPath,
content: JSON.stringify(history),
changeSource: 'auto-save'
changeSource: 'auto-save',
} as any);
}
@@ -375,4 +377,4 @@ export class ActionRunner {
output,
};
}
}
}