Skip to content

Commit e42a7a9

Browse files
committed
Fix lazy
1 parent 92b2e43 commit e42a7a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/extension/tools/node/githubRepoTool.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { TelemetryCorrelationId } from '../../../util/common/telemetryCorrelatio
1818
import { isLocation, isUri } from '../../../util/common/types';
1919
import { raceCancellationError, timeout } from '../../../util/vs/base/common/async';
2020
import { CancellationToken } from '../../../util/vs/base/common/cancellation';
21-
import { Lazy } from '../../../util/vs/base/common/lazy';
2221
import { URI } from '../../../util/vs/base/common/uri';
2322
import { IInstantiationService } from '../../../util/vs/platform/instantiation/common/instantiation';
2423
import { ExtendedLanguageModelToolResult, LanguageModelPromptTsxPart, MarkdownString } from '../../../vscodeTypes';
@@ -47,7 +46,7 @@ export class GithubRepoTool implements ICopilotTool<GithubRepoToolParams> {
4746
@IRunCommandExecutionService _commandService: IRunCommandExecutionService,
4847
@IInstantiationService private readonly _instantiationService: IInstantiationService,
4948
@IGithubCodeSearchService private readonly _githubCodeSearch: IGithubCodeSearchService,
50-
@IGithubAvailableEmbeddingTypesService private readonly _availableEmbeddingTypesManager: Lazy<GithubAvailableEmbeddingTypesService>,
49+
@IGithubAvailableEmbeddingTypesService private readonly _availableEmbeddingTypesManager: GithubAvailableEmbeddingTypesService,
5150
@ITelemetryService private readonly _telemetryService: ITelemetryService,
5251
) { }
5352

@@ -57,7 +56,7 @@ export class GithubRepoTool implements ICopilotTool<GithubRepoToolParams> {
5756
throw new Error('Invalid input. Could not parse repo');
5857
}
5958

60-
const embeddingType = await this._availableEmbeddingTypesManager.value.getPreferredType(false);
59+
const embeddingType = await this._availableEmbeddingTypesManager.getPreferredType(false);
6160
if (!embeddingType) {
6261
throw new Error('No embedding models available');
6362
}

0 commit comments

Comments
 (0)