From 2558d6dae1ddf44c9caf9cc8523929a6c5562bb9 Mon Sep 17 00:00:00 2001 From: xiaoxixi Date: Wed, 17 Jun 2026 22:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=B0=83=E6=95=B4=E6=96=AD=E8=A8=80=E5=92=8C?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=85=B1=E4=BA=AB=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agent/agent_loop.rs | 8 ++++++-- src/channels/feishu.rs | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/agent/agent_loop.rs b/src/agent/agent_loop.rs index b470a27..9a3726a 100644 --- a/src/agent/agent_loop.rs +++ b/src/agent/agent_loop.rs @@ -874,8 +874,12 @@ mod tests { ®istry, ); - assert!(matches!(blocks.first(), Some(ContentBlock::Text { text }) if text == "先看这段文字")); - assert!(matches!(blocks.get(1), Some(ContentBlock::Text { text }) if text.contains("用户发来了一个文件"))); + assert!( + matches!(blocks.first(), Some(ContentBlock::Text { text }) if text == "先看这段文字") + ); + assert!( + matches!(blocks.get(1), Some(ContentBlock::Text { text }) if text.contains("用户发来了一个文件")) + ); } } diff --git a/src/channels/feishu.rs b/src/channels/feishu.rs index 0eeda51..e05eac0 100644 --- a/src/channels/feishu.rs +++ b/src/channels/feishu.rs @@ -1125,7 +1125,10 @@ impl FeishuChannel { .get("event_key") .and_then(|v| v.as_str()) .unwrap_or("unknown"); - (format!("[shared calendar event: {}]", event_key), Vec::new()) + ( + format!("[shared calendar event: {}]", event_key), + Vec::new(), + ) } else { ("[shared calendar event]".to_string(), Vec::new()) }