Skip to content

feat: edit bot CLI and model from dashboard#317

Open
icankeep wants to merge 1 commit into
deepcoldy:masterfrom
icankeep:feature/dashboard-bot-agent-switch
Open

feat: edit bot CLI and model from dashboard#317
icankeep wants to merge 1 commit into
deepcoldy:masterfrom
icankeep:feature/dashboard-bot-agent-switch

Conversation

@icankeep

@icankeep icankeep commented Jun 26, 2026

Copy link
Copy Markdown

Summary

  • Add a CLI / Model section to the Bot Defaults dashboard so existing bots can switch agent runtime without editing bots.json manually.
  • Expose model/wrapper metadata through /api/bots and add a dashboard-to-daemon agent update route.
  • Persist cliId, wrapperCli, and model together in the daemon, with TTADK wrapper selection support and next-session semantics.

Fixes #316

Test Plan

  • corepack pnpm vitest run --project unit test/dashboard-bot-payload.test.ts test/dashboard-bot-defaults-cliid.test.ts test/dashboard-ipc.test.ts
  • corepack pnpm exec tsc --noEmit

中文说明

改动概览

  • 在“数字员工档案 / Bot Defaults”页面增加“CLI / 模型”配置区,让已有 bot 可以直接在 Dashboard 上切换 agent 运行时,不再需要手动编辑 bots.json。
  • /api/bots 透出 model / wrapperCli 等元数据,并新增 Dashboard 到 daemon 的 agent 更新代理路由。
  • daemon 端新增 /api/bot-agent,保存时一次性写入 cliId、wrapperCli、model,并同步内存配置;改动只影响后续新会话。
  • 支持 TTADK wrapper 选择项,例如 ttadk-x-codex,并复用现有 /api/cli-options 作为选项来源。

解决的问题

创建机器人后,原来 Dashboard 无法更改 bot 的 CLI 或模型。例如一个创建为 TraeX 的机器人,如果后续想改成 Claude、Codex 或 TTADK,只能手动改 bots.json 或重新创建机器人。这个 PR 把该能力放到 Bot Defaults 页面中,并确保 wrapper 与 model 一起保存,避免配置不一致。

测试计划

  • corepack pnpm vitest run --project unit test/dashboard-bot-payload.test.ts test/dashboard-bot-defaults-cliid.test.ts test/dashboard-ipc.test.ts
  • corepack pnpm exec tsc --noEmit

@icankeep icankeep requested a review from deepcoldy as a code owner June 26, 2026 12:40
@icankeep

Copy link
Copy Markdown
Author
image

@icankeep

Copy link
Copy Markdown
Author
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard should allow changing an existing bot's CLI and model

1 participant