feat(web): 插件管理弹窗(启停 / 重载)

- 顶栏新增「插件管理」图标按钮,打开 PluginsDialog
- 弹窗列出 pugins/ 下的插件:标题 / 目录名 / 是否启用与已加载 / 平台 label / 能力清单
- 每个插件可启用、停用、重载,底部有「全部重载」
- 启停成功后重新拉 /api/platforms,「添加账号」的平台下拉同步刷新
- types.ts 新增 PluginInfo;App.tsx 把平台列表加载提成 loadPlatforms 复用
- static/ 重新构建(pnpm typecheck + pnpm build 均通过)
- 顺带把 .vscode/ 纳入跟踪
This commit is contained in:
study-tool
2026-10-31 16:01:44 +08:00
parent f8458cff51
commit cfa960221e
12 changed files with 471 additions and 244 deletions
+1
View File
@@ -108,6 +108,7 @@ src/study_tool/pugins/
启用清单存在设置项 `plugins`(`{"disabled": [...]}`):没列进去的默认启用,新丢进目录的插件自动生效。
停用的插件会 `registry.unregister()`,从 `/api/platforms` 消失,账号的平台下拉里也不会出现。
热重载先把旧实现从注册表摘掉再 import;正在跑的学习任务持有的是旧实例,跑到结束不受影响。
前端顶栏的「插件管理」弹窗(`web/src/components/PluginsDialog.tsx`)就是这几个接口的界面。
## 槽位契约