Open brichet opened 2 weeks ago
Thanks @brichet for working on this!
I'll have a closer look very soon.
BTW @jtpio, if you want to test it easily you can apply this patch, it will register a completion object in both extensions.
The completion options should be displayed if you type :
in the input.
Thanks!
The integration tests seem to be failing consistently with this change, or was it also happening with other changes?
I don't think that this related to this change, the failing test is about updating the file on disk, which should update the view. I'll have a closer look to this issue.
This PR adds autocomplete commands to the chat component, using a registry. It is strongly inspired by the PR made by @dlqqq in
jupyter-ai
https://github.com/jupyterlab/jupyter-ai/pull/810Fixes https://github.com/jupyterlab/jupyter-chat/issues/51
If some autocomplete commands are provided, a list of commands will open if the first character match a specific string.
The logic is as following:
jupyterlab-collaborativ-chat
provides a registry for autocomplete commands, using a token.jupyterlab-collaborativ-chat
(like possiblyjupyter-ai
) will be able to register some autocomplete commands for its own use.The 2 extensions (collaborative and websocket chat) provide the token in a new plugin.
cc @jtpio