Skip to content

feat(engine): manual /compact command and configurable compaction threshold #22

@EngineerProjects

Description

@EngineerProjects

Summary

Context compaction currently runs automatically when the context window
approaches the model limit. Add a /compact slash command so users can
trigger it manually, and expose the threshold as a configurable setting.

Scope

  • /compact slash command in the TUI — triggers compaction immediately
  • nexus config set compaction.threshold 0.8 — set the auto-trigger fraction
  • nexus config set compaction.enabled false — disable auto-compaction
  • Compaction summary displayed in the chat after /compact completes

Acceptance criteria

  • /compact registered in the commands palette and slash-command handler
  • Manual compaction produces the same summary message as auto-compaction
  • compaction.threshold config key accepted and persisted
  • compaction.enabled config key accepted and persisted
  • Docs updated in docs/sdk.md under "Long-context compaction"

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore runtime / engine layerenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions