MoonshotAI / MoonshotAI/kimi-cli
[Feature Request] Allow /compact to accept custom summarization instructions
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What feature would you like to see?
Description
- Background: /compact currently uses a fixed prompt, so users cannot steer summarization (e.g., “code only”, “avoid personal info”). Claude Code supports /compact , and we have the same need.
- Problem: Manual /compact calls can’t accept a hint, so the summary may not fit the scenario. Automatic compaction should keep the default behavior.
- Proposal:
- Let /compact accept an optional hint /compact and pass it through to SimpleCompaction.
- In SimpleCompaction, append User instruction: after the default prompts.COMPACT; if no hint is provided, keep current behavior.
- Update help text and add a test covering custom instruction injection.
- Impact: Defaults unchanged; only user-invoked /compact with a hint alters the compaction prompt.
- Validation: Add/adjust tests; manual check with /compact summarize code only to see the summary change.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the /compact command entry point and the SimpleCompaction implementation, then find the existing help text and compaction tests. Add coverage for injecting an optional hint after prompts.COMPACT while preserving the no-hint behavior. Done means /compact accepts a hint, automatic compaction remains unchanged, and the updated help text and tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100