pi-mono/packages/coding-agent/src
Mario Zechner ddda8b124c refactor(coding-agent): fix compaction for branched sessions, consolidate hook context types
Compaction API:
- prepareCompaction() now takes (pathEntries, settings) only
- CompactionPreparation restructured: removed cutPoint/messagesToKeep/boundaryStart, added turnPrefixMessages/isSplitTurn/previousSummary/fileOps/settings
- compact() now takes (preparation, model, apiKey, customInstructions?, signal?)
- Fixed token overflow by using getPath() instead of getEntries()

Hook types:
- HookEventContext renamed to HookContext
- HookCommandContext removed, RegisteredCommand.handler takes (args, ctx)
- HookContext now includes model field
- SessionBeforeCompactEvent: removed previousCompactions/model, added branchEntries
- SessionBeforeTreeEvent: removed model (use ctx.model)
- HookRunner.initialize() added for modes to set up callbacks
2025-12-31 02:24:24 +01:00
..
cli WIP: Major cleanup - move Attachment to consumers, simplify agent API 2025-12-30 22:42:20 +01:00
core refactor(coding-agent): fix compaction for branched sessions, consolidate hook context types 2025-12-31 02:24:24 +01:00
modes Hide model_change and thinking_level_change in tree selector default view 2025-12-30 22:42:25 +01:00
utils refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
cli.ts Remove old implementation files (main.ts, cli.ts, tui-renderer.ts), rename new files 2025-12-09 01:21:28 +01:00
config.ts Refactor OAuth/API key handling: AuthStorage and ModelRegistry 2025-12-25 03:48:36 +01:00
index.ts Add ReadonlySessionManager and refactor branch summarization 2025-12-30 22:42:23 +01:00
main.ts refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
migrations.ts Add automatic session migration for v0.30.0 bug 2025-12-26 03:24:49 +01:00