Skip to content

Agents - refactor GitHub models#313891

Merged
lszomoru merged 7 commits into
mainfrom
lszomoru/github-model-references
May 2, 2026
Merged

Agents - refactor GitHub models#313891
lszomoru merged 7 commits into
mainfrom
lszomoru/github-model-references

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented May 2, 2026

  • Use ReferenceCollections for each model kind
  • Centralize refresh and polling into one workbench contribution

Copilot AI review requested due to automatic review settings May 2, 2026 17:58
@lszomoru lszomoru enabled auto-merge (squash) May 2, 2026 17:58
@lszomoru lszomoru self-assigned this May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cb32a3e854b5734fe5aaca2318f2e0a42ee821b05ea97883ea42c5ba95edb3c3)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/42624fbba5e0db7f32c224b5eb9c5dd3b08245697ae2e7d2a88be0d7c287129b)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/28af1b719f3877d2f048fef10bb4534d5f638c1987bb0536331f4ab50ea0ea7a)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/c6c77ca2785665ae66c817cda21a8e5f5ea7d51e798c5b4e5aedcda9fd7323bd)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/2fbc12507b59ff950d9612d2df92e6b39d8bf0bf500478e42eca2ead4d1ae206)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4632ab04d1fdd7db9ab0e00cce10aefb7a6344eb8869dfce740309a8801cab73)

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 refactors the sessions-window GitHub integration to move model ownership from ad-hoc caches to reference-counted collections, and to centralize active-session refresh/polling logic in a single workbench contribution. It fits into the vs/sessions layer by consolidating how PR, CI, and review-thread data are shared across the Agents experience.

Changes:

  • Replaced direct GitHub model getters with reference-returning APIs backed by per-model ReferenceCollections.
  • Added active-session observables in GitHubService and moved CI/review-thread refresh + polling into GitHubPullRequestPollingContribution.
  • Updated dependent services/tests to consume model references or active-session observables instead of direct cached models.
Show a summary per file
File Description
src/vs/sessions/contrib/github/test/browser/githubService.test.ts Updates service tests from direct cached models to reference-based acquisition/disposal behavior.
src/vs/sessions/contrib/github/test/browser/githubModels.test.ts Adjusts CI model tests to exercise reference collection behavior.
src/vs/sessions/contrib/github/test/browser/githubContribution.test.ts Updates polling contribution tests/mocks for the new service API.
src/vs/sessions/contrib/github/browser/models/githubRepositoryModel.ts Adds a reference collection wrapper for repository models.
src/vs/sessions/contrib/github/browser/models/githubPullRequestReviewThreadsModel.ts Adds a reference collection wrapper for PR review-thread models.
src/vs/sessions/contrib/github/browser/models/githubPullRequestModel.ts Adds a reference collection wrapper and changes PR polling bookkeeping to disposable-based tracking.
src/vs/sessions/contrib/github/browser/models/githubPullRequestCIModel.ts Adds a reference collection wrapper and includes PR number in CI model state/logging.
src/vs/sessions/contrib/github/browser/githubService.ts Reworks the GitHub service around references plus active-session derived observables.
src/vs/sessions/contrib/github/browser/github.contribution.ts Centralizes active-session PR/CI/review-thread refresh and polling behavior.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts Switches live PR icon computation to use a model reference.
src/vs/sessions/contrib/codeReview/test/browser/codeReviewService.test.ts Updates code review tests for the new active-session review-thread flow.
src/vs/sessions/contrib/codeReview/browser/codeReviewService.ts Refactors PR review state consumption to read from the GitHub service’s active-session review-thread observable.
src/vs/sessions/contrib/changes/browser/checksViewModel.ts Switches checks view model to consume the active-session CI observable.
src/vs/sessions/contrib/changes/browser/checksActions.ts Switches failed-check actions/context to consume the active-session CI observable.

Copilot's findings

  • Files reviewed: 14/14 changed files
  • Comments generated: 4

Comment thread src/vs/sessions/contrib/github/browser/githubService.ts
Comment thread src/vs/sessions/contrib/github/browser/githubService.ts
Comment thread src/vs/sessions/contrib/github/browser/github.contribution.ts
Comment thread src/vs/sessions/contrib/codeReview/browser/codeReviewService.ts
@lszomoru lszomoru merged commit 6fc17b5 into main May 2, 2026
42 of 45 checks passed
@lszomoru lszomoru deleted the lszomoru/github-model-references branch May 2, 2026 19:30
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone May 2, 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