forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMCPIntroView.swift
More file actions
45 lines (40 loc) · 1.36 KB
/
MCPIntroView.swift
File metadata and controls
45 lines (40 loc) · 1.36 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
import Client
import Foundation
import Logger
import SharedUIComponents
import SwiftUI
struct MCPIntroView: View {
@Binding private var isMCPFFEnabled: Bool
public init(isMCPFFEnabled: Binding<Bool>) {
_isMCPFFEnabled = isMCPFFEnabled
}
var body: some View {
VStack(alignment: .leading, spacing: 8) {
if !isMCPFFEnabled {
GroupBox {
HStack(alignment: .top, spacing: 8) {
Image(systemName: "info.circle.fill")
.font(.body)
.foregroundColor(.gray)
Text(
"MCP servers are disabled by your organization’s policy. To enable them, please contact your administrator. [Get More Info about Copilot policies](https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-organization/manage-policies)"
)
}
}
.groupBoxStyle(
CardGroupBoxStyle(
backgroundColor: Color(nsColor: .textBackgroundColor)
)
)
}
}
}
}
#Preview {
MCPIntroView(isMCPFFEnabled: .constant(true))
.frame(width: 800)
}
#Preview {
MCPIntroView(isMCPFFEnabled: .constant(false))
.frame(width: 800)
}