diff --git a/Extension/src/LanguageServer/lmTool.ts b/Extension/src/LanguageServer/lmTool.ts index 50240fdd7..be03ca46e 100644 --- a/Extension/src/LanguageServer/lmTool.ts +++ b/Extension/src/LanguageServer/lmTool.ts @@ -38,7 +38,7 @@ const knownValues: { [Property in keyof ChatContextResult]?: { [id: string]: str 'c++17': 'C++17', 'c++20': 'C++20', 'c++23': 'C++23', - 'c90': "C90", + 'c89': "C89", 'c99': "C99", 'c11': "C11", 'c17': "C17", @@ -140,6 +140,8 @@ export async function getProjectContext(uri: vscode.Uri, context: { flags: Recor return undefined; } + const originalStandardVersion = projectContext.result.standardVersion; + formatChatContext(projectContext.result); const result: ProjectContext = { @@ -160,6 +162,11 @@ export async function getProjectContext(uri: vscode.Uri, context: { flags: Recor if (projectContext.result.standardVersion) { telemetryProperties["standardVersion"] = projectContext.result.standardVersion; } + else { + if (originalStandardVersion) { + telemetryProperties["originalStandardVersion"] = originalStandardVersion; + } + } if (projectContext.result.targetPlatform) { telemetryProperties["targetPlatform"] = projectContext.result.targetPlatform; } diff --git a/Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts b/Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts index afcf90366..a5cc0825f 100644 --- a/Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts +++ b/Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts @@ -376,6 +376,7 @@ describe('CppConfigurationLanguageModelTool Tests', () => { property['language'] === undefined && property['compiler'] === undefined && property['standardVersion'] === undefined && + property['originalStandardVersion'] === 'gnu++17' && property['targetPlatform'] === undefined))); ok(result, 'result should not be undefined'); ok(result.language === '');