-
Notifications
You must be signed in to change notification settings - Fork 3
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 icon and name for the AI assistant #40
Conversation
src/chat-handler.ts
Outdated
@@ -87,7 +104,9 @@ export class ChatHandler extends ChatModel { | |||
}) | |||
); | |||
|
|||
this.updateWriters([{ username: 'AI' }]); | |||
const avatar = `data:image/svg+xml;base64,${AI_AVATAR_BASE64}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe jupyter-chat
could allow taking a LabIcon
as avatar_url
, or expose an avatar
field which could be a LabIcon
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface is a copy of User.IIdentity
, that is compatible with the server version of it.
In jupyterlab-chat
extension, the user data are saved in the collaborative document (chat file) in plain text. I don't know if there would be a way to keep the LabIcon
in this case (some kind of serialization ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, not sure either for now (haven't investigated more), but sticking to this approach is likely fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, thanks @jtpio.
"jupyter.lab.setting-icon": "@jupyterlite/ai:jupyternaut-lite", | ||
"jupyter.lab.setting-icon-label": "JupyterLite AI Chat", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't know that 👍.
Co-authored-by: Nicolas Brichet <[email protected]>
Updating the name in the settings now also updates the chat panel, thanks @brichet! jupyterlite-ai-persona-name-update.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jtpio
personaName
to the chat settings, defaulting toJupyternaut
for now