UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

19 lines • 1.04 kB
export function createPendingModelSwitch(input) { return { ...input, notice: `${input.model.id} needs ${input.projection.shortfallTokens} fewer tokens than this conversation holds. It is compacted on your next message, and the switch applies after that.`, }; } /** * The keep-recent size the PENDING model's window is designed around, recovered * from the projection's own post-compaction geometry. The deferred compaction * aims here while the summary request is still issued by the model that can hold * the transcript today, so geometry and summarizer come from different models on * purpose: aiming at the current model's geometry, or merely at whatever still * fits, leaves no room for the summary the compaction is about to add. */ export function pendingSwitchKeepRecentTokens(projection) { const overheadTokens = projection.requiredTokens - projection.liveContextTokens; return Math.max(1, projection.postCompactionRequiredTokens - overheadTokens); } //# sourceMappingURL=switch-admission.js.map