Skip to content

Commit

Permalink
Merge pull request #12870 from microsoft/seanmcm/1_22_10_release
Browse files Browse the repository at this point in the history
Cherry-picks for 1.22.10
  • Loading branch information
sean-mcmanus authored Oct 21, 2024
2 parents db6e0cb + ce20613 commit dead10a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
5 changes: 5 additions & 0 deletions Extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 1 addition & 4 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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$/)"
}
]
},
Expand Down
9 changes: 2 additions & 7 deletions Extension/src/LanguageServer/lmTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,10 @@ const knownValues: { [Property in keyof ChatContextResult]?: { [id: string]: str
}
};

const plainTextContentType = 'text/plain';

export class CppConfigurationLanguageModelTool implements vscode.LanguageModelTool<void> {
public async invoke(options: vscode.LanguageModelToolInvocationOptions<void>, token: vscode.CancellationToken): Promise<vscode.LanguageModelToolResult> {
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<string> {
Expand Down

0 comments on commit dead10a

Please sign in to comment.