youngjin-langchain-tools 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/PKG-INFO +1 -1
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/pyproject.toml +1 -1
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/youngjin_langchain_tools/handlers/streamlit_langgraph_handler.py +10 -2
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/.gitignore +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/LICENSE +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/README.md +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/youngjin_langchain_tools/__init__.py +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/youngjin_langchain_tools/handlers/__init__.py +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/youngjin_langchain_tools/utils/__init__.py +0 -0
- {youngjin_langchain_tools-0.2.0 → youngjin_langchain_tools-0.2.1}/youngjin_langchain_tools/utils/config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: youngjin-langchain-tools
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: LangGraph utilities for Streamlit - StreamlitLanggraphHandler and more
|
|
5
5
|
Project-URL: Homepage, https://github.com/yourusername/youngjin-langchain-tools
|
|
6
6
|
Project-URL: Documentation, https://github.com/yourusername/youngjin-langchain-tools#readme
|
|
@@ -265,6 +265,7 @@ class StreamlitLanggraphHandler:
|
|
|
265
265
|
self._container = container
|
|
266
266
|
self._final_response: str = ""
|
|
267
267
|
self._status_container: Any = None
|
|
268
|
+
self._thoughts_placeholder: Any = None # Placeholder inside status for re-render
|
|
268
269
|
self._response_placeholder: Any = None
|
|
269
270
|
self._thought_history: List[Dict[str, Any]] = [] # History of old thoughts
|
|
270
271
|
self._current_thoughts: List[Dict[str, Any]] = [] # Current visible thoughts
|
|
@@ -370,6 +371,9 @@ class StreamlitLanggraphHandler:
|
|
|
370
371
|
self._config.thinking_label,
|
|
371
372
|
expanded=True # Always start expanded during processing
|
|
372
373
|
)
|
|
374
|
+
# Create placeholder INSIDE status for thought re-rendering
|
|
375
|
+
with self._status_container:
|
|
376
|
+
self._thoughts_placeholder = st.empty()
|
|
373
377
|
self._response_placeholder = st.empty()
|
|
374
378
|
|
|
375
379
|
# Stream from agent with error handling
|
|
@@ -500,10 +504,14 @@ class StreamlitLanggraphHandler:
|
|
|
500
504
|
st_module.code(content, language="text")
|
|
501
505
|
|
|
502
506
|
def _render_thoughts_in_status(self) -> None:
|
|
503
|
-
"""Render all thoughts (history + current) inside the status container.
|
|
507
|
+
"""Render all thoughts (history + current) inside the status container.
|
|
508
|
+
|
|
509
|
+
Uses placeholder.container() to completely replace previous content.
|
|
510
|
+
"""
|
|
504
511
|
import streamlit as st
|
|
505
512
|
|
|
506
|
-
|
|
513
|
+
# Clear and re-render using placeholder
|
|
514
|
+
with self._thoughts_placeholder.container():
|
|
507
515
|
# Render history expander if there are old thoughts
|
|
508
516
|
if self._thought_history:
|
|
509
517
|
with st.expander(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|