Chat

Positron Assistant provides multiple ways to interact with AI assistance across your workspace. Whether you use the dedicated chat pane, inline chat within your Editor or Terminal, or quick Console actions for errors, Assistant integrates seamlessly with your development environment.

Tip

To use Positron Assistant features, you’ll need to first configure a language model provider. See the Getting Started guide for more details.

Chat pane

The chat pane provides a dedicated interface for asking questions, editing and debugging your code. Assistant responds based on your active session context, making it easier to troubleshoot issues and learn new techniques.

You can interact with your R and Python Console sessions, including code, outputs, and in-memory objects like dataframes, via chat. Code generated by Assistant can be run in the Console, copied to the clipboard, or sent to an Editor using controls attached to code output blocks. Access to Variables and Plots panes provides additional context for your conversations.

Opening the chat pane

To open the chat pane, click the chat robot icon in the sidebar or run the command Chat: Open Chat from the Command Palette.

Key features

Feature Description
Chat agents Choose from default agents (Ask, Edit, Agent, Plan) or create custom agents to tailor Assistant’s responses.
Context Attach files, interpreter sessions, tools, and source control history for more relevant responses.
Commands and participants Use commands for pre-defined actions and interact with dedicated participants for specific tasks.
Custom instructions Create and use custom instructions to personalize your chat experience.

Inline chat

Inline chat is a mini chat interface that can be opened directly within your code Editor, Notebook, or Terminal. It allows you to ask questions, get suggestions, and apply changes without leaving your current context.

To use the inline chat interface in an Editor or Notebook:

  1. In an Editor or Notebook, place your cursor where you want to open the inline chat interface.
  2. Open the inline chat interface using the default keybinding ; or, by running the command Inline Chat: Open Inline Chat from the Command Palette.
  3. Type your question or request in the inline chat input box and press Enter to send the message.
  4. Accept or dismiss suggestions directly from the inline chat response.

Learn more about how to Use editor inline chat in the VS Code documentation.

To use the inline chat interface in a Terminal:

  1. In a Terminal, place your cursor where you want to open the inline chat interface.
  2. Open the inline chat interface using the default keybinding ; or, by running the command Terminal: Open Inline Chat from the Command Palette.
  3. Type your question or request in the inline chat input box and press Enter to send the message.
  4. Accept or dismiss suggestions directly from the inline chat response.

Console actions

Positron Assistant provides quick assistance for errors in the Console. When you see an error, you can choose the following options to send your Console session to Assistant for immediate help:

  • Fix: Assistant diagnoses the error and suggests a corrected version of your code. Use Fix to resolve errors quickly or apply recommended changes.
  • Explain: Assistant describes what your code does, analyzes the error, and suggests possible solutions. Use Explain to learn more about your code or get advice on complex issues.

Fix and Explain inherit these options from the chat pane:

  • Selected model
  • Files added or removed from context
  • Console session visibility

Managing Console actions

  • To disable Console actions, modify the positron.assistant.consoleActions.enable setting.
  • To review your Fix and Explain chat history for the current chat session, run the Chat: Open Quick Chat command and your chat history will appear in the Quick Chat overlay.