Skip to content

Commit 569ed94

Browse files
authored
Merge pull request #2079 from danielaskdd/fix-cot-render-fall-back
Fix assistant message display with content fallback
2 parents ff6c061 + 6157318 commit 569ed94

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

lightrag/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__api_version__ = "0216"
1+
__api_version__ = "0217"

lightrag/api/webui/assets/feature-retrieval-Cz5issgY.js renamed to lightrag/api/webui/assets/feature-retrieval-CUau_fDY.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lightrag/api/webui/assets/index-BFuU8FUw.js renamed to lightrag/api/webui/assets/index-xxDBNEXY.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lightrag/api/webui/index.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lightrag_webui/src/components/retrieval/ChatMessage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export const ChatMessage = ({ message }: { message: MessageWithError }) => { //
5050
// The content to display is now non-ambiguous.
5151
const finalThinkingContent = thinkingContent
5252
// For user messages, displayContent will be undefined, so we fall back to content.
53-
// For assistant messages, we prefer displayContent and don't fallback to avoid content leakage during thinking
53+
// For assistant messages, we prefer displayContent but fallback to content for backward compatibility
5454
const finalDisplayContent = message.role === 'user'
5555
? message.content
56-
: displayContent || ''
56+
: displayContent || message.content || ''
5757

5858
// Load KaTeX dynamically
5959
useEffect(() => {

0 commit comments

Comments
 (0)