forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKeyBindingManager.swift
More file actions
29 lines (27 loc) · 854 Bytes
/
KeyBindingManager.swift
File metadata and controls
29 lines (27 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import Foundation
import Workspace
public final class KeyBindingManager {
let tabToAcceptSuggestion: TabToAcceptSuggestion
public init(
workspacePool: WorkspacePool,
acceptSuggestion: @escaping () -> Void,
expandSuggestion: @escaping () -> Void,
collapseSuggestion: @escaping () -> Void,
dismissSuggestion: @escaping () -> Void
) {
tabToAcceptSuggestion = .init(
workspacePool: workspacePool,
acceptSuggestion: acceptSuggestion,
dismissSuggestion: dismissSuggestion,
expandSuggestion: expandSuggestion,
collapseSuggestion: collapseSuggestion
)
}
public func start() {
tabToAcceptSuggestion.start()
}
@MainActor
public func stopForExit() {
tabToAcceptSuggestion.stopForExit()
}
}