[wip] Add local canvases to the Agents Window - #335902
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Draft
[wip] Add local canvases to the Agents Window#335902Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Conversation
Add the default-off local canvas preview across Agent Host, the canonical protocol adapter, Sessions presentation, package authoring and native browser surfaces. Preserve exact workspace/revision authority, external document data, canvas-first retention, live source ownership and request-frozen context. Project genuine joined-SDK requests into chat turns so canvas-originated requests use visible tool approvals and cancellation. Include regression coverage, runnable fixtures, launch tooling and the required JavaScript allowlist entries for source packages that run without transpilation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a069b1a2-65a9-4427-b3fe-6546a3bffc9e
Copilot started reviewing on behalf of
Ulugbek Abdullaev (ulugbekna)
September 11, 2026 22:11
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Workspace-scoped approvals can bypass target-folder trust checks and fail for isolated worktrees because repository roots are used instead of effective working directories.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced (auto)
Findings: 1
Note
Copilot is running an experiment and ran this review at Balanced.
Open findings (3)
What changed in this PR
Adds an opt-in local canvas development preview spanning Agent Host state, package authorization, Sessions UI, and confined Integrated Browser rendering.
Changes:
- Adds canonical canvas protocol, persistence, context, and SDK integration.
- Adds reviewed package snapshots with scoped approvals.
- Adds Sessions controls, browser confinement, tooling, and tests.
| File | Description |
|---|---|
src/vs/platform/agentHost/** |
Canvas protocol, runtime, package authorization, context, and tests |
src/vs/sessions/contrib/canvases/** |
Canvas presentation and actions |
src/vs/sessions/contrib/providers/agentHost/** |
Package management and session integration |
src/vs/workbench/contrib/browserView/** |
Source-backed browser editors |
src/vs/platform/browserView/** |
Native browser confinement and lifecycle |
src/vs/workbench/contrib/chat/** |
Canvas request context and draft transfer |
scripts/local-canvas-* |
Development setup and launch tooling |
.agents/skills/launch/** |
Isolated launch workflow updates |
build/** |
Build, localization, and style metadata |
src/**/test/** |
Unit and integration coverage |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+369
to
+379
| if (scope === 'workspace' && capturedWorkspace) { | ||
| if (!this.workspaceTrustManagementService.isWorkspaceTrusted()) { | ||
| const trusted = await this.workspaceTrustRequestService.requestResourcesTrust({ | ||
| uri: capturedWorkspace.folder, | ||
| message: localize('agentHostCanvasPackages.approve.trustMessage', "Approving \"{0}\" to run in this workspace requires you to trust the workspace.", pkg.name), | ||
| }); | ||
| if (!trusted) { | ||
| return; | ||
| } | ||
| } | ||
| } |
| } | ||
|
|
||
| private async openPackage(target: ISessionCanvasTarget): Promise<URI | undefined> { | ||
| const workspace = target.session.workspace.get()?.folders[0]?.root; |
|
|
||
| private currentSessionWorkspace(): ICanvasPackageSessionWorkspace | undefined { | ||
| const session = this.sessionsService.activeSession.get(); | ||
| const folder = session?.workspace.get()?.folders[0]?.root; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Add a default-off local canvas development preview to the Agents Window, backed by approved Copilot SDK extension packages and source-resolved native browser surfaces.
This is a work-in-progress integration PR, not a request to enable the feature generally or publish the companion SDK/runtime changes.
Included
The five JavaScript allowlist additions are executable extension/browser fixtures and the no-build authoring starter; those files intentionally run as delivered rather than requiring TypeScript transpilation. The allowlist still requires normal CODEOWNERS review.
Validation
Public companion drafts
40b27012.The compatible runtime change is tracked separately in its existing private repository.
Remaining WIP gates
Hook processor is not configuredresume failure was fixed in the companion runtime's lifecycle handling, without a VS Code workaround. Repeated unchanged SDK reproductions and actual native existing-chat package approval now pass. Consuming released dependency versions is still separate from the isolated development-build validation.No private user profiles, credentials, local verification logs, heap dumps, SDK/runtime build artifacts or session documents are included.