positron
positron copied to clipboard
Add streaming support to notebook ai suggested actions
Addresses #10568.
https://github.com/user-attachments/assets/57984490-1a1a-4e8d-9c45-4b5778ff95f4
This PR switches the "Generate AI suggestions" feature from JSON to XML format, enabling progressive display of suggestions as they're generated.
Summary
Uses StreamingTagLexer to parse XML responses progressively:
- Updated prompt format to request XML instead of JSON in
suggestions.md - Replaced JSON accumulation with streaming XML parser in
notebookSuggestions.ts - Added progressive updates to QuickPick via callback command in
AskAssistantAction.ts - Removed old "Suggest next steps" action (too similar to AI suggestions)
Release Notes
New Features
- N/A
Bug Fixes
- N/A
QA Notes
@:positron-notebooks @:assistant
- Open a notebook with Python or R code
- Click "Ask Positron Assistant" in the cell toolbar
- Select "Generate AI suggestions"
- Verify suggestions appear progressively (first within 1-2 seconds, others incrementally)
E2E Tests 🚀
This PR will run tests tagged with: @:critical @:positron-notebooks @:assistant