Repository navigation
v0.4.0
v0.4.0
这一版带来两个新能力:在选择器里直接删会话,以及修复「同一目录换了新会话后,卡片永远指向那个旧会话」。外加水印处显示版本号。删除走 Windows 回收站,误删可以在回收站还原。
This release brings two new capabilities: deleting sessions right in the selector, and a fix for cards pointing forever at an old session after a directory moved on to a new one. Plus the version number now shows in the footer. Deletions go to the Windows Recycle Bin, so a mistake can be undone.
新功能
New features
-
选择器内删除:选中卡片按
d(搜索框为空时)或Delete进入确认屏,确认屏列出该目录下将被删除的全部会话(短 id / 标题 / 时间 / 大小四列),并显示目录真身与编码位置、会话总数与总体积。按y、回车或d执行,按n或Esc取消,其余按键一律无效——你可以先滚动看完清单再决定,误触不会有后果。执行时删掉该卡片对应的整个编码目录(含记忆文件夹、子会话与附属文件),走 Windows 回收站,可在回收站还原。搜索框里已经有词时
d照常输入,要删就用Delete。In-selector deletion: press
d(with an empty search box) orDeleteon a card to open a confirmation screen listing every session that will be removed (short id / title / time / size), along with the real directory, its encoded location, the session count and the total size. Pressy, Enter ordto confirm,norEscto cancel, and any other key does nothing — you can scroll through the list before deciding, and a stray keypress has no consequence.Confirming deletes that card's entire encoded directory (memory folder, sub-sessions and attachments included) to the Windows Recycle Bin, where it can be restored. When the search box already has text,
dtypes as usual — useDeleteto remove. -
删除结果提示:删除完成后,「删除成功」显示在搜索框右侧,不覆盖搜索框、也不吞掉你按下的那个键——删完立刻处于正常操作状态,可以接着删下一个。
Result notice: after a deletion, "删除成功" appears to the right of the search box without covering it and without swallowing your keypress — you are immediately back to normal operation and can delete the next one.
修复与优化
Fixes and improvements
-
同一目录换新会话后,卡片不再永远指向旧的命名会话:当原本在用的会话出问题、你改用
claude-d另开一个会话继续干活时,cct 的卡片此前会一直指向那个旧的命名会话。根因有两个——会话文件只要被打开过一次,末条时间戳就会被刷新(用 cct 进去看一眼再退出,哪怕一个字没打,它也会被排成「最新」);并且目录里只要存在手动命名的会话,自动命名的会话就一律不显示。现在按最后一条真实用户输入的时间判定新旧,并且在目录内只有一个命名名时,由真实输入更晚的合格未命名会话顶上出卡、沿用这个名字。名字跟着任务走,不跟会话文件走。这全程只改显示,绝不写入会话文件。
Cards no longer point forever at an old named session when a directory moves on: previously, if the session you were using broke and you continued in a fresh one via
claude-d, the card kept pointing at the old named session. Two root causes — a session file's last timestamp is refreshed merely by opening it (peek at it with cct and exit, without typing a word, and it sorts as newest), and any auto-named session was hidden whenever the directory had a manually named one.The rule now compares the last real user input time, and when a directory has a single manual title, the newer qualified unnamed session takes the card and keeps that title. The name follows the task, not the session file. This is display-only and never writes back to the session file.
-
帮助行显示版本号:右下角版权改为
v0.4.0 by github - hjkl950217,版本号读取自模块清单而非写死,窗口变窄时逐档省略。Version in the help line: the footer copyright is now
v0.4.0 by github - hjkl950217; the version is read from the module manifest rather than hard-coded, and degrades step by step as the window narrows. -
确认屏对齐:四列一律按显示宽度计算(中文占 2 列),窄窗口逐级降级为「去掉大小列 → 再去掉时间列」,任何窗宽下每行都不会越界。
Confirmation screen alignment: all four columns are laid out by display width (CJK glyphs count as two), degrading on narrow windows to dropping the size column and then the time column, so no row ever overflows.
-
同步脚本自愈:目标安装目录不存在时自动创建;同步结束后自动清理旧版本模块目录与过期备份(保留最近 3 份),dll 被其他进程占用时给出可操作的提示而不是一句含义不明的系统报错。
Self-healing sync script: creates the target install directory when missing, cleans up old module versions and stale backups after syncing (keeping the 3 most recent), and reports an actionable message instead of an opaque system error when a dll is held by another process.
安装与更新
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.4.0
# Update to 0.4.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 typingcctfor the update to take effect.
更多用法见 README 或 cct -h。
More usage details in the README or cct -h.