Skip to content

πŸ™Œ OpenHands: AI-Driven Development

refactor(frontend): remove file-state-slice.ts file (#11061)

Hiep Le11edf33b9746
diff --git a/frontend/src/state/file-state-slice.ts b/frontend/src/state/file-state-slice.ts
deleted file mode 100644
index 55faef0fc7..0000000000
--- a/frontend/src/state/file-state-slice.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { createSlice, PayloadAction } from "@reduxjs/toolkit";
-
-type SliceState = { changed: Record<string, boolean> }; // Map<path, changed>
-
-const initialState: SliceState = {
- changed: {},
-};
-
-export const fileStateSlice = createSlice({
- name: "fileState",
- initialState,
- reducers: {
- setChanged(
- state,
- action: PayloadAction<{ path: string; changed: boolean }>,
- ) {
- const { path, changed } = action.payload;
- state.changed[path] = changed;
- },
- },
-});
-
-export const { setChanged } = fileStateSlice.actions;
-export default fileStateSlice.reducer;
diff --git a/frontend/src/store.ts b/frontend/src/store.ts
index 4890710d43..7e75d76aa0 100644
--- a/frontend/src/store.ts
+++ b/frontend/src/store.ts
@@ -1,14 +1,12 @@
import { combineReducers, configureStore } from "@reduxjs/toolkit";
import agentReducer from "./state/agent-slice";
import browserReducer from "./state/browser-slice";
-import fileStateReducer from "./state/file-state-slice";
import { jupyterReducer } from "./state/jupyter-slice";
import securityAnalyzerReducer from "./state/security-analyzer-slice";
import microagentManagementReducer from "./state/microagent-management-slice";
import eventMessageReducer from "./state/event-message-slice";
export const rootReducer = combineReducers({
- fileState: fileStateReducer,
browser: browserReducer,
agent: agentReducer,
jupyter: jupyterReducer,