Replies: 13 comments
|
Although the “tool call” component currently corresponds to that of |
|
The package name can also be changed if there are more relevant ones. |
|
@jupyter-ai-contrib/decision-makers |
|
The repo now also includes a diff component, based on the current implementation in https://github.com/jupyter-ai-contrib/jupyter-ai-acp-client:
You can try it in your browser with JupyterLite: https://brichet.github.io/jupyter-chat-components/notebooks/?path=components_demo.ipynb |
|
Gentle ping @jupyter-ai-contrib/decision-makers |
|
I'm 👍 on this. |
|
I'm not a decision maker here but 👍 |
|
Ouch, sorry this has been sitting for so long. Feel free to ping us personally through other channels if we miss something like this. I am +1 on adding this repo and want to make sure we have a single set of components for these things in the long run. We will need to go through a process of merging this with the components we have in the ACP clients and ensure high quality. I don't have a sense of which repo has which components and what the de-dup/merge will look like yet - we may end up keeping some from the ACP repo and some from the new repo being pulled in. |
|
Also, I love the JS kernel usage to show demos of components, very cool! |
|
👍 +1, totally agree that this would be a valuable addition to the JAI contrib org. We need more time to review & test before making it a dependency of |
|
+1 on shared, reusable components. The duplication problem is real and this is a great initiative. Before we commit to a specific repo location though, a few things I'd love to see us think through:
|
|
Thanks for approvals and suggestions. After discussion during the weekly meeting, I'll move the repository in jupyter-ai-contrib to ease tests, as a first step. |
|
Done https://github.com/jupyter-ai-contrib/jupyter-chat-components |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is a proposition to add an extension that would share AI related frontend components to display in the chat.
Currently the repo is at brichet/jupyter-chat-components.
DESCRIPTION
MIME renderer
Components are exposed through a custom MIME type:
application/vnd.jupyter.chat.components.This extension registers a MIME renderer factory with JupyterLab's render MIME registry. To display a component, produce output with the MIME type above, where:
"tool-call")The MIME renderer looks up the component name in the factory's registry and renders the corresponding React component.
Component registry
The registry is available directly on the
IComponentsRendererFactorytoken as theregistryproperty. It maps component names to React components and exposes the following methods:add(name, component)— register a new React component under a unique nameget(name)— retrieve a registered component by namehas(name)— check whether a component is registeredgetNames()— list all registered component namesOther JupyterLab extensions can consume the
IComponentsRendererFactorytoken and useregistry.add()to register their own components, which will then be available for rendering via the MIME bundle.Available components
Currently only a tool call component is available, to display the state and output of a tool call. It allows an awaiting approval state, that display buttons to approve or reject a tool call.
MOTIVATION
The main motivation is to avoid each extension to provide their own components, that probably won't be compatible and reused.
Related discussion in jupyter-chat: jupyterlab/jupyter-chat#276
For example the tool call component is already defined at least in 2 projects:
All reactions