Skip to content

Commit caba5dd

Browse files
authored
fix(amazonq): utg findSourceFileByContent passes wrong context #5873
## Problem Using extractClasses with path as file content incorrectly, so always returns empty list. ## Solution Fix the call. fix #5864
1 parent 42f49a8 commit caba5dd

File tree

1 file changed

+1
-1
lines changed
  • packages/core/src/codewhisperer/util/supplementalContext

1 file changed

+1
-1
lines changed

packages/core/src/codewhisperer/util/supplementalContext/utgUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async function findSourceFileByContent(
129129

130130
throwIfCancelled(cancellationToken)
131131

132-
testElementList.push(...extractClasses(editor.document.fileName, languageConfig.classExtractionPattern))
132+
testElementList.push(...extractClasses(testFileContent, languageConfig.classExtractionPattern))
133133

134134
throwIfCancelled(cancellationToken)
135135

0 commit comments

Comments
 (0)