jupyterlab / jupyter-ai

A generative AI extension for JupyterLab
https://jupyter-ai.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.98k stars 297 forks source link

Use Jupyter Chat, if available, for the chat interface #785

Open JasonWeill opened 1 month ago

JasonWeill commented 1 month ago

Problem

@brichet has been working on Jupyter Chat, a package that contains a chat feature for Jupyter applications. It is based on the chat interface for Jupyter AI, but it does not include any AI features.

If a user has both Jupyter Chat and Jupyter AI enabled, they will have two different and independent chat features in their application.

Proposed Solution

If Jupyter Chat and Jupyter AI are both installed, have Jupyter AI's chat agent respond in the Jupyter Chat interface instead of in its own chat interface.

Additional context

See #205 for prior discussion about the chat panel.

jtpio commented 2 weeks ago

If Jupyter Chat and Jupyter AI are both installed, have Jupyter AI's chat agent respond in the Jupyter Chat interface instead of in its own chat interface.

Curious of what this would entail in terms of implementation.

https://github.com/jupyterlab/jupyter-ai/issues/205 was closed, but it looks like Jupyter AI still needs to depend on the @jupyter/chat package for its chat components?

By "Jupyter Chat installed", does this refer to the jupyterlab-collaborative-chat package? In this case it makes for Jupyter AI to try to "find" this chat instance (via a token?) and reuse it.

brichet commented 1 week ago

We should probably do the migration in 2 steps, first depend on @jupyter/chat for UI components, and than use possibly jupyterlab-collaborative-chat. This would ensure that we don't lost any feature in UI before changing the messaging stuff.