fix: Normalize Bash tool args and add signature caching support

Normalize Bash tool arguments by converting a "command" key into "cmd" using JSON-aware parsing, avoiding brittle string replacements that could corrupt values. Apply this conversion in both streaming and non-streaming response paths so bash-style tool calls are emitted with the expected "cmd" field.

Add support for accumulating thinking text and carrying session identifiers to enable signature caching/restore for unsigned thinking blocks, improving handling of thinking-state continuity across requests/responses.

Also perform small cleanups: import logging, tidy comments and test descriptions. These changes make tool-argument handling more robust and enable reliable signature restoration for thinking blocks.
This commit is contained in:
이대희
2025-12-19 11:12:16 +09:00
parent 98fa2a1597
commit c1f8211acb
5 changed files with 53 additions and 12 deletions

View File

@@ -631,7 +631,7 @@ func compareJSON(t *testing.T, expectedJSON, actualJSON string) {
}
// ============================================================================
// P0-1: Empty Schema Placeholder Tests
// Empty Schema Placeholder Tests
// ============================================================================
func TestCleanJSONSchemaForAntigravity_EmptySchemaPlaceholder(t *testing.T) {
@@ -732,7 +732,7 @@ func TestCleanJSONSchemaForAntigravity_EmptySchemaWithDescription(t *testing.T)
}
// ============================================================================
// P0-2: Format field handling (ad-hoc patch removal)
// Format field handling (ad-hoc patch removal)
// ============================================================================
func TestCleanJSONSchemaForAntigravity_FormatFieldRemoval(t *testing.T) {