mirror of
https://github.com/Donchitos/Claude-Code-Game-Studios.git
synced 2026-06-27 04:51:46 +00:00
Fix: session-start preview shows most recent state instead of oldest (#43)
Replace head with tail so the quick summary surfaces the last 20 lines of active.md — where all skills append their session extracts — rather than the first 20 lines which grow stale as the file accumulates history. Fixes #39 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,8 +62,8 @@ if [ -f "$STATE_FILE" ]; then
|
|||||||
echo "A previous session left state at: $STATE_FILE"
|
echo "A previous session left state at: $STATE_FILE"
|
||||||
echo "Read this file to recover context and continue where you left off."
|
echo "Read this file to recover context and continue where you left off."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Quick summary:"
|
echo "Quick summary (last 20 lines):"
|
||||||
head -20 "$STATE_FILE" 2>/dev/null
|
tail -20 "$STATE_FILE" 2>/dev/null
|
||||||
TOTAL_LINES=$(wc -l < "$STATE_FILE" 2>/dev/null)
|
TOTAL_LINES=$(wc -l < "$STATE_FILE" 2>/dev/null)
|
||||||
if [ "$TOTAL_LINES" -gt 20 ]; then
|
if [ "$TOTAL_LINES" -gt 20 ]; then
|
||||||
echo " ... ($TOTAL_LINES total lines — read the full file to continue)"
|
echo " ... ($TOTAL_LINES total lines — read the full file to continue)"
|
||||||
|
|||||||
Reference in New Issue
Block a user