Skip to content

Commit 37ef84a

Browse files
alexr00Copilot
andauthored
Add theme color badges to the Copilot icons (#7129)
* Use local svgs * Initial plan * Convert Copilot SVGs to data URIs with resolved colors Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Get things working * Handle defaults and respond to theme changes * Fix tests * Remove unchanged files --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 91394f7 commit 37ef84a

15 files changed

Lines changed: 254 additions & 76 deletions

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4016,10 +4016,11 @@
40164016
"debounce": "^1.2.1",
40174017
"events": "3.2.0",
40184018
"fast-deep-equal": "^3.1.3",
4019+
"jsonc-parser": "^3.3.1",
40194020
"jszip": "^3.10.1",
40204021
"lru-cache": "6.0.0",
4021-
"marked": "^4.0.10",
40224022
"markdown-it": "^14.1.0",
4023+
"marked": "^4.0.10",
40234024
"monaco-editor": "^0.52.2",
40244025
"react": "^16.12.0",
40254026
"react-dom": "^16.12.0",
@@ -4034,4 +4035,4 @@
40344035
"vsls": "^0.3.967"
40354036
},
40364037
"license": "MIT"
4037-
}
4038+
}

src/common/settingKeys.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ export const OPEN_VIEW = 'openView';
8181
export const EXPLORER = 'explorer';
8282
export const AUTO_REVEAL = 'autoReveal';
8383

84+
// Workbench
85+
export const WORKBENCH = 'workbench';
86+
export const COLOR_THEME = 'colorTheme';
87+
8488
// Coding Agent
8589

8690
export const CODING_AGENT = `${PR_SETTINGS_NAMESPACE}.codingAgent`;

src/common/uri.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,33 @@ export namespace DataUri {
218218
);
219219
}
220220

221+
export function copilotErrorAsImageDataURI(foreground: string, color: string): vscode.Uri {
222+
const svgContent = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
223+
<path d="M13.807 2.265C13.228 1.532 12.313 1.141 11.083 1.004C9.877 0.870002 8.821 1.038 8.139 1.769C8.09 1.822 8.043 1.877 8 1.933C7.957 1.877 7.91 1.822 7.861 1.769C7.179 1.038 6.123 0.870002 4.917 1.004C3.687 1.141 2.772 1.532 2.193 2.265C1.628 2.981 1.5 3.879 1.5 4.75C1.5 5.322 1.553 5.897 1.754 6.405L1.586 7.243L1.52 7.276C0.588 7.742 0 8.694 0 9.736V11C0 11.24 0.086 11.438 0.156 11.567C0.231 11.704 0.325 11.828 0.415 11.933C0.595 12.143 0.819 12.346 1.02 12.513C1.225 12.684 1.427 12.836 1.577 12.943C1.816 13.116 2.062 13.275 2.318 13.423C2.625 13.6 3.066 13.832 3.614 14.065C4.391 14.395 5.404 14.722 6.553 14.887C6.203 14.377 5.931 13.809 5.751 13.202C5.173 13.055 4.645 12.873 4.201 12.684C3.717 12.479 3.331 12.274 3.067 12.123L3.002 12.085V7.824L3.025 7.709C3.515 7.919 4.1 8 4.752 8C5.898 8 6.812 7.672 7.462 7.009C7.681 6.785 7.859 6.535 8.002 6.266C8.049 6.354 8.106 6.436 8.16 6.52C8.579 6.238 9.038 6.013 9.522 5.843C9.26 5.52 9.077 5.057 8.996 4.407C8.879 3.471 9.034 3.011 9.238 2.793C9.431 2.586 9.875 2.379 10.919 2.495C11.939 2.608 12.398 2.899 12.632 3.195C12.879 3.508 13.002 3.984 13.002 4.75C13.002 5.158 12.967 5.453 12.909 5.674C13.398 5.792 13.865 5.967 14.3 6.197C14.443 5.741 14.502 5.248 14.502 4.75C14.502 3.879 14.374 2.981 13.809 2.265H13.807ZM7.006 4.407C6.915 5.133 6.704 5.637 6.388 5.959C6.089 6.264 5.604 6.5 4.75 6.5C3.828 6.5 3.47 6.301 3.308 6.12C3.129 5.92 3 5.542 3 4.75C3 3.984 3.123 3.508 3.37 3.195C3.604 2.899 4.063 2.609 5.083 2.495C6.127 2.379 6.571 2.586 6.764 2.793C6.968 3.011 7.123 3.471 7.006 4.407Z" fill="${foreground}" />
224+
<path d="M11.5 7C9.015 7 7 9.015 7 11.5C7 13.985 9.015 16 11.5 16C13.985 16 16 13.985 16 11.5C16 9.015 13.985 7 11.5 7ZM13.854 13.146L13.147 13.853L11.501 12.207L9.855 13.853L9.148 13.146L10.794 11.5L9.148 9.854L9.855 9.147L11.501 10.793L13.147 9.147L13.854 9.854L12.208 11.5L13.854 13.146Z" fill="${color}" />
225+
</svg>`;
226+
const contents = Buffer.from(svgContent);
227+
return asImageDataURI(contents);
228+
}
229+
230+
export function copilotInProgressAsImageDataURI(foreground: string, color: string): vscode.Uri {
231+
const svgContent = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
232+
<path d="M13.807 2.265C13.228 1.532 12.313 1.141 11.083 1.004C9.877 0.870002 8.821 1.038 8.139 1.769C8.09 1.822 8.043 1.877 8 1.933C7.957 1.877 7.91 1.822 7.861 1.769C7.179 1.038 6.123 0.870002 4.917 1.004C3.687 1.141 2.772 1.532 2.193 2.265C1.628 2.981 1.5 3.879 1.5 4.75C1.5 5.322 1.553 5.897 1.754 6.405L1.586 7.243L1.52 7.276C0.588 7.742 0 8.694 0 9.736V11C0 11.24 0.086 11.438 0.156 11.567C0.231 11.704 0.325 11.828 0.415 11.933C0.595 12.143 0.819 12.346 1.02 12.513C1.225 12.684 1.427 12.836 1.577 12.943C1.816 13.116 2.062 13.275 2.318 13.423C2.625 13.6 3.066 13.832 3.614 14.065C4.391 14.395 5.404 14.722 6.553 14.887C6.203 14.377 5.931 13.809 5.751 13.202C5.173 13.055 4.645 12.873 4.201 12.684C3.717 12.479 3.331 12.274 3.067 12.123L3.002 12.085V7.824L3.025 7.709C3.515 7.919 4.1 8 4.752 8C5.898 8 6.812 7.672 7.462 7.009C7.681 6.785 7.859 6.535 8.002 6.266C8.049 6.354 8.106 6.436 8.16 6.52C8.579 6.238 9.038 6.013 9.522 5.843C9.26 5.52 9.077 5.057 8.996 4.407C8.879 3.471 9.034 3.011 9.238 2.793C9.431 2.586 9.875 2.379 10.919 2.495C11.939 2.608 12.398 2.899 12.632 3.195C12.879 3.508 13.002 3.984 13.002 4.75C13.002 5.158 12.967 5.453 12.909 5.674C13.398 5.792 13.865 5.967 14.3 6.197C14.443 5.741 14.502 5.248 14.502 4.75C14.502 3.879 14.374 2.981 13.809 2.265H13.807ZM7.006 4.407C6.915 5.133 6.704 5.637 6.388 5.959C6.089 6.264 5.604 6.5 4.75 6.5C3.828 6.5 3.47 6.301 3.308 6.12C3.129 5.92 3 5.542 3 4.75C3 3.984 3.123 3.508 3.37 3.195C3.604 2.899 4.063 2.609 5.083 2.495C6.127 2.379 6.571 2.586 6.764 2.793C6.968 3.011 7.123 3.471 7.006 4.407Z" fill="${foreground}" />
233+
<path d="M11.5 7C9.015 7 7 9.015 7 11.5C7 13.985 9.015 16 11.5 16C13.985 16 16 13.985 16 11.5C16 9.015 13.985 7 11.5 7ZM11.5 14.25C10.963 14.25 10.445 14.105 10 13.844V14.5H9V12.5L9.5 12H11.5V13H10.536C10.823 13.16 11.155 13.25 11.5 13.25C12.177 13.25 12.805 12.907 13.137 12.354L13.994 12.87C13.481 13.722 12.525 14.25 11.5 14.25ZM14 10.5L13.5 11H11.5V10H12.464C12.177 9.84 11.845 9.75 11.5 9.75C10.823 9.75 10.195 10.093 9.863 10.646L9.006 10.13C9.519 9.278 10.475 8.75 11.5 8.75C12.037 8.75 12.555 8.895 13 9.156V8.5H14V10.5Z" fill="${color}" />
234+
</svg>`;
235+
const contents = Buffer.from(svgContent);
236+
return asImageDataURI(contents);
237+
}
238+
239+
export function copilotSuccessAsImageDataURI(foreground: string, color: string): vscode.Uri {
240+
const svgContent = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
241+
<path d="M13.807 2.265C13.228 1.532 12.313 1.141 11.083 1.004C9.877 0.870002 8.821 1.038 8.139 1.769C8.09 1.822 8.043 1.877 8 1.933C7.957 1.877 7.91 1.822 7.861 1.769C7.179 1.038 6.123 0.870002 4.917 1.004C3.687 1.141 2.772 1.532 2.193 2.265C1.628 2.981 1.5 3.879 1.5 4.75C1.5 5.322 1.553 5.897 1.754 6.405L1.586 7.243L1.52 7.276C0.588 7.742 0 8.694 0 9.736V11C0 11.24 0.086 11.438 0.156 11.567C0.231 11.704 0.325 11.828 0.415 11.933C0.595 12.143 0.819 12.346 1.02 12.513C1.225 12.684 1.427 12.836 1.577 12.943C1.816 13.116 2.062 13.275 2.318 13.423C2.625 13.6 3.066 13.832 3.614 14.065C4.391 14.395 5.404 14.722 6.553 14.887C6.203 14.377 5.931 13.809 5.751 13.202C5.173 13.055 4.645 12.873 4.201 12.684C3.717 12.479 3.331 12.274 3.067 12.123L3.002 12.085V7.824L3.025 7.709C3.515 7.919 4.1 8 4.752 8C5.898 8 6.812 7.672 7.462 7.009C7.681 6.785 7.859 6.535 8.002 6.266C8.049 6.354 8.106 6.436 8.16 6.52C8.579 6.238 9.038 6.013 9.522 5.843C9.26 5.52 9.077 5.057 8.996 4.407C8.879 3.471 9.034 3.011 9.238 2.793C9.431 2.586 9.875 2.379 10.919 2.495C11.939 2.608 12.398 2.899 12.632 3.195C12.879 3.508 13.002 3.984 13.002 4.75C13.002 5.158 12.967 5.453 12.909 5.674C13.398 5.792 13.865 5.967 14.3 6.197C14.443 5.741 14.502 5.248 14.502 4.75C14.502 3.879 14.374 2.981 13.809 2.265H13.807ZM7.006 4.407C6.915 5.133 6.704 5.637 6.388 5.959C6.089 6.264 5.604 6.5 4.75 6.5C3.828 6.5 3.47 6.301 3.308 6.12C3.129 5.92 3 5.542 3 4.75C3 3.984 3.123 3.508 3.37 3.195C3.604 2.899 4.063 2.609 5.083 2.495C6.127 2.379 6.571 2.586 6.764 2.793C6.968 3.011 7.123 3.471 7.006 4.407Z" fill="${foreground}" />
242+
<path d="M11.5 7C9.015 7 7 9.015 7 11.5C7 13.985 9.015 16 11.5 16C13.985 16 16 13.985 16 11.5C16 9.015 13.985 7 11.5 7ZM11.393 13.309L10.7 13.401L8.7 11.901L9.3 11.1L10.909 12.307L13.357 9.192L14.143 9.809L11.393 13.309Z" fill="${color}" />
243+
</svg>`;
244+
const contents = Buffer.from(svgContent);
245+
return asImageDataURI(contents);
246+
}
247+
221248
export async function avatarCirclesAsImageDataUris(context: vscode.ExtensionContext, users: (IAccount | ITeam)[], height: number, width: number, localOnly?: boolean): Promise<(vscode.Uri | undefined)[]> {
222249
let cacheLogOrder: string[];
223250
const cacheLog = cacheLogUri(context);

src/extension.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ChatParticipant, ChatParticipantState } from './lm/participants';
3333
import { registerTools } from './lm/tools/tools';
3434
import { migrate } from './migrations';
3535
import { NotificationsFeatureRegister } from './notifications/notificationsFeatureRegistar';
36+
import { ThemeWatcher } from './themeWatcher';
3637
import { UriHandler } from './uriHandler';
3738
import { CommentDecorationProvider } from './view/commentDecorationProvider';
3839
import { CompareChanges } from './view/compareChangesTreeDataProvider';
@@ -65,6 +66,7 @@ async function init(
6566
reposManager: RepositoriesManager,
6667
createPrHelper: CreatePullRequestHelper,
6768
copilotRemoteAgentManager: CopilotRemoteAgentManager,
69+
themeWatcher: ThemeWatcher
6870
): Promise<void> {
6971
context.subscriptions.push(Logger);
7072
Logger.appendLine('Git repository found, initializing review manager and pr tree view.', ACTIVATION);
@@ -180,7 +182,7 @@ async function init(
180182
Logger.appendLine(`Repo ${repo.rootUri} has already been setup.`, ACTIVATION);
181183
return;
182184
}
183-
const newFolderManager = new FolderRepositoryManager(reposManager.folderManagers.length, context, repo, telemetry, git, credentialStore, createPrHelper);
185+
const newFolderManager = new FolderRepositoryManager(reposManager.folderManagers.length, context, repo, telemetry, git, credentialStore, createPrHelper, themeWatcher);
184186
reposManager.insertFolderManager(newFolderManager);
185187
const newReviewManager = new ReviewManager(
186188
reviewManagerIndex++,
@@ -418,9 +420,12 @@ async function deferredActivate(context: vscode.ExtensionContext, showPRControll
418420
const createPrHelper = new CreatePullRequestHelper();
419421
context.subscriptions.push(createPrHelper);
420422

423+
const themeWatcher = new ThemeWatcher();
424+
context.subscriptions.push(themeWatcher);
425+
421426
let folderManagerIndex = 0;
422427
const folderManagers = repositories.map(
423-
repository => new FolderRepositoryManager(folderManagerIndex++, context, repository, telemetry, apiImpl, credentialStore, createPrHelper),
428+
repository => new FolderRepositoryManager(folderManagerIndex++, context, repository, telemetry, apiImpl, credentialStore, createPrHelper, themeWatcher),
424429
);
425430
context.subscriptions.push(...folderManagers);
426431
for (const folderManager of folderManagers) {
@@ -432,7 +437,7 @@ async function deferredActivate(context: vscode.ExtensionContext, showPRControll
432437
readOnlyMessage.isTrusted = { enabledCommands: ['pr.checkoutFromReadonlyFile'] };
433438
context.subscriptions.push(vscode.workspace.registerFileSystemProvider(Schemes.Pr, inMemPRFileSystemProvider, { isReadonly: readOnlyMessage }));
434439

435-
await init(context, apiImpl, credentialStore, repositories, prTree, liveshareApiPromise, showPRController, reposManager, createPrHelper, copilotRemoteAgentManager);
440+
await init(context, apiImpl, credentialStore, repositories, prTree, liveshareApiPromise, showPRController, reposManager, createPrHelper, copilotRemoteAgentManager, themeWatcher);
436441
return apiImpl;
437442
}
438443

src/github/folderRepositoryManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { batchPromiseAll, compareIgnoreCase, formatError, Predicate } from '../c
3535
import { PULL_REQUEST_OVERVIEW_VIEW_TYPE } from '../common/webview';
3636
import { LAST_USED_EMAIL, NEVER_SHOW_PULL_NOTIFICATION, REPO_KEYS, ReposState } from '../extensionState';
3737
import { git } from '../gitProviders/gitCommands';
38+
import { IThemeWatcher } from '../themeWatcher';
3839
import { CreatePullRequestHelper } from '../view/createPullRequestHelper';
3940
import { OctokitCommon } from './common';
4041
import { ConflictModel } from './conflictGuide';
@@ -229,7 +230,8 @@ export class FolderRepositoryManager extends Disposable {
229230
public readonly telemetry: ITelemetry,
230231
private readonly _git: GitApiImpl,
231232
private readonly _credentialStore: CredentialStore,
232-
public readonly createPullRequestHelper: CreatePullRequestHelper
233+
public readonly createPullRequestHelper: CreatePullRequestHelper,
234+
public readonly themeWatcher: IThemeWatcher
233235
) {
234236
super();
235237
this._githubRepositories = [];

src/test/github/folderRepositoryManager.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ import { Uri } from 'vscode';
2323
import { GitHubServerType } from '../../common/authentication';
2424
import { CreatePullRequestHelper } from '../../view/createPullRequestHelper';
2525
import { RepositoriesManager } from '../../github/repositoriesManager';
26+
import { MockThemeWatcher } from '../mocks/mockThemeWatcher';
2627

2728
describe('PullRequestManager', function () {
2829
let sinon: SinonSandbox;
2930
let manager: FolderRepositoryManager;
3031
let telemetry: MockTelemetry;
32+
let mockThemeWatcher: MockThemeWatcher;
3133

3234
beforeEach(function () {
3335
sinon = createSandbox();
3436
MockCommandRegistry.install(sinon);
3537

3638
telemetry = new MockTelemetry();
39+
mockThemeWatcher = new MockThemeWatcher();
3740
const repository = new MockRepository();
3841
const context = new MockExtensionContext();
3942
const credentialStore = new CredentialStore(telemetry, context);
4043
const repositoriesManager = new RepositoriesManager(credentialStore, telemetry);
41-
manager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(repositoriesManager), credentialStore, new CreatePullRequestHelper());
44+
manager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(repositoriesManager), credentialStore, new CreatePullRequestHelper(), mockThemeWatcher);
4245
});
4346

4447
afterEach(function () {

src/test/github/pullRequestOverview.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { GitHubRemote } from '../../common/remote';
2525
import { CheckState } from '../../github/interface';
2626
import { CreatePullRequestHelper } from '../../view/createPullRequestHelper';
2727
import { RepositoriesManager } from '../../github/repositoriesManager';
28+
import { MockThemeWatcher } from '../mocks/mockThemeWatcher';
2829

2930
const EXTENSION_URI = vscode.Uri.joinPath(vscode.Uri.file(__dirname), '../../..');
3031

@@ -36,6 +37,7 @@ describe('PullRequestOverview', function () {
3637
let repo: MockGitHubRepository;
3738
let telemetry: MockTelemetry;
3839
let credentialStore: CredentialStore;
40+
let mockThemeWatcher: MockThemeWatcher;
3941

4042
beforeEach(async function () {
4143
sinon = createSandbox();
@@ -45,9 +47,10 @@ describe('PullRequestOverview', function () {
4547
const repository = new MockRepository();
4648
telemetry = new MockTelemetry();
4749
credentialStore = new CredentialStore(telemetry, context);
50+
mockThemeWatcher = new MockThemeWatcher();
4851
const createPrHelper = new CreatePullRequestHelper();
4952
const repositoriesManager = new RepositoriesManager(credentialStore, telemetry);
50-
pullRequestManager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(repositoriesManager), credentialStore, createPrHelper);
53+
pullRequestManager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(repositoriesManager), credentialStore, createPrHelper, mockThemeWatcher);
5154

5255
const url = 'https://github.com/aaa/bbb';
5356
remote = new GitHubRemote('origin', url, new Protocol(url), GitHubServerType.GitHubDotCom);

src/test/mocks/mockThemeWatcher.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as vscode from 'vscode';
7+
import { Disposable } from '../../common/lifecycle';
8+
import type { ThemeData } from '../../view/theme';
9+
import { IThemeWatcher } from '../../themeWatcher';
10+
11+
export class MockThemeWatcher extends Disposable implements IThemeWatcher {
12+
private _themeData: ThemeData | undefined;
13+
private _onDidChangeTheme = new vscode.EventEmitter<ThemeData | undefined>();
14+
readonly onDidChangeTheme = this._onDidChangeTheme.event;
15+
16+
constructor() {
17+
super();
18+
this._themeData = {
19+
colors: {},
20+
semanticTokenColors: [],
21+
tokenColors: [],
22+
type: 'dark'
23+
};
24+
}
25+
26+
async updateTheme(themeData?: ThemeData) {
27+
this._themeData = themeData ?? this._themeData;
28+
this._onDidChangeTheme.fire(this._themeData);
29+
}
30+
31+
get themeData() {
32+
return this._themeData;
33+
}
34+
}

src/test/view/prsTree.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { IAccount, ITeam } from '../../github/interface';
3232
import { asPromise } from '../../common/utils';
3333
import { CreatePullRequestHelper } from '../../view/createPullRequestHelper';
3434
import { CopilotRemoteAgentManager } from '../../github/copilotRemoteAgent';
35+
import { MockThemeWatcher } from '../mocks/mockThemeWatcher';
3536

3637
describe('GitHub Pull Requests view', function () {
3738
let sinon: SinonSandbox;
@@ -42,10 +43,12 @@ describe('GitHub Pull Requests view', function () {
4243
let reposManager: RepositoriesManager;
4344
let createPrHelper: CreatePullRequestHelper;
4445
let copilotManager: CopilotRemoteAgentManager;
46+
let mockThemeWatcher: MockThemeWatcher;
4547

4648
beforeEach(function () {
4749
sinon = createSandbox();
4850
MockCommandRegistry.install(sinon);
51+
mockThemeWatcher = new MockThemeWatcher();
4952

5053
context = new MockExtensionContext();
5154

@@ -103,7 +106,7 @@ describe('GitHub Pull Requests view', function () {
103106
it('has no children when repositories have not yet been initialized', async function () {
104107
const repository = new MockRepository();
105108
repository.addRemote('origin', 'git@github.com:aaa/bbb');
106-
reposManager.insertFolderManager(new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper));
109+
reposManager.insertFolderManager(new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper, mockThemeWatcher));
107110
provider.initialize([], credentialStore);
108111

109112
const rootNodes = await provider.getChildren();
@@ -113,7 +116,7 @@ describe('GitHub Pull Requests view', function () {
113116
it('opens the viewlet and displays the default categories', async function () {
114117
const repository = new MockRepository();
115118
repository.addRemote('origin', 'git@github.com:aaa/bbb');
116-
reposManager.insertFolderManager(new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper));
119+
reposManager.insertFolderManager(new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper, mockThemeWatcher));
117120
sinon.stub(credentialStore, 'isAuthenticated').returns(true);
118121
await reposManager.folderManagers[0].updateRepositories();
119122
provider.initialize([], credentialStore);
@@ -183,7 +186,7 @@ describe('GitHub Pull Requests view', function () {
183186

184187
await repository.createBranch('non-pr-branch', false);
185188

186-
const manager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper);
189+
const manager = new FolderRepositoryManager(0, context, repository, telemetry, new GitApiImpl(reposManager), credentialStore, createPrHelper, mockThemeWatcher);
187190
reposManager.insertFolderManager(manager);
188191
sinon.stub(manager, 'createGitHubRepository').callsFake((r, cs) => {
189192
assert.deepStrictEqual(r, remote);

0 commit comments

Comments
 (0)