zzz / frontend /src /state /agent-slice.tsx
ar08's picture
Upload 1040 files
246d201 verified
raw
history blame contribute delete
454 Bytes
import { createSlice } from "@reduxjs/toolkit";
import { AgentState } from "#/types/agent-state";
export const agentSlice = createSlice({
name: "agent",
initialState: {
curAgentState: AgentState.LOADING,
},
reducers: {
setCurrentAgentState: (state, action) => {
state.curAgentState = action.payload;
},
},
});
export const { setCurrentAgentState } = agentSlice.actions;
export default agentSlice.reducer;