Skip to content

Chat context API changes#8507

Merged
alexr00 merged 3 commits intomainfrom
alexr00/welcome-hyena
Feb 11, 2026
Merged

Chat context API changes#8507
alexr00 merged 3 commits intomainfrom
alexr00/welcome-hyena

Conversation

@alexr00
Copy link
Copy Markdown
Member

@alexr00 alexr00 commented Feb 11, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 11, 2026 11:42
@alexr00 alexr00 enabled auto-merge (squash) February 11, 2026 11:42
@alexr00 alexr00 self-assigned this Feb 11, 2026
@vs-code-engineering vs-code-engineering Bot added this to the February 2026 milestone Feb 11, 2026
hediet
hediet previously approved these changes Feb 11, 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

Updates the extension’s chat context integration to match the newer VS Code proposed “chat context provider” API split (workspace vs explicit vs resource), and adjusts provider registrations/types accordingly.

Changes:

  • Split PR chat context into a new WorkspaceContextProvider (workspace context) plus an updated PullRequestContextProvider (explicit + resource context).
  • Update IssueContextProvider to implement the new explicit/resource provider interfaces and method names.
  • Update chat context provider proposed typings and switch registrations in extension.ts to the new registerChat*ContextProvider APIs.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/lm/pullRequestContextProvider.ts Introduces WorkspaceContextProvider and adapts PR provider to explicit/resource provider APIs.
src/lm/issueContextProvider.ts Migrates issue provider to new explicit/resource provider interfaces and method names.
src/extension.ts Replaces deprecated registerChatContextProvider usage with new workspace/explicit/resource registrations.
src/@types/vscode.proposed.chatContextProvider.d.ts Adds new provider interfaces and registration APIs; marks old API deprecated and updates ChatContextItem shape.
Comments suppressed due to low confidence (2)

src/lm/pullRequestContextProvider.ts:106

  • provideExplicitChatContext unconditionally uses this._reposManager.folderManagers[0]. If there are no folder managers this will throw, and in multi-root workspaces it ignores other repositories. Consider returning an empty list when there are no repos and aggregating PRs across all folderManagers.
	async provideExplicitChatContext(_token: vscode.CancellationToken): Promise<PRChatContextItem[]> {
		const prs = await this._prsTreeModel.getAllPullRequests(this._reposManager.folderManagers[0], false);
		return prs.items.map(pr => {
			return this._prToUnresolvedContext(pr);
		});

src/extension.ts:280

  • The chat context provider registrations for githubissue also aren’t being disposed (the returned Disposables are ignored). Add these registration disposables (and any disposable providers, if needed) to context.subscriptions.
	const issueContextProvider = new IssueContextProvider(issueStateManager, reposManager, context);
	vscode.chat.registerChatExplicitContextProvider('githubissue', issueContextProvider);
	vscode.chat.registerChatResourceContextProvider({ scheme: 'webview-panel', pattern: '**/webview-IssueOverview**' }, 'githubissue', issueContextProvider);

Comment thread src/lm/pullRequestContextProvider.ts
Comment thread src/lm/pullRequestContextProvider.ts Outdated
Comment thread src/extension.ts Outdated
@alexr00 alexr00 marked this pull request as draft February 11, 2026 11:57
auto-merge was automatically disabled February 11, 2026 11:57

Pull request was converted to draft

@alexr00 alexr00 marked this pull request as ready for review February 11, 2026 12:55
Copilot AI review requested due to automatic review settings February 11, 2026 12:55
@alexr00 alexr00 enabled auto-merge (squash) February 11, 2026 12:55
@alexr00 alexr00 disabled auto-merge February 11, 2026 12:55
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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

Comment thread src/lm/pullRequestContextProvider.ts
Comment thread src/lm/issueContextProvider.ts
@alexr00 alexr00 merged commit b73dbca into main Feb 11, 2026
12 checks passed
@alexr00 alexr00 deleted the alexr00/welcome-hyena branch February 11, 2026 16:40
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.

4 participants