hunk.code_window:     if (saveStatus.isSaving === false && saveStatus.error === true) {
         setForceUpdate(true);
       } else if (saveStatus.isSaving === true) {
         setForceUpdate(false);
       }
     }, [saveStatus.isSaving, saveStatus.error]);
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit:     } else if (saveStatus.isSaving === false && saveStatus.error === false) {
         // Construct URLSearchParams object instance from current URL querystring.
         const queryParams = new URLSearchParams(window.location.search);
         if (
           queryParams.has("editName") &&
           queryParams.get("editName") === "true"
         ) {
           // Set new or modify existing parameter value.
           queryParams.set("editName", "false");
           // Replace current querystring with the new one.
           history.replaceState({}, "", "?" + queryParams.toString());
         }
  
hunk.file_path: app/client/src/components/editorComponents/ActionNameEditor.tsx
hunk.type: add
file: import { createReducer } from "utils/AppsmithUtils";
  import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
  import { Datasource } from "entities/Datasource";
  import _ from "lodash";
  
  const initialState: DatasourcePaneReduxState = {
    selectedPlugin: "",
    drafts: {},
    actionRouteInfo: {},
    expandDatasourceId: "",
    newDatasource: "",
    viewMode: {},
  };
  
  export interface DatasourcePaneReduxState {
    selectedPlugin: string;
    drafts: Record<string, Datasource>;
    expandDatasourceId: string;
    actionRouteInfo: Partial<{
      apiId: string;
      datasourceId: string;
      pageId: string;
      applicationId: string;
    }>;
    newDatasource: string;
    viewMode: Record<string, boolean>;
  }
  
  const datasourcePaneReducer = createReducer(initialState, {
    [ReduxActionTypes.SELECT_PLUGIN]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{ pluginId: string }>,
    ) => ({
      ...state,
      selectedPlugin: action.payload.pluginId,
    }),
  
    [ReduxActionTypes.UPDATE_DATASOURCE_DRAFT]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{ id: string; draft: Partial<Datasource> }>,
    ) => {
      return {
        ...state,
        drafts: {
          ...state.drafts,
          [action.payload.id]: action.payload.draft,
        },
      };
    },
    [ReduxActionTypes.DELETE_DATASOURCE_DRAFT]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{ id: string }>,
    ) => ({
      ...state,
      drafts: _.omit(state.drafts, action.payload.id),
    }),
    [ReduxActionTypes.STORE_AS_DATASOURCE_UPDATE]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{
        apiId: string;
        datasourceId: string;
        pageId: string;
        applicationId: string;
      }>,
    ) => {
      return {
        ...state,
        actionRouteInfo: action.payload,
      };
    },
    [ReduxActionTypes.STORE_AS_DATASOURCE_COMPLETE]: (
      state: DatasourcePaneReduxState,
    ) => ({
      ...state,
      actionRouteInfo: {},
    }),
    [ReduxActionTypes.CREATE_DATASOURCE_SUCCESS]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{ id: string }>,
    ) => {
      return {
        ...state,
        newDatasource: action.payload.id,
      };
    },
    [ReduxActionTypes.SAVE_DATASOURCE_NAME_SUCCESS]: (
      state: DatasourcePaneReduxState,
    ) => {
      return {
        ...state,
        newDatasource: "",
      };
    },
    [ReduxActionTypes.UPDATE_DATASOURCE_SUCCESS]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<Datasource>,
    ) => {
      return {
        ...state,
        newDatasource: "",
        expandDatasourceId: action.payload.id,
      };
    },
    [ReduxActionTypes.SET_DATASOURCE_EDITOR_MODE]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<{ id: string; viewMode: boolean }>,
    ) => {
      return {
        ...state,
        viewMode: {
          ...state.viewMode,
          [action.payload.id]: action.payload.viewMode,
        },
      };
    },
    [ReduxActionTypes.EXPAND_DATASOURCE_ENTITY]: (
      state: DatasourcePaneReduxState,
      action: ReduxAction<string>,
    ) => {
      return {
        ...state,
        expandDatasourceId: action.payload,
      };
    },
  });
  
  export default datasourcePaneReducer;
  