Skip to content

Get task buttons working for Claude#312232

Merged
TylerLeonhardt merged 2 commits intomainfrom
tyler/angry-ocelot
Apr 23, 2026
Merged

Get task buttons working for Claude#312232
TylerLeonhardt merged 2 commits intomainfrom
tyler/angry-ocelot

Conversation

@TylerLeonhardt
Copy link
Copy Markdown
Member

By hard coding it along with CLI...

By hard coding it along with CLI...
Copilot AI review requested due to automatic review settings April 23, 2026 21:37
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) April 23, 2026 21:37
@TylerLeonhardt TylerLeonhardt self-assigned this Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends “background/local workspace agent” behavior (notably task/terminal affordances) to Claude Code sessions in the Agents (Sessions) window by treating Claude Code similarly to Copilot CLI sessions.

Changes:

  • Added a shared helper to identify workspace-backed agent session types (currently Copilot CLI + Claude Code).
  • Updated active-session context key wiring and terminal path resolution to use the shared helper.
  • Expanded terminal contribution test coverage to include Claude sessions and repository-only archival cleanup.
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Adds isLocalAgentSessionType helper for Copilot CLI + Claude Code session-type checks.
src/vs/sessions/services/sessions/browser/sessionsManagementService.ts Uses the new helper to drive the “background provider” active-session context key.
src/vs/sessions/contrib/terminal/browser/sessionsTerminalContribution.ts Uses the helper to decide when to use worktree/repo cwd and when to close terminals on archive/remove.
src/vs/sessions/contrib/terminal/test/browser/sessionsTerminalContribution.test.ts Adds Claude-specific terminal cwd tests and a repository-only archived-session terminal close test.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/terminal/browser/sessionsTerminalContribution.ts:160

  • The comment says this closes terminals for a session’s “worktree”, but getSessionTerminalInfo now uses worktree or repository (and unwraps agent-host URIs). Update the comment to match the behavior so it’s clear terminals can also be keyed/closed by repository path when no worktree is present.
		// When a session is archived or removed, close all terminals for its worktree
		this._register(this._sessionsManagementService.onDidChangeSessions(e => {
			for (const session of [...e.removed, ...e.changed.filter(s => s.isArchived.get())]) {
				const info = getSessionTerminalInfo(session);
				if (info) {
					this._closeTerminalsForPath(info.cwd.fsPath);
  • Files reviewed: 4/4 changed files
  • Comments generated: 3

Comment thread src/vs/sessions/services/sessions/common/session.ts
Comment thread src/vs/sessions/services/sessions/browser/sessionsManagementService.ts Outdated
Copy link
Copy Markdown
Member Author

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

Addressed: renamed isLocalAgentSessionTypeisWorkspaceAgentSessionType, updated JSDoc and comments to describe workspace/worktree-backed behavior rather than locality. Renamed the backing field _isBackgroundProvider_isWorkspaceAgent to align semantics.

@TylerLeonhardt TylerLeonhardt merged commit f9f1cdc into main Apr 23, 2026
26 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/angry-ocelot branch April 23, 2026 22:15
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 2026
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.

3 participants