diff --git a/Build/cg/cg.yml b/Build/cg/cg.yml
index 124c301f04..fae5d8d91f 100644
--- a/Build/cg/cg.yml
+++ b/Build/cg/cg.yml
@@ -102,6 +102,10 @@ extends:
filename: mkdir
arguments: $(Build.ArtifactStagingDirectory)\Extension
+ - script: yarn run vsix-prepublish
+ displayName: Build files
+ workingDirectory: $(Build.SourcesDirectory)\Extension
+
- task: CmdLine@1
name: ProcessRunner_12
displayName: Run VSCE to package vsix
diff --git a/Build/signing/SignFiles.proj b/Build/signing/SignFiles.proj
new file mode 100644
index 0000000000..b467041296
--- /dev/null
+++ b/Build/signing/SignFiles.proj
@@ -0,0 +1,21 @@
+
+
+
+
+
+ $(BUILD_STAGINGDIRECTORY)/Extension
+
+ $(BaseOutputDirectory)
+ $(BaseOutputDirectory)
+
+
+
+
+
+ Microsoft400
+
+
+
+
+
\ No newline at end of file
diff --git a/Build/signing/packages.config b/Build/signing/packages.config
new file mode 100644
index 0000000000..df03298c5e
--- /dev/null
+++ b/Build/signing/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md
index 306b7c5728..a2a5cc18de 100644
--- a/Extension/CHANGELOG.md
+++ b/Extension/CHANGELOG.md
@@ -1,5 +1,14 @@
# C/C++ for Visual Studio Code Changelog
+## Version 1.22.5: September 24, 2024
+### Enhancement
+* Add the database path to the `C/C++: Log Diagnostics` output.
+
+### Bug Fixes
+* Fix some synchronization and crash issues with `handle_edits`. [#12747](https://github.com/microsoft/vscode-cpptools/issues/12747)
+* Fix usage of `#cpp` with Copilot chat. [PR #12755](https://github.com/microsoft/vscode-cpptools/pull/12755)
+* Fix some document buffer issues.
+
## Version 1.22.4: September 19, 2024
### Enhancements
* Performance improvements related to how custom configurations are processed. [#12632](https://github.com/microsoft/vscode-cpptools/issues/12632)
diff --git a/Extension/package.json b/Extension/package.json
index 81633633e8..8d8395e3fb 100644
--- a/Extension/package.json
+++ b/Extension/package.json
@@ -2,7 +2,7 @@
"name": "cpptools",
"displayName": "C/C++",
"description": "C/C++ IntelliSense, debugging, and code browsing.",
- "version": "1.22.4-main",
+ "version": "1.22.5-main",
"publisher": "ms-vscode",
"icon": "LanguageCCPP_color_128x.png",
"readme": "README.md",
@@ -6452,7 +6452,10 @@
"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)",
"parametersSchema": {},
- "when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)"
+ "when": "(config.C_Cpp.experimentalFeatures =~ /^[eE]nabled$/)",
+ "supportedContentTypes": [
+ "text/plain"
+ ]
}
]
},
@@ -6468,7 +6471,7 @@
"compile": "yarn install && (yarn verify prep --quiet || yarn prep) && yarn build",
"watch": "yarn install && (yarn verify prep --quiet || yarn prep) && tsc --build tsconfig.json --watch",
"rebuild": "yarn install && yarn clean && yarn prep && yarn build",
- "vscode:prepublish": "yarn install && yarn clean && yarn webpack",
+ "vsix-prepublish": "yarn install && yarn clean && yarn webpack",
"webpack": "yarn install && (yarn verify prep --quiet || yarn prep) && tsc --build ui.tsconfig.json && webpack --mode production --env vscode_nls",
"generate-native-strings": "ts-node -T ./.scripts/generateNativeStrings.ts",
"generate-options-schema": "ts-node -T ./.scripts/generateOptionsSchema.ts",
diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts
index 67077b2ba0..bb30b4927a 100644
--- a/Extension/src/LanguageServer/extension.ts
+++ b/Extension/src/LanguageServer/extension.ts
@@ -375,7 +375,7 @@ function onInterval(): void {
/**
* registered commands
*/
-export function registerCommands(enabled: boolean, isRelatedFilesApiEnabled: boolean = false): void {
+export function registerCommands(enabled: boolean, isRelatedFilesApiEnabled: boolean): void {
commandDisposables.forEach(d => d.dispose());
commandDisposables.length = 0;
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.SwitchHeaderSource', enabled ? onSwitchHeaderSource : onDisabledCommand));
diff --git a/Extension/src/LanguageServer/lmTool.ts b/Extension/src/LanguageServer/lmTool.ts
index f643c63714..6b986463e1 100644
--- a/Extension/src/LanguageServer/lmTool.ts
+++ b/Extension/src/LanguageServer/lmTool.ts
@@ -44,14 +44,15 @@ const knownValues: { [Property in keyof ChatContextResult]?: { [id: string]: str
}
};
-class StringLanguageModelToolResult implements vscode.LanguageModelToolResult {
- public constructor(public readonly value: string) { }
- public toString(): string { return this.value; }
-}
+const plainTextContentType = 'text/plain';
export class CppConfigurationLanguageModelTool implements vscode.LanguageModelTool {
- public async invoke(_parameters: any, token: vscode.CancellationToken): Promise {
- return new StringLanguageModelToolResult(await this.getContext(token));
+ 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;
}
private async getContext(token: vscode.CancellationToken): Promise {
diff --git a/Extension/src/main.ts b/Extension/src/main.ts
index 7379235277..fd6bacb89e 100644
--- a/Extension/src/main.ts
+++ b/Extension/src/main.ts
@@ -146,7 +146,8 @@ export async function activate(context: vscode.ExtensionContext): Promise