修复工具未定义调用报错
Browse files
src/utils/converters/claude.js
CHANGED
|
@@ -71,7 +71,7 @@ function handleClaudeAssistantMessage(message, antigravityMessages, enableThinki
|
|
| 71 |
parts.push(createThoughtPart(' '));
|
| 72 |
}
|
| 73 |
if (hasContent) parts.push({ text: textContent.trimEnd(), thoughtSignature: reasoningSignature });
|
| 74 |
-
if (!enableThinking) delete parts[0].thoughtSignature;
|
| 75 |
|
| 76 |
pushModelMessage({ parts, toolCalls, hasContent }, antigravityMessages);
|
| 77 |
}
|
|
|
|
| 71 |
parts.push(createThoughtPart(' '));
|
| 72 |
}
|
| 73 |
if (hasContent) parts.push({ text: textContent.trimEnd(), thoughtSignature: reasoningSignature });
|
| 74 |
+
if (!enableThinking && parts[0]) delete parts[0].thoughtSignature;
|
| 75 |
|
| 76 |
pushModelMessage({ parts, toolCalls, hasContent }, antigravityMessages);
|
| 77 |
}
|
src/utils/converters/openai.js
CHANGED
|
@@ -64,7 +64,7 @@ function handleAssistantMessage(message, antigravityMessages, enableThinking, ac
|
|
| 64 |
parts.push(createThoughtPart(reasoningText));
|
| 65 |
}
|
| 66 |
if (hasContent) parts.push({ text: message.content.trimEnd(), thoughtSignature: message.thoughtSignature || reasoningSignature });
|
| 67 |
-
if (!enableThinking) delete parts[0].thoughtSignature;
|
| 68 |
|
| 69 |
pushModelMessage({ parts, toolCalls, hasContent }, antigravityMessages);
|
| 70 |
}
|
|
|
|
| 64 |
parts.push(createThoughtPart(reasoningText));
|
| 65 |
}
|
| 66 |
if (hasContent) parts.push({ text: message.content.trimEnd(), thoughtSignature: message.thoughtSignature || reasoningSignature });
|
| 67 |
+
if (!enableThinking && parts[0]) delete parts[0].thoughtSignature;
|
| 68 |
|
| 69 |
pushModelMessage({ parts, toolCalls, hasContent }, antigravityMessages);
|
| 70 |
}
|