-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Implement the non-interactive execution logic when --popclip-mode
flag is set. The script should never prompt for user input and should handle all scenarios automatically.
Acceptance Criteria
- When
--popclip-mode
is set, always use AI suggestions regardless of confidence level - If AI categorization fails completely, implement sensible fallback defaults
- Remove all
input()
calls when in PopClip mode - Provide appropriate exit codes for success/failure scenarios
- Return status messages suitable for PopClip feedback
Context
This is the core implementation work for PopClip integration, building on the flag added in issue #14. This will make the script fully autonomous when triggered from PopClip.
Technical Implementation
Default Fallback Strategy
When AI fails in PopClip mode:
- Collection: "General" or analyze content for keywords
- Name: First 50 characters of content, cleaned up
- Keyword: Generate from content (e.g., first word + timestamp)
- Description: "Snippet created via PopClip"
Error Handling
- Never use
input()
when--popclip-mode
is True - Log errors but continue with defaults
- Exit with appropriate codes (0 for success, 1 for failure)
Notification Changes
- Suppress or modify macOS notifications in PopClip mode
- Consider returning status via stdout for PopClip to display
Dependencies
- Requires issue Add --popclip-mode flag to add_alfred_snippet.py for non-interactive execution #14 to be completed first (--popclip-mode flag)
Priority
Medium (P2) - Critical functionality for PopClip integration
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request