Merged
Conversation
- replace openChat and createChat callbacks with createModel callback - do not open chat with the createChat command. A dedicated commands createAndOpen commands has been added - add some docstring
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up #262
Originally posted by @brichet in #262 (comment)
code change
replace the callbacks
openChatandcreateChatin the multichat panel bycreateModelThese 2 callbacks were used to open a chat in the panel, the first one with a provided name (existing chat) and the second one without name (new chat). Both functions were supposed to call the
addChat(model)function from the panel themselves, which is a bad design since they are executed from the panel.Instead, this PR adds a
createModelcallback that is responsible for creating a chat model, whether a name has been provided or not. In the case of jupyterlab-chat, the name is actually the path of the file.do not open the chat in the
createChatcommands anymore. Instead there is a new commandopenAndCreatethat do both actions.add a signal when a new section is added to the multichat panel, to add the new chat to the tracker