DrSmoothl
891a197335
refactor(onebot): collapse action registration into a single barrel
加一个 action 文件原本要同步改三处手写清单:ApiHandler 的 12 个 register import +
12 行构造调用、各文件的 register footer、action-docs 的 13 import + GROUPS。现收敛
成一个 actions/index.ts barrel 作为「文件→动作 + 分类」的单一真相。
- action-kit:抽 RegisteredActionSpec(describe+register),ActionSpec/
StreamActionSpec extends 它,registerActions 参数放宽到 RegisteredActionSpec[]
(它只调 .register),于是 stream 动作也能并入统一注册。
- 新增 actions/index.ts:ACTION_GROUPS(11 组含分类,stream 合并)+ ALL_ACTIONS。
- api-handler:12 import+12 调用 → registerActions(this, context, ALL_ACTIONS);
.handle_quick_operation(唯一非 ActionSpec 的裸 handler,需要 h 本身)从
extended 搬进构造器一处显式注册。
- action-docs:改用 barrel 的 ACTION_GROUPS,删本地 GROUPS + 13 import。
- 删 12 个 register footer + 清理因此变 unused 的 ApiHandler/ApiActionContext import。
行为严格不变:注册的动作集合、.handle_quick_operation、文档分类/计数均一致。
onebot 516 全绿、全仓 12 包 typecheck Done;对抗性 Agent 逐条对比 HEAD 确认等价。
2026-07-01 17:49:07 +08:00
..
2026-06-30 23:29:51 +08:00
2026-07-01 17:29:25 +08:00
2026-07-01 17:29:25 +08:00
2026-07-01 02:27:35 +08:00
2026-07-01 17:49:07 +08:00
2026-07-01 02:13:35 +08:00
2026-07-01 15:56:43 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-06-30 20:38:37 +08:00
2026-07-01 14:43:29 +08:00