mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: add metric for per-turn tool count and add tmp_mem flag (#13456)
This commit is contained in:
committed by
GitHub
Unverified
parent
bda3c49dc4
commit
e07eaff0d3
@@ -118,6 +118,14 @@ impl ToolRegistry {
|
||||
let mcp_server_ref = mcp_server.as_deref();
|
||||
let mcp_server_origin_ref = mcp_server_origin.as_deref();
|
||||
|
||||
{
|
||||
let mut active = invocation.session.active_turn.lock().await;
|
||||
if let Some(active_turn) = active.as_mut() {
|
||||
let mut turn_state = active_turn.turn_state.lock().await;
|
||||
turn_state.tool_calls = turn_state.tool_calls.saturating_add(1);
|
||||
}
|
||||
}
|
||||
|
||||
let handler = match self.handler(tool_name.as_ref()) {
|
||||
Some(handler) => handler,
|
||||
None => {
|
||||
|
||||
Reference in New Issue
Block a user