Skip to content

Commit 1015b86

Browse files
feat: update to latest Copilot LSP
1 parent 3b6ec7d commit 1015b86

File tree

13 files changed

+1002
-565
lines changed

13 files changed

+1002
-565
lines changed

copilot/js/api/types.d.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,24 @@ export type ContextUsageStatistics = {
8686
usageDetails?: ContextItemUsageDetails[];
8787
};
8888

89+
export type ProposedTextEdit = TextEdit & {
90+
positionAfterEdit: Position;
91+
// Indicates whether the edit is suggested by the IDE. Otherwise it's assumed to be speculative
92+
source?: 'selectedCompletionInfo';
93+
};
94+
8995
export interface DocumentContext {
9096
uri: DocumentUri;
9197
languageId: string;
9298
version: number;
99+
// Position and offset are relative to the provided version of the document.
100+
// The position after an edit is applied is found in ProposedTextEdit.positionAfterEdit.
93101
/**
94102
* @deprecated Use `position` instead.
95103
*/
96104
offset: number;
97105
position: Position;
98-
proposedEdits?: TextEdit[];
106+
proposedEdits?: ProposedTextEdit[];
99107
}
100108
export interface ResolveRequest {
101109
// A unique ID to correlate the request with the completion request.
@@ -109,9 +117,16 @@ export interface ResolveRequest {
109117
* After the time budget runs out, the request will be cancelled via the CancellationToken.
110118
* Providers can use this value as a hint when computing context. Providers should expect the
111119
* request to be cancelled once the time budget runs out.
120+
*
121+
* @deprecated Use `timeoutEnd` instead.
112122
*/
113123
timeBudget: number;
114124

125+
/**
126+
* Unix timestamp representing the exact time the request will be cancelled via the CancellationToken.
127+
*/
128+
timeoutEnd: number;
129+
115130
/**
116131
* Various statistics about the last completion request. This can be used by the context provider
117132
* to make decisions about what context to provide for the current call.

copilot/js/bin/darwin/arm64/rg

3.26 MB
Binary file not shown.

copilot/js/bin/darwin/x64/rg

3.99 MB
Binary file not shown.

copilot/js/bin/linux/arm64/rg

3.92 MB
Binary file not shown.

copilot/js/bin/linux/x64/rg

4.89 MB
Binary file not shown.

copilot/js/bin/win32/arm64/rg.exe

3.95 MB
Binary file not shown.

copilot/js/bin/win32/x64/rg.exe

4.47 MB
Binary file not shown.

copilot/js/main.js

Lines changed: 983 additions & 561 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

copilot/js/main.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-338 KB
Binary file not shown.

0 commit comments

Comments
 (0)