Skip to content

Commit 4cf9ea0

Browse files
fix: preserve full thinking text (incl. labels) in chat history
1 parent 6b005d3 commit 4cf9ea0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5978,10 +5978,7 @@
59785978
*/
59795979
function _appendAssistantToHistory(text) {
59805980
if (!text) return;
5981-
// Strip thinking-block UI headers before storing so the model never sees them
5982-
// as part of the conversation context on the next turn.
5983-
const stored = _stripThinkingHeader(text);
5984-
_jsChatHistory.push({ role: 'assistant', text: stored });
5981+
_jsChatHistory.push({ role: 'assistant', text });
59855982
// Keep history manageable (last 40 messages)
59865983
if (_jsChatHistory.length > 40) _jsChatHistory = _jsChatHistory.slice(-40);
59875984
_saveJsChatHistory();

0 commit comments

Comments
 (0)