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