Skip to content

Conversation

@hdcodedev
Copy link
Contributor

@hdcodedev hdcodedev commented Jan 17, 2026

Context

Fixes #3489

When editing an already sent message and attaching an image to it, the image was being silently dropped and not sent with the edited text. This bug only occurred when a checkpoint existed after the message being edited, causing the user to see the "Proceed" or "No, edit message only" dialog.

The issue was reported in #3489.

Implementation

The bug was in webview-ui/src/App.tsx. When sending the editMessageConfirm message to the backend, there were two code paths:

  1. With checkpoint (CheckpointRestoreDialog) - The images field was missing
  2. Without checkpoint (EditMessageDialog) - The images field was correctly included

The fix adds the missing images: editMessageDialogState.images field to the checkpoint dialog's onConfirm handler, ensuring images are preserved in both scenarios.

 onConfirm={(restoreCheckpoint: boolean) => {
     vscode.postMessage({
         type: "editMessageConfirm",
         messageTs: editMessageDialogState.messageTs,
         text: editMessageDialogState.text,
         restoreCheckpoint,
+        images: editMessageDialogState.images,
     })

Screenshots

How to Test

  1. Start a conversation and send a text-only message
  2. Wait for the AI to respond (this creates a checkpoint)
  3. Click the edit icon on your original message
  4. Modify the text and attach an image
  5. Select "Proceed" or "No, edit message only" in the confirmation dialog
  6. Before fix: Image indicator disappears, exporting task shows no [Image] tag
  7. After fix: Image is preserved and visible in the conversation

Alternative verification:

  • Export the task as markdown after editing with an image
  • The [Image] indicator should be present in the exported .md file

@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2026

🦋 Changeset detected

Latest commit: bf66def

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@kevinvandijk kevinvandijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hdcodedev! Tested and works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attached images are lost when the message is edited

2 participants