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.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.