positron icon indicating copy to clipboard operation
positron copied to clipboard

Add streaming support to notebook ai suggested actions

Open nstrayer opened this issue 1 month ago • 1 comments

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

  1. Open a notebook with Python or R code
  2. Click "Ask Positron Assistant" in the cell toolbar
  3. Select "Generate AI suggestions"
  4. Verify suggestions appear progressively (first within 1-2 seconds, others incrementally)

nstrayer avatar Nov 26 '25 02:11 nstrayer

E2E Tests 🚀 This PR will run tests tagged with: @:critical @:positron-notebooks @:assistant

readme  valid tags

github-actions[bot] avatar Nov 26 '25 02:11 github-actions[bot]