Skip to content
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

Add frontend plugin to allow for a custom React component to be rendered under each message #867

Closed
dlqqq opened this issue Jun 30, 2024 · 1 comment · Fixed by #942
Closed
Labels
enhancement New feature or request priority
Milestone

Comments

@dlqqq
Copy link
Member

dlqqq commented Jun 30, 2024

Problem

Some developers configuring Jupyter AI with their own custom extension would like to be able to render a custom React component under each message in the UI. This allows for a wide range of capabilities, such as rendering a feedback button under each AI message.

Proposed Solution

  • Export a new token & type, e.g. MessageAddition. The type expected by Jupyter AI should be that of a React component which takes a single message: AiService.ChatMessage prop.
  • Optionally request an implementation by listing it within the optional field of the root plugin object in packages/jupyter-ai/src/index.ts.
  • If this component is provided, then render this under each message in the chat.
@dlqqq dlqqq added enhancement New feature or request priority labels Jun 30, 2024
@dlqqq dlqqq added this to the v2.19.0 milestone Jun 30, 2024
@michaelchia
Copy link
Collaborator

when this is done, would it be possible to provide an example in the docs or elsewhere how to implement feedback buttons with this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants