feat: add ChatEmptyState component and integrate it into ChatMessageList for improved user experience
This commit is contained in:
@@ -675,6 +675,7 @@ async function deleteSession(sessionKey: string): Promise<void> {
|
||||
|
||||
if (state.currentSessionKey === sessionKey) {
|
||||
const nextSession = remaining[0]?.key ?? getDefaultMainSessionKey();
|
||||
const hasRemainingSessions = remaining.length > 0;
|
||||
patchState({
|
||||
...basePatch,
|
||||
currentSessionKey: nextSession,
|
||||
@@ -688,7 +689,7 @@ async function deleteSession(sessionKey: string): Promise<void> {
|
||||
lastUserMessageAt: null,
|
||||
});
|
||||
|
||||
if (nextSession) {
|
||||
if (hasRemainingSessions && nextSession) {
|
||||
await loadHistory(nextSession);
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user