forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstructionView.swift
More file actions
54 lines (48 loc) · 1.47 KB
/
InstructionView.swift
File metadata and controls
54 lines (48 loc) · 1.47 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import SwiftUI
struct InstructionView: View {
var body: some View {
Section {
HStack {
VStack(alignment: .leading, spacing: 8) {
// swiftformat: disable indent
Text("Instruction")
.font(.title)
.padding(.bottom, 12)
Text("Enable Extension")
.font(.title3)
Text("""
1. Install Node.
2. Click `Set Up Launch Agent` to set up an XPC service to run in the background.
3. Refresh Copilot status or restart the app.
4. Click `Sign In` to sign into your GitHub Account.
5. After submitting your user code to the verification website, click `Confirm Sign-in` to finish the sign-in.
6. Go to `Settings.app > Privacy & Security > Extension > Xcode Source Editor Extension` to turn **Copilot for Xcode** on.
7. Restart Xcode, the Copilot commands should be available in the menu bar.
""")
Text("Permissions Requirement")
.font(.title3)
Text("""
- The extension will ask for Accessibility API permission the first time it runs.
- The extension may ask for folder access permission when it runs.
""")
Text("Disable Extension")
.font(.title3)
Text("""
1. Optionally sign out of GitHub Copilot.
2. Click `Remove Launch Agent`.
""")
// swiftformat: enable indent
Spacer()
}
Spacer()
}
}
}
}
struct InstructionView_Preview: PreviewProvider {
static var previews: some View {
InstructionView()
.background(.black)
.frame(height: 600)
}
}