Commit eeaab6f
🤖 feat: add mode="compact" for /compact operations (#200)
Enables users to customize AI compaction behavior via instruction files.
## What Changed
**Backend accepts mode as string** - No hardcoded mode restrictions,
allowing future flexibility without backend changes.
**Frontend sends mode="compact"** - When users run `/compact`, the
system now passes `mode: "compact"` to include mode-specific
instructions from AGENTS.md.
**Documentation** - Added example `Mode: Compact` section showing how
users can customize what information is preserved during automatic
conversation history compaction.
## Example Usage
Add to `~/.cmux/AGENTS.md` or `<workspace>/AGENTS.md`:
```markdown
## Mode: Compact
When compacting conversation history:
- Preserve key decisions and their rationale
- Keep code snippets that are still relevant
- Maintain context about ongoing tasks
- Be extremely concise—prioritize information density
```
When the user runs `/compact`, the AI will receive these additional
instructions and follow them during summarization.
## Technical Notes
- Backend now accepts `mode?: string` for flexibility
- Frontend uses type-safe literal: `mode: "compact" as const`
- Available modes: exec, plan, compact (extensible without backend
changes)
_Generated with `cmux`_
Co-authored-by: Ammar Bandukwala <ammar@ammar.io>1 parent 716637e commit eeaab6f
File tree
4 files changed
+21
-3
lines changed- docs
- src
- components
- services
- types
4 files changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments