Function
preserveRecentBudget
(input: { cfg: ConfigV1.Info; model: Provider.Model })
Source from the content-addressed store, hash-verified
| 78 | } |
| 79 | |
| 80 | function preserveRecentBudget(input: { cfg: ConfigV1.Info; model: Provider.Model }) { |
| 81 | return ( |
| 82 | input.cfg.compaction?.preserve_recent_tokens ?? |
| 83 | Math.min(MAX_PRESERVE_RECENT_TOKENS, Math.max(MIN_PRESERVE_RECENT_TOKENS, Math.floor(usable(input) * 0.25))) |
| 84 | ) |
| 85 | } |
| 86 | |
| 87 | function turns(messages: SessionV1.WithParts[]) { |
| 88 | const result: Turn[] = [] |
Tested by
no test coverage detected