Skip to content

Make vscode.open agent-invocable - #15141

Draft
dhruvisompura wants to merge 1 commit into
mainfrom
dhruvi/agent-compatible-files
Draft

Make vscode.open agent-invocable#15141
dhruvisompura wants to merge 1 commit into
mainfrom
dhruvi/agent-compatible-files

Conversation

@dhruvisompura

Copy link
Copy Markdown
Contributor

Addresses part of #15063.

Summary

Makes vscode.open invocable by Posit Assistant, so the assistant can open files -- including opening .csv/.parquet files in the Data Explorer via Positron's editor resolver.

The command already works through the agent path today: positron.ai.validateAndExecuteCommand executes the renderer-side registration directly (bypassing the extension-host API converter that rejects plain path strings), and a string path falls through to the opener service, which parses it as a file URI. The only gap was discovery metadata: the renderer registration in the upstream editorCommands.ts declared a bare Uri arg with no description or schema.

This PR adds agentCompatible: true and a documented string schema for the argument, wrapped in Start/End Positron markers with the upstream arg line preserved in a comment. No behavior change for any caller.

Screenshots

(to be added: assistant opening a csv in Data Explorer via positronCommand)

Release Notes

New Features

Bug Fixes

  • N/A

Validation Steps

@:data-explorer @:editor

  1. Verify the agent contract: run "Developer: Show All Agent-Compatible Commands". Expected: vscode.open listed with a described string Uri argument.
  2. Verify user behavior is unchanged: open files normally (double-click in Explorer, Quick Open). Expected: no change.
  3. Verify the headless path: in a workspace containing a csv, ask the assistant to "open data.csv". Expected: the file opens in the Data Explorer with no prompt.

@github-actions

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:data-explorer @:editor

Why these tags?
Tag Source
@:critical Always runs (required)
@:data-explorer PR description
@:editor PR description

More on automatic tags from changed files.

readme  valid tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant