Skip to content

Commit bd4c34e

Browse files
committed
rename
1 parent f916464 commit bd4c34e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function getPrefixSuffixOverlap(firstString: string, secondString: string
6565
return secondString.slice(0, i)
6666
}
6767

68-
export function checkKeywordsForJson(fileName: string, leftFileContent: string, language: string): boolean {
68+
export function isSupportedJsonFormat(fileName: string, leftFileContent: string, language: string): boolean {
6969
if (
7070
language === 'json' &&
7171
!AWSTemplateKeyWords.some((substring) => leftFileContent.includes(substring)) &&

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { fetchSupplementalContext } from './supplementalContext/supplementalCont
1414
import { supplementalContextTimeoutInMs } from '../models/constants'
1515
import { getSelectedCustomization } from './customizationUtil'
1616
import { selectFrom } from '../../shared/utilities/tsUtils'
17-
import { checkKeywordsForJson } from './commonUtil'
17+
import { isSupportedJsonFormat } from './commonUtil'
1818
import { CodeWhispererSupplementalContext } from '../models/model'
1919
import { getOptOutPreference } from '../../shared/telemetry/util'
2020

@@ -39,7 +39,7 @@ export function extractContextForCodeWhisperer(editor: vscode.TextEditor): codew
3939
)
4040
)
4141
let languageName = 'plaintext'
42-
if (!checkKeywordsForJson(document.fileName, caretLeftFileContext, editor.document.languageId)) {
42+
if (!isSupportedJsonFormat(document.fileName, caretLeftFileContext, editor.document.languageId)) {
4343
languageName =
4444
runtimeLanguageContext.normalizeLanguage(editor.document.languageId) ?? editor.document.languageId
4545
}

0 commit comments

Comments
 (0)