diff --git a/src/store/agent/slices/chat/action.ts b/src/store/agent/slices/chat/action.ts index 0c78b65af9fe..0c8c5e7a0522 100644 --- a/src/store/agent/slices/chat/action.ts +++ b/src/store/agent/slices/chat/action.ts @@ -117,16 +117,16 @@ export const createChatSlice: StateCreator< () => sessionService.getSessionConfig(INBOX_SESSION_ID), { onSuccess: (data) => { - if (data) { - set( - { - defaultAgentConfig: merge(get().defaultAgentConfig, defaultAgentConfig), - isInboxAgentConfigInit: true, - }, - false, - 'initStore', - ); + set( + { + defaultAgentConfig: merge(get().defaultAgentConfig, defaultAgentConfig), + isInboxAgentConfigInit: true, + }, + false, + 'initDefaultAgent', + ); + if (data) { get().internal_dispatchAgentMap(INBOX_SESSION_ID, data, 'initInbox'); } }, diff --git a/src/store/session/slices/session/action.ts b/src/store/session/slices/session/action.ts index 83e6c0937ad5..e96e75950473 100644 --- a/src/store/session/slices/session/action.ts +++ b/src/store/session/slices/session/action.ts @@ -265,6 +265,6 @@ export const createSessionSlice: StateCreator< ); }, refreshSessions: async () => { - await mutate(FETCH_SESSIONS_KEY); + await mutate([FETCH_SESSIONS_KEY, true]); }, });