feat(goal): TG /goal 指令进入目标模式

- 复用宿主命令运行时(commands.execute,与 Web 端 /goal 同通道),不依赖
  GUI 连接:command-goal 在宿主侧操作 session-log 支撑的 goals 域
- 语法与 Web 完全一致:/goal <目标>、/goal(查看)、clear/edit/pause/resume
- 目标状态变更(blocked/complete)实时推送 TG 通知,手机可感知目标模式进展
- 配置侧启用 command-goal(plugin_toggle,已 live 生效)
This commit is contained in:
root
2026-09-17 12:05:26 +08:00
parent 85a42f28a6
commit 36e95c2631
6 changed files with 130 additions and 0 deletions
+4
View File
@@ -127,6 +127,10 @@ export function parseCommand(text) {
return { type: 'status', text };
case '/compact':
return { type: 'compact', text };
case '/goal':
case '/目标':
// 目标语句是多词文本,保留完整参数(去掉命令名本身)
return { type: 'goal', text, arg: text.slice(command.length).trim() };
case '/rich':
case '/render':
case '/setting': {