alexhancock/mcp-crate-cleanup (#4885)

This commit is contained in:
Alex Hancock
2025-09-29 17:00:17 -04:00
committed by GitHub
parent 2bd18a757b
commit cb0eca9966
78 changed files with 1039 additions and 1090 deletions
+2 -2
View File
@@ -151,7 +151,7 @@ impl AsyncTokenCounter {
let tool_call = tool_request.tool_call.as_ref().unwrap();
// Note: separators are tokenized with adjacent tokens, keep original for accuracy
let text = format!(
"{}:{}:{}",
"{}:{}:{:?}",
tool_request.id, tool_call.name, tool_call.arguments
);
num_tokens += self.count_tokens(&text);
@@ -299,7 +299,7 @@ impl TokenCounter {
} else if let Some(tool_request) = content.as_tool_request() {
let tool_call = tool_request.tool_call.as_ref().unwrap();
let text = format!(
"{}:{}:{}",
"{}:{}:{:?}",
tool_request.id, tool_call.name, tool_call.arguments
);
num_tokens += self.count_tokens(&text);