youngjin-langchain-tools 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

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.
@@ -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
- with self._status_container:
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(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: youngjin-langchain-tools
3
- Version: 0.2.0
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
@@ -1,9 +1,9 @@
1
1
  youngjin_langchain_tools/__init__.py,sha256=S5GJtbYymhDuGtTibEG61Li9UvwvoFtnKm4mxjWNgnU,1310
2
2
  youngjin_langchain_tools/handlers/__init__.py,sha256=-vGk-m1fqOipJSe02ogcScE0K3pdVwO9A_EqBovPRxo,397
3
- youngjin_langchain_tools/handlers/streamlit_langgraph_handler.py,sha256=O2_B5I7E0OWqh1JdS014aGw_smQsCpT7NykxcH16Ql8,22599
3
+ youngjin_langchain_tools/handlers/streamlit_langgraph_handler.py,sha256=GA2A7aYtcNnZ--XBcV2T1mzm1toGdALIPyNCxKIcU40,23009
4
4
  youngjin_langchain_tools/utils/__init__.py,sha256=LgSd7Gz2n5WgIhxaKHqpmQVUaBUDT_TTTw63hzoWGgM,272
5
5
  youngjin_langchain_tools/utils/config.py,sha256=hHvdxsn5ZFWRJvR6N7ODy94JbCkeJocsS58hmvxoK5I,1640
6
- youngjin_langchain_tools-0.2.0.dist-info/METADATA,sha256=3zKlWZoqhkSKRxhFV89VL08pgwtfYxZgORGKWZM3N4Q,6959
7
- youngjin_langchain_tools-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
- youngjin_langchain_tools-0.2.0.dist-info/licenses/LICENSE,sha256=fENUlkDDxJEn5c0u8mhVcz5ek-rTg2L4Kby1tMNchI8,11342
9
- youngjin_langchain_tools-0.2.0.dist-info/RECORD,,
6
+ youngjin_langchain_tools-0.2.1.dist-info/METADATA,sha256=aTH3J-FR4eRLgdaQ7OZXb8CCrH0bazeinvz42Sl_rK4,6959
7
+ youngjin_langchain_tools-0.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
+ youngjin_langchain_tools-0.2.1.dist-info/licenses/LICENSE,sha256=fENUlkDDxJEn5c0u8mhVcz5ek-rTg2L4Kby1tMNchI8,11342
9
+ youngjin_langchain_tools-0.2.1.dist-info/RECORD,,