mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
fix(acp): align salvaged /compact wording and test with current /compress command name
Main renamed the ACP slash command from /compact to /compress after #63630 was written; update the salvaged status line, comment, and behavioral test to dispatch the command that actually exists.
This commit is contained in:
parent
a007ac55c6
commit
7580bc66d5
2 changed files with 5 additions and 5 deletions
|
|
@ -2023,7 +2023,7 @@ class HermesACPAgent(acp.Agent):
|
|||
if getattr(agent, "compression_enabled", True) is False:
|
||||
lines.append(
|
||||
"Auto-compaction is disabled (compression.enabled: false); "
|
||||
"/compact still compresses manually."
|
||||
"/compress still compresses manually."
|
||||
)
|
||||
else:
|
||||
lines.append("Tip: run /compress to compress manually before the threshold.")
|
||||
|
|
@ -2052,7 +2052,7 @@ class HermesACPAgent(acp.Agent):
|
|||
try:
|
||||
agent = state.agent
|
||||
# No compression_enabled gate: the flag disables *automatic*
|
||||
# compaction only; manual /compact must keep working (matches
|
||||
# compaction only; manual /compress must keep working (matches
|
||||
# the CLI /compress and gateway handlers).
|
||||
if not hasattr(agent, "_compress_context"):
|
||||
return "Context compression not available for this agent."
|
||||
|
|
|
|||
|
|
@ -1761,9 +1761,9 @@ class TestSlashCommands:
|
|||
)
|
||||
mock_save.assert_called_once_with(state.session_id)
|
||||
|
||||
def test_compact_works_when_auto_compaction_disabled(self, agent, mock_manager):
|
||||
def test_compress_works_when_auto_compaction_disabled(self, agent, mock_manager):
|
||||
"""compression.enabled: false disables *automatic* compaction only —
|
||||
manual /compact must still compress (matches CLI /compress and the
|
||||
manual /compress must still compress (matches CLI /compress and the
|
||||
gateway handler)."""
|
||||
state = self._make_state(mock_manager)
|
||||
state.history = [
|
||||
|
|
@ -1787,7 +1787,7 @@ class TestSlashCommands:
|
|||
side_effect=[40, 12],
|
||||
),
|
||||
):
|
||||
result = agent._handle_slash_command("/compact", state)
|
||||
result = agent._handle_slash_command("/compress", state)
|
||||
|
||||
assert "disabled" not in result.lower()
|
||||
assert "Context compressed: 4 -> 1 messages" in result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue