fix: repair chat history from DB when Goose session has empty placeholders
Portal direct chat → goosed escalation can leave hollow Goose messages while h5_conversation_messages retains the full dialogue. Backfill session detail from DB, extend snapshot list fallback, and keep stored session id on transient boot failures so refresh no longer looks like a blank new chat. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1125,7 +1125,6 @@ export function useTKMindChat(
|
||||
setMessages([]);
|
||||
setChatState('idle');
|
||||
} else if (isTransientConnectError(err)) {
|
||||
clearStoredSessionId(userRef.current?.id);
|
||||
setSession(null);
|
||||
messageHistoryLoadedCountRef.current = 0;
|
||||
messageHistoryTotalRef.current = 0;
|
||||
@@ -1134,7 +1133,7 @@ export function useTKMindChat(
|
||||
setMessageHistoryTotal(0);
|
||||
setMessages([]);
|
||||
setChatState('idle');
|
||||
setNotice('上次会话恢复超时,已为你准备新对话,可直接发送消息');
|
||||
setNotice('上次会话恢复超时,请点左上角 ☰ 选择历史对话,或稍后刷新重试');
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user