aws-samples / aws-samples/bedrock-chat

[BUG] Cannot edit a prompt with an attached image

Open
#235 0 comments 1 reaction 0 assignees View on GitHub
bug identified
Dominant language
TypeScript
Stars
1.3k
Forks
535
Avg merge
1d 12h
Merged PRs (30d)
10

Description

## Describe the bug
We cannot edit a prompt in a chat page when it contains an attached image.

## To Reproduce

1. Given a prompt with an image
![image](https://github.com/aws-samples/bedrock-claude-chat/assets/7490655/2a5ffd79-3a30-4bfe-bdc4-4cea7cfcb7e6)
2. Click edit button
3. Only the encoded image is shown and we cannot edit the original prompt text
![image](https://github.com/aws-samples/bedrock-claude-chat/assets/7490655/4f5aa1c6-ad07-4c43-9f29-8fc0ad24c678)

## Screenshots

If applicable, add screenshots to help explain your problem.

## Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the chat page with a prompt containing an image, then trace the edit button and prompt editing flow to see why the encoded image replaces the original text. Done means the original prompt text is editable when an image is attached, while the existing image remains handled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.