[建议 / Feature] Bot Channel:支持列出并切换工作区内已有任务(当前 /new 只能单向新建)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复提议 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
对话 / Agent 交互 · Agent chat / interaction(Bot Channel)
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
使用场景 · Use case
桌面端同一个工作区(项目)里有多个任务(会话)并行,例如:一个在跑 RL 训练的长任务 + 一个日常主会话。通过飞书 Bot Channel 远程推进时发现:
/status只能看到 Bot 绑定的某一个"当前任务";- Bot 命令总表只有
help / bind / status / new / project(切换项目) / model / mode / think / reply,没有"列出任务"或"切换任务"命令; /new是单向门——只能新建任务并切过去,无法回到已有任务;Bot 状态文件里每个 Bot 也只有一个activeTaskId;- 桌面端侧边栏切换任务不会影响 Bot 的绑定(两边状态独立存储)。
结果:人不在电脑前时,手机上只能对着一个任务说话,想查看或推进同一项目里的另一个任务做不到。
目前的临时绕过:
- 在当前任务里让 Agent 读取其他会话的上下文"接管"推进(可行,但执行集中在一个会话里,原任务界面不更新);
- 为每个任务单独建一个飞书 Bot(每个 Bot 独立绑定任务),维护成本高。
建议方案 · Proposal
- 新增
/task(或/tasks)命令:列出当前工作区内的任务(标题 / 状态 / session id),选择后将该 Bot 的activeTaskId切换过去; - 或在
/status卡片底部附上任务列表与切换入口; - 也可考虑与桌面端联动:桌面端切换当前会话时,Bot 的绑定跟随切换。
预期价值 · Expected value
移动端可以真正"跨端跟进同一项目的多个长任务"(与官网宣传的多任务远程跟进场景一致),不需要为每个任务单独创建和绑定一个 Bot。
你认为的优先级 · Your perceived priority
高 · High
你使用的 ZCode 版本 / 环境 · ZCode version / environment
ZCode 3.10.1 · macOS 26.6.2 (arm64) · 飞书渠道(streaming_card)· BigModel Coding Plan / GLM-5.3-Flash
补充材料 · Additional context
- 上述命令总表来自应用内 Bot Channel 的命令注册表与
~/.zcode/v2/bot-config.json的allowedCommands字段;"单任务绑定"来自~/.zcode/v2/bot-state.v2.json的状态结构(每 Bot 仅一个activeTaskId,mode为draft/task两态)。 - 相关已有 issue:#470(同机跨会话通信)、#347(Bot channel 运行模式与远程权限)——本建议与二者互补,聚焦"任务列表与切换"这一缺口。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Bot Channel command registry, the allowedCommands field in ~/.zcode/v2/bot-config.json, and the activeTaskId structure in ~/.zcode/v2/bot-state.v2.json. Read how /status and /new currently resolve tasks, then define and implement the task-list and task-switching behavior so a bot can select another task in the current workspace.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend-api-design, desktop-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100