-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring v3 mvp #1391
Draft
lss233
wants to merge
158
commits into
browser-version
Choose a base branch
from
refactoring-v3-mvp
base: browser-version
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Refactoring v3 mvp #1391
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Sourcery AI <>
Co-authored-by: Sourcery AI <>
- Implemented ClearMemory block for clearing conversation memory - Added `/清空记忆` dispatch rule to trigger memory clearing - Updated MemoryManager with clear_memory method - Enhanced DefaultMemoryDecomposer to handle empty memory entries - Modified ChatResponseConverter to support multi-message responses using `<break>` - Updated system prompt with more detailed character background - Improved Telegram adapter with typing actions and simulated message delays
- Added WorkflowExecutor variable storage with set_variable and get_variable methods - Implemented variable substitution in ChatMessageConstructor using regex - Created SetVariableBlock and GetVariableBlock for workflow-level variable manipulation - Updated create-workflow rule description to be more concise - Enabled dynamic variable replacement in system and user prompts
- Introduced UserProfile data model with comprehensive user information - Created UserProfileAdapter protocol for querying user profiles - Implemented QueryUserProfileBlock for workflow-based user profile retrieval - Added user profile query method to Telegram adapter with caching - Supported flexible profile information extraction with fallback mechanisms
* feat: add new message elements to IM framework - Introduced AtElement for mentioning users - Added ReplyElement to support message replies - Implemented FileElement for file message handling - Created JsonElement for JSON-based messages - Added FaceElement for emoji/sticker support - Included VideoElement for video message transmission * refactor: update FileElement to inherit from MediaMessage - Modified FileElement to inherit from MediaMessage - Enhanced to_dict method with more comprehensive media information - Updated to_plain method to handle different file identification scenarios - Added support for URL, path, data, and format attributes
- Added `empty_message` property to `MemoryDecomposer` base class - Updated `DefaultMemoryDecomposer` to use `empty_message` for empty entries - Modified test cases to use display names and message content in assertions - Removed unnecessary test constant for invalid path
* feat: add comprehensive web management API and authentication system - Implemented web server with Quart and Hypercorn - Added authentication middleware with JWT and bcrypt - Created RESTful APIs for managing: * IM adapters * LLM backends * Dispatch rules * Workflows * Blocks - Introduced first-time setup and password management - Enhanced configuration loading with backup mechanism - Added support for rule and workflow priority, enabling/disabling - Integrated web configuration into global config * feat: comprehensive web management system with plugin and system status APIs - Added new web API modules for system and plugin management - Implemented system status API with resource usage tracking - Created plugin management API with support for: * Plugin listing * Plugin details retrieval * Plugin update (with restrictions) - Enhanced web framework with modular API design - Added setup files for internal plugins - Introduced new web API tests for system, plugin, and workflow management - Improved authentication and authorization mechanisms - Updated configuration models to support new plugin and system features * fix(web auth): cannot import UTC from datetime in old Python * docs(web api): update content to match current implementation * feat(plugin): implement missing plugin management API - Added new plugin management routes with full lifecycle support - Implemented plugin installation, uninstallation, enabling, and disabling - Updated PluginLoader with async methods for plugin operations - Enhanced plugin info model with more metadata - Added plugin API documentation with detailed usage examples - Created unit tests for plugin management functionality - Integrated plugin configuration updates with config backup mechanism * tests: fix tests * ci: Remove pull_request triggers from Windows quickstart workflows - Simplify concurrency group definition to use only github.ref - Maintain workflow dispatch and push to browser-version-dev branch * tests(config): add config backup mechanism and save methods - Implemented `save_config_with_backup` method in ConfigLoader - Added tests for config saving with and without existing backup - Updated LLM and IM API routes to use config backup when modifying configurations - Enhanced config management with automatic file backup before modifications * feat(llm): restore previous missing parameters - Added ability tracking to LLMBackendRegistry - Introduced logging for backend adapter registration - Updated register method to include LLMAbility parameter - Improved plugin loader with internal plugin tracking
- Replaced AsyncLogger with HypercornLoggerWrapper to handle Hypercorn logging - Added regex-based log message formatting for Hypercorn logger - Modified logger initialization in WebServer and HTTP Legacy Adapter - Improved logging compatibility with Hypercorn's logging requirements
- Introduced AuthService abstract base class for flexible authentication - Created FileBasedAuthService for file-based password management - Added MockAuthService for testing purposes - Refactored authentication routes to use dependency injection - Updated middleware to use AuthService for token verification - Improved authentication flow with first-time setup and password change - Added comprehensive test coverage for new authentication mechanisms
…qq-bot into refactoring-v3-mvp
* ci(docker): update docker entry name * refactor(quickstart): update Windows quickstart scripts * fix(ci): use v4 checkout * chore(ci): update ffmpeg download to version 7.0.2 * fix(ci): windows script
* feat(deployment): add web UI distribution and expose port * feat(web): improve static file serving and routing - Updated app.py to serve static files from web directory - Added routes to handle index.html and static file serving - Implemented fallback to index.html for client-side routing - Fixed workflow registry method call in dispatch routes * fix(web): minor bugs fix * ci: dynamically fetch latest web UI release * ci: containerize test workflow * fix: font location
…qq-bot into refactoring-v3-mvp
f2319da
to
c4de0ac
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.