Skip to content

Update to jupyterlab-ai-commands 0.3.1#301

Open
jtpio wants to merge 4 commits intojupyterlite:mainfrom
jtpio:bump-jupyterlab-ai-commands
Open

Update to jupyterlab-ai-commands 0.3.1#301
jtpio wants to merge 4 commits intojupyterlite:mainfrom
jtpio:bump-jupyterlab-ai-commands

Conversation

@jtpio
Copy link
Copy Markdown
Member

@jtpio jtpio commented Mar 24, 2026

Update to the latest release, which should bring improvements when editing notebooks and files.

Also slightly tweak the system prompt to nudge the model to get more up-to-date information about the files it edits.

@jtpio jtpio added the enhancement New feature or request label Mar 24, 2026
@jtpio jtpio changed the title Update to jupyterlab-ai-commands 0.3.0 Update to jupyterlab-ai-commands 0.3.1 Mar 24, 2026
@jtpio jtpio marked this pull request as ready for review March 26, 2026 15:36
Copy link
Copy Markdown
Collaborator

@brichet brichet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jtpio , it seems a lot more reliable.
I still see some error done by mistral (devstral), but I think it is also an issue with the LLM. Sometime when I ask something that is not fully relevant with the current notebook, it opens a lot of notebooks to see if one matches better the request.

Ideas for future PRs:

  • add a command to read the content without opening the widget, to help introspecting files and opening only the relevant one. It was part of jupyter-ai-contrib/jupyterlab-ai-commands#5, maybe we could keep only the part about reading content.
  • specify to ask the user when the request is not fully understand, before starting to call tools
  • I haven't see issues so far with this PR, but it could be useful to tell the agent to compare the file after the change, and correct it if it is not what was expected

## Notebook State and Cell Identity
When working with an existing notebook, use the notebook's current structure and kernel state as the source of truth.
- Before changing notebook content or structure, inspect the notebook and any target cells with the relevant notebook commands you have discovered.
- If the user may have edited the notebook, or if a previous command could have changed it, refresh your view before continuing rather than relying on earlier results.
Copy link
Copy Markdown
Collaborator

@brichet brichet Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An other idea for future PR.
"If the user may have edited the notebook": I wonder if we could send this information back to the agent during a response generation. If we add a message in the history, it will probably break the history if it is inserted between a tool call and a tool result...
But there may be other way to inform the agent about some changes that should be taken into consideration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Maybe listening to fileChanged and passing this information to the conversation (as a message hidden to the user) could be a more reliable approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants