diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 87b8350..ace175a 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -206,6 +206,17 @@ fn parse_loose_end_kind(raw: &str) -> Result &'static str { + match kind { + hive_sh4re::CancelLooseEndKind::Question => "question", + hive_sh4re::CancelLooseEndKind::Reminder => "reminder", + } +} + /// Format helper for `whoami`: renders the identity block as a short /// human-readable string. Skips fields that are `None` so the output /// doesn't carry dead placeholders. @@ -492,13 +503,13 @@ impl AgentServer { )] async fn cancel_loose_end(&self, Parameters(args): Parameters) -> String { let log = format!("{args:?}"); - let kind_label = args.kind.clone(); let id = args.id; run_tool_envelope("cancel_loose_end", log, async move { let kind = match parse_loose_end_kind(&args.kind) { Ok(k) => k, Err(e) => return e, }; + let kind_label = loose_end_kind_label(kind); let (resp, retries) = self .dispatch(hive_sh4re::AgentRequest::CancelLooseEnd { kind, id }) .await; @@ -1032,13 +1043,13 @@ impl ManagerServer { )] async fn cancel_loose_end(&self, Parameters(args): Parameters) -> String { let log = format!("{args:?}"); - let kind_label = args.kind.clone(); let id = args.id; run_tool_envelope("cancel_loose_end", log, async move { let kind = match parse_loose_end_kind(&args.kind) { Ok(k) => k, Err(e) => return e, }; + let kind_label = loose_end_kind_label(kind); let (resp, retries) = self .dispatch(hive_sh4re::ManagerRequest::CancelLooseEnd { kind, id }) .await;