jupyterlab / jupyter-chat

An extension to add a chat panel
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Autocomplete commands #57

Open brichet opened 2 weeks ago

brichet commented 2 weeks ago

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/810

Fixes 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:

The 2 extensions (collaborative and websocket chat) provide the token in a new plugin.

cc @jtpio

github-actions[bot] commented 2 weeks ago

Binder :point_left: Launch a Binder on branch _brichet/jupyter-chat/autocompletecommands

jtpio commented 6 days ago

Thanks @brichet for working on this!

I'll have a closer look very soon.

brichet commented 4 days ago

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.

autocompletion-test.txt

jtpio commented 3 days ago

Thanks!

The integration tests seem to be failing consistently with this change, or was it also happening with other changes?

brichet commented 3 days ago

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.