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:
@@ -111,6 +111,7 @@ export type ParsedCommand =
|
||||
| { type: 'status'; text: string }
|
||||
| { type: 'compact'; text: string }
|
||||
| { type: 'rich'; text: string; arg?: string }
|
||||
| { type: 'goal'; text: string; arg?: string }
|
||||
| { type: 'unbind'; text: string }
|
||||
| { type: 'stop'; text: string }
|
||||
| { type: 'mission'; text: string }
|
||||
@@ -140,6 +141,10 @@ export function parseCommand(text: string): ParsedCommand {
|
||||
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': {
|
||||
|
||||
Reference in New Issue
Block a user