mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
a392d3e572
Extensions can now register an OnContextPrepare handler that fires after the context window is built from the session tree and before messages are sent to the LLM. Handlers receive ContextMessage entries with positional indices and can filter, reorder, or inject messages. Original messages referenced by index preserve tool calls, reasoning, and other complex parts. New context-inject example extension demonstrates injecting a local .kit/context.md file as an ephemeral system message every turn.