Commit Graph

3846 Commits

Author SHA1 Message Date
qianlifeng ba1718c966
refactor(chat): Enhance chat data structure and update UI components [WIP]
- Rename chat data type from `chat` to `AIChatData` for clarity and consistency.
- Update `WoxPreviewChatData` to include additional fields such as `id`, `title`, and `model`.
- Refactor `WoxPreviewChatView` to use the updated chat data structure and improve variable naming for better readability.
- Adjust JSON serialization and deserialization methods to align with the new data structure.
- Simplify message handling and UI interactions in the chat view for a more intuitive user experience.
2025-03-25 23:33:19 +08:00
qianlifeng 008629863b
fix(launcher): Delay window hide on Windows to prevent key event inconsistencies
- Implement a delay before hiding the window on Windows to address issues with suppressed keyup events.
- Remove unused timestamp variables for hide and enter actions in WoxQueryBoxView.
- Simplify key event handling by directly invoking hideApp and onEnter methods for escape and enter keys.
2025-03-25 22:43:49 +08:00
qianlifeng 702071fc0c
feat(chat): Implement chat input focus functionality and enhance chat data structure
- Add FocusToChatInput method to UI interface for focusing on chat input
- Update AIChatPlugin to manage chat data with improved structure
- Refactor WoxPreviewChatData to include Conversations and Model for better data handling
- Enhance Flutter UI components to support chat input focus and improve user experience
- Update query handling to integrate chat functionalities seamlessly
2025-03-25 15:10:27 +08:00
qianlifeng 655b461388
refactor(common): Migrate entity types to common package for better organization
- Move AI-related types such as Conversation, PlainQuery, and WoxImage to the new common package
- Update all references in AI provider implementations and plugin components to utilize common types
- Enhance code maintainability by centralizing shared types and functions in the common package
- Ensure consistency across the codebase by replacing entity references with common types
2025-03-25 10:50:42 +08:00
qianlifeng fcf42471c9
refactor(entity): Move AI-related types and functions to entity package
- Introduce entity.Conversation, entity.PlainQuery, and entity.WoxImage for better organization
- Update AI provider implementations to utilize new entity types for consistency
- Refactor plugin and system components to replace share references with entity types
- Enhance code maintainability by centralizing common types and functions in the entity package
2025-03-24 22:59:27 +08:00
qianlifeng e542c05caa
refactor(ai): Move WoxImage and AI related types to entity package
- Replace ai.Model with entity.Model for improved consistency
- Refactor conversation handling to utilize entity.Conversation
- Simplify preview data management by removing unnecessary JSON parsing
- Update preview types to use Markdown format for better display
2025-03-24 22:59:02 +08:00
qianlifeng fe06cc64e2
feat(plugin): Introduce chat preview functionality in Wox [WIP]
- Add WoxPreviewTypeChat to support chat previews
- Implement WoxPreviewChatData structure for managing chat messages
- Update AI command handling to utilize chat previews for responses
- Enhance Flutter UI to display chat previews using WoxPreviewChatView
- Ensure proper JSON serialization and deserialization for chat data
2025-03-23 22:41:27 +08:00
qianlifeng 52c6a3dd09
refactor(app): Standardize shell command usage in OpenAppFolder function
- Replace all instances of ShellRunOutput with RunOutput for consistency
- Update OpenAppFolder to utilize the new shell package for improved maintainability
2025-03-23 19:27:01 +08:00
qianlifeng 916cd41424
refactor(app): Update OpenAppFolder function to use centralized shell command
- Replace ShellOpenFileInFolder with OpenFileInFolder for consistency
- Improve code maintainability by utilizing the new shell package
2025-03-23 19:17:31 +08:00
qianlifeng a75b559ac7
fix(test): Exclude TestCalculatorTime from test suite to streamline testing
- Update test command in Makefile to skip TestCalculatorTime along with existing tests
- Improve test execution efficiency by reducing unnecessary test runs
2025-03-21 23:23:50 +08:00
qianlifeng 29883170b7
refactor(util): Consolidate shell command functions into a single shell package
- Remove individual platform-specific shell command implementations
- Centralize command execution logic in the new shell package
- Update all references to shell command functions across the codebase for consistency and improved error handling
2025-03-20 22:56:56 +08:00
qianlifeng 3670ce9336
refactor(ai): Update GoogleProviderStream to improve stream handling
- Change stream type in GoogleProviderStream from iter.Seq2 to a function returning response, error, and validity
- Simplify response handling in Receive method to directly process the stream function
- Enhance error handling and streamline message retrieval logic
2025-03-20 15:07:32 +08:00
qianlifeng 26695513ec
feat(ai): Add Ping method to AI providers for health check functionality
- Implement Ping method in GoogleProvider, GroqProvider, OllamaProvider, and OpenAIProvider to verify connectivity
- Update Provider interface to include Ping method
- Enhance UI to display AI model status based on Ping results
- Add new status column in AI settings view for better user feedback
2025-03-20 14:19:42 +08:00
qianlifeng efd781ee1b
refactor(ai): Update Google AI provider to use new genai package
- Replace deprecated generative-ai-go package with google.golang.org/genai
- Refactor GoogleProvider and GoogleProviderStream for improved stream handling
- Simplify model retrieval and conversation conversion logic
- Enhance error handling and response processing in ChatStream method
2025-03-20 13:38:03 +08:00
qianlifeng 654d867e94
refactor(util): Simplify ShellOpen and ShellOpenFileInFolder functions #4144
- Replace direct exec.Command calls with ShellRun for better error handling
- Improve code readability and maintainability by centralizing command execution logic
2025-03-20 11:28:16 +08:00
qianlifeng 44afcf31b9
fix(ai): Fix the issue where thinking model tags sometimes fail to parse
- Add goquery v1.10.0 as a new dependency
- Upgrade generative-ai-go from v0.18.0 to v0.19.0
- Refactor GoogleProvider model names for clarity
- Enhance processThinking function to handle leading newlines in input
- Improve AI command tests for better coverage of thinking tag processing
2025-03-13 19:53:57 +08:00
qianlifeng 67fe5660c0
feat(window): Implement window dragging functionality across platforms
- Add startDragging method to window manager interfaces for Linux, macOS, and Windows
- Integrate drag handling in respective platform-specific window managers
- Update Flutter window to handle dragging via method calls
- Enhance user experience by allowing window movement with mouse events
2025-03-13 11:37:59 +08:00
qianlifeng fcbbef6b2f fix(ui): Fix shellOpen issues on windows #4144
- Add timestamp-based debounce for Enter key press
- Prevent multiple rapid Enter key triggers
- Move Enter key handling to key event listener
2025-03-12 16:18:55 +08:00
qianlifeng 7aece4aa9d
fix(test): Improve error message in query test runner
- Enhance test failure reporting by including expected title in error message
- Provide more context when a specific title format is not found in test results
2025-03-12 08:07:02 +08:00
qianlifeng f4b74957be feat(hotkey): Add Windows/Win key support to hotkey parsing #4144
- Extend hotkey parsing to recognize "windows" and "win" as meta key modifiers
- Improve cross-platform hotkey compatibility
2025-03-11 23:40:52 +08:00
qianlifeng 16ac94e2b5 fix(ui): Optimize Escape key handling in query box view
- Add debounce mechanism to prevent multiple hide app calls
- Handle both keydown and keyup events for Escape key
- Improve window hide behavior with timestamp-based throttling
2025-03-11 23:18:47 +08:00
qianlifeng 493bbf84f6 fix(window): Optimize window hide and show behavior
- Reorder window hide operations to prevent focus restoration issues
- Remove previous active window tracking in native window manager
- Ensure proper query result clearing before hiding the window
2025-03-11 22:41:33 +08:00
qianlifeng 90550560d6 feat(window): Improve window management with DPI scaling and focus restoration #4144
- Add DPI scaling support for window centering and positioning
- Implement logging method for window-related events
- Add previous active window tracking for better focus management
- Enhance window show/hide methods with focus restoration
- Improve error handling in window method calls
2025-03-10 23:06:01 +08:00
qianlifeng 87b0a99c09
feat(ai): Allow user to edit the ai model name #4144
- Implement new `/plugin/detail` endpoint to retrieve specific plugin details
- Refactor plugin loading and refresh mechanisms in the settings controller
- Add support for dynamic plugin list updates (add/remove/update)
- Optimize plugin state management and reduce unnecessary API calls
- Remove loading state artifacts and improve plugin list rendering
2025-03-10 22:31:22 +08:00
qianlifeng 44b2306f7f
feat(ai): Support custom OpenAI API host configuration #4144
- Add support for custom OpenAI API host in provider configuration
- Allow overriding default base URL when a custom host is specified
- Enhance OpenAI client initialization flexibility
2025-03-10 15:34:28 +08:00
qianlifeng 0683e05053
fix(ui): #4144 Fix AI command UI input jitter issue
- Add width configuration for AI command prompt setting column
- Optimize AI model selection in plugin settings table
- Prevent focus loss when in settings view
- Implement preloading of AI model options for better UX
2025-03-10 15:10:43 +08:00
qianlifeng 1acdc1c701
feat(window): Add window blur event handling for macOS and Windows
- Implement method call handler for window blur events in MacOS and Windows window managers
- Add UUID-based logging for window events
- Integrate native window blur notifications with Flutter method channels
- Enhance cross-platform window event tracking and logging
2025-03-10 11:18:56 +08:00
qianlifeng deb28250e7 refactor(window): Update window centering method to support dynamic window sizing
Modify window centering methods across platforms to:
- Accept explicit width and height parameters
- Improve window positioning calculation
- Enhance cross-platform window management consistency
- Remove hardcoded window sizing in some method calls
2025-03-09 23:36:56 +08:00
qianlifeng 71cad94f33 refactor(window): Remove unused window event methods
Clean up window management code by removing unnecessary event methods and notifications across multiple platform-specific window manager implementations
2025-03-09 22:20:02 +08:00
qianlifeng 470eb78f69 feat(linux): Enhance window focus and system library integration
- Add comprehensive X11 window focus handling
- Include additional system libraries (GLIB, GIO, X11) in CMake configuration
- Implement robust window focus method with X11-specific techniques
- Add detailed logging for window focus operations
- Link necessary system libraries for improved Linux platform support
2025-03-09 21:17:47 +08:00
qianlifeng 993923ad31 fix(linux): Improve window visibility and positioning on Linux
- Add explicit window show method for Linux platform
- Implement logging for window positioning and focus events
- Modify application startup to hide window initially
- Ensure proper window management for Linux-specific scenarios
2025-03-09 15:37:43 +08:00
qianlifeng 6d0db2c7d7 feat(linux): Add rounded window shape for Linux platform
- Implement rounded window corners using Cairo graphics
- Add functions to create rounded rectangle shape
- Connect window shape signals to dynamically update window geometry
- Include necessary header files for graphics and window manipulation
2025-03-09 13:48:17 +08:00
qianlifeng 67f0d2603d feat(linux): Make the window background opaque on linux
- Add vertical box container to ensure proper window rendering
- Apply CSS to set an opaque background for the window
- Explicitly show container and view widgets
- Modify container hierarchy to improve window layout
2025-03-08 21:57:55 +08:00
qianlifeng b841e13954
feat(backup): Enhance backup functionality and fix proxy url textbox issues #4144
- Add ability to open backup and user data folders directly from settings
- Update router to support generic file/folder opening
- Modify backup struct to include full backup path
- Improve backup restore confirmation message in language files
- Add open folder buttons in backup and data location sections
- Remove deprecated proxy settings view
2025-03-08 11:36:29 +08:00
qianlifeng 33c494972a
feat(backup): Implement data backup and restore functionality #4145
- Add auto backup feature with configurable settings
- Create new backup management UI in Flutter
- Implement backup and restore API endpoints
- Update language files with backup-related translations
- Add support for manual and automatic backups
- Enhance data management settings with backup list and restore options
2025-03-07 23:14:21 +08:00
qianlifeng 519e0c764d
feat(data): Add user data directory configuration and management
- Implement new feature to change Wox user data directory location
- Add backend support for copying and updating user data directory
- Create new API endpoints for retrieving and updating data location
- Update localization files with new data configuration translations
- Enhance Flutter UI with data location selection and confirmation dialog
- Refactor setting views and controllers to support new data management feature
2025-03-07 22:09:40 +08:00
qianlifeng a365a0bb7f
feat(ui): Add new settings pane for data management and localization updates [WIP]
- Introduce new "Data" settings pane in the application
- Add localization keys for AI model and data settings
- Update setting view to include data management section
- Refactor setting view classes to use a common base view
- Update pane index references in setting controller
2025-03-07 15:38:13 +08:00
qianlifeng 56f175a958
feat(localization): Enhance UI translation and language key management
- Update language files with consistent UI-prefixed translation keys
- Modify translation key retrieval to support more flexible localization
- Add new localization entries for plugin, theme, and system settings
- Improve translation key naming for better clarity and organization
2025-03-07 15:16:11 +08:00
qianlifeng 715b1db70f
fix(windows): Minor semicolon adjustment in screen detection method
Resolve potential syntax issue in Windows screen size retrieval function by adding semicolon
2025-03-07 14:27:00 +08:00
qianlifeng a3b8a620d0
feat(ui): Add configurable Wox display position across platforms #4145
- Introduce new setting for Wox window positioning (mouse screen, active screen, last location)
- Update language files with new position-related translations
- Implement cross-platform screen detection for active and mouse screen positions
- Add UI controls for selecting display position in settings
- Update Flutter and Go implementations to support new positioning logic
2025-03-07 11:55:00 +08:00
qianlifeng e6fb817177 feat(linux): Customize Linux window behavior for launcher
- Set window title to "Wox"
- Prevent taskbar entry and notifications
- Configure window to stay on top
- Adjust default window size for better launcher experience
2025-03-07 10:26:17 +08:00
qianlifeng c1f88fc766 refactor(deeplink): Improve deeplink processing robustness and error handling on linux
- Modify deeplink parsing to handle links without query parameters
- Simplify deeplink argument extraction logic
- Add more flexible error handling for malformed deeplinks
- Remove unnecessary error logging for valid deeplinks without parameters
2025-03-07 10:15:36 +08:00
qianlifeng 3219868623 feat(launcher): Improve IME input handling and query triggering
- Implement robust IME composition detection using input formatters
- Add detailed logging for IME input state transitions
- Enhance query triggering for both IME and direct text input
- Resolve cross-platform IME input inconsistencies
- Use Future.microtask for more reliable query text updates
2025-03-06 23:42:04 +08:00
qianlifeng ef61bbb823
fix(launcher): fix the issue that query text is randomly selected when user query fast
- Add trace ID logging for query-related operations
- Improve query box text change handling with selection preservation
- Fix potential IME composition text change issues
- Add detailed logging for query box text selection
2025-03-06 22:34:01 +08:00
qianlifeng 7a3d00852b refactor: Update build and window management configurations
- Modify Makefile to use default build configuration instead of release
- Simplify Windows window styling by removing extra window flags
- Update Flutter launcher controller to remove redundant window show method
- Update pnpm-lock.yaml to latest lockfile version
- Remove platform-specific window show workaround on Windows
2025-03-06 21:06:27 +08:00
qianlifeng cd02a6db51 refactor(windows): Streamline Windows window rendering and DWM effects
- Update Makefile to use release build configuration
- Simplify Windows window transparency and acrylic effect implementation
- Remove custom window dragging and hit testing logic
- Improve version detection and SystemBackdrop API usage
- Enhance Windows 11 UI effects with cleaner, more concise code
2025-03-06 20:40:41 +08:00
qianlifeng e2c29a3484 refactor(windows): Enhance Windows window transparency and DWM effects
- Improve acrylic effect implementation with version-specific handling
- Add support for Windows 10 and 11 background blur techniques
- Implement advanced window styling for borderless, resizable windows
- Add custom non-client area handling for transparent window rendering
- Introduce window dragging and resizing support for frameless windows
2025-03-06 18:11:38 +08:00
qianlifeng dd7cf6f2e9
refactor(macos): Simplify macOS window transparency implementation
- Reduce complexity of acrylic effect application
- Remove recursive view transparency methods
- Streamline NSVisualEffectView configuration
- Minimize window styling and transparency logic
2025-03-06 14:55:40 +08:00
qianlifeng 36ad9131b1
refactor(macos): Enhance macOS window transparency and visual effects
- Implement advanced window transparency for macOS using NSVisualEffectView
- Add recursive method to set views and sublayers to transparent
- Modify AppDelegate to apply acrylic-like effect and improve window rendering
- Remove unnecessary window initialization methods
- Improve Flutter view background transparency handling
2025-03-06 14:40:24 +08:00
qianlifeng 27800b40ca refactor(window): Enhance Windows window rendering and DWM effects
- Remove deprecated acrylic and window setup methods from Flutter and native code
- Implement Windows 11 rounded corners and system backdrop support
- Simplify window creation and styling for better DWM integration
- Remove theme-related registry checks and manual theme handling
- Improve window initialization with modern Windows UI effects
2025-03-05 23:49:47 +08:00