mirror of
https://github.com/langchain-ai/langgraph-fullstack-python.git
synced 2026-08-26 17:56:38 -04:00
[PR #7] Fix: streaming message display in LLM chatbot #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langchain-ai/langgraph-fullstack-python/pull/7
Author: @geminixiang
Created: 3/23/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (1)
cf07f6cfix: hx_swap from innerHTML to beforeend📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/react_agent/app.py(+1 -1)📄 Description
Description
This PR changes the hx_swap attribute from innerHTML to beforeend in the AssistantMessagePlaceholder function to correctly handle streaming responses from the LLM. This fixes the issue where only the last streaming chunk was being displayed instead of the complete response.
Changes
Changed hx_swap="innerHTML" to hx_swap="beforeend" in the AssistantMessagePlaceholder function
This modification allows new message chunks to be appended to existing content rather than replacing it
Maintains the complete message history during streaming
ref. https://htmx.org/attributes/hx-swap/
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.