import SwiftUI struct SettingsView: View { @Bindable var viewModel: BookmarksViewModel let onDisconnect: () -> Void @Environment(\.dismiss) private var dismiss @State private var autoTagText = PodcastRequests.autoTags.joined(separator: " ") var body: some View { NavigationStack { List { Section("AI Features") { Label("Semantic search, auto-tagging, smart collections, and podcast generation are active.", systemImage: "sparkles") .font(.system(size: 13)) .foregroundStyle(.secondary) } Section { TextField("e.g. listen podcast", text: $autoTagText) .textInputAutocapitalization(.never) .autocorrectionDisabled() .onChange(of: autoTagText) { _, new in PodcastRequests.autoTags = new .split(whereSeparator: { $0 == " " || $0 == "," }) .map(String.init) } } header: { Text("Auto-Podcast Tags") } footer: { Text("Saving a bookmark with any of these tags automatically generates a podcast for it.") } Section("Server") { Button(role: .destructive) { dismiss() onDisconnect() } label: { Label("Disconnect", systemImage: "person.crop.circle.badge.minus") } } } .navigationTitle("Settings") .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .topBarTrailing) { Button("Done") { dismiss() } } } } } }