From 67a83368f0569b65c87c93b4d10d37518667cf5d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Apr 2026 20:44:55 +0200 Subject: [PATCH] Fix: show top-level reasoning field in thinking card Hermes stores reasoning as a top-level message field (m.reasoning) instead of in content arrays like Claude. This patch makes the thinking/reasoning card also check for m.reasoning, so users can see the model's reasoning process in the WebUI. --- static/ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/ui.js b/static/ui.js index e0f717c..f318a32 100644 --- a/static/ui.js +++ b/static/ui.js @@ -499,6 +499,10 @@ function renderMessages(){ thinkingText=content.filter(p=>p&&(p.type==='thinking'||p.type==='reasoning')).map(p=>p.thinking||p.reasoning||p.text||'').join('\n'); content=content.filter(p=>p&&p.type==='text').map(p=>p.text||p.content||'').join('\n'); } + // Also check top-level reasoning field (Hermes format) + if(!thinkingText && m.reasoning){ + thinkingText=m.reasoning; + } const isUser=m.role==='user'; const isLastAssistant=!isUser&&vi===visWithIdx.length-1; // Render thinking card before the assistant message (collapsed by default)