mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-17 01:49:15 +08:00
a3fbfd3540a71ac5e4bbb46eb59fa85cb30df91f
27 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a3fbfd3540 |
feat: SDK integration and various improvements
- Refactor core modules for better SDK integration - Improve skill manager with better caching and loading - Update dashboard routes for plugin and tools management - Fix and enhance computer skill synchronization - Various bug fixes and test improvements |
||
|
|
95430ee6f8 |
Feat/sdk integration (#6807)
* Add legacy session waiter compatibility * Expand legacy astrbot package compatibility * Tighten external legacy plugin compatibility smoke tests * Consolidate controlled legacy facade compatibility * docs: clarify compat package boundaries * test: align runtime fixtures with maintained samples * fix: preserve unicode sample fixtures in runtime tests * Implement legacy hook and tool compat runtime * Refactor legacy runtime execution boundary * 增强旧版兼容性,添加多个旧路径入口和相关功能 * 增强旧版兼容性,添加适配器边界的启动和关闭钩子支持 * Refactor legacy API and LLM compatibility logic - Moved legacy LLM and tool compatibility logic from `_legacy_api.py` to a new module `_legacy_llm.py` for better organization and separation of concerns. - Updated `_legacy_api.py` to import necessary components from `_legacy_llm.py`, removing redundant code. - Enhanced database client functionality by adding support for batch read/write operations and change event subscriptions. - Improved documentation in the database client and capability router to reflect new features. - Refined environment management process in the loader to better handle plugin grouping and virtual environment management. * 补充插件分组环境测试覆盖 * feat: Enhance CLI and testing capabilities - Added a new script entry point `astrbot-sdk` in `pyproject.toml`. - Introduced `has_waiter` method in `SessionWaiterManager` to check for existing waiters. - Updated `cli.py` to improve error handling and added context to error messages. - Implemented local development support in `cli.py` with a new `dev` command for running plugins against a mock core. - Created a new testing module `astrbot_sdk.testing` with utilities for local development and plugin testing. - Added comprehensive tests for the new testing module and CLI commands. - Improved compatibility and error messaging for plugin loading failures. * feat: 添加插件初始化、验证和构建命令,增强 CLI 功能 * feat: add platform client documentation and examples - Introduced platform client documentation in `docs/v4/clients/platform.md` detailing methods for sending messages, images, and managing group members. - Added example plugins for LLM chat and database functionalities in `docs/v4/examples/README.md`, `docs/v4/examples/llm-chat/README.md`, and `docs/v4/examples/database/README.md`. - Enhanced quickstart guide with links to new documentation and example plugins. - Implemented runtime contract tests to ensure compatibility of public capabilities and hooks. * Refactor legacy runtime handling and improve plugin loading - Updated `handler_dispatcher.py` to streamline legacy runtime preparation and dispatching results. - Enhanced `loader.py` to simplify legacy plugin detection and manifest building. - Added tests for new HTTPClient and MetadataClient functionalities. - Introduced tests for legacy context metadata methods and legacy loader helpers. - Improved legacy runtime tests to cover new functionality and edge cases. * refactor: 更新兼容层和导入路径,优化文档描述 * Support grouped plugin workers in shared environments - add group metadata driven worker startup for shared env plans - track per-plugin handler and capability ownership inside grouped workers - update runtime and smoke tests for grouped worker session behavior * Add v4 compat layer and legacy shims - Introduce private v4 compatibility surface using _legacy_api.py, _legacy_runtime.py, _legacy_loader.py plus new _legacy_context.py and _legacy_star.py to centralize legacy adapters while keeping public APIs thin. - Extend InitializeOutput to carry protocol_version for negotiated protocol, enabling runtime to adapt to the chosen v4 version. - Add lightweight legacy support for Star/Context via new LegacyStar and LegacyContext shims and expose legacy API through the aggregate _legacy_api entry point. - Ensure legacy loader preserves class declaration order by iterating module.__dict__ instead of relying on alphabetical sorting. - Add tests: protocol_version handling in InitializeOutput, legacy main component order preservation, and embedded-newline framing in transport tests. * Add architecture doc and refine API compat - Add PROJECT_ARCHITECTURE.md documenting architecture, compat surface, and testing notes. - Update astrbot_sdk.api.__init__ to clarify it is a compatibility implementation layer, not a simple facade, and list migration targets. - Normalize platform in AstrMessageEvent.to_payload to emit a string id by using get_platform_id(). * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * delete old sdk * delete old sdk (#7) Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> * feat(cli): normalize plugin init skeletons Add interactive plugin init prompts and normalize generated plugin names to the astrbot_plugin_ convention. Update CLI tests for the new skeleton layout and ignore generated plugin directories in git and coverage tooling. Also include related runtime logging adjustments from the current worktree. * Create lint.yml * Update lint.yml * clean it * feat: Enhance handler and capability dispatchers with improved error handling - Updated HandlerDispatcher to raise TypeError for uninjectable required parameters, logging errors appropriately. - Refactored CapabilityDispatcher to raise TypeError for missing required parameters during capability execution. - Renamed _load_plugin_config to load_plugin_config for clarity and consistency. - Introduced _sync_plugin_registry method in SupervisorRuntime to manage plugin capabilities more effectively. - Enhanced capability registration logic to handle naming conflicts with better logging and automatic renaming. - Added tests for handler and capability dispatchers to ensure proper error handling and functionality. - Implemented new HTTP and metadata capabilities with corresponding tests for registration and retrieval. - Improved MemoryClient methods with additional tests for save_with_ttl, get_many, delete_many, and stats. - Added tests for the testing module to ensure proper import and functionality of PluginHarness. * feat: 更新 SDK 描述,重构插件调用上下文,移除插件 ID 传递,增强能力路由和 HTTP 客户端的插件身份管理 * refactor: 更新文档和代码注释,优化兼容性描述,增强可读性 * feat: 添加插件热重载功能,支持文件变更时自动重新加载插件 * feat: 增强错误处理,添加上下文信息,优化插件组件加载和参数注入校验 * feat: 添加 hello_plugin 示例,包含插件结构、命令处理和测试用例 * refactor: 删除过时的架构文档、变更日志和兼容矩阵文件 * refactor: 更新兼容层弃用通知,优化文档结构和可读性 * refactor: 更新项目架构文档,增强能力客户端和执行边界的描述,移除兼容层设计章节 * feat(errors): Enhance AstrBotError with detailed documentation and examples feat(events): Expand MessageEvent with reply capabilities and detailed docstrings fix(loader): Ensure plugin path is correctly managed in sys.path feat(star): Improve Star class documentation and lifecycle method descriptions feat(testing): Add plugin metadata handling in MockContext and enhance PluginHarness feat(hello): Refactor HelloPlugin to utilize new reply methods and structured capabilities test(decorators): Add tests for input/output model support in provide_capability test(events): Implement tests for reply_image and reply_chain methods in MessageEvent test(http): Validate API registration with capability handler references and error handling test(tests): Enhance tests for plugin harness and directory handling in dev commands * feat(runtime): add configurable msgpack wire codec support * fix(runtime): align msgpack framing with transport defaults * fix(runtime): preserve json transport compatibility * fix(cli): scope worker wire codec option * feat: 添加 AGENTS.md 文档,描述 v4 架构约束和开发命令 refactor: 更新 HandlerDispatcher 和 WorkerSession,增强参数处理和结果汇总逻辑 * fix(test): 更新 init_plugin 测试以匹配新的目录命名规范 CLI 的 _normalize_init_plugin_name 函数现在自动添加 astrbot_plugin_ 前缀, 测试期望的目录名从 demo_plugin 更新为 astrbot_plugin_demo_plugin。 * Refactor worker initialization and remove unused codec parameters; add schedule and session waiter modules - Simplified `GroupWorkerRuntime` and `PluginWorkerRuntime` constructors by removing the codec parameter and related logic. - Introduced `schedule.py` to define `ScheduleContext` for managing scheduled tasks with a clear structure and payload handling. - Added `session_waiter.py` for session-based conversational flow management, including `SessionController` and `SessionWaiterManager` for handling multi-turn dialogues. - Enhanced testing utilities in `testing.py` by removing unused classes and streamlining the structure. - Created `types.py` to introduce `GreedyStr` for improved command parameter parsing. * feat: 添加 LLM 工具管理和会话级别状态管理能力 - 新增 llm/ 模块,包含 LLMToolSpec、ProviderRequest、AgentSpec 等实体 - 新增 LLMToolManager 用于管理 LLM 工具注册和激活状态 - 新增 SessionPluginManager 用于会话级别的插件启用状态管理 - 新增 SessionServiceManager 用于会话级别的 LLM/TTS 服务状态管理 - 新增 RegistryClient 用于查询 handler 元数据和设置白名单 - 扩展 CapabilityRouter 内置能力,支持 session.* 和 registry.* 命名空间 - 增强描述符和装饰器以支持新的 trigger 类型 * feat: 大幅增强 SDK 核心功能和文档 新增模块: - clients/files.py: 文件上传/下载客户端 - clients/managers.py: 会话/LLM/Provider 管理器 - clients/provider.py: LLM Provider 客户端 - conversation.py: 对话上下文管理 - plugin_kv.py: 插件 KV 存储辅助 - runtime/limiter.py: 限流器 - star_tools.py: Star 工具函数 - docs/: 完整的 SDK 使用文档 (01-05) 功能增强: - Context 大幅扩展,增加 reply/send_image/typing 等便捷方法 - 装饰器增强,支持 on_llm_request/on_provider_request 等 - 内置 schemas 扩展,覆盖更多 capability 定义 - capability_router_builtins 大幅扩展内置能力实现 - handler_dispatcher 增强参数注入和错误处理 - Star 基类增加生命周期钩子和工具方法 * Add comprehensive API documentation for types and utilities in AstrBot SDK - Introduced `types.md` detailing type aliases, generics, and Pydantic models used in the SDK. - Added `utils.md` covering utility classes and functions including CancelToken, MessageSession, command groups, and session management. - Included usage examples and detailed descriptions for each component to enhance developer understanding and ease of use. * feat: 添加高级方法和辅助函数文档,增强消息组件和事件处理功能 * feat: 增强过滤器类型和能力路由文档,添加 Provider 和会话管理功能 * change location * delete no need thing * delete again * feat: add Star plugin base class and StarTools utility class - Introduced `Star` class as a base for v4 native plugins, providing lifecycle methods and context management. - Added `StarTools` class for accessing runtime context and managing LLM tools. - Implemented `PluginHarness` for local development and testing of plugins, allowing for message dispatching and lifecycle management. - Created `GreedyStr` type for enhanced command parameter parsing, enabling the capture of remaining command text as a single argument. - Added testing utilities and mock capabilities for plugin development. * delete: remove hello_plugin example and its related files * Remove obsolete test files for testing module, top-level modules, transport, and wire codecs - Deleted `test_testing_module.py` as it is no longer needed. - Removed `test_top_level_modules.py` which had no content. - Eliminated `test_transport.py` due to redundancy. - Cleared out `test_wire_codecs.py` as part of the cleanup. * fix(runtime): avoid creating Star instance in on_error fallback * fix(runtime): avoid virtual dispatch in Star.on_error fallback * refactor(runtime): unify command matching logic (#25) * refactor(testing): share command matching with handler dispatcher * fix:添加公共函数文件 * fix: simplify register_task completion handling (#27) * fix: simplify register_task completion handling Remove duplicated cancellation logging in Context.register_task while keeping Future inputs compatible with asyncio.create_task semantics. Add regression coverage for coroutine, Future, cancellation, and failure paths. * fix: prioritize local src in tests_v4 Ensure tests_v4 always imports the working tree package by moving src to sys.path[0] even when another checkout or installed copy is already present. * chore: sync subtree from AstrBot * feat: replay non-sdk changes on clean sdk subtree baseline * feat(sdk): add merged provider config capability support Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat(sdk): add merged provider config bridge and client Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat(sdk): add merged provider config capability support Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(sdk): tighten bridge cast typing Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat(sdk): add merged provider config bridge and client Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(sdk): cover merged provider config parity Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat: 完善 memory 向量检索与索引统计 (#28) Co-authored-by: united_pooh <united_pooh@outlook.com> * feat(tests): 添加测试用例以验证 register_task 的行为并更新测试运行说明 * Merge commit 'e45bade147ff44b43860ecff12067309e59c151a' into feat/sdk-integration * Squashed 'astrbot-sdk/' changes from 7dda6077..85342f14 |
||
|
|
5ba7ecec9e | Merge branch 'master' of https://github.com/AstrBotDevs/AstrBot into dev | ||
|
|
554c9cecfa | feat: fix preserve escaped newlines in frontmatter & update tests & ci workflows (#6783) | ||
|
|
c238880cd2 | 修复:server.py | ||
|
|
92b3e2d260 | fix: avoid false dashboard port conflicts | ||
|
|
00c9388da3 |
重构:彻底放弃md5保存密码
main.py调整说明 修复一系列导入问题 修复一部分ruff check问题 |
||
|
|
92bae1fdae | docs: replace prints with logger in upload_doc_images_to_r2.py | ||
|
|
98a8502ebe |
fix: resolve asynchronous context manager and coroutine attribute issues
- Fixed '_GeneratorContextManager' error in pip_installer.py by using synchronous 'with' for constraints_file(). - Fixed 'CoroutineType' has no attribute 'is_file' in dashboard/routes/config.py by adding missing await. - Fixed undefined names (Group, ComponentTypes, File, Reply, At) in aiocqhttp_platform_adapter.py. - Added 'pytest-cov' for code coverage testing. |
||
|
|
1fd3d4ce0e |
fix: subagent lookup failure when using default persona (#5672)
* fix: resolve subagent persona lookup for 'default' and unify resolution logic - Add PersonaManager.get_persona_v3_by_id() to centralize v3 persona resolution - Handle 'default' persona_id mapping to DEFAULT_PERSONALITY in subagent orchestrator - Fix HandoffTool.default_description using agent_name parameter correctly - Add tests for default persona in subagent config and tool deduplication Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: simplify get_default_persona_v3 using get_persona_v3_by_id Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> |
||
|
|
044b361ac5 |
feat: add conversation batch deletion for webchat (#6160)
* feat: add conversation batch deletion for webchat * fix: security issues in batch_delete_sessions and better handle batch select * feat: enhance batch selection UI with animated checkbox visibility in ConversationSidebar --------- Co-authored-by: Soulter <905617992@qq.com> |
||
|
|
6da59cfb07 |
fix: 插件依赖自动安装逻辑与 Dashboard 安装体验优化 (#5954)
* fix: install plugin requirements before first load * fix: handle pip option arguments correctly * fix: harden pip install input parsing * refactor: simplify pip install input parsing * fix: align plugin dependency install handling * fix: respect configured pip index overrides * test: parameterize plugin dependency install flows * refactor: simplify multiline pip input parsing * fix: install plugin dependencies before loading * fix: protect core dependencies from downgrades and simplify package input splitting * fix: enhance dependency conflict reporting and improve user-facing warnings * refactor: preserve pip log indentation and fix CodeQL URL sanitization alert * fix: explicit re-export for DependencyConflictError to satisfy ruff F401 * test: enhance index override verification in pip installer tests * fix: correctly map pip ERROR and WARNING outputs to proper log levels * refactor: show specific version conflicts in DependencyConflictError and revert log level mapping * refactor: simplify install() by decoupling pip logging, failure classification and constraint file management * refactor: further simplify pip installer and requirement parsing logic * refactor: simplify dependency installation logic and improve circular requirement reporting * style: organize imports in astrbot/core/__init__.py * refactor: optimize requirement parsing efficiency and flatten pip installer API * style: fix import sorting in astrbot/core/__init__.py * refactor: consolidate requirement parsing, optimize core protection, and improve exception propagation * fix: preserve valid pip requirement parsing * fix: skip empty pip installs and preserve blank output * chore: normalize gitignore entry style * fix: tighten pip trust and requirement parsing * refactor: centralize pip install parsing and failure handling * fix: redact pip argv credentials in logs * fix: surface plugin dependency install errors * fix: cache core constraints and clarify requirement installs * fix: harden pip requirement parsing for plugin installs * fix: simplify pip installer parsing internals * fix: tighten pip installer parsing and redaction * refactor: simplify plugin dependency install flow * fix: preserve core constraint conflict errors * fix: harden pip installer fallback resolution * refactor: split pip requirement and constraint helpers * refactor: simplify pip installer helper flow * refactor: streamline requirement precheck helpers * refactor: clarify core constraint resolution * fix: surface pip install failures explicitly * refactor: separate pip conflict context parsing * fix: harden core constraint resolution * test: cover pip installer failure call sites * refactor: remove dead requirements fallback helper * refactor: narrow core constraint error handling * refactor: unify requirement iteration * refactor: share requirement name parsing * test: align pip helper coverage * fix: bind pip output limit at runtime * refactor: reuse core requirement parser for tokens |
||
|
|
e25a1a42cf |
Revert "fix: clarify missing MCP stdio command errors (#5992)"
This reverts commit
|
||
|
|
0c771e4a77 |
fix: clarify missing MCP stdio command errors (#5992)
* fix: clarify missing MCP stdio command errors * refactor: tighten MCP error presentation helpers * fix: improve MCP test connection feedback * fix: structure MCP test connection errors * refactor: share MCP test error codes |
||
|
|
795aec9578 |
feat(extension): add filtering and sorting for installed plugins in WebUI (#5923)
* feat(extension): add PluginSortControl reusable component for sorting * i18n: add i18n keys for plugin sorting and filtering features * feat(extension): add sorting and status filtering for installed plugins Backend changes (plugin.py): - Add _resolve_plugin_dir method to resolve plugin directory path - Add _get_plugin_installed_at method to get installation time from file mtime - Add installed_at field to plugin API response Frontend changes (InstalledPluginsTab.vue): - Import PluginSortControl component - Add status filter toggle (all/enabled/disabled) using v-btn-toggle - Integrate PluginSortControl for sorting options - Add toolbar layout with actions and controls sections Frontend changes (MarketPluginsTab.vue): - Import PluginSortControl component - Replace v-select + v-btn combination with unified PluginSortControl Frontend changes (useExtensionPage.js): - Add installedStatusFilter, installedSortBy, installedSortOrder refs - Add installedSortItems and installedSortUsesOrder computed properties - Add sortInstalledPlugins function with multi-criteria support - Support sorting by install time, name, author, and update status - Add status filtering in filteredPlugins computed property - Disable default table sorting by setting sortable: false * test: add tests for installed_at field in plugin API - Assert all plugins have installed_at field in get_plugins response - Assert installed_at is not null after plugin installation * fix(extension): add explicit fallbacks for installed plugin sort comparisons * i18n(extension): rename install time label to last modified * fix(extension): cache installed_at parsing and validate timestamp format in tests * test(dashboard): strengthen installed_at coverage for plugin API |
||
|
|
812834bc9f |
feat(skills): add batch upload functionality for multiple skill ZIP files (#5804)
* feat(skills): add batch upload functionality for multiple skill ZIP files - Implemented a new endpoint for batch uploading skills. - Enhanced the SkillsSection component to support multiple file selection and drag-and-drop functionality. - Updated localization files for new upload features and messages. - Added tests to validate batch upload behavior and error handling. * feat(skills): improve batch upload handling and enhance accessibility for dropzone * feat(skills): enhance batch upload process and improve UI for better user experience * feat(skills): enhance skills upload dialog layout and styling for improved usability * feat(skills): update upload dialog description styling for better visibility and usability * feat(skills): improve upload dialog button styling and layout for enhanced usability * feat(skills): refine upload dialog text for clarity and consistency * feat(skills): enhance batch upload functionality by ignoring __MACOSX entries and improving upload dialog styling * feat(skills): refactor upload dialog and button styles for improved consistency and usability --------- Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> |
||
|
|
f818ad0758 | Merge remote-tracking branch 'origin/master' into feat/neo-skill-self-iteration | ||
|
|
2a6863cf70 |
test: add tests for star base class and config management (#5356)
* test: add tests for star base class and config management - Add Star base class safety helper tests - Expand config management unit tests - Update cron manager tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: fix plugin_manager test isolation issues - Use local mock plugin instead of real network requests - Clear sys.modules cache for entire data module tree - Clear star_map and star_registry in teardown - Use pytest_asyncio.fixture for async fixture support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: fix test isolation and compatibility issues - test_main.py: fix version comparison and path assertions for Windows - test_smoke.py: add missing apscheduler.triggers mock modules - test_tool_loop_agent_runner.py: update assertion for new interrupt behavior - test_api_key_open_api.py: use unique session IDs to avoid test conflicts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add unit tests for _version_info comparisons * test: enhance plugin manager tests with mock implementations and improved assertions * test: add mock plugin builder and updater for plugin management tests * fix: resolve pipeline and star import cycles (#5353) * fix: resolve pipeline and star import cycles - Add bootstrap.py and stage_order.py to break circular dependencies - Export Context, PluginManager, StarTools from star module - Update pipeline __init__ to defer imports - Split pipeline initialization into separate bootstrap module Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add logging for get_config() failure in Star class * fix: reorder logger initialization in base.py --------- Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * test: update cron job scheduling tests and refactor star base tests for clarity * test: expand star base tests for comprehensive coverage - Add tests for Star class initialization and context handling - Add tests for text_to_image with/without config - Add tests for html_render method - Add tests for initialize/terminate lifecycle methods - Add type hint validation tests for Context - Add circular import prevention tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review feedback - use TYPE_CHECKING instead of Any - pipeline/context.py: Use TYPE_CHECKING to import PluginManager instead of Any - pipeline/__init__.py: Add TYPE_CHECKING imports for __all__ exports to satisfy static analyzers - star/register/star_handler.py: Use TYPE_CHECKING to import AstrAgentContext instead of Any - tests: Remove invalid type hint tests that tested incorrect assumptions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: improve TYPE_CHECKING pattern for circular import resolution - star/register/star_handler.py: Use AstrAgentContext instead of Any in generic types - star/context.py: Remove unnecessary else branch with CronJobManager = Any (with __future__ annotations, TYPE_CHECKING imports are sufficient) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> |
||
|
|
afe292de35 | fix: address neo skill review findings | ||
|
|
a8cc995633 | feat(dashboard): add neo skills APIs and management UI | ||
|
|
80b89fd2ea |
feat: implements command management and improve webui feature structure (#3904)
move mcp management to plugin managemanet page * feat: 新增命令配置数据库模型 * feat: 实现核心命令管理系统 * feat: 将命令管理集成到 Star 框架 * feat: 新增命令管理后台 API * feat: 新增命令管理界面页面 * feat: 新增命令管理国际化支持 * test: 新增命令管理相关测试 * refactor(command): 移除指令重命名时的别名功能 * fix(command): 修正指令冲突检测逻辑 * fix(command): 排除已禁用指令的冲突检测 - 只有 `effective_command` 存在且 `enabled` 为 `True` 的指令才会被纳入冲突检测范围。 * feat(command): 优化指令冲突显示与提示 - 【功能】新增指令冲突警告提示,当检测到冲突时显示详细信息及解决方案。 - 【优化】调整指令列表排序逻辑,将冲突指令优先显示并分组。 - 【样式】为冲突指令行添加专属高亮样式,提升视觉识别度。 - 【国际化】更新英文和中文多语言文件,增加指令冲突警告相关的翻译文本。 * chore(command-page): 禁用命令表格部分列的排序功能 * style(command-page): 调整命令页面表格样式和图标大小 * refactor(command): 优化指令页面布局并更新冲突警告 - 【布局优化】重新组织指令管理页面布局,将筛选器移至顶部独立行 - 【信息展示】将搜索栏与总指令数、已禁用指令数合并显示,提升页面空间利用率 - 【视觉更新】更新指令冲突警告样式 * style: UI 细节 * refactor(command): 调整指令管理中的成员权限显示与筛选 - 更新指令筛选逻辑,当选择“所有人”权限筛选时,将同时包含 `everyone` 和 `member` 权限的指令。 * feat(command-management): 新增指令层级管理与UI展示 - 【后端】 - `CommandDescriptor` 新增 `parent_group_handler` 和 `sub_commands` 字段,支持指令层级结构定义。 - `list_commands` 函数重构,实现指令的层级收集与构建,将子指令正确挂载到其父指令组下。 - 新增 `_collect_all_descriptors` 和 `_find_parent_group_handler` 辅助函数,用于全面收集指令并定位父指令组。 - `_build_descriptor` 优化指令类型判断逻辑,明确区分普通指令、指令组和子指令。 - `_descriptor_to_dict` 递归处理子指令,确保 API 返回完整的指令层级数据。 - 【前端】 - 指令管理页面 (`CommandPage.vue`) 增加指令类型筛选器,并支持指令组的展开/折叠功能。 - 表格展示优化,为指令组和子指令添加不同的样式和缩进,提升层级结构的视觉可读性。 - 指令详情对话框新增指令类型、所属指令组和子指令列表的展示。 - 更新 `CommandItem` 接口,以适配后端提供的层级数据结构。 - 【i18n】 - 新增指令类型(指令、指令组、子指令)的国际化文本。 - 更新指令管理相关 UI 文本,包括表格头部、详情对话框字段和筛选器选项。 * style(command): 优化指令组子指令数量显示UI * refactor(command): 修改指令列表排序逻辑 * style(command-page): 优化命令列表UI * feat(command): 添加系统插件指令过滤与冲突处理 * refactor(command): 更新指令数展示逻辑 * style(command): 更新空状态描述 * feat(extension): 添加插件指令冲突检测与提示 - 在插件安装或启用后,自动检测并提示指令冲突。 - 当检测到指令冲突时,显示警告对话框,告知用户冲突数量及可能的影响。 * refactor(command): 移除指令表格内部加载指示器 * style(extension): 文案修改 * refactor(command): 模块化指令管理面板前端代码 * refactor(commandPanel): 重命名指令模块目录为 commandPanel * style(commandPanel): 微调指令面板UI * fix(command): 确保新命令配置的事务提交 * fix(sidebar): 补全新增侧边栏项后的侧边栏位追加逻辑 * refactor(commands): 重构/help指令以动态显示实际命令并补充部分命令描述 * style(builtin_commands): 补充命令描述 * refactor(commandPanel): 移除未使用的 filterState 常量 * perf(dashboard): 删除多余的CommandPage.vue文件(已被模块化引用) * perf(command): 优化命令冲突计数逻辑 * perf(command): 优化指令管理辅助函数和配置绑定逻辑 * perf(db): 优化重构command相关数据库操作 * refactor(sidebar): 提取侧边栏项目解析逻辑到工具函数复用 * refactor: move mcp and command page to extension page * refactor: remove unused imports in component panel * fix: update terminology for handler management in extension localization --------- Co-authored-by: Soulter <905617992@qq.com> |
||
|
|
758ce40cc1 | chore: fix test (#3787) | ||
|
|
0b7fc29ac4 |
style: add ruff lint module of isort and pyupgrade, and some ruff check fix (#3214)
Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com> |
||
|
|
19d7438499 |
fix: unit tests (#2760)
* fix:修复了main和plugin_manager部分单元测试 * fix: 修复了dashboard部分测试 * remove: 删除暂无用的配置测试脚本 * perf:拆分插件增查删改为独立的单元测试 * refactor: 重构插件管理器测试,使用临时环境隔离测试实例 * test: 增加对仪表板文件检查的单元测试,涵盖不同情况 * style: format code * remove: 删除未使用的导入语句 * delete: remove unused test file for pipeline --------- Co-authored-by: Soulter <905617992@qq.com> |
||
|
|
49bba9bf98 | style: format codes | ||
|
|
7b4118493b | chore: fix test | ||
|
|
b72c69892e | test: dashboard test |