-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathInstructionView.swift
More file actions
64 lines (55 loc) · 2.81 KB
/
InstructionView.swift
File metadata and controls
64 lines (55 loc) · 2.81 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
55
56
57
58
59
60
61
62
63
import ComposableArchitecture
import SwiftUI
public struct Instruction: View {
@Binding var isAgentMode: Bool
public init(isAgentMode: Binding<Bool>) {
self._isAgentMode = isAgentMode
}
public var body: some View {
WithPerceptionTracking {
VStack {
VStack(spacing: 24) {
VStack(spacing: 16) {
Image("CopilotLogo")
.resizable()
.renderingMode(.template)
.scaledToFill()
.frame(width: 60.0, height: 60.0)
.foregroundColor(.secondary)
if isAgentMode {
Text("Copilot Agent Mode")
.font(.title)
.foregroundColor(.primary)
Text("Ask Copilot to edit your files in agent mode.\nIt will automatically use multiple requests to \nedit files, run terminal commands, and fix errors.")
.font(.system(size: 14, weight: .light))
.multilineTextAlignment(.center)
.lineSpacing(4)
}
Text("Copilot is powered by AI, so mistakes are possible. Review output carefully before use.")
.font(.system(size: 14, weight: .light))
.multilineTextAlignment(.center)
.lineSpacing(4)
}
VStack(alignment: .leading, spacing: 8) {
if isAgentMode {
Label("to configure MCP server", systemImage: "wrench.and.screwdriver")
.foregroundColor(Color("DescriptionForegroundColor"))
.font(.system(size: 14))
}
Label("to reference context", systemImage: "paperclip")
.foregroundColor(Color("DescriptionForegroundColor"))
.font(.system(size: 14))
if !isAgentMode {
Text("@ to chat with extensions")
.foregroundColor(Color("DescriptionForegroundColor"))
.font(.system(size: 14))
Text("Type / to use commands")
.foregroundColor(Color("DescriptionForegroundColor"))
.font(.system(size: 14))
}
}
}
}.frame(maxWidth: 350)
}
}
}