zai-org / zai-org/feedback

功能请求:向 agent 暴露会话改名工具(内核已有 renameSession,目前 agent 只能直写 SQLite 且 UI 不刷新)

Open
#712 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

环境

ZCode Desktop macOS 3.12.3(Apple Silicon)

场景与期望

我们团队的全局规则要求 AI 在主题演进或收尾时按统一格式修改会话标题(例如 ✅ 已结 09-18|任务短语,见下方背景)。期望 agent 能在会话内直接改当前会话的标题,并且界面即时刷新。

现状

  1. agent 工具列表中没有任何改会话名的工具,也没有 zcode 命令行可用;
  2. 内核其实已经有这条命令/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs 里可见 renameSession:m.object({title:m.string()}),与 session/create、session/fork 等同族——只是没有暴露给 agent;
  3. 目前唯一的路是绕过应用直写 ~/.zcode/cli/db/db.sqlitesession.title。写入本身成功,但桌面端会话列表缓存在内存、不监听数据库文件变化,必须重启客户端才能看到新标题
  4. 另外观察到 title_source=generated 的会话,应用之后重新生成标题时可能覆盖手改值。

建议

把现成的 renameSession RPC 暴露为 agent 工具(如 session_rename),成本应该很低;或者退一步,让会话列表对 session.title 的变更做失效/监听,使直写 DB 也能被界面感知。

价值

自动改名是「AI 收尾交班」工作流的关键一环:会话结束时按 <状态> <MM-DD>|<任务> 格式留名,会话列表即可当任务台账用。目前这条链路在 ZCode 上因「无工具 + UI 缓存」断掉,Claude Code / Codex 上都是应用进程内完成、即时生效的。

背景

全局规则示例(~/.claude/CLAUDE.md §24):状态四选一 ▶️ 在办 / ⏸️ 挂起 / ❓ 等对方回话 / ✅ 已结,日期为会话开始日,任务为中文短语,全长 ≤25 字。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting /Applications/ZCode.app/Contents/Resources/glm/zcode.cjs, especially the existing renameSession RPC and the agent tool list. Verify the session-title update path and the UI cache behavior around ~/.zcode/cli/db/db.sqlite; done means an agent can rename the current session and the desktop list updates without restarting, without unintended regeneration overwriting the title.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, sqlite
Domain
database, desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.