Breaking
- Session hooks API redesign: Merged
branchevent intosessionevent.BranchEvent,BranchEventResulttypes andpi.on("branch", ...)removed. Usepi.on("session", ...)withreason: "before_branch" | "branch"instead.AgentSession.branch()returns{ cancelled }instead of{ skipped }.AgentSession.reset()andswitchSession()now returnboolean(false if cancelled by hook). RPC commandsreset,switch_session, andbranchnow includecancelledin response data. (#278)
Added
- Session lifecycle hooks: Added
before_*variants (before_switch,before_clear,before_branch) that fire before actions and can be cancelled with{ cancel: true }. Addedshutdownreason for graceful exit handling. (#278)
Fixed
-
File tab completion display: File paths no longer get cut off early. Folders now show trailing
/and removed redundant "directory"/"file" labels to maximize horizontal space. (#280) -
Bash tool visual line truncation: Fixed bash tool output in collapsed mode to use visual line counting (accounting for line wrapping) instead of logical line counting. Now consistent with bash-execution.ts behavior. Extracted shared
truncateToVisualLinesutility. (#275)