Update onboarding and error handling experience (#29)

This commit is contained in:
AceDataCloud committed 2024-01-03 16:40:24 +08:00
1 parent 916df4b482
commit 9c54ffb7a8
23 files changed
+228 -43

No files matched your search

+5
View File
@@ -17,6 +17,10 @@ import { ActionContext } from 'vuex';
import { log } from '@/utils/log';
import { IChatState } from './models';
export const resetAll = ({ commit }: ActionContext<IChatState, IRootState>): void => {
commit('resetAll');
};
export const setModel = async ({ commit }: any, payload: IChatModel): Promise<void> => {
commit('setModel', payload);
};
@@ -96,6 +100,7 @@ export const getConversations = async ({
};
export default {
resetAll,
setModel,
setApplications,
setConversation,
+9 -1
View File
@@ -2,6 +2,13 @@ import { IApplication, IChatConversation, IChatModel } from '@/operators';
import { IChatState } from './models';
import { Status } from '../common/models';
export const resetAll = (state: IChatState): void => {
state.applications = [];
state.getApplicationsStatus = Status.None;
state.conversations = [];
state.getConversationsStatus = Status.None;
};
export const setModel = (state: IChatState, payload: IChatModel): void => {
state.model = payload;
};
@@ -27,5 +34,6 @@ export default {
setApplications,
setGetApplicationsStatus,
setConversations,
setGetConversationsStatus
setGetConversationsStatus,
resetAll
};