Skip to content

Commit 412d7d3

Browse files
MrFlounderclaude
andcommitted
feat(court,review): allow starting fresh when session already exists
When a court or review session already exists and the user declines to resume, offer a "Start fresh?" prompt that deletes the existing session and continues with a new one instead of just exiting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3b2e01b commit 412d7d3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/crabcode

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8448,7 +8448,12 @@ review_quick() {
84488448
session_resume "$name"
84498449
return
84508450
fi
8451-
return 1
8451+
read -p "Start fresh? (deletes existing session) [Y/n] " fresh
8452+
if [[ "$fresh" =~ ^[Nn]$ ]]; then
8453+
return 1
8454+
fi
8455+
rm -rf "$sessions_dir/$name"
8456+
echo -e "${GREEN}Deleted existing session. Starting fresh...${NC}"
84528457
fi
84538458

84548459
# Fetch PR data
@@ -8567,7 +8572,12 @@ review_court() {
85678572
session_resume "$name"
85688573
return
85698574
fi
8570-
return 1
8575+
read -p "Start fresh? (deletes existing session) [Y/n] " fresh
8576+
if [[ "$fresh" =~ ^[Nn]$ ]]; then
8577+
return 1
8578+
fi
8579+
rm -rf "$sessions_dir/$name"
8580+
echo -e "${GREEN}Deleted existing session. Starting fresh...${NC}"
85718581
fi
85728582

85738583
# Show the court intro while fetching

0 commit comments

Comments
 (0)