Fixes#2804
The useStream hook tracks messages-tuple mode which captures ALL LLM
events, including the internal summarization LLM call. This caused the
English summary text to briefly appear as an AI message in the UI before
the REMOVE_ALL_MESSAGES state update replaced it.
Fix by overriding _create_summary/_acreate_summary to pass callbacks=[]
when invoking the summary model, preventing LangGraph from forwarding
the internal LLM events to the frontend stream. Also add
hide_from_ui=True to the summary HumanMessage's additional_kwargs as a
belt-and-suspenders safety net alongside the existing name=summary
check.
* Refactor API fetch calls to use a unified fetch function; enhance chat history loading with new hooks and UI components
- Replaced `fetchWithAuth` with a generic `fetch` function across various API modules for consistency.
- Updated `useThreadStream` and `useThreadHistory` hooks to manage chat history loading, including loading states and pagination.
- Introduced `LoadMoreHistoryIndicator` component for better user experience when loading more chat history.
- Enhanced message handling in `MessageList` to accommodate new loading states and history management.
- Added support for run messages in the thread context, improving the overall message handling logic.
- Updated translations for loading indicators in English and Chinese.
* Fix test assertions for run ordering in RunManager tests
- Updated assertions in `test_list_by_thread` to reflect correct ordering of runs.
- Modified `test_list_by_thread_is_stable_when_timestamps_tie` to ensure stable ordering when timestamps are tied.