fix: persist image generation results to DB for reload survival, bump v0.17.2
Root cause: after image generation, the message content in DB stayed as `image-gen-request` (the options form). On app restart, MessageItem re-parsed this as a generation form instead of showing the completed result. The result only lived in React state and localStorage. Fix: - db.ts: add updateMessageContent() to update a message's content by ID - /api/chat/messages: add PUT handler for message content updates - ImageGenConfirmation: accept messageId prop; on successful generation, replace message content from image-gen-request to image-gen-result format (with localPath references) via PUT API call - MessageItem: pass message.id to ImageGenConfirmation Now on restart, parseImageGenResult() matches the persisted image-gen-result block and renders ImageGenCard directly with the saved image paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
fd03d179e3
commit
20a5934cfc
6 files changed
+62
-4
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codepilot",
|
||||
"version": "0.17.1",
|
||||
"version": "0.17.2",
|
||||
"private": true,
|
||||
"author": {
|
||||
"name": "op7418",
|
||||
|
||||
Reference in new issue
Block a user