MoonshotAI / MoonshotAI/kimi-cli

[Feature Request] Allow /compact to accept custom summarization instructions

Open
#544 0 comments 1 reaction 0 assignees View on GitHub

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:
    1. Let /compact accept an optional hint /compact and pass it through to SimpleCompaction.
    2. In SimpleCompaction, append User instruction: after the default prompts.COMPACT; if no hint is provided, keep current behavior.
    3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.