Skip to content

Commit 7c3e584

Browse files
committed
Bump GitHub Copilot to 1.9.1
1 parent d4dca03 commit 7c3e584

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Core/Sources/GitHubCopilotService/GitHubCopilotInstallationManager.swift

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ public struct GitHubCopilotInstallationManager {
55
private static var isInstalling = false
66

77
static var downloadURL: URL {
8-
let commitHash = "1358e8e45ecedc53daf971924a0541ddf6224faf"
8+
let commitHash = "a4a6d6b3f9e284e7f5c849619e06cd228cad8abd"
99
let link = "https://github.com/github/copilot.vim/archive/\(commitHash).zip"
1010
return URL(string: link)!
1111
}
1212

13-
static let latestSupportedVersion = "1.8.4"
13+
static let latestSupportedVersion = "1.9.1"
1414

1515
public init() {}
1616

@@ -113,7 +113,7 @@ public struct GitHubCopilotInstallationManager {
113113
includingPropertiesForKeys: nil,
114114
options: []
115115
)
116-
116+
117117
defer {
118118
for url in contentURLs {
119119
try? FileManager.default.removeItem(at: url)
@@ -127,8 +127,18 @@ public struct GitHubCopilotInstallationManager {
127127
return
128128
}
129129

130-
let lspURL = gitFolderURL.appendingPathComponent("copilot")
131-
let installationURL = urls.executableURL.appendingPathComponent("copilot")
130+
let lspURL = gitFolderURL.appendingPathComponent("dist")
131+
let copilotURL = urls.executableURL.appendingPathComponent("copilot")
132+
133+
if !FileManager.default.fileExists(atPath: copilotURL.path) {
134+
try FileManager.default.createDirectory(
135+
at: copilotURL,
136+
withIntermediateDirectories: true,
137+
attributes: nil
138+
)
139+
}
140+
141+
let installationURL = copilotURL.appendingPathComponent("dist")
132142
try FileManager.default.copyItem(at: lspURL, to: installationURL)
133143

134144
// update permission 755

Core/Sources/GitHubCopilotService/GitHubCopilotService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ public class GitHubCopilotBaseService {
170170
try await server.sendRequest(GitHubCopilotRequest.SetEditorInfo())
171171
}
172172
}
173-
174-
175173

176174
public static func createFoldersIfNeeded() throws -> (
177175
applicationSupportURL: URL,

0 commit comments

Comments
 (0)