Repository navigation
Releases: hjkl950217/ClaudeCodeTask
Release list
v0.5.0
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.mdorAGENTS.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 -cin 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. TheSessionIdis unchanged, so the exact session is still restored. -
项目根识别兼容两种文件名:
CLAUDE.md与AGENTS.md同等对待。目录里没有锚点文件时回退到会话启动目录,行为与旧版一致。Project-root detection accepts both filenames:
CLAUDE.mdandAGENTS.mdare 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 typingcctfor the update to take effect.
更多用法见 README 或 cct -h。
More usage details in the README or cct -h.
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.
v0.3.3
v0.3.3
这一版修复了 cct 在「claude 以脚本形态安装」的电脑上启动失败的问题。当 claude 是 npm 装的
.cmd/.ps1包装脚本、或没有扩展名的 POSIX 脚本时,启动器此前会直接把这些脚本当程序执行而失败(报「%1 不是有效的 Win32 应用程序」)。现在 cct 会先识别 claude 的真实安装形态,再选对启动方式,各种安装方式都能正常进入会话。
This release fixes cct failing to launch on machines where claude is installed as a script. When claude comes as an npm
.cmd/.ps1wrapper script, or as an extensionless POSIX shim, the launcher used to execute the script file directly and fail with "%1 is not a valid Win32 application". cct now detects how claude is actually installed and picks the right runner, so every install shape starts a session correctly.
修复与优化
Fixes and improvements
-
支持 claude 的脚本安装形态:启动器按
claude命令的实际解析结果自动选择启动方式——npm/常见安装的.cmd/.bat经cmd.exe包装执行,.ps1(如claude.ps1)经pwsh执行,.exe保持直接启动以保留交互式终端;找不到配套脚本时回退让命令解析器按扩展名检索。Script-form claude is now supported: the launcher follows how
claudeactually resolves and picks the right runner — npm/common.cmd/.batshims run throughcmd.exe,.ps1(likeclaude.ps1) runs throughpwsh, and.exestays a direct launch to preserve the interactive terminal; when no companion script is found it falls back to letting the command resolver search by extension. -
保留原有交互式终端语义:原生
.exe形态仍直接启动(不经解释器包装),不改变已有的无管道直启(TTY 保持)设计,脚本形态仅做最小必要包装。The original interactive-terminal behavior is preserved: native
.exebuilds are still launched directly (no interpreter wrapper), keeping the existing pipe-free direct-launch (TTY-preserving) design; script shapes only get the minimal wrapper they need.
安装与更新
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.3.3
# Update to 0.3.3
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.
v0.3.2
v0.3.2
这一版把模块的对外介绍全面改为中英双语,方便不同语言的读者。PowerShell Gallery 的模块简介扩充为完整的功能概述(中文、英文各成段),README 每一段中文下都附英文说明,GitHub 仓库简介也改为双语。阅读时不再有中文夹英文的别扭感——中文一整句、英文一整句,各自独立成行。
This release makes all external documentation fully bilingual so readers in either language get the same comfortable experience. The PowerShell Gallery module description is expanded into a full feature overview with separate Chinese and English paragraphs; every README paragraph carries an English explanation below it; and the GitHub repo description is bilingual too. No more mixing languages inside one sentence — a whole Chinese sentence, then a whole English sentence, each on its own line.
修复与优化
Fixes and improvements
-
模块简介扩充为双语:PowerShell Gallery 的模块描述从一句话扩展为完整功能概述,中文、英文各成一段;标签补充
claude-code、selector、sessions、launcher、productivity等便于搜索。The module description is expanded and bilingual: the PSGallery description grows from one line into a full feature overview with separate Chinese and English paragraphs; tags now include
claude-code,selector,sessions,launcher,productivityand more for easier discovery. -
README 全面双语:每段中文下附英文说明;标题、列表项、代码注释改为中英分行,不再同一句内中英混杂,中英文读者都容易读。
The README is fully bilingual: every Chinese paragraph carries an English explanation below it; titles, list items and code comments are split into separate Chinese and English lines instead of mixing languages inside one sentence.
-
GitHub 仓库简介改为双语:仓库首页的简介现在同时展示中文和英文。
The GitHub repository description is now bilingual, shown in both Chinese and English on the repo homepage.
-
发版说明双语化:PowerShell Gallery 页面底部展示的 ReleaseNotes 同步改为中文、英文双语。
The ReleaseNotes shown at the bottom of the PowerShell Gallery page are now bilingual as well.
安装与使用
Installation and usage
推荐从 PowerShell Gallery 安装:
Recommended: install from the PowerShell Gallery.
Install-Module -Name ClaudeCodeTask -Scope CurrentUser已有旧版本?更新到最新版:
Already on an older version? Update to the latest:
# 更新到最新版(含 0.3.2)
# Update to the latest version (includes 0.3.2)
Update-Module -Name ClaudeCodeTask
# 若上一命令因权限报错,显式指定用户级作用域重试
# If the command above fails on permissions, retry with an explicit user scope
Update-Module -Name ClaudeCodeTask -Scope CurrentUser -Force更新前先确认当前版本:
Get-Module -Name ClaudeCodeTask -ListAvailable;若模块已在本会话加载,更新后需重开终端(或先Remove-Module ClaudeCodeTask再输入cct)才会生效。
Check the current version first:
Get-Module -Name ClaudeCodeTask -ListAvailable; if the module is already loaded in the session, reopen the terminal after updating (orRemove-Module ClaudeCodeTaskand typecctagain).
或下载本页 Assets 里的 ClaudeCodeTask.zip 手动安装:解压后把 ClaudeCodeTask 文件夹放进 PowerShell 模块目录(Windows 为 $HOME\Documents\PowerShell\Modules),然后:
Or download the ClaudeCodeTask.zip asset on this page and install manually: extract it and put the ClaudeCodeTask folder into your PowerShell module directory (Windows: $HOME\Documents\PowerShell\Modules), then:
Import-Module ClaudeCodeTask -Force
cct -h更多用法见 README 或 cct -h。
More usage details in the README or cct -h.
v0.3.1
v0.3.1
v0.3.1 修复两类「列表不对劲」:
claude -c/--resume续接会话产生的重复卡片不再出现(同一对话链只留最新一张);只剩零碎会话的目录现在直接显示为可进入的会话卡,卡片标题和进入后的会话标题完全一致。另外同步脚本经过一轮加固,各种异常情况都有明确提示。
修复与优化
- 续接分叉不再重复出卡:用
claude -c或--resume继续会话时,Claude Code 会在同一目录生成携带历史的新会话文件。此前祖先会话和续接会话会各自出一张卡(标题、路径都一样);现在同一对话链只显示最新的一个入口,旧卡自动折叠。 - 碎片目录直接可进:目录里只剩多次续接产生的零碎会话(此前因消息数不足而被过滤,只能看到文件夹卡片)时,现在自动把最新的有标题会话升格为会话卡。卡片标题 = 进入后的会话标题,且用精确恢复(
--resume)代替「接续最近」,进入的就是卡片上这个会话。 - 无标题的目录保持原样:没有标题的目录仍按文件夹卡片显示,不受本次调整影响。
- 扫描内核升级(CctScannerV5):为支持上面两项,扫描时额外识别会话之间的续接血缘;扫描缓存格式升级,旧缓存会在下次启动时自动重建,无需手动清理。
- 同步脚本加固(
sync-to-installed.ps1,自装用户):备份先行(备份失败不覆盖任何文件)、单文件被占用不中断整体并在最后汇总提示、覆盖后新开子进程烟测验证「装上即可用」、旧内核驻留的终端自动跳过热切换并说明原因(.NET 程序集无法在进程内替换,新开终端即可)、PowerShell 5.1 下给出明确提示。 - 集中元数据:版本号、仓库地址、发版说明、构建代理收敛到仓库根
build-metadata.json单一文件维护,发版不再多处手改。
安装与使用
推荐从 PowerShell Gallery 安装:
Install-Module -Name ClaudeCodeTask -Scope CurrentUser已有旧版本?更新到最新版:
# 更新到最新版(含 0.3.1)
Update-Module -Name ClaudeCodeTask
# 若上一命令因权限报错,显式指定用户级作用域重试
Update-Module -Name ClaudeCodeTask -Scope CurrentUser -Force更新前先确认当前版本:
Get-Module -Name ClaudeCodeTask -ListAvailable;若模块已在本会话加载,更新后需重开终端(或先Remove-Module ClaudeCodeTask再输入cct)才会生效。
或下载本页 Assets 里的 ClaudeCodeTask.zip 手动安装:解压后把 ClaudeCodeTask 文件夹放进 PowerShell 模块目录(Windows 为 $HOME\Documents\PowerShell\Modules),然后:
Import-Module ClaudeCodeTask -Force
cct -h更多用法见 cct -h。
v0.3.0
v0.3.0
v0.3.0 新增
cct clear清理命令:默认一键清掉 cct 自己的扫描缓存,让下次重启全量重新扫描;加上-cc还能按「会话行数」判定,帮你像手动整理那样删除多余的历史会话——删之前会先打印过滤规则和待删清单,确认后才动手。
新功能
cct clear——清扫描缓存:删除~/.cct/cache.json,下次启动 cct 时全量重建扫描结果。适合觉得列表「卡在旧数据」时用。只动缓存文件,config.json配置不受影响。cct clear -cc——清理多余会话:把「整理历史会话」的手工操作变成一条命令。按每个目录里的会话.jsonl行数近似判断对话次数,每目录保留「行数 ≥ 阈值」里最新的一个,其余会话、被删会话的附属目录(subagents/tool-results/workflows)、孤立目录、以及整目录里会话都太少时连同 memory 一起列入删除。- 先预览后删除:执行前打印三样——过滤规则、将保留的会话、待删清单(类型/路径/理由/大小),最后交互确认
[y/N]才真正删除。 - 非交互环境安全兜底:没有终端(无 TTY)且未加
--yes时,只出预览不删。 --yes:跳过交互确认直接删(CI / 脚本用)。--dry-run:只看预览,不删。--keep <数>:调整每目录保留的最新会话个数(默认 1)。--min <行数>:调整会话有效行数阈值(默认 20)。- 排除路径沿用配置文件里的
excludePathPatterns(如 worktrees / Temp),这些目录不参与判定。
- 先预览后删除:执行前打印三样——过滤规则、将保留的会话、待删清单(类型/路径/理由/大小),最后交互确认
使用示例
cct clear # 清 cct 扫描缓存,下次全量重建
cct clear -cc --dry-run # 预览会删哪些多余会话(不删)
cct clear -cc # 预览 + 确认后删除
cct clear -cc --yes # 跳过确认直接删(脚本用)
cct clear -cc --keep 3 # 每目录多留几个最新会话安装与使用
推荐从 PowerShell Gallery 安装:
Install-Module -Name ClaudeCodeTask -Scope CurrentUser已有旧版本?更新到最新版:
# 更新到最新版(含 0.3.0)
Update-Module -Name ClaudeCodeTask
# 若上一命令因权限报错,显式指定用户级作用域重试
Update-Module -Name ClaudeCodeTask -Scope CurrentUser -Force更新前先确认当前版本:
Get-Module -Name ClaudeCodeTask -ListAvailable;若模块已在本会话加载,更新后需重开终端(或先Remove-Module ClaudeCodeTask再输入cct)才会生效。
或下载本页 Assets 里的 ClaudeCodeTask.zip 手动安装:解压后把 ClaudeCodeTask 文件夹放进 PowerShell 模块目录(Windows 为 $HOME\Documents\PowerShell\Modules),然后:
Import-Module ClaudeCodeTask -Force
cct -h更多用法见 cct clear -h。
v0.2.1
v0.2.1
v0.2.1 修好了「装完跑不起来」的问题——从 PowerShell Gallery 或本页 zip 安装后,现在直接能
cct启动;同时列表不再把同名历史会话藏起来,你保存过的每个真实会话都能找到、都能进。
修复与优化
- 安装即用:上一版从 Gallery 安装后启动报错、zip 解压也不能用,根因是内核动态库没有随模块一起打包。本版把内核打进模块包,安装后直接可用,不再需要额外拷贝或手工放置文件。
- 同名会话不再被隐藏:多个同名(同标题)的历史会话此前只留最新一条,旧的同名会话在列表里看不到、也进不去;现在全部各自列出,靠最近活动时间区分,逐个可进。
- 列表更干净:某个文件夹里已有可恢复的会话时,该文件夹不再单独占一行(由会话条目直接代表),文件夹只出现在没有可恢复会话的纯目录下。
安装与使用
从 0.2.0 起模块名统一为 ClaudeCodeTask(此前为 ClaudeCodeTask.UI),Gallery 包名与源码文件名均以此为准。
推荐从 PowerShell Gallery 安装:
Install-Module -Name ClaudeCodeTask -Scope CurrentUser或下载本页 Assets 里的 ClaudeCodeTask.zip 手动安装:解压后把 ClaudeCodeTask 文件夹放进 PowerShell 模块目录(Windows 为 $HOME\Documents\PowerShell\Modules),然后:
Import-Module ClaudeCodeTask -Force
cct更多用法见 cct -h。
v0.2.0
v0.2.0
v0.2.0 让你像用普通命令行工具一样用 cct——不用进全屏界面,也能在熟悉的终端里把会话列出来、查出来、直接跑起来。
新功能
- 指令式用法:
cct list列出会话、cct find <词>查找、cct run <词>直接启动;想「把上次那个调优的会话跑起来」,一条命令就够。 - 按会话 ID 精准进入:
cct run -i <会话ID>直达指定会话,关键词撞车也不怕;配--dry-run可先演练看要执行的命令。 - 列表更聚焦:默认只列真实会话,文件夹不再单独占一行(需要时可用配置文件恢复)。
- 标题来源可辨:输出能看出会话名是你手动命名的,还是 AI 自动生成的。
- 版本信息更全:
cct -v显示版本号 + 项目地址。
修复与优化
- 进入会话时转圈动画在 claude 真正接管后立即停止,不再空转。
- 内核(C#)+ 外壳(PowerShell)分层重构,配 Pester 单测,整体更稳。
安装与使用
从 0.2.0 起模块名统一为 ClaudeCodeTask(此前为
ClaudeCodeTask.UI),Gallery 包名与源码文件名均以此为准。
推荐从 PowerShell Gallery 安装:
Install-Module -Name ClaudeCodeTask -Scope CurrentUser或下载本页 Assets 里的 ClaudeCodeTask.zip 手动安装:解压后把 ClaudeCodeTask 文件夹放进 PowerShell 模块目录(Windows 为 $HOME\Documents\PowerShell\Modules),然后:
Import-Module ClaudeCodeTask -Force
cct更多用法见 cct -h。
ClaudeCodeTask v0.1.0
ClaudeCodeTask v0.1.0
一条命令列出所有 Claude Code 任务文件夹与历史会话,全屏卡片网格选择器,选中自动 cd 并启动 claude。
命令为 cct,模块/包名为 ClaudeCodeTask。
安装(从 PowerShell Gallery)
Install-Module -Name ClaudeCodeTask -Scope CurrentUser