diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 3e83e1a790..d8a2f36bba 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,10 @@ # C/C++ for Visual Studio Code Changelog +## Version 1.22.10: October 21, 2024 +### Bug Fixes +* Fix the 'Extract to Function' feature not working. +* Fix the 'Go to Next/Prev Preprocessor Conditional' feature not working. + ## Version 1.22.9: October 14, 2024 ### Performance Improvements * Initialization performance improvements. [#12030](https://github.com/microsoft/vscode-cpptools/issues/12030) diff --git a/Extension/package.json b/Extension/package.json index 9b238c6676..8674cf9db1 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -6451,10 +6451,7 @@ "userDescription": "%c_cpp.languageModelTools.configuration.userDescription%", "modelDescription": "For the active C or C++ file, this tool provides: the language (C, C++, or CUDA), the language standard version (such as C++11, C++14, C++17, or C++20), the compiler (such as GCC, Clang, or MSVC), the target platform (such as x86, x64, or ARM), and the target architecture (such as 32-bit or 64-bit).", "icon": "$(file-code)", - "when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)", - "supportedContentTypes": [ - "text/plain" - ] + "when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)" } ] }, diff --git a/Extension/src/LanguageServer/lmTool.ts b/Extension/src/LanguageServer/lmTool.ts index 5951377b4e..ed5be61a00 100644 --- a/Extension/src/LanguageServer/lmTool.ts +++ b/Extension/src/LanguageServer/lmTool.ts @@ -44,15 +44,10 @@ const knownValues: { [Property in keyof ChatContextResult]?: { [id: string]: str } }; -const plainTextContentType = 'text/plain'; - export class CppConfigurationLanguageModelTool implements vscode.LanguageModelTool { public async invoke(options: vscode.LanguageModelToolInvocationOptions, token: vscode.CancellationToken): Promise { - const result: vscode.LanguageModelToolResult = {}; - if (options.requestedContentTypes.includes(plainTextContentType)) { - result[plainTextContentType] = await this.getContext(token); - } - return result; + return new vscode.LanguageModelToolResult([ + new vscode.LanguageModelTextPart(await this.getContext(token))]); } private async getContext(token: vscode.CancellationToken): Promise {