Memory and Context Management Architecture
Overview
The context management system prevents token overflow while preserving critical information. It intelligently trims conversation history using multiple strategies based on token costs.
The Engine: Context Trimming
File: src/server/repositories/engine/engine.ts:201