Commit Graph

68 Commits

Author SHA1 Message Date
SengokuCola
16de259955 perf:优化webui配置展示,优化log显示,修复表达审核 2026-05-05 18:34:20 +08:00
SengokuCola
a5e4ac8531 pref:优化webui界面,增加prompt模板元信息 2026-05-05 17:57:19 +08:00
SengokuCola
0d43d3ec05 feat:webui默认infoLog,移除display_message字段 2026-05-05 16:39:35 +08:00
SengokuCola
4641fa1a15 fix:修复qq号为int的问题,修复部分多行配置问题,修复多语言prompt问题 2026-05-05 00:32:49 +08:00
SengokuCola
94a0cb3a62 fix:数字配置读取有问题的问题 2026-05-04 23:09:46 +08:00
SengokuCola
eea95c1961 feat:webui支持更加优化的模型配置,优化多处UI体验,支持设置视觉和cache价格,修复多重表达不生效的问题,修复表情包路径错误 2026-05-04 22:52:41 +08:00
SengokuCola
120acb835f fix:优化图片识别,优化webui配置和排版,优化聊天流监控,新增mcp显示,新增prompt修改面板,优化插件状态显示,优化长期记忆控制台, 2026-05-04 18:19:00 +08:00
DawnARC
87716d18b7 fix:移动A_memorix配置项到botconfig 2026-05-03 20:15:30 +08:00
DrSmoothl
b132a64de6 feat: 更新模型获取逻辑,处理返回的模型数组并添加鉴权头 2026-05-02 00:08:12 +08:00
DrSmoothl
d9a509b6c2 feat(chat): refactor chat message handling and introduce private messaging support
- Updated `uni_message_sender.py` to allow for private messaging by removing the mandatory group ID and adding user ID handling.
- Enhanced chat history retrieval and clearing functions in `routes.py` and `service.py` to support both group and private chat scenarios.
- Introduced a new `ChatScrollContext` for managing message scrolling and highlighting in the chat UI.
- Created a `ListItemEditorHookFactory` for rendering a rich UI editor for list items in configuration settings, replacing the previous JSON text display.
- Improved message serialization for consistent display in chat history.
- Added detailed logging for chat history operations and error handling.

Co-authored-by: Copilot <copilot@github.com>
2026-05-01 17:54:13 +08:00
DrSmoothl
465c5bd97a feat: 更新 EmojiResponse 模型,添加 format 和 usage_count 字段 2026-04-22 23:37:50 +08:00
DrSmoothl
c0be64f268 Refactor API response models and improve documentation
- Updated response model functions in emoji, expression, jargon, and person routers to include detailed docstrings.
- Enhanced the clarity of function signatures by specifying return types.
- Removed redundant comments and improved code readability.
- Added error handling and logging improvements in various endpoints.
- Deleted outdated code documentation file.
2026-04-22 23:33:57 +08:00
A-Dawn
6bfccf90a3 fix:收敛A_Memorix最小回归修复
最小修复聊天摘要写回游标恢复、摘要元数据透传、webui反馈参数解析、embedding批次缓存索引、图存储清理与配置默认值回归,并补齐针对性回归测试,确保问题解决且不影响现有逻辑。
2026-04-16 20:28:54 +08:00
DawnARC
056a3af642 Merge branch 'r-dev' of https://github.com/A-Dawn/MaiBot into r-dev 2026-04-13 13:10:02 +08:00
DawnARC
b3fb662f3d tmp 2026-04-13 13:09:57 +08:00
SengokuCola
8bd1c6ee11 优化对上下文的压缩,新增表达方式快速版本 2026-04-10 12:23:12 +08:00
SengokuCola
f058bc3189 feat:合并timing和plan展示,回复频率控制 2026-04-07 20:26:07 +08:00
SengokuCola
526fc9b763 feat:优化表情包注册,迁移数据库v3 2026-04-05 20:12:21 +08:00
SengokuCola
d82b37a08f feat:修复gemini tool问题,简化表情包识别,修复非多模态plan图片识别 2026-04-05 14:50:52 +08:00
DrSmoothl
c816ad4179 feat: add MaiSaka real-time chat flow monitoring component and WebSocket event handling
- Implemented the MaiSakaMonitor component for real-time monitoring of chat flow using WebSocket.
- Created a custom hook `useMaisakaMonitor` to manage WebSocket subscriptions and event states.
- Developed a backend module for broadcasting various monitoring events through WebSocket.
- Added serialization functions for messages and tool calls to optimize data transmission.
- Included event emission functions for session start, message ingestion, cycle start, timing gate results, planner requests/responses, tool executions, and replier requests/responses.
2026-04-05 00:23:34 +08:00
DrSmoothl
e44e4245f5 feat: 添加插件配置版本管理,优化配置归一化流程 2026-04-04 12:38:45 +08:00
DawnARC
9c21fa0a56 refactor(core): 精细化异步类型并改进配置处理的相关逻辑
精简协程工厂与执行器的类型注解(将 Awaitable 替换为 Coroutine,添加 Callable/Coroutine 导入,并在 create_task 前对 episode 循环进行类型转换)
优化 SDKMemoryKernel 的配置文件处理逻辑,规范应用配置时的配置文件载荷格式
调整 GraphStore.matrix_format ,现支持 SparseMatrixFormat 类型,初始化 VectorStore.min_train_threshold,并将 RelationWriteService.source_paragraph 重构为 Optional[str]
加固 Web UI 处理程序:安全解析 path_aliases,改为直接调用 get_raw_config_with_meta(),并在使用前规范化 tuning report 的载荷与报告结构
2026-04-04 01:11:06 +08:00
DawnARC
291420b7c7 merge: 同步 upstream/r-dev 并解决冲突 2026-04-03 19:56:45 +08:00
DawnARC
da95b06f96 feat:完善长期记忆控制台导入链路与联调测试
summary:\n- 扩展长期记忆控制台导入、调优与删除相关 UI/接口,补充中文化展示与任务细粒度状态管理\n- 强化 memory API 与后端路由能力,补齐导入任务、图谱检索、配置与运行态相关字段\n- 新增与增强前后端测试,覆盖导入多文件类型、检索、调优、删除及图谱查询关键路径

description:\n- dashboard: 重构 knowledge-base 页面与 memory-api,统一任务队列、分块分页、来源删除恢复、调优闭环交互\n- backend: 扩展 webui memory 路由与 A_Memorix 内核检索逻辑,完善服务侧能力与配置 schema\n- tests: 增加 webui 集成测试和 kernel 单测,提升导入/检索/调优/删除全流程回归保障
2026-04-03 19:50:08 +08:00
SengokuCola
6c720e0403 ref:重构maisaka内置工具逻辑,拆分文件 2026-04-03 14:51:05 +08:00
A-Dawn
15d436b3a1 refactor: 将 A_Memorix 重构为主线长期记忆子系统并重建管理界面
- 将 A_Memorix 从旧 submodule / 插件形态迁入主线源码,主体落到 src/A_memorix
- 调整主程序接入方式,使 A_Memorix 作为源码内长期记忆子系统运行
- 回收父项目插件体系中针对 A_Memorix 的特判,减少对 plugin 通用层的侵入
- 将长期记忆配置、运行时、自检、导入、调优等能力收口到 memory 路由与主线服务层
- 重做长期记忆控制台与图谱页面,按 MaiBot 现有 dashboard 风格接入
- 补充实体关系图与证据视图双视图能力,支持查看节点、关系、段落及其证据链路
- 新增长期记忆配置编辑器与 memory-api,支持主线内配置管理
- 补齐删除管理能力:删除预览、混合删除、来源批量删除、删除操作恢复
- 优化删除预览与删除操作详情的前端展示,支持分页、检索,并以实体名/关系内容/段落摘要替代单纯 hash 展示
- 修复图谱与控制台相关前端问题,包括证据视图切换、查询触发时机、删除弹层空值保护等
- 新增或更新 A_Memorix 相关测试、WebUI 路由测试、前端 vitest 测试与辅助验证脚本
- 移除旧 plugins/A_memorix、.gitmodules 及相关历史维护文档
2026-04-03 08:08:24 +08:00
DrSmoothl
aea87e18f1 feat: enhance bot configuration with new sections and JSON field hooks
- Added support for new configuration sections: relationship, database, maisaka, mcp, and plugin_runtime.
- Introduced complex field hooks for handling JSON configurations in chat talk value rules, expression learning lists, and more.
- Updated the field hooks to include schema metadata for better UI representation.
- Refactored the bot configuration page to utilize a more dynamic approach for managing section values and state.
- Improved the configuration schema generation to ensure all top-level sections have UI metadata.
- Added tests to validate the new configuration schema and ensure proper functionality of the JSON field hooks.
2026-04-03 02:46:07 +08:00
DrSmoothl
1906890b67 feat: add unified WebSocket connection manager and routing
- Implemented UnifiedWebSocketManager for managing WebSocket connections, including subscription handling and message sending.
- Created unified WebSocket router to handle client messages, including authentication, subscription, and chat session management.
- Added support for logging and plugin progress subscriptions.
- Enhanced error handling and response structure for WebSocket operations.
2026-04-02 22:08:52 +08:00
DrSmoothl
7d0d429640 feat: Enhance plugin runtime configuration and hook management
- Added `inactive_plugins` field to `RunnerReadyPayload` and `ReloadPluginResultPayload` to track plugins that are not activated due to being disabled or unmet dependencies.
- Introduced `InspectPluginConfigPayload` and `InspectPluginConfigResultPayload` for inspecting plugin configuration metadata.
- Implemented `PluginActivationStatus` enum to better represent plugin activation states.
- Updated `_activate_plugin` method to return activation status and handle inactive plugins accordingly.
- Added hooks for send service to allow modification of messages before and after sending.
- Created new runtime routes for listing hook specifications in the WebUI.
- Refactored plugin configuration handling to utilize runtime inspection for better accuracy and flexibility.
- Enhanced error handling and logging for plugin configuration operations.
2026-04-02 21:16:31 +08:00
DrSmoothl
7b3c12ba02 feat: add runtime validation for plugin configurations
- Introduced a new method `validate_plugin_config` in `PluginRuntimeManager` to validate plugin configurations at runtime.
- Implemented the `_normalize_plugin_config` method in `PluginRunner` to normalize and persist plugin configurations.
- Enhanced the `PluginRunner` to handle configuration validation requests and return normalized configurations.
- Updated the WebUI routes to utilize runtime validation for plugin configurations, ensuring that configurations are validated and normalized before saving.
- Added tests for runtime configuration validation and normalization processes, including handling of invalid configurations.
2026-04-01 19:39:55 +08:00
A-Dawn
bf5eb45709 Merge remote-tracking branch 'upstream/r-dev' into r-dev
# Conflicts:
#	src/memory_system/chat_history_summarizer.py
#	src/memory_system/memory_retrieval.py
#	src/memory_system/retrieval_tools/__init__.py
2026-04-01 14:20:22 +08:00
SengokuCola
503a257d66 remove:无用配置 2026-04-01 13:06:01 +08:00
A-Dawn
ea9a1b5802 Merge remote-tracking branch 'upstream/r-dev' into sync/pr-1564-upstream-20260331
# Conflicts:
#	src/chat/brain_chat/PFC/conversation.py
#	src/chat/brain_chat/PFC/pfc_KnowledgeFetcher.py
#	src/chat/knowledge/lpmm_ops.py
2026-03-31 10:43:55 +08:00
DrSmoothl
777d4cb0d2 feat: Enhance OpenAI compatibility and introduce unified LLM service data models
- Refactored model fetching logic to support various authentication methods for OpenAI-compatible APIs.
- Introduced new data models for LLM service requests and responses to standardize interactions across layers.
- Added an adapter base class for unified request execution across different providers.
- Implemented utility functions for building OpenAI-compatible client configurations and request overrides.
2026-03-26 16:15:42 +08:00
A-Dawn
ded5a7478d merge: sync upstream/r-dev and resolve real conflicts 2026-03-24 15:36:26 +08:00
DrSmoothl
85f060621d feat: Add NapCat adapter plugin and enhance message handling
- Introduced a built-in NapCat adapter plugin for MVP message forwarding.
- Implemented core functionalities for connecting to NapCat/OneBot v11 WebSocket service.
- Added message serialization capabilities for WebUI chat routes.
- Enhanced the RegisterPluginPayload to include optional adapter declarations.
- Implemented methods for handling external messages and adapter declarations in the PluginRunner.
- Improved the send_service to inherit platform IO route metadata for outgoing messages.
2026-03-24 12:13:17 +08:00
DawnARC
bd84e500e1 feat:新增记忆测试、检索工具与服务
新增完整的长期记忆支持及测试:引入中文记忆检索提示词、query_long_term_memory 检索工具、记忆服务与记忆流程服务,以及 WebUI 的记忆路由。新增大规模测试套件(包括单元测试与基准/在线测试),覆盖聊天历史摘要、知识获取器、事件(episode)生成、写回机制以及用户画像检索等功能。

更新多个模块以集成记忆检索能力(包括 knowledge fetcher、chat summarizer、memory_retrieval、person_info、config/legacy 迁移以及 WebUI 路由),并移除遗留的 lpmm 知识模块。这些变更完成了记忆运行时的接入,同时为基准测试提供嵌入适配器的 mock,并支持新测试与工具所需的导入与 episode 处理流程。
2026-03-18 21:35:17 +08:00
DrSmoothl
a5a6d2cb26 fix: 修复错误的插件重载机制,改为插件级区分
test: 补充新版本插件系统重载机制的测试
2026-03-16 13:27:10 +08:00
DrSmoothl
e7ac064a80 WebUI 后端类型注解补全,使用全 typing 库类型注解 2026-03-16 13:09:12 +08:00
晴猫
267b42001e fix: make bot identity platform-aware 2026-03-15 07:22:08 +09:00
DrSmoothl
292f0a1d7a feat: 增加网络安全功能,验证公共 URL 和适配器配置路径 2026-03-14 22:55:51 +08:00
DrSmoothl
172615f18a WebUI 前端 & 后端超级大重构 2026-03-14 21:06:36 +08:00
DrSmoothl
a576313b22 Ruff Format 2026-03-13 11:45:26 +08:00
DrSmoothl
186073f13b feat: 添加递归转换函数以处理 TOML 文档,优化配置数据验证 2026-03-07 23:24:07 +08:00
DrSmoothl
d3a4e3f3e7 feat: 优先读取插件的 config_schema.json,提供富 UI 元数据支持 2026-03-07 22:31:44 +08:00
DrSmoothl
0451a7fef4 优化认证检查逻辑,确保加载状态显示在正确位置;更新配置验证逻辑,使用深拷贝确保数据完整性 2026-03-07 21:52:23 +08:00
DrSmoothl
4565bd94b4 修复统计数据 API 中的数据库查询方法,优化性能和准确性 2026-03-07 21:18:36 +08:00
DrSmoothl
fe5cab9c41 修复 webui 明暗切换问题 2026-03-07 20:59:18 +08:00
DrSmoothl
ce8d8dfd0a 重构整个插件系统,尝试恢复可启动性,新增插件系统maibot-plugin-sdk依赖 2026-03-07 19:40:51 +08:00
DrSmoothl
2e3dd44ee9 Refactor chat stream handling to use BotChatSession
- Updated imports and references from ChatStream to BotChatSession across multiple files.
- Adjusted method signatures and internal logic to accommodate the new session management.
- Ensured compatibility with existing functionality while improving code clarity and maintainability.
2026-03-07 00:57:37 +08:00