feat(v1.0.0): fork-on-delete + heatmap + true token counts#4
Merged
Conversation
Major rewrite. Every `delete` now produces a NEW session file with a fresh UUID instead of mutating the source. Output prints a `claude --resume <new-id>` command. The new id forces a fresh prefix- cache slot in Claude Code, so /context immediately reflects the smaller size — no stale cache. - delete: forks instead of mutating; output adds new_session_id, new_path, resume_command. Source file is never touched. - heatmap: new subcommand. Ranks conversational turns by true token count (tiktoken on whole JSONL line — text + tool args + tool stdout + metadata). Drop the heaviest first. - info / show: token counts now reflect wire size (typically 2-3x the old text-only estimate). - list / search: forked files are tagged with a cc-session-fork sentinel line and surface as is_fork=true with an [edited] title prefix. - Removed: --force flag, lsof concurrent-open detection, .bak backup, restore subcommand. None are needed when the source is never mutated. - AGENTS.md: agent guide moved out of source into a real markdown file at the repo root. `cc-session agent-guide` reads it via include_str! so GitHub renders it natively and the binary stays self-contained. - v1.0.0 bump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major rewrite. Every
deletenow writes a NEW session file with a fresh UUID and prints aclaude --resume <new-id>command. Source file is never touched. New session id forces a fresh prefix-cache slot in Claude Code, so /context immediately reflects the smaller size — no stale cache.What changed
deleteproducesnew_session_id,new_path,resume_command. No more in-place mutation.cc-session heatmap <id>ranks conversational turns by true token count (tiktoken on whole JSONL line: text + tool args + tool stdout + metadata).info/showtoken numbers now reflect wire size (typically 2-3x the old text-only estimate).is_fork=truewith an[edited]title prefix.include_str!. GitHub renders natively; binary stays self-contained.Removed
--forceflag, lsof concurrent-open detection,.bakbackup,restoresubcommand. None are needed when the source is never mutated.Verified