Forked from kosmix/compact
README.md
Type /compact in a chat to export the whole conversation to a file and get a paste-ready seed summary for a fresh chat. The local model's own /compact.
Part of lmstudio-suite.
β οΈ A plugin cannot clear the LM Studio chat. The SDK's
pullHistory()returns a copy β there is no truncate/reset API, and only a prompt preprocessor can read history at all (tools can't). So "compact" here means export + seed, not wipe. Clearing the context is the New Chat button; this plugin hands you a summary to carry across.
Send a message that starts with the trigger (default /compact, optionally followed by a note):
compact-<timestamp>.md (the /compact message itself is excluded).compact-<timestamp>.seed.md.Then open New Chat and paste the summary to continue with less context.
/compact ship notes β [compact] Exported this conversation. - Transcript: β¦/compact-2026-06-21-1432.md - Seed: β¦/compact-2026-06-21-1432.seed.md Summary for the next chat: We were building plugin-compact; chose a preprocessor because tools can't pullHistoryβ¦ next: wire docs + ship.
/compact). Must be the start of the message; /compacting and please /compact do not match..md + .seed.md files. Blank = the plugin's per-prediction working directory.America/Mexico_City) for the filename timestamp. Blank = this machine's timezone./compact; on by default). Turn off for a raw export with no model call.4000) β the token budget for each summarization call. A long conversation is summarized in chunks of this size, then merged. Set it below your model's loaded context length. It can't be auto-detected: LM Studio's SDK reports the model's maximum context, not the window you loaded, so the plugin would over-size and overflow. Default 4000 is safe on essentially any model; raise it toward your context length (e.g. 24000 for a 32k load) for fewer, faster chunks.Recap the story, characters, key choices, and exactly where we left off, as a complete briefing for the writer who picks this up. The conversation is appended automatically.2048) β the seed's room to work: the summary aims to be as complete as the material needs, up to this many output tokens. Raise it for long conversations (a thorough narrated seed can want 2000β4000), lower for terser seeds. Counts reasoning tokens too β if your model "thinks" heavily and seeds come out cut off, raise it. (The default instruction tells the model not to emit reasoning, so output is mostly the seed itself.)pullHistory()./compact, the model still generates a brief reply to the status note β a preprocessor can't suppress the follow-on turn. It's harmless; the useful artifacts are the two files.MIT licensed.