Skip to content

Make vscode.open agent-invocable - #15141

Merged
dhruvisompura merged 2 commits into
mainfrom
dhruvi/agent-compatible-files
Aug 5, 2026
Merged

Make vscode.open agent-invocable#15141
dhruvisompura merged 2 commits into
mainfrom
dhruvi/agent-compatible-files

Conversation

@dhruvisompura

@dhruvisompura dhruvisompura commented Jul 25, 2026

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.

@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

Comment thread src/vs/workbench/browser/parts/editor/editorCommands.ts Outdated
Co-authored-by: Sam Clark <samclark2015@users.noreply.github.com>
Signed-off-by: Dhruvi Sompura <dhruvi.sompura@posit.co>

@samclark2015 samclark2015 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@dhruvisompura
dhruvisompura enabled auto-merge (squash) August 5, 2026 14:56
@dhruvisompura
dhruvisompura merged commit 0e18ab6 into main Aug 5, 2026
26 checks passed
@dhruvisompura
dhruvisompura deleted the dhruvi/agent-compatible-files branch August 5, 2026 15:16
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants