-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete UI for slash commands #810
Conversation
I've opened a secondary PR that implements an alternative autocomplete design: dlqqq#2 I've updated the description of this PR to include a demo video of the alternative UI. |
f953a8d
to
972f1c1
Compare
Feedback from Piyush:
|
Thank you for opening this PR! This looks really neat. Some feedback after using the primary branch:
|
@JasonWeill Thanks for the feedback. Let me address your callouts in order:
(will continue, just posting partial reply now to avoid losing progress) |
|
@3coins @JasonWeill I've addressed your comments and this PR is ready for another round of review. Here is a demo of the latest revision of this branch for your convenience: Screen.Recording.2024-06-05.at.11.10.27.AM.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looking good! Just a few non-blocking suggestions.
@JasonWeill Thanks! I'm tracking the remainder of your feedback in #820. I will merge this PR for now. |
cc @brichet for awareness. I guess this is a feature that should / could be ported to https://github.com/jupyterlab/jupyter-chat |
* add REST API for fetching list of available slash commands * implement slash command autocomplete UI * pre-commit * shorten /export help message * add border and more right margin on icons in popup * prefer mdash over hyphen * include space after selecting an option
Description
This PR adds an autocomplete UI for slash commands in the chat box. When the user types
/
, a list of matching slash commands is shown in the UI.The list of slash commands is retrieved from a new REST API endpoint
ListSlashCommands
onGET /api/ai/chats/slash_commands
. This only shows the list of slash commands which are valid for the currently selected provider, which handles the case of whenunsupported_slash_commands
is set in a custom provider.Demo of first proposal
This is the UI implemented in this PR.
Screen.Recording.2024-05-31.at.11.05.52.AM.mov
Demo of second proposal
This is the UI implemented here: dlqqq#2
Screen.Recording.2024-05-31.at.12.23.59.PM.mov