Skip to content

Commit

Permalink
Issue#2977 (All-Hands-AI#3050)
Browse files Browse the repository at this point in the history
- keeping agentStateService unchanged.
- Renamed 'changeAgentState' inside 'agentSlice' to 'setCurrentAgentState'

Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
  • Loading branch information
DecodersLord and amanape authored Jul 22, 2024
1 parent ce8a11a commit 812e5d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/services/observations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { changeAgentState } from "#/state/agentSlice";
import { setCurrentAgentState } from "#/state/agentSlice";
import { setUrl, setScreenshotSrc } from "#/state/browserSlice";
import store from "#/store";
import { ObservationMessage } from "#/types/Message";
Expand All @@ -25,7 +25,7 @@ export function handleObservationMessage(message: ObservationMessage) {
}
break;
case ObservationType.AGENT_STATE_CHANGED:
store.dispatch(changeAgentState(message.extras.agent_state));
store.dispatch(setCurrentAgentState(message.extras.agent_state));
break;
case ObservationType.DELEGATE:
// TODO: better UI for delegation result (#2309)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/state/agentSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export const agentSlice = createSlice({
curAgentState: AgentState.LOADING,
},
reducers: {
changeAgentState: (state, action) => {
setCurrentAgentState: (state, action) => {
state.curAgentState = action.payload;
},
},
});

export const { changeAgentState } = agentSlice.actions;
export const { setCurrentAgentState } = agentSlice.actions;

export default agentSlice.reducer;

0 comments on commit 812e5d1

Please sign in to comment.