Skip to content

Commit e7b514b

Browse files
authored
Fix Cloudflare AI API call compatibility issues
1 parent bf8d0b5 commit e7b514b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ <h5 class="font-weight-bold mb-4">MCP</h5>
934934
<v-textarea class="conversation-area" variant="plain" density='compact' auto-grow
935935
hide-details rows="1" readonly v-model="group.message.content"></v-textarea>
936936
</v-card-text>
937-
<v-card-text v-else class="md-preview px-5 py-2">
937+
<v-card-text v-else class="md-preview px-4 py-3">
938938
<md-preview :model-value="group.message.content"
939939
:language="language == 'zhHans' ? 'zh-CN' : 'en-US'" :code-foldable="true"
940940
auto-fold-threshold="Infinity"></md-preview>
@@ -1785,6 +1785,10 @@ <h5 class="font-weight-bold mb-4">MCP</h5>
17851785
if (last.tool_calls.length == 0) {
17861786
delete last.tool_calls
17871787
return
1788+
}
1789+
if (Object.keys(last.tool_calls[0]).length === 0) {
1790+
delete last.tool_calls
1791+
return
17881792
} else {
17891793
let tool_called = false
17901794
console.log(last.tool_calls)

0 commit comments

Comments
 (0)