[IDE] Add support for inline context tokens within Duo's prompt input
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=546248) </details> <!--IssueSummary end--> # Problem to solve User's can't directly reference context sources when writing prompt instructions. This creates friction when writing prompt instructions. See https://gitlab.com/gitlab-org/editor-extensions/meta/-/issues/223 for more details on the problem and user feedback. ## Why it's important This will make it easier for users to format and create intuitive prompt instructions while using Duo in the IDE. ## Proposal ```gherkin Scenario: Add an inline context source token Given the user is typing in the prompt input field When the user types "+" Then the context menu should appear And the user makes a selection Then the selected context source is immediately inserted inline at the last cursor location And the context menu should close automatically And the context source is also added to the standard context reference list ``` ```gherkin Scenario: Remove an inline context source token Given an inline token is displayed in the prompt input field When the user <deletes the inline token> Then the context source should be removed from the input and the standard context reference list Examples: | Click `X` on the token | | Use mouse click to focus the token and press backspace | | Use keyboard to focus the token and press backspace | ``` ## Example [![ContextMenu_addinlinetoken](https://gitlab.com/-/project/278964/uploads/2142e6604af7e1a7770250592045657e/ContextMenu_addinlinetoken.png)](https://gitlab.com/gitlab-org/gitlab/-/issues/546248/designs/ContextMenu_addinlinetoken.png) ## Important links - [Figma](https://www.figma.com/design/py1XaoxXhPpc1jFocBMUnx/%E2%AD%90-Duo-in-the-IDE--16983?node-id=3581-8990&t=qlJE8xkWORZTMdcK-1) - [Prototype iteration 3](https://prototyping-939024.gitlab.io/) (to illustrate the concept, not a 1:1 spec)
issue