Skip to content

Commit 87e8f17

Browse files
committed
CW: Resolved Conflicts
1 parent 3cbefec commit 87e8f17

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/codewhisperer/models/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const platformLanguageIds = [
9898
'terragrunt',
9999
'packer',
100100
'plaintext',
101+
'jsonc',
101102
] as const
102103

103104
export type PlatformLanguageId = (typeof platformLanguageIds)[number]

src/codewhisperer/service/classifierTrigger.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export class ClassifierTrigger {
6161
go: -0.3504,
6262
scala: -0.534,
6363
cpp: -0.1734,
64+
json: 0,
65+
yaml: -0.3,
66+
tf: -0.55,
6467
}
6568

6669
// other metadata coefficient

src/codewhisperer/util/dependencyGraph/dependencyGraphFactory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export class DependencyGraphFactory {
3434
static getDependencyGraphFromFileExtensions<K extends Keys>(fileName: string): ClassType<K> {
3535
if (fileName.endsWith(DependencyGraphConstants.tfExt) || fileName.endsWith(DependencyGraphConstants.hclExt)) {
3636
return new languageMap['terraform']('tf' satisfies CodeWhispererConstants.PlatformLanguageId)
37+
} else if (fileName.endsWith(DependencyGraphConstants.jsonExt)) {
38+
return new languageMap['cloudformation']('json' satisfies CodeWhispererConstants.PlatformLanguageId)
3739
} else {
3840
return undefined
3941
}
@@ -53,8 +55,6 @@ export class DependencyGraphFactory {
5355
return new languageMap['csharp']('csharp' satisfies CodeWhispererConstants.PlatformLanguageId)
5456
case 'yaml' satisfies CodeWhispererConstants.PlatformLanguageId:
5557
return new languageMap['cloudformation']('yaml' satisfies CodeWhispererConstants.PlatformLanguageId)
56-
case 'json' satisfies CodeWhispererConstants.PlatformLanguageId:
57-
return new languageMap['cloudformation']('json' satisfies CodeWhispererConstants.PlatformLanguageId)
5858
case 'ruby' satisfies CodeWhispererConstants.PlatformLanguageId:
5959
return new languageMap['ruby']('ruby' satisfies CodeWhispererConstants.PlatformLanguageId)
6060
default:

src/codewhisperer/util/runtimeLanguageContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class RuntimeLanguageContext {
6565
javascript: 'javascript',
6666
javascriptreact: 'jsx',
6767
json: 'json',
68-
jsonc: 'jsonc',
68+
jsonc: 'json',
6969
jsx: 'jsx',
7070
kotlin: 'kotlin',
7171
packer: 'tf',
@@ -97,7 +97,7 @@ export class RuntimeLanguageContext {
9797
java: 'java',
9898
javascript: 'js',
9999
json: 'json',
100-
jsonc: 'jsonc',
100+
jsonc: 'json',
101101
jsx: 'jsx',
102102
kotlin: 'kt',
103103
plaintext: 'txt',

0 commit comments

Comments
 (0)