mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
dont show tool messages unless marked for user or no audience marked
This commit is contained in:
@@ -74,6 +74,11 @@ impl MessagePopup {
|
||||
lines.push("Tool Output:".to_string());
|
||||
if let Ok(contents) = &resp.tool_result {
|
||||
for content in contents {
|
||||
if let Some(audience) = content.audience() {
|
||||
if !audience.contains(&rmcp::model::Role::User) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if let rmcp::model::Content {
|
||||
raw: rmcp::model::RawContent::Text(text_content),
|
||||
..
|
||||
@@ -139,6 +144,11 @@ impl MessagePopup {
|
||||
)));
|
||||
if let Ok(contents) = &resp.tool_result {
|
||||
for content in contents {
|
||||
if let Some(audience) = content.audience() {
|
||||
if !audience.contains(&rmcp::model::Role::User) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if let rmcp::model::Content {
|
||||
raw: rmcp::model::RawContent::Text(text_content),
|
||||
..
|
||||
|
||||
Reference in New Issue
Block a user