Fix reasoning content bleeding into multi-swipes

722b0698e9561fdbeb72c867b68dccec501c1b9a

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/scripts/openai.js+2 -1
@@ -2234,7 +2234,8 @@ async function sendOpenAIRequest(type, messages, signal) {
22342234
2235 if (Array.isArray(parsed?.choices) && parsed?.choices?.[0]?.index > 0) {2235 if (Array.isArray(parsed?.choices) && parsed?.choices?.[0]?.index > 0) {
2236 const swipeIndex = parsed.choices[0].index - 1;2236 const swipeIndex = parsed.choices[0].index - 1;
2237 swipes[swipeIndex] = (swipes[swipeIndex] || '') + getStreamingReply(parsed, state);2237 // FIXME: state.reasoning should be an array to support multi-swipe
2238 swipes[swipeIndex] = (swipes[swipeIndex] || '') + getStreamingReply(parsed, state, { overrideShowThoughts: false });
2238 } else {2239 } else {
2239 text += getStreamingReply(parsed, state);2240 text += getStreamingReply(parsed, state);
2240 }2241 }