Skip to content

Conversation

@AstralSolipsism
Copy link

关联Issue

Closes #4440

变更概述

本PR实现了Issue #4440中提出的插件管理器优化方案,包括MOD管理器风格的新布局、Pipeline Snapshot可视化、提示词预览功能,以及GitHub风格的Markdown展示。

主要功能

1. MOD管理器风格布局

  • 双列表布局:左侧展示激活/未激活插件列表,支持批量勾选与操作
  • 详情面板:右侧展示插件详情(Info/Config/Overview/Changelog标签页)
  • 可拖拽分割:支持横向/纵向分割条拖拽,比例自动持久化
  • 视图切换:保留旧视图入口,用户可自由切换

2. Pipeline Snapshot 可视化

  • 鱼骨图展示:直观展示Pipeline各阶段的插件注册情况与执行顺序
  • 冲突检测:自动检测并展示命令冲突,支持从冲突列表跳转到具体参与者
  • 风险标记:对潜在风险的handler进行静态分析与标记
  • Scope切换:支持全局/会话(UMO)两种视角

3. 提示词预览(Dry-run)

  • 最终提示词展示:展示system_prompt与extra_user_content_parts
  • 分段归因:对提示词各段落标注来源插件,支持tooltip查看与一键复制
  • 执行链路追踪:展示dry-run执行过程中的状态、stop_event、diff等信息

4. GitHub风格Markdown展示

  • 统一渲染组件:新增GitHubMarkdownViewer组件,支持KaTeX/Mermaid
  • 预处理优化:引入preprocessPluginMarkdown处理不规范HTML与资源链接

技术实现

后端新增

  • astrbot/core/pipeline/snapshot/ - Pipeline快照构建、冲突检测、风险扫描模块
  • astrbot/core/pipeline/prompt_preview_dry_run.py - 提示词预览dry-run实现
  • astrbot/dashboard/routes/pipeline.py - Pipeline API路由

前端新增

  • dashboard/src/components/extension/mod-manager/ - MOD管理器布局组件集
  • dashboard/src/components/extension/mod-manager/pipeline/ - Pipeline/Trace可视化组件
  • dashboard/src/components/shared/GitHubMarkdownViewer.vue - GitHub一致的Markdown渲染

依赖变更

  • 新增 github-markdown-css 用于GitHub风格样式

变更统计

  • 55files changed
  • 15,207 insertions(+)
  • 961 deletions(-)

验证截图详见issue


Checklist / 检查清单

  • [] 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • [✔] 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • [ ✔] 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

- 合并upstream27个新提交

- 解决4个冲突文件(i18n、ReadmeDialog、ExtensionPage)

- 保留MOD管理器架构重构

- 吸收upstream的视图模式持久化功能
- 新增MOD管理器UI组件(mod-manager/)

- 新增pipeline快照后端模块(snapshot/)

- 新增pipeline路由和dry run功能

- 新增相关composables(命令冲突、快照、配置缓存)
- Auto-fit mod manager split layout on first load and surface fetch failures

- Add README/CHANGELOG GitHub-style viewer with markdown preprocessing for upstream formatting quirks

- Refactor pipeline trace UX with selectable rows, impact detail panel, and jump-to-pipeline navigation

- Cache pipeline snapshot/prompt rendering on backend with TTL + inflight dedupe
- GitHubMarkdownViewer 添加 showHeader 属性支持隐藏头部

- PipelineSnapshotPanel 使用可调整大小的分割面板

- 分割比例支持 localStorage 持久化

- 小屏幕自动切换为堆叠布局
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 13, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @AstralSolipsism, your pull request is larger than the review limit of 150000 diff characters

@dosubot dosubot bot added area:webui The bug / feature is about webui(dashboard) of astrbot. feature:plugin The bug / feature is about AstrBot plugin system. labels Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. feature:plugin The bug / feature is about AstrBot plugin system. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 插件管理器布局优化,以及Pipeline可视化与提示词预览功能

1 participant