Commit Graph

14 Commits

Author SHA1 Message Date
qianlifeng 4b2018934d
feat(mru): Implement Most Recently Used (MRU) functionality across plugins
- Added MRU support to SysPlugin and UrlPlugin, allowing users to access recently used commands and URLs.
- Introduced new data structures for MRU items and context data.
- Updated the query methods to include MRU results based on user settings.
- Modified the settings management to accommodate the new query mode for MRU.
- Enhanced the UI to reflect the changes in query modes and added relevant translations.
- Created a dedicated MRU manager for handling MRU items in the database.
- Updated Flutter UI to support MRU queries and settings.
2025-07-30 19:54:31 +08:00
qianlifeng 734d0f0830
refactor(setting): unify setting store architecture and introduce type-safe value wrappers
- Split Store into separate WoxSettingStore and PluginSettingStore with unified SettingStore interface
- Introduce SettingValue[T] and WoxSettingValue[T] generic wrappers for type-safe setting access
- Refactor PluginSetting to use PluginSettingValue[T] wrappers instead of direct field access
- Remove redundant plugin_setting_test.go and consolidate setting management logic
- Update plugin API, manager, and UI components to work with new setting architecture
- Simplify setting store operations and improve separation of concerns between core and plugin settings

This refactoring provides better type safety, cleaner separation between different setting types,
and a more maintainable architecture for future setting system enhancements.
2025-07-17 21:06:31 +08:00
qianlifeng fda4d4df3a
refactor(ui): Refactor ToolbarInfo handling
- Updated toolbar management to utilize new methods for emptying toolbar sides.
- Replaced direct instantiation of ToolbarInfo with emptyRightSide and emptyLeftSide methods for better clarity and maintainability.
- Introduced copyWith method in ToolbarInfo for easier updates to toolbar properties without full re-instantiation.
2025-05-29 22:52:44 +08:00
qianlifeng 21d8d83a1f
feat(script_plugin): enhance script plugin functionality
- Increased notification display duration from 3 to 8 seconds in API implementation.
- Refactored script execution logic in host_script.go to improve error handling and streamline execution.
- Added checks for existing script plugins in WPM plugin creation process, providing options to open or overwrite.
- Enhanced user feedback with localized messages for plugin creation and actions.
- Updated script templates (JavaScript, Python, Bash) to include environment variable documentation and improved action handling.
- Improved UI responsiveness in Flutter by implementing AnimatedSwitcher for list view updates.
- Added validation for viewport height in WoxListController to prevent scrolling issues during initialization.
2025-05-25 21:48:15 +08:00
qianlifeng 243b38ef96
refactor(ai): Support multiple tool calls in one conversation [WIP]
* Changed `ChatStreamData` structure to use `Status` instead of `Type`.
* Improved handling of tool call statuses during streaming.
* Refactored related functions to ensure consistent status updates across the application.
* Enhanced logging for better debugging and tracking of AI interactions.
2025-05-17 23:55:25 +08:00
qianlifeng 7f0962c1a7
feat(ai): Enhance tool call handling and logging in AI components 2025-04-17 15:05:00 +08:00
qianlifeng 1f53bfa4df
refactor(ai): Improve tool call handling and UI updates in AI chat components
- Enhanced tool call information management in OpenAIBaseProvider and API implementation.
- Updated AIChatPlugin to streamline tool call status updates and conversation handling.
- Improved WoxAIChatView to conditionally render tool call badges and manage chat responses effectively.
- Refactored duration calculation in ToolCallInfo to account for various tool call statuses.
- Introduced a tool call start timestamp map for better tracking of tool call durations.
2025-04-16 16:06:10 +08:00
qianlifeng dd4b799369
refactor(ai): Revamp AI chat stream handling and tool call integration
- Updated ChatStream interface to return structured ChatStreamData, enhancing clarity in message handling.
- Improved logging and error handling for AI chat streams, ensuring robust communication with the AI provider.
- Refactored OpenAIBaseProvider to streamline tool call processing and status management.
- Enhanced WoxAIChatPlugin to support recursive chat calls for tool execution, improving user interaction flow.
- Updated UI components to better display tool call information and manage conversation states effectively.
2025-04-15 15:19:15 +08:00
qianlifeng 87f72c4c2e
refactor(ai): Enhance AI chat functionality with tool call support
- Added detailed logging for tool calls in MCPListTools and OpenAIBaseProvider.
- Updated ChatStream interface to include message type.
- Implemented tool call handling in OpenAIBaseProvider, including status tracking and response management.
- Enhanced WoxAIChatView to visually differentiate tool calls and display their status.
- Introduced ToolCallInfo structure to encapsulate tool call details.
- Updated WoxAIChatController to manage tool call expansion states.
- Improved JSON serialization/deserialization for tool call information.
- Added UI elements to display tool call details and statuses in the chat interface.
2025-04-14 22:20:57 +08:00
qianlifeng e8759dd9a4
feat(ai): Enhance AI chat functionality with new options and MCP server integration [WIP]
- Update AI chat stream methods to include options for enhanced customization.
- Introduce new ChatOptions struct to manage tools and settings for AI interactions.
- Add MCP server configuration options in language resources for better user guidance.
- Remove deprecated AI chat plugin code to streamline the system.
- Ensure all AI providers are updated to handle the new options parameter in chat stream methods.
2025-03-31 22:51:16 +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 ccfdbc5e4a
Refactor plugin host 2024-12-22 22:24:04 +08:00
qianlifeng 975b268f9b
Replace justfile with makefile and unify project naming 2024-12-19 23:12:38 +08:00