Skip to content

Commit a009494

Browse files
committed
feat: add blocks tool when requesting netdata conversation completion from workers
1 parent 1a0de9a commit a009494

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src-tauri/src/mcp/tools/netdata.rs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use std::sync::{Arc, Mutex};
2121

2222
use serde::Deserialize;
2323

24-
use crate::api::netdata::{ChatCompletionRequest, NetdataApi};
24+
use crate::api::netdata::{ChatCompletionRequest, ChatTool, NetdataApi};
2525

2626
use super::ToolError;
2727

@@ -210,9 +210,13 @@ impl NetdataQueryTool {
210210

211211
// 4. Send message via chat completion (SSE streaming, wait for completion)
212212
// Prefix with [@clai] so the UI can distinguish worker queries from user messages
213+
// Include "blocks" tool to enable rich visualizations in the stored conversation
213214
let request = ChatCompletionRequest {
214215
message: format!("[@clai] {}", query),
215-
tools: vec![], // Use default tools
216+
tools: vec![ChatTool {
217+
name: "blocks".to_string(),
218+
version: 0,
219+
}],
216220
parent_message_id,
217221
};
218222

0 commit comments

Comments
 (0)