Skip to content

Commit bd03440

Browse files
committed
Update
1 parent f13b82d commit bd03440

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

Tool/Sources/GitHubCopilotService/LanguageServer/CopilotLocalProcessServer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ final class ServerNotificationHandler {
360360
Logger.gitHubCopilot
361361
.info("\(anyNotification.method): \(debugDescription)")
362362
}
363+
case "didChangeStatus":
364+
Logger.gitHubCopilot.info("Did change status: \(debugDescription)")
363365
default:
364366
throw ServerError.handlerUnavailable(methodName)
365367
}

Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ public struct GitHubCopilotInstallationManager {
1111
return URL(string: link)!
1212
}
1313

14+
/// trying to update to a newer version but completions stop working for some reasons.
15+
/// As a reference, the changes starts since 1.45.0 and GitHub's extension updates the
16+
/// language server since this commit:
17+
/// https://github.com/github/CopilotForXcode/commit/b2189de633417a49d6d2022aad5ff0748ebed2ac#diff-678798cf677bcd1ce276809cfccd33da9ff594b1b0c557180210a4ed2bd27ffa
18+
/// It jumps directly to 1.48.0 from a much lower version.
1419
static let latestSupportedVersion = "1.44.0"
1520
static let minimumSupportedVersion = "1.32.0"
1621

Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class GitHubCopilotBaseService {
152152
}() else {
153153
throw GitHubCopilotError.languageServerNotInstalled
154154
}
155-
155+
156156
let indexJSURL: URL = try {
157157
if UserDefaults.shared.value(for: \.gitHubCopilotLoadKeyChainCertificates) {
158158
let url = urls.executableURL
@@ -241,7 +241,17 @@ public class GitHubCopilotBaseService {
241241

242242
server.initializeParamsProvider = {
243243
let capabilities = ClientCapabilities(
244-
workspace: nil,
244+
workspace: .init(
245+
applyEdit: false,
246+
workspaceEdit: nil,
247+
didChangeConfiguration: nil,
248+
didChangeWatchedFiles: nil,
249+
symbol: nil,
250+
executeCommand: nil,
251+
workspaceFolders: true,
252+
configuration: nil,
253+
semanticTokens: nil
254+
),
245255
textDocument: nil,
246256
window: nil,
247257
general: nil,
@@ -276,7 +286,7 @@ public class GitHubCopilotBaseService {
276286
"copilotCapabilities": [
277287
/// The editor has support for watching files over LSP
278288
"watchedFiles": watchedFiles,
279-
]
289+
],
280290
],
281291
capabilities: capabilities,
282292
trace: .off,

0 commit comments

Comments
 (0)