Skip to content

EditableTurn

Stable

A message the person sent, which they can edit and send again, with its earlier versions kept.

Also known as edit message, edit prompt, resend

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Edit and send again

Plan a 3 day trip to Lisbon.
Assistant: Day 1: Alfama and the castle. Day 2: Belém. Day 3: a day trip to Sintra.

Press Edit, change the question, and Send. Then use the pager to go back.

When to use it

Lets people fix or rephrase what they asked without starting over, and go back to what they had before.

Made of: Message bubble · Version pager · Copy · Edit · Edit box with note · Cancel and Send

Use it for

  • Fixing a typo or adding detail to a question already sent.
  • Trying a question two ways and comparing the replies.

Not for

  • Moving between regenerated versions of a reply: use VersionPager.
  • A person's message that cannot be changed: use Message.
  • Editing text the AI wrote: use InlineEdit.

Do and avoid

Book a table for four at 8.
Edited
Do. The earlier version stays, and the pager moves between them.
Book a table for four at 8.
Avoid. Throwing the old version away makes people afraid to edit.

Do

  • Keep every version and its replies.
  • Say that sending an edit writes the replies after it again.
  • Put focus back on Edit when editing ends.

Avoid

  • Do not show Edit only on hover.
  • Do not throw the old version away.
  • Do not let people send an empty edit.

On a phone

  • Edit and Copy sit under the bubble at all times, because a phone has no hover.
  • The edit box takes the full width on a narrow screen.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started