Skip to content

Add auto_compact_enabled setting and /autocompact command#44

Merged
PTFOPlayer merged 1 commit into
masterfrom
feat/auto-compact-toggle
Jun 30, 2026
Merged

Add auto_compact_enabled setting and /autocompact command#44
PTFOPlayer merged 1 commit into
masterfrom
feat/auto-compact-toggle

Conversation

@PTFOPlayer

Copy link
Copy Markdown
Owner

Add a boolean setting 'auto_compact_enabled' (default: true) that controls whether the auto_compact tool is registered with the provider. When disabled, the model never sees auto_compact as an available tool.

  • New /autocompact [on|off] slash command to toggle at runtime
  • Supported in global settings and per-project config
  • Shown in /settings, /project-settings, and /debug output
  • Project override takes precedence over global setting

Add a boolean setting 'auto_compact_enabled' (default: true) that
controls whether the auto_compact tool is registered with the provider.
When disabled, the model never sees auto_compact as an available tool.

- New /autocompact [on|off] slash command to toggle at runtime
- Supported in global settings and per-project config
- Shown in /settings, /project-settings, and /debug output
- Project override takes precedence over global setting
Copilot AI review requested due to automatic review settings June 30, 2026 11:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new auto_compact_enabled configuration flag (default true) to control whether the auto_compact tool is exposed to the model, plus a /autocompact slash command to view/toggle the setting at runtime. This fits into TinyHarness’s existing settings + per-project override model and tool-registration pipeline.

Changes:

  • Introduces Settings.auto_compact_enabled and ProjectSettings.auto_compact_enabled, merged into MergedSettings.
  • Filters the tool list sent to the provider to exclude auto_compact when disabled.
  • Adds /autocompact command and surfaces the setting in /settings, /project-settings, and /debug.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tinyharness-lib/src/tools/mod.rs Adds filtering so auto_compact can be omitted from advertised tools based on settings.
tinyharness-lib/src/config/mod.rs Adds the new setting to global/project structs and merge logic.
src/commands/settings.rs Displays global auto-compact status in /settings.
src/commands/project_settings.rs Displays merged auto-compact status in /project-settings and updates init template comments.
src/commands/mod.rs Registers /autocompact and its subcommands.
src/commands/debug.rs Includes auto-compact status in debug dump output.
src/commands/config_settings.rs Implements /autocompact global setting toggle.
src/agent/tui_loop.rs Uses merged settings when building tool list per provider call (TUI path).
src/agent/mod.rs Uses merged settings when building tool list per provider call (non-TUI path).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/agent/mod.rs
Comment thread src/agent/tui_loop.rs
Comment thread src/commands/config_settings.rs
Comment thread src/commands/config_settings.rs
Comment thread tinyharness-lib/src/config/mod.rs
Comment thread tinyharness-lib/src/config/mod.rs
@PTFOPlayer PTFOPlayer merged commit 9734858 into master Jun 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants