diff --git a/package.json b/package.json index 8f253842..80438d1b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "codeg", "private": true, - "version": "0.15.9", + "version": "0.15.10", "scripts": { "dev": "next dev --turbopack", "build": "next build", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 7d2eab1e..49ee0e80 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -982,7 +982,7 @@ checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "codeg" -version = "0.15.9" +version = "0.15.10" dependencies = [ "aes-gcm", "agent-client-protocol-schema", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d456296d..b8d4ae5c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "codeg" -version = "0.15.9" +version = "0.15.10" description = "Agent Code Generation App" authors = ["feitao"] edition = "2021" diff --git a/src-tauri/src/commands/session_info.rs b/src-tauri/src/commands/session_info.rs index 31358eb9..c7a17328 100644 --- a/src-tauri/src/commands/session_info.rs +++ b/src-tauri/src/commands/session_info.rs @@ -293,15 +293,16 @@ fn compact_turn(turn: &MessageTurn) -> SessionMessageItem { parts.push(t); } } - ContentBlock::ToolUse { tool_name, .. } => { - // Bound the count per turn and each name's length; dedup on the - // truncated form so the collected `tools` can't exceed - // MAX_TOOLS_PER_TURN * MAX_TOOL_NAME_CHARS. - if tools.len() < MAX_TOOLS_PER_TURN && !tool_name.is_empty() { - let name = truncate_chars(tool_name, MAX_TOOL_NAME_CHARS); - if !tools.contains(&name) { - tools.push(name); - } + // Bound the count per turn and each name's length; dedup on the + // truncated form so the collected `tools` can't exceed + // MAX_TOOLS_PER_TURN * MAX_TOOL_NAME_CHARS. Once the cap is hit the + // guard fails and further ToolUse blocks fall through to `_`. + ContentBlock::ToolUse { tool_name, .. } + if tools.len() < MAX_TOOLS_PER_TURN && !tool_name.is_empty() => + { + let name = truncate_chars(tool_name, MAX_TOOL_NAME_CHARS); + if !tools.contains(&name) { + tools.push(name); } } // Tool results, images, and image-generation carry no useful plain diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 0f7e2ddf..4d7659cc 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "codeg", - "version": "0.15.9", + "version": "0.15.10", "identifier": "app.codeg", "build": { "beforeDevCommand": "pnpm tauri:before-dev",