hunk.code_window:   useEffect(() => {
       const pathName = window.location.pathname;
       const shouldShow = matchBuilderPath(pathName) || matchViewerPath(pathName);
       // Disable comment mode toggle for anonymous users
  
hunk.labels: keep keep replace keep
hunk.after_edit:     const shouldShow =
         (matchBuilderPath(pathName) && isEditorInitialized) ||
         (matchViewerPath(pathName) && isViewerInitialized);
  
hunk.file_path: app/client/src/pages/Editor/ToggleModeButton.tsx
hunk.type: replace
file: import {
    ReduxActionTypes,
    ReduxAction,
  } from "@appsmith/constants/ReduxActionConstants";
  
  export type InitializeEditorPayload = {
    applicationId?: string;
    pageId?: string;
    branch?: string;
  };
  
  export const initEditor = (
    payload: InitializeEditorPayload,
  ): ReduxAction<InitializeEditorPayload> => ({
    type: ReduxActionTypes.INITIALIZE_EDITOR,
    payload,
  });
  
  export const resetEditorRequest = () => ({
    type: ReduxActionTypes.RESET_EDITOR_REQUEST,
  });
  
  export const resetEditorSuccess = () => ({
    type: ReduxActionTypes.RESET_EDITOR_SUCCESS,
  });
  