MVP AI tooltip in Wax editor
This issue is duplicated in ketida/ketida#714
Context
On behalf of BookSprints we need to build AI functionality into Ketida 2. We already have demo AI functionality in a private CokoDocs demo site but need to expand on this significantly.
Ultimately, in terms of using AI within the editor (in the producer page of the Ketida 2 site), admins would like to set a list of prompts available for a user to make use of. For an MVP, we are not going to offer defined prompts, but rather let the user ask AI anything.
In order to give the authors maximum control, the AI generated text should not insert onto the page automatically, this should be a triggered action by the user (to replace or insert below) and they should also be able to discard the AI's suggestion or try again.
Proposal
User flow
- User select text
- AI tooltip appears which says 'Ask AI'
- The user clicks on 'Ask AI'
- An AI window appears which has a prompt field
- The user types in a prompt
- The AI returns a response in the AI window, which visually replaces the prompt input area
- Below the AI response the user sees the following options:
- Replace current selection
- Insert below
- Try again
- Discard
- The user presses enter or clicks a send button (this could be words or an icon)
- The user chooses an option, and the relevant action is executed:
- Replace current selection: deletes the selected text and inserts AI's response
- Insert below: keeps the selected text, adds a new paragraph below which includes the AI's response
- Try again: removes the previous AI response from the AI window, and generates a new AI response for which the user sees these same options
- Discard: closes the AI tooltip "modal"
Design
The design is a work in progress, a first version will be ready this week
Two existing visual references to help give you an idea of ways in which other's have integrated AI into editors, are Notion, and Google Labs. There are many other similar examples.