Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chore(agents): stop advertising /compact on the inmem Macro agent (#6817)
Wolf Mermelsteinb647b88cfa76
diff --git a/crates/agent_inmem/src/domain/agent.rs b/crates/agent_inmem/src/domain/agent.rsindex 5d9db19719..454bff2412 100644--- a/crates/agent_inmem/src/domain/agent.rs+++ b/crates/agent_inmem/src/domain/agent.rs@@ -31,7 +31,7 @@ use agent_client_protocol::schema::v1::{use agent_client_protocol::{Agent, Channel as AcpChannel, Client, ConnectionTo, Error as AcpError,};-use agent_runtime_protocol::domain::action::{COMPACT_COMMAND, MODEL_CONFIG_ID};+use agent_runtime_protocol::domain::action::MODEL_CONFIG_ID;use agent_session::domain::model::AgentSessionId;use ai_tools::user_tool_review::{ReviewError, ReviewFieldKind, ReviewForm, ReviewOutcome, ReviewRequest, UserToolReviewer,@@ -824,15 +824,14 @@ async fn run_ask(}}-/// The slash commands this agent handles itself, as ACP advertises them:-/// bare names, no leading slash. `/ask` only while the host enables-/// development commands, since the prompt handler ignores it otherwise.+/// The slash commands this agent advertises over ACP: bare names, no+/// leading slash. `/compact` is still handled if a client sends it, but it+/// is not listed — dropping history is not a product command for this+/// harness. `/ask` only while the host enables development commands, since+/// the prompt handler ignores it otherwise.fn available_commands(state: &AgentState) -> Vec<AvailableCommand> {let name = |command: &str| command.trim_start_matches('/').to_owned();- let mut commands = vec![AvailableCommand::new(- name(COMPACT_COMMAND),- "Drop the earlier conversation from the model's context",- )];+ let mut commands = Vec::new();if state.enable_dev_commands {commands.push(AvailableCommand::new(diff --git a/crates/agent_inmem/src/domain/agent/test.rs b/crates/agent_inmem/src/domain/agent/test.rsindex f07ba681a4..fa6dbc079a 100644--- a/crates/agent_inmem/src/domain/agent/test.rs+++ b/crates/agent_inmem/src/domain/agent/test.rs@@ -190,13 +190,9 @@ async fn new_session_advertises_its_slash_commands() {.iter().map(|command| command.name.as_str()).collect::<Vec<_>>();- assert_eq!(names, vec!["compact", "ask"]);+ assert_eq!(names, vec!["ask"]);assert!(- advertised.available_commands[0].input.is_none(),- "/compact takes no argument, so the composer sends it as-is"- );- assert!(- advertised.available_commands[1].input.is_some(),+ advertised.available_commands[0].input.is_some(),"/ask carries a hint for its question");}