Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Oct 02:08

v0.5.0

这一版修复「同一个会话在列表里显示成两张卡」,并把卡片的启动目录改成项目根。缓存结构不变,无需清理。

This release fixes the same conversation showing up as two cards, and changes where a card starts claude to the project root. The cache format is unchanged.

修复

Fixes

  • 同一会话不再显示成两张卡:分组键从「会话首次出现的目录」改为「项目根」——从该目录向上找最近的含 CLAUDE.md 或 AGENTS.md 的目录(两个文件名都认),找不到就沿用原目录。

    问题场景:你在项目目录里用 claude -c 恢复会话,会话中某个工具把工作目录切回上级,退出时停在子级。旧版按首次出现目录分组,同一对话链的祖先和后代被拆成两组;祖先组里没有达到阈值的新会话时,又被「目录升格」单独出一张卡——于是同一个任务出现两张同名卡片。改为项目根归组后,两条会话落进同一组,现有的同名折叠规则就能把它们合并。

    One conversation no longer shows up as two cards: the grouping key moves from the directory where a session first appeared to the project root — the nearest directory containing CLAUDE.md or AGENTS.md, walking up from the start directory (both filenames are accepted), falling back to the original directory when neither exists.

    The scenario: you resume a session with claude -c in a project directory, a tool inside the session changes the working directory back to a parent, and you exit while still in the subdirectory. The old code grouped by the first-seen directory, splitting one conversation chain into two groups; when the ancestor group had no session above the message threshold, the directory-promotion rule surfaced it as its own card — two identically named cards for one task. Grouping by project root puts both sessions in the same group, where the existing same-title folding merges them.

  • 卡片从项目根启动:选中会话卡后,cct 先切到项目根再执行 --resume,不再使用会话最后一次所在的目录。下次恢复不会又落在子级。SessionId 不变,仍然精确恢复那一条会话。

    Cards start from the project root: after you pick a session card, cct changes to the project root before running --resume, instead of using the session's last directory. The next resume will not land in a subdirectory again. The SessionId is unchanged, so the exact session is still restored.

  • 项目根识别兼容两种文件名:CLAUDE.md 与 AGENTS.md 同等对待。目录里没有锚点文件时回退到会话启动目录,行为与旧版一致。

    Project-root detection accepts both filenames: CLAUDE.md and AGENTS.md are treated the same. When no anchor file is found, cct falls back to the session start directory, matching the previous behavior.

安装与更新

Installation and update

从 PowerShell Gallery 安装或更新到最新版:

Install or update to the latest version from the PowerShell Gallery:

# 全新安装
# Fresh install
Install-Module -Name ClaudeCodeTask -Scope CurrentUser

# 更新到 0.5.0
# Update to 0.5.0
Update-Module -Name ClaudeCodeTask -Scope CurrentUser -Force

更新后若 cct 已在本会话加载,需重开终端(或先 Remove-Module ClaudeCodeTask)再输入 cct 才会生效。

If cct is already loaded in the session, reopen the terminal (or Remove-Module ClaudeCodeTask) before typing cct for the update to take effect.

更多用法见 README 或 cct -h。

More usage details in the README or cct -h.