chore: remove unused push_tool_round_calls and attach_tool_round_results
This commit is contained in:
@@ -546,33 +546,6 @@ impl MitmStore {
|
||||
self.tool_rounds.read().await.clone()
|
||||
}
|
||||
|
||||
/// Push a new tool round from Google's response (calls only, results empty).
|
||||
/// Called by proxy.rs when the MITM intercepts functionCall parts.
|
||||
pub async fn push_tool_round_calls(&self, calls: Vec<CapturedFunctionCall>) {
|
||||
if !calls.is_empty() {
|
||||
self.tool_rounds.write().await.push(ToolRound {
|
||||
calls,
|
||||
results: Vec::new(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Attach tool results to the latest incomplete tool round (one with empty results).
|
||||
/// Called by responses.rs/gemini.rs when the client sends tool results.
|
||||
/// If there's no open round, creates a legacy round with no calls.
|
||||
pub async fn attach_tool_round_results(&self, results: Vec<PendingToolResult>) {
|
||||
let mut rounds = self.tool_rounds.write().await;
|
||||
// Find the last round that has no results yet
|
||||
if let Some(round) = rounds.iter_mut().rev().find(|r| r.results.is_empty()) {
|
||||
round.results = results;
|
||||
} else {
|
||||
// No open round — probably a race or legacy path, create standalone
|
||||
rounds.push(ToolRound {
|
||||
calls: Vec::new(),
|
||||
results,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ── Direct response capture (bypass LS) ──────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user