Merge pull request #606 from Szpadel/extend-r1-support

Extend deepseek-r1 support
This commit is contained in:
Matt Rubens
2025-01-28 07:30:31 -05:00
committed by GitHub
5 changed files with 309 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