fix: writes to disk when the user accepts the prompt to edit (#4942)

* fix: writes to disk when the user accepts the prompt to edit

* fix: then catch
This commit is contained in:
Kevin Nadro
2025-01-06 13:26:22 -05:00
committed by GitHub
parent 66834931aa
commit e21ef3f122

View File

@ -470,6 +470,17 @@ export function ToastPromptToEditCadSuccess({
onClick={() => {
sendTelemetry(modelId, 'accepted', token).catch(reportRejection)
toast.dismiss(toastId)
// Write new content to disk since they have accepted.
codeManager
.writeToFile()
.then(() => {
// no-op
})
.catch((e) => {
console.error('Failed to save prompt-to-edit to disk')
console.error(e)
})
}}
>
Accept