Skip to content

Commit 4645163

Browse files
authored
ignore speculative-edit requests (#13593)
1 parent 7e013ab commit 4645163

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6625,7 +6625,7 @@
66256625
"xml2js": "^0.6.2"
66266626
},
66276627
"dependencies": {
6628-
"@github/copilot-language-server": "^1.266.0",
6628+
"@github/copilot-language-server": "^1.316.0",
66296629
"@vscode/extension-telemetry": "^0.9.6",
66306630
"chokidar": "^3.6.0",
66316631
"comment-json": "^4.2.3",

Extension/src/LanguageServer/copilotCompletionContextProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ response.uri:${copilotCompletionContext.sourceFileUri || "<not-set>"}:${copilotC
339339
}
340340

341341
public async resolve(context: ResolveRequest, copilotCancel: vscode.CancellationToken): Promise<SupportedContextItem[]> {
342+
const proposedEdits = context.documentContext.proposedEdits;
343+
if (proposedEdits) { return []; } // Ignore the request if there are proposed edits.
342344
const resolveStartTime = performance.now();
343345
let logMessage = `Copilot: resolve(${context.documentContext.uri}: ${context.documentContext.offset}):`;
344346
const cppTimeBudgetMs = await this.fetchTimeBudgetMs(context);

Extension/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2"
5656
integrity sha1-3mM9s+wu9qPIni8ZA4Bj6KEi4sI=
5757

58-
"@github/copilot-language-server@^1.266.0":
59-
version "1.273.0"
60-
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@github/copilot-language-server/-/copilot-language-server-1.273.0.tgz#561094fc0d832acae173c40549cd95d27a648fbc"
61-
integrity sha1-VhCU/A2DKsrhc8QFSc2V0npkj7w=
58+
"@github/copilot-language-server@^1.316.0":
59+
version "1.316.0"
60+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@github/copilot-language-server/-/copilot-language-server-1.316.0.tgz#7df2f3857f8e148de36b232ccf8b762dfbb2ec9b"
61+
integrity sha1-ffLzhX+OFI3jayMsz4t2Lfuy7Js=
6262
dependencies:
6363
vscode-languageserver-protocol "^3.17.5"
6464

0 commit comments

Comments
 (0)