fix(chat): add history loading skeletons
Build Push and Deploy / docker-image (push) Successful in 1m2s
Build Push and Deploy / deploy-fallback-log (push) Has been skipped

This commit is contained in:
2026-06-10 17:51:28 +08:00
parent ab9e2a0420
commit 9c0a7a2864
6 changed files with 254 additions and 57 deletions
+8 -4
View File
@@ -68,6 +68,7 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
chatSessions,
activeSessionId,
isHydrating,
loadingSessionId,
isStreaming,
sessionTitle,
sendPrompt,
@@ -159,9 +160,9 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
}, []);
const handleSelectSession = useCallback(
(sessionId: string) => {
(sessionId: string, title: string) => {
composerRef.current?.clear();
void switchSession(sessionId);
void switchSession(sessionId, title);
},
[switchSession],
);
@@ -326,12 +327,14 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
sessions={chatSessions}
activeSessionId={activeSessionId}
isHydrating={isHydrating}
isLoadingSessions={isHydrating && chatSessions.length === 0}
loadingSessionId={loadingSessionId}
onNewSession={() => {
handleNewConversation();
setIsHistoryOpen(false);
}}
onSelectSession={(id) => {
handleSelectSession(id);
onSelectSession={(id, title) => {
handleSelectSession(id, title);
setIsHistoryOpen(false);
}}
onRenameSession={handleRenameSession}
@@ -343,6 +346,7 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
<AgentWorkspace
messages={messages}
isStreaming={isStreaming}
isLoadingSession={Boolean(loadingSessionId)}
bottomRef={bottomRef}
speakingMessageId={speakingMessageId}
speechState={speechState}