Extend deepseek-r1 support

This commit is contained in:
Piotr Rogowski
2025-01-27 21:27:24 +01:00
parent db0ec64d1c
commit cb23be6346
4 changed files with 129 additions and 17 deletions

View File

@@ -2391,6 +2391,10 @@ export class Cline {
let reasoningMessage = ""
try {
for await (const chunk of stream) {
if (!chunk) {
// Sometimes chunk is undefined, no idea that can cause it, but this workaround seems to fix it
continue
}
switch (chunk.type) {
case "reasoning":
reasoningMessage += chunk.text