Skip to content

Commit dead10a

Browse files
authored
Merge pull request #12870 from microsoft/seanmcm/1_22_10_release
Cherry-picks for 1.22.10
2 parents db6e0cb + ce20613 commit dead10a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

Extension/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# C/C++ for Visual Studio Code Changelog
22

3+
## Version 1.22.10: October 21, 2024
4+
### Bug Fixes
5+
* Fix the 'Extract to Function' feature not working.
6+
* Fix the 'Go to Next/Prev Preprocessor Conditional' feature not working.
7+
38
## Version 1.22.9: October 14, 2024
49
### Performance Improvements
510
* Initialization performance improvements. [#12030](https://github.com/microsoft/vscode-cpptools/issues/12030)

Extension/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -6451,10 +6451,7 @@
64516451
"userDescription": "%c_cpp.languageModelTools.configuration.userDescription%",
64526452
"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).",
64536453
"icon": "$(file-code)",
6454-
"when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)",
6455-
"supportedContentTypes": [
6456-
"text/plain"
6457-
]
6454+
"when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)"
64586455
}
64596456
]
64606457
},

Extension/src/LanguageServer/lmTool.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,10 @@ const knownValues: { [Property in keyof ChatContextResult]?: { [id: string]: str
4444
}
4545
};
4646

47-
const plainTextContentType = 'text/plain';
48-
4947
export class CppConfigurationLanguageModelTool implements vscode.LanguageModelTool<void> {
5048
public async invoke(options: vscode.LanguageModelToolInvocationOptions<void>, token: vscode.CancellationToken): Promise<vscode.LanguageModelToolResult> {
51-
const result: vscode.LanguageModelToolResult = {};
52-
if (options.requestedContentTypes.includes(plainTextContentType)) {
53-
result[plainTextContentType] = await this.getContext(token);
54-
}
55-
return result;
49+
return new vscode.LanguageModelToolResult([
50+
new vscode.LanguageModelTextPart(await this.getContext(token))]);
5651
}
5752

5853
private async getContext(token: vscode.CancellationToken): Promise<string> {

0 commit comments

Comments
 (0)