mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 04:02:21 +00:00
Improve before_compact hook: add messagesToKeep, replace apiKey with resolveApiKey
This commit is contained in:
parent
e4283294c8
commit
d9a542763a
8 changed files with 51 additions and 24 deletions
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
### Added
|
||||
|
||||
- **Compaction hook `resolveApiKey`**: The `before_compact` session event now includes `resolveApiKey` function to resolve API keys for any model (checks settings, OAuth, env vars). Useful for hooks that need to call different models during custom compaction.
|
||||
- **Compaction hook improvements**: The `before_compact` session event now includes:
|
||||
- `messagesToKeep`: Messages that will be kept after the summary (recent turns), in addition to `messagesToSummarize`
|
||||
- `resolveApiKey`: Function to resolve API keys for any model (checks settings, OAuth, env vars)
|
||||
- Removed `apiKey` string in favor of `resolveApiKey` for more flexibility
|
||||
|
||||
## [0.27.5] - 2025-12-24
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue