fix bug with history not being updated if image generation fails
This commit is contained in:
parent
9494f4c1cc
commit
f1a9859384
@ -254,6 +254,9 @@ async def stream_code(websocket: WebSocket):
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
print("Image generation failed", e)
|
||||
# Send set code even if image generation fails since that triggers
|
||||
# the frontend to update history
|
||||
await websocket.send_json({"type": "setCode", "value": completion})
|
||||
await websocket.send_json(
|
||||
{"type": "status", "value": "Image generation failed but code is complete."}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user