mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-22 00:45:12 -10:00
Allow model configuration and existing plugin catalog transforms to select the provider compaction strategy. Keep summary compaction as the default. For opted-in models, replace text-only model context with the complete native replacement window using the existing AI compact API. Persist the replacement in the normal checkpoint lifecycle, derive a readable UI and model-switch fallback from the compacted context, bind replay to catalog and runtime identities, and omit opaque payloads from sanitized exports. Preserve existing manual, automatic, and overflow scheduling. Verified focused compaction/replay, configuration, fork/revert, export, client, and AI regression checks; Core, Schema, Protocol, Plugin, Server, and Client typechecks; regenerated clients; and a live synthetic compact/persist/replay/recall flow through the changed Core service. A 350k-token workload was not stress-tested.