Skip to content

Align chat context providers with updated ChatContextItem icon typing#8844

Merged
rzhao271 merged 2 commits into
mainfrom
copilot/fix-pipeline-compilation-errors
Jul 15, 2026
Merged

Align chat context providers with updated ChatContextItem icon typing#8844
rzhao271 merged 2 commits into
mainfrom
copilot/fix-pipeline-compilation-errors

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Recent VS Code proposed API updates changed chat context item icon typing, causing pipeline TypeScript compilation failures in LM context providers. This PR updates the affected provider payloads to match current ChatContextItem shape.

  • Type contract alignment

    • Replaced icon with iconPath in chat context items built by:
      • IssueContextProvider
      • WorkspaceContextProvider
      • PullRequestContextProvider
  • Scope of change

    • Touches only chat context item construction paths in LM context providers.
    • No behavioral changes to context resolution, labels, commands, or serialized context values.
return {
  iconPath: new vscode.ThemeIcon('git-pull-request'),
  label: `#${pr.number} ${pr.title}`,
  modelDescription: 'The GitHub pull request the user is viewing.',
  tooltip: new vscode.MarkdownString(`#${pr.number} ${pr.title}`),
  pr,
  command: {
    command: 'pr.openDescription',
    title: vscode.l10n.t('Open Pull Request')
  }
};

Copilot AI and others added 2 commits July 14, 2026 21:45
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@rzhao271 rzhao271 added this to the 1.130.0 milestone Jul 14, 2026
@rzhao271
rzhao271 marked this pull request as ready for review July 14, 2026 22:47
Copilot AI review requested due to automatic review settings July 14, 2026 22:47

Copilot AI 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.

Pull request overview

This PR updates the extension’s LM chat context providers and bundled proposed VS Code typings to align with the latest vscode.ChatContextItem icon contract (moving from icon to iconPath) to fix TypeScript compilation failures.

Changes:

  • Updated LM context item construction to use iconPath instead of icon for PR/issue/workspace chat context items.
  • Updated proposed ChatContextItem typing and documentation to reflect iconPath?: IconPath.
  • Extended ChatSessionProviderOptionModelMetadata with a promo field (not mentioned in the PR description).

Reviewed changes

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

File Description
src/lm/pullRequestContextProvider.ts Uses iconPath for workspace and PR chat context items.
src/lm/issueContextProvider.ts Uses iconPath for issue chat context items.
src/@types/vscode.proposed.chatSessionsProvider.d.ts Adds promo metadata under chat session provider option model metadata.
src/@types/vscode.proposed.chatContextProvider.d.ts Updates ChatContextItem to iconPath?: IconPath and adjusts related docs/comments.

@rzhao271
rzhao271 enabled auto-merge (squash) July 14, 2026 23:02
@rzhao271
rzhao271 merged commit 1f6a1e1 into main Jul 15, 2026
8 checks passed
@rzhao271
rzhao271 deleted the copilot/fix-pipeline-compilation-errors branch July 15, 2026 00:35
@alexr00

alexr00 commented Jul 15, 2026

Copy link
Copy Markdown
Member

@rzhao271 I already did this: #8838

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.

5 participants