Update src/vs/workbench/contrib/chat/common/chatModel.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Andrew Pareles 2025-02-15 15:46:39 -08:00 committed by GitHub
parent 7849b0a107
commit a26816d597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,7 +371,7 @@ export function stripThinkTags(text: string): string {
depth++;
i += 7; // length of '<think>'
} else if (text.startsWith('</think>', i)) {
depth--;
if (depth > 0) depth--;
i += 8; // length of '</think>'
} else if (depth === 0) {
result += text[i];