Third-party extensions need a stable public API to open JupyterLite AI chat and pre-fill the prompt text (for example i was working on jupyterlab/plugin-playground#136, which requires pre-filling the chat with a prompt).
For now, we rely on tracker/model internals (IChatTracker -> widget.model.input) after opening chat.
Current behavior
@jupyterlite/ai:open-chat supports:
It does not support pre-filling input directly.
A possible solution could be:
To support one of these public APIs:
- Extend
@jupyterlite/ai:open-chat args with:
input?: string
focus?: boolean (default true)
autoSend?: boolean (default false)
or
- Add a dedicated command, e.g.:
@jupyterlite/ai:open-chat-with-message
Third-party extensions need a stable public API to open JupyterLite AI chat and pre-fill the prompt text (for example i was working on jupyterlab/plugin-playground#136, which requires pre-filling the chat with a prompt).
For now, we rely on tracker/model internals (
IChatTracker->widget.model.input) after opening chat.Current behavior
@jupyterlite/ai:open-chatsupports:areanameproviderIt does not support pre-filling input directly.
A possible solution could be:
To support one of these public APIs:
@jupyterlite/ai:open-chatargs with:input?: stringfocus?: boolean(default true)autoSend?: boolean(default false)or
@jupyterlite/ai:open-chat-with-message