-
Notifications
You must be signed in to change notification settings - Fork 131
Positron-nb-assistant-feedback-fixes #10880
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
base: main
Are you sure you want to change the base?
Conversation
|
E2E Tests 🚀 |
161bd92 to
991ad68
Compare
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.
Pull request overview
This PR implements several improvements to the Positron Notebooks Assistant based on user feedback, focusing on performance optimizations through better caching, auto-execution of code cells, auto-rendering of markdown cells, and improved MIME type handling to reduce token usage.
Key Changes
- Performance & Caching: Notebook context is now injected as a separate user message with its own cache breakpoint instead of being embedded in the system prompt, maximizing cache hits when notebook state changes
- Auto-execution: Code cells added by the Assistant now execute automatically by default (configurable via
runparameter), eliminating the need for separate tool calls and reducing response latency - Auto-rendering: Markdown cells with content now automatically render instead of entering edit mode, providing immediate visual feedback
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
notebookMimeUtils.ts |
New utility module for identifying image vs text-based MIME types to optimize token usage |
PositronNotebookInstance.ts |
Modified to prevent auto-entering edit mode for markdown cells with content, enabling auto-rendering |
mainThreadNotebookFeatures.ts |
Enhanced MIME type handling in cell outputs using the new utility functions with fallback logging for unknown types |
notebookUtils.ts |
Added serializeNotebookContextAsUserMessage() to format notebook state as a separate user message for caching |
notebookTools.ts |
Enhanced EditNotebookCells tool to auto-execute code cells after adding them, with run parameter to opt-out |
promptRender.ts |
Removed notebook context from template augmentation since it's now injected separately as a user message |
participants.ts |
Refactored to inject notebook context as a dedicated user message after general context for better cache optimization |
notebook-mode-*.md |
Updated prompt templates to reference notebook context in separate message rather than embedding it inline |
positron-assistant-notebook-mode.md |
Updated documentation to reflect auto-execution behavior |
package.json |
Updated tool description to document the run parameter and auto-execution default behavior |
extensions/positron-assistant/src/tools/positron-assistant-notebook-mode.md
Show resolved
Hide resolved
extensions/positron-assistant/src/tools/positron-assistant-notebook-mode.md
Show resolved
Hide resolved
231c837 to
2c67555
Compare
Addresses #10856, #10858, #10853, #10851, and #10859.
Summary
This PR includes several improvements to the Positron Notebooks Assistant based on user feedback:
Release Notes
New Features
Bug Fixes
QA Notes
@:positron-notebooks @:assistant