name: continue description: 附着最新的上下文传输 Markdown 文件从当前项目的 ./.ccb/history/ 到 Claude,使用 @file。当用户输入 /continue 或要求恢复本项目的最新传输文件时使用。
继续(附着最新历史)
概述
在 ./.ccb/history/(或旧版 ./.ccb_config/history/)中查找最新的 Markdown 文件,并使用 @file 引用回复,以便 Claude 加载它。
工作流程
- 定位当前项目历史文件夹下的最新
.md文件。 - 如果不存在,报告未找到历史文件。
- 回复一行
@<路径>,其他内容不输出。
执行(强制)
latest="$(ls -t "$PWD"/.ccb/history/*.md 2>/dev/null | head -n 1)"
if [[ -z "$latest" ]]; then
latest="$(ls -t "$PWD"/.ccb_config/history/*.md 2>/dev/null | head -n 1)"
fi
if [[ -z "$latest" ]]; then
echo "No history file found in ./.ccb/history."
exit 0
fi
printf '@%s
' "$latest"
输出规则
- 当历史文件存在时:只输出
@<路径>在一行。 - 当不存在时:输出错误消息并停止。
示例
/continue->@/home/bfly/workspace/hippocampus/.ccb/history/claude-20260208-225221-9f236442.md