Add screenshot capture settings for token and payload optimization#17
Add screenshot capture settings for token and payload optimization#17antiartificial wants to merge 1 commit intofarzaa:mainfrom
Conversation
Expose three user-configurable settings in the menu bar panel: - Primary screen only toggle (skips secondary monitors) - Active window only toggle (captures frontmost window instead of full screen) - JPEG quality slider (0.3–1.0, adjusts upload payload size) Settings persist via UserDefaults and are wired through the capture utility to both the voice response and onboarding demo pipelines. Includes unit tests for defaults, persistence, and boundary values.
|
Hi, Severity: remediation recommended | Category: reliability How to fix: Clamp quality to 0..1 Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
|
Hi, The setting named/labelled “Primary screen only” actually captures the screen containing the cursor, not the system primary display. This mismatch can lead to incorrect future usage and user confusion about what will be captured. Severity: informational | Category: maintainability How to fix: Align name with behavior Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
Summary
All three settings live in a new "SCREENSHOT" section in the menu bar panel, persist via UserDefaults, and are wired into both the voice response and onboarding demo capture pipelines. Defaults match existing behavior (all screens, full screen, 80% quality) so nothing changes unless a user opts in.
Files changed
CompanionManager.swiftthree new@Publishedsettings with UserDefaults persistenceCompanionScreenCaptureUtility.swiftcaptureAllScreensAsJPEG()accepts new parameters for filtering screens, capturing active window viaSCContentFilter(desktopIndependentWindow:), and configurable JPEG compressionCompanionPanelView.swiftnew "SCREENSHOT" settings section with two toggles and a sliderScreenshotSettingsTests.swift17 unit tests covering defaults, persistence, struct fields, and quality boundariesTest plan