fix(mac): hide empty MCP servers section

This commit is contained in:
Peter Steinberger
2025-12-13 16:43:31 +00:00
parent 44f9327087
commit a882798143

View File

@@ -217,9 +217,13 @@ struct ToolsSettings: View {
.padding(.top, 2)
}
@ViewBuilder
private func section(for kind: ToolEntry.Kind, title: String) -> some View {
let filtered = self.tools.filter { $0.kind == kind }
return VStack(alignment: .leading, spacing: 10) {
if filtered.isEmpty {
EmptyView()
} else {
VStack(alignment: .leading, spacing: 10) {
Text(title)
.font(.callout.weight(.semibold))
.padding(.top, 6)
@@ -239,6 +243,7 @@ struct ToolsSettings: View {
.stroke(Color.secondary.opacity(0.15), lineWidth: 1))
}
}
}
}
}