Skip to content

Commit

Permalink
Fix repo name resolver cache miss due to using separate RepoNameResol…
Browse files Browse the repository at this point in the history
…ver instance
  • Loading branch information
thenamankumar committed Jan 9, 2025
1 parent e4bb490 commit 179681a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vscode/src/editor/utils/editor-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
import { URI } from 'vscode-uri'
import { getOpenTabsUris } from '.'
import { toVSCodeRange } from '../../common/range'
import { RepoNameResolver } from '../../repository/repo-name-resolver'
import { repoNameResolver } from '../../repository/repo-name-resolver'
import { findWorkspaceFiles } from './findWorkspaceFiles'

// Some matches we don't want to ignore because they might be valid code (for example `bin/` in Dart)
Expand Down Expand Up @@ -319,7 +319,6 @@ async function createContextFileFromUri(
symbolName?: string
): Promise<ContextItem[]> {
const range = toRangeData(selectionRange)
const repoNameResolver = new RepoNameResolver()
const repoNames = await firstValueFrom(repoNameResolver.getRepoNamesContainingUri(uri))
const repoName: string = Array.isArray(repoNames) ? repoNames[0] : repoNames.toString()

Expand Down

0 comments on commit 179681a

Please sign in to comment.