Fix reasoning content bleeding into multi-swipes

This commit is contained in:
Cohee
2025-04-16 21:35:35 +03:00
parent 8aa6350c31
commit 722b0698e9

View File

@ -2234,7 +2234,8 @@ async function sendOpenAIRequest(type, messages, signal) {
if (Array.isArray(parsed?.choices) && parsed?.choices?.[0]?.index > 0) {
const swipeIndex = parsed.choices[0].index - 1;
swipes[swipeIndex] = (swipes[swipeIndex] || '') + getStreamingReply(parsed, state);
// FIXME: state.reasoning should be an array to support multi-swipe
swipes[swipeIndex] = (swipes[swipeIndex] || '') + getStreamingReply(parsed, state, { overrideShowThoughts: false });
} else {
text += getStreamingReply(parsed, state);
}