fix(conversation-assistant): version generation and settings button

- Add ./generate-version.sh call in install.sh before swift build
  to ensure AppVersion.swift is regenerated with latest VERSION.json
- Fix openSettings() selector syntax: remove extra parentheses from
  Selector(("...")) and add fallback for macOS 12 and earlier
- Remove test comment

🤖 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 21:34:42 -08:00
parent ce9277d56a
commit 5e09cf7a8e
2 changed files with 13 additions and 5 deletions

View file

@ -140,11 +140,12 @@ class MenuBarViewModel: ObservableObject {
}
// Activate the app (required for menu bar apps to show settings)
NSApp.activate(ignoringOtherApps: true)
// Open settings window - use the modern selector
// Open settings window - macOS 14+ renamed to showSettingsWindow, older versions use showPreferencesWindow
// Note: Using string-based selector since #selector requires @objc exposure which NSApplication methods don't have
if #available(macOS 14, *) {
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
} else if #available(macOS 13, *) {
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
NSApp.sendAction(Selector("showSettingsWindow:"), to: nil, from: nil)
} else {
NSApp.sendAction(Selector("showPreferencesWindow:"), to: nil, from: nil)
}
}
@ -162,4 +163,3 @@ class MenuBarViewModel: ObservableObject {
lastSyncText = text
}
}
// v0.0.31 - pipeline test

View file

@ -89,6 +89,14 @@ build_application() {
cd "$SCRIPT_DIR"
# Generate version file from VERSION.json
print_info "Generating version info..."
if [[ -x "./generate-version.sh" ]]; then
./generate-version.sh
else
print_warning "generate-version.sh not found or not executable, skipping version generation"
fi
# Clean previous builds
if [[ -d ".build" ]]; then
rm -rf .build