mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-08 11:56:59 +00:00
Hide untagged reasoning dumps in chat
This commit is contained in:
@@ -165,7 +165,7 @@ export function hasUnclosedThinkTag(text) {
|
||||
}
|
||||
|
||||
export function startsWithReasoningPrefix(text) {
|
||||
return /^\s*(?:thinking(?:\s+process)?\s*:|the user |i need |i should |i will |they are |the question |i can )/i.test(text || '');
|
||||
return /^\s*(?:thinking(?:\s+process)?\s*:|the user |user wants|we need |i need |i should |i will |i'll |i am going |let me (?:think|look|see|check|read|review|analyze|parse|figure|draft|write)|they are |the question |i can )/i.test(text || '');
|
||||
}
|
||||
|
||||
export function normalizeThinkingMarkup(text) {
|
||||
@@ -236,6 +236,11 @@ function normalizePlainThinking(text) {
|
||||
}
|
||||
}
|
||||
|
||||
if (/^\s*(?:thinking(?:\s+process)?\s*:|the user |user wants|we need |let me (?:think|look|see|check|read|review|analyze|parse|figure|draft|write)|i need to |i should |i will |i'll |i am going )/i.test(trimmed)) {
|
||||
const thinkBlock = withoutPrefix.trim();
|
||||
if (thinkBlock) return `<think>${thinkBlock}</think>`;
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user