forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoApproveContainerView.swift
More file actions
32 lines (28 loc) · 940 Bytes
/
Copy pathAutoApproveContainerView.swift
File metadata and controls
32 lines (28 loc) · 940 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
30
31
32
// AutoApproveContainerView.swift
// Container view for the auto-approve feature in Tools Settings
// Created: 2026-01-08
//
// This view wraps EditsAutoApproveView in a VStack for layout.
import AppKit
import Logger
import SharedUIComponents
import SwiftUI
struct AutoApproveContainerView: View {
@ObservedObject private var featureFlags = FeatureFlagManager.shared
@ObservedObject private var copilotPolicy = CopilotPolicyManager.shared
private var isAutoApprovalEnabled: Bool {
featureFlags.isAgenModeAutoApprovalEnabled && copilotPolicy.isAgentModeAutoApprovalEnabled
}
var body: some View {
VStack(spacing: 16) {
if isAutoApprovalEnabled {
EditsAutoApproveView()
TerminalAutoApproveView()
MCPAutoApproveView()
} else {
AutoApprovalDisableView()
}
}
.padding(.bottom, 20)
}
}