fix: wire session branching, complete JSON output, token budget config#33
Merged
kienbui1995 merged 1 commit intomainfrom Apr 11, 2026
Merged
fix: wire session branching, complete JSON output, token budget config#33kienbui1995 merged 1 commit intomainfrom
kienbui1995 merged 1 commit intomainfrom
Conversation
Session branching: - /fork, /branches, /switch, /branch delete now call BranchManager JSON output: - Added cost, cache_creation_tokens, cache_read_tokens Token budget config: - max_context_window override in [compaction] - strategy: smart|naive in [compaction]
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughBranch command handling now supports subcommands (fork, list, switch, delete) that execute against BranchManager and a locked runtime session. JSON output includes cache tokens and cost estimates. Configuration types extend with compaction context window and strategy options. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Handler
participant Parser as Command Parser
participant BranchMgr as BranchManager
participant Runtime as Runtime Session
CLI->>Parser: receive PendingCommand::Branch(cmd)
Parser->>Parser: parse subcommand (fork/list/switch/delete)
Parser->>Runtime: try_lock()
alt lock successful
alt fork
Parser->>BranchMgr: fork_branch()
BranchMgr-->>Parser: success
else list
Parser->>Runtime: get session.branch_id
Parser->>BranchMgr: list_branches()
BranchMgr-->>Parser: branches with current marker
else switch
Parser->>BranchMgr: switch_branch(id)
BranchMgr-->>Parser: success/failure
else delete
Parser->>BranchMgr: delete_branch(id)
BranchMgr-->>Parser: success/failure
end
Parser-->>CLI: formatted output
else lock failed
Parser-->>CLI: Unknown branch command
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
3 small gaps fixed:
183 tests pass.
Summary by CodeRabbit