fix(conversation-assistant): use SwiftUI openSettings environment

Replace NSApp.sendAction approach with @Environment(\.openSettings)
which is the proper way to open Settings in SwiftUI menu bar apps.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Quinn Ftw 2025-12-29 22:09:12 -08:00
parent 703a6637f6
commit bcd7f9f002

View file

@ -2,6 +2,7 @@ import SwiftUI
struct MenuBarView: View {
@StateObject private var viewModel = MenuBarViewModel()
@Environment(\.openSettings) private var openSettings
var body: some View {
VStack(spacing: 0) {
@ -29,7 +30,13 @@ struct MenuBarView: View {
// Footer
HStack {
Button(action: viewModel.openSettings) {
Button {
// Close popover first, then open settings
if let appDelegate = NSApp.delegate as? AppDelegate {
appDelegate.closePopover()
}
openSettings()
} label: {
Image(systemName: "gear")
.accessibilityLabel("Settings")
}