程序员阿江(Relakkes) 767abfc233 fix: restore tool calls on page refresh — handle server type mapping
Server marks assistant messages with tool_use blocks as type='tool_use'
(not 'assistant'), and user messages with tool_result blocks as
type='tool_result' (not 'user'). mapHistoryMessagesToUiMessages now
handles both type variants when parsing content arrays, so tool calls
are properly restored after page refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 23:26:29 +08:00
..