| @@ -41,7 +41,6 @@ type Params struct { · 40 unmodified lines |
| 41 | HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output | 41 | HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output |
| 42 | | 42 | |
| 43 | // Signature caching support | 43 | // Signature caching support |
| 44 | SessionID string // Session ID derived from request for signature caching | | |
| 45 | CurrentThinkingText strings.Builder // Accumulates thinking text for signature caching | 44 | CurrentThinkingText strings.Builder // Accumulates thinking text for signature caching |
| 46 | } | 45 | } |
| 47 | | 46 | |
| @@ -138,7 +137,7 @@ func ConvertAntigravityResponseToClaude(_ context.Context, _ string, originalReq · 90 unmodified lines |
| 138 | if thoughtSignature := partResult.Get("thoughtSignature"); thoughtSignature.Exists() && thoughtSignature.String() != "" { | 137 | if thoughtSignature := partResult.Get("thoughtSignature"); thoughtSignature.Exists() && thoughtSignature.String() != "" { |
| 139 | // log.Debug("Branch: signature_delta") | 138 | // log.Debug("Branch: signature_delta") |
| 140 | | 139 | |
| 141 | if params.SessionID != "" && params.CurrentThinkingText.Len() > 0 { | 140 | if params.CurrentThinkingText.Len() > 0 { |
| 142 | cache.CacheSignature(modelName, params.CurrentThinkingText.String(), thoughtSignature.String()) | 141 | cache.CacheSignature(modelName, params.CurrentThinkingText.String(), thoughtSignature.String()) |
| 143 | // log.Debugf("Cached signature for thinking block (sessionID=%s, textLen=%d)", params.SessionID, params.CurrentThinkingText.Len()) | 142 | // log.Debugf("Cached signature for thinking block (sessionID=%s, textLen=%d)", params.SessionID, params.CurrentThinkingText.Len()) |
| 144 | params.CurrentThinkingText.Reset() | 143 | params.CurrentThinkingText.Reset() |