Skip to content

Conversation

@Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Oct 24, 2024

Problem

patch #5663

Due to this line of code https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/codewhisperer/util/runtimeLanguageContext.ts#L156-L173

when users make inline completion call with new languages, logs will show
2024-10-24 08:52:55.501 [error] codewhisperer: unknown runtime language dart, however it doesn't have functional impact because it will fallback to original language string (which is the reason why it doesn't fail test cases) and it's only affecting logs.

test has been added https://github.com/aws/aws-toolkit-vscode/blob/master/packages/amazonq/test/unit/codewhisperer/util/runtimeLanguageContext.test.ts#L184-L222

Solution


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Will-ShaoHua Will-ShaoHua requested a review from a team as a code owner October 24, 2024 16:43
@github-actions
Copy link

This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@Will-ShaoHua
Copy link
Contributor Author

will figure out a better to deal with all the language stuff happening in codewhisperer codebase. It's tech debt and error prone

@leigaol
Copy link
Contributor

leigaol commented Oct 24, 2024

Typo in description

@Will-ShaoHua Will-ShaoHua changed the title config(amazonq): patch language configiration not added correctly #5663 config(amazonq): patch language configuration not added correctly #5663 Oct 24, 2024
'kotlin',
'php',
'python',
'powershell',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified, equal to jb
const val ID = "powershell"

'php',
'python',
'powershell',
'r',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified, equal to jb
const val ID = "r"

'python',
'powershell',
'r',
'dart',
Copy link
Contributor Author

@Will-ShaoHua Will-ShaoHua Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified, equal to jb
const val ID = "dart"

'scala',
'shell',
'sql',
'swift',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const val ID = "swift"

'shell',
'sql',
'swift',
'lua',
Copy link
Contributor Author

@Will-ShaoHua Will-ShaoHua Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified, equal to jb
const val ID = "lua"

'sql',
'swift',
'lua',
'vue',
Copy link
Contributor Author

@Will-ShaoHua Will-ShaoHua Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified, equal to jb
const val ID = "vue"

@Will-ShaoHua Will-ShaoHua requested a review from a team as a code owner October 24, 2024 17:21
Comment on lines -214 to -216
if (inputCwsprLanguageId === 'systemVerilog') {
console.log()
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it's dev purpose added in #5663

@jpinkney-aws jpinkney-aws merged commit e8d62f1 into aws:master Oct 25, 2024
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants