Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "dx",
"source": "./",
"description": "Developer experience essentials: GitHub Actions debugging, conversation cloning/half-cloning, context handoffs, and Reddit research via Gemini CLI",
"version": "0.14.12"
"version": "0.14.13"
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dx",
"description": "Developer experience essentials: GitHub Actions debugging, conversation cloning/half-cloning, context handoffs, and Reddit research via Gemini CLI",
"version": "0.14.12",
"version": "0.14.13",
"author": {
"name": "YK",
"email": "yoyoyosss@wearehackerone.com"
Expand Down
26 changes: 26 additions & 0 deletions scripts/clone-conversation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,32 @@ clone_conversation() {
# Touch the file to ensure it appears at the top of claude -r
touch "$target_file"

# Override session title so resumed cloned session shows the [CLONED ...] tag.
# Claude Code 2.1.x stores titles as custom-title/agent-name records in the
# jsonl; it reads the LAST occurrence to determine the resumed session's name.
# The awk pass copies source records (with rewritten sessionId) but leaves the
# customTitle string alone — without this, cloned session inherits source's
# title (e.g. "career-reset-strategy") instead of the [CLONED ...] prefix.
local original_title
original_title=$(grep '"type":"custom-title"' "$source_file" 2>/dev/null | tail -1 | \
grep -oE '"customTitle":"[^"]*"' | head -1 | \
sed 's/"customTitle":"//;s/"$//' || true)

local clone_title
if [ -n "$original_title" ]; then
clone_title="${clone_tag} ${original_title}"
else
clone_title="${clone_tag}"
fi

# JSON-escape (backslash first, then double-quote)
local clone_title_esc
clone_title_esc=$(printf '%s' "$clone_title" | sed 's/\\/\\\\/g; s/"/\\"/g')

echo "{\"type\":\"custom-title\",\"customTitle\":\"${clone_title_esc}\",\"sessionId\":\"${new_session}\"}" >> "$target_file"
echo "{\"type\":\"agent-name\",\"agentName\":\"${clone_title_esc}\",\"sessionId\":\"${new_session}\"}" >> "$target_file"
log_info "Set session title: ${clone_title}"

# Update history.jsonl
log_info "Updating history file..."

Expand Down
26 changes: 26 additions & 0 deletions scripts/half-clone-conversation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,32 @@ half_clone_conversation() {
# Touch the file to ensure it appears at the top of claude -r
touch "$target_file"

# Override session title so resumed half-cloned session shows the [HALF-CLONE ...] tag.
# Claude Code 2.1.x stores titles as custom-title/agent-name records in the
# jsonl; it reads the LAST occurrence to determine the resumed session's name.
# The awk pass copies source records (with rewritten sessionId) but leaves the
# customTitle string alone — without this, half-cloned session inherits source's
# title instead of the [HALF-CLONE ...] prefix.
local original_title
original_title=$(grep '"type":"custom-title"' "$source_file" 2>/dev/null | tail -1 | \
grep -oE '"customTitle":"[^"]*"' | head -1 | \
sed 's/"customTitle":"//;s/"$//' || true)

local clone_title
if [ -n "$original_title" ]; then
clone_title="${clone_tag} ${original_title}"
else
clone_title="${clone_tag}"
fi

# JSON-escape (backslash first, then double-quote)
local clone_title_esc
clone_title_esc=$(printf '%s' "$clone_title" | sed 's/\\/\\\\/g; s/"/\\"/g')

echo "{\"type\":\"custom-title\",\"customTitle\":\"${clone_title_esc}\",\"sessionId\":\"${new_session}\"}" >> "$target_file"
echo "{\"type\":\"agent-name\",\"agentName\":\"${clone_title_esc}\",\"sessionId\":\"${new_session}\"}" >> "$target_file"
log_info "Set session title: ${clone_title}"

# Update history.jsonl
log_info "Updating history file..."

Expand Down