Skip to content

Commit 6704a46

Browse files
committed
update
1 parent 836ac80 commit 6704a46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/codewhisperer/util/editorContext.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { checkLeftContextKeywordsForJson } from './commonUtil'
1818
import { CodeWhispererSupplementalContext } from '../models/model'
1919
import { getOptOutPreference } from '../../shared/telemetry/util'
2020
import { indent } from '../../shared/utilities/textUtilities'
21+
import { isInDirectory } from '../../shared'
2122

2223
let tabSize: number = getTabSizeSetting()
2324

@@ -88,7 +89,7 @@ async function getWorkspaceId(editor: vscode.TextEditor): Promise<string | undef
8889
await vscode.commands.executeCommand('aws.amazonq.getWorkspaceId')
8990
for (const item of workspaceIds.workspaces) {
9091
const path = vscode.Uri.parse(item.workspaceRoot).fsPath
91-
if (editor.document.uri.fsPath.startsWith(path)) {
92+
if (isInDirectory(path, editor.document.uri.fsPath)) {
9293
return item.workspaceId
9394
}
9495
}

0 commit comments

Comments
 (0)