Skip to content

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

@zlb22

Description

@zlb22

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions