posit-dev / posit-dev/positron

Assistant: When Data Viewer is active, include its data and metadata as context

Open
#8,709 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: assistant area: data explorer
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

When a text file is open in the active editor, it is automatically included as context in Assistant.

Image

However, if the Data Viewer is the active editor, nothing is automatically included as context.

Image

This makes it difficult to ask Assistant about the data that's right in front of you. When a data viewer is the active editor, we could attach an implicit context object (as we do for files and consoles). This object could contain:

  • information for the model about the shape of the data
  • some of the data itself
  • if the data is in an R or Python session, the identifier of the session and the variable name
  • if the data is from a connection, information about the connection
  • if the data is from a CSV file, the location of the CSV file and perhaps a sample thereof
  • (and so on, i.e. the provenance of the data)
  • enough information to perform tool calls to get more more complete data (e.g. getTableSummary)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Assistant currently attaches implicit context for active files and consoles, then inspect the Data Viewer path and the getTableSummary tool mentioned in the issue. Done should mean an active Data Viewer supplies useful data shape, sample, and provenance context, with enough information for more complete data tool calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.