fix: harden antigravity claude support (#968)
Co-authored-by: Max <rdev@users.noreply.github.com>
This commit is contained in:
@@ -62,9 +62,9 @@ export function downgradeGeminiThinkingBlocks(messages: AgentMessage[]): AgentMe
|
||||
if (!block || typeof block !== "object") return [block as AssistantContentBlock];
|
||||
const record = block as GeminiThinkingBlock;
|
||||
if (record.type !== "thinking") return [block];
|
||||
const signature =
|
||||
const thinkingSig =
|
||||
typeof record.thinkingSignature === "string" ? record.thinkingSignature.trim() : "";
|
||||
if (signature.length > 0) return [block];
|
||||
if (thinkingSig.length > 0) return [block];
|
||||
const thinking = typeof record.thinking === "string" ? record.thinking : "";
|
||||
const trimmed = thinking.trim();
|
||||
hasDowngraded = true;
|
||||
|
||||
@@ -90,6 +90,7 @@ export async function sanitizeSessionMessagesImages(
|
||||
if (rec.type !== "text" || typeof rec.text !== "string") return true;
|
||||
return rec.text.trim().length > 0;
|
||||
});
|
||||
|
||||
const normalizedContent = options?.enforceToolCallLast
|
||||
? (() => {
|
||||
let lastToolIndex = -1;
|
||||
|
||||
Reference in New Issue
Block a user