refactor: remove unused dialogEntryOn redux state
The dialogEntryOn state was not being read anywhere in the codebase, only set once during the feedback dialog trigger. This commit removes: - dialogEntryOn from UIState type definition - dialogEntryOn from DEFAULT_UI_SLICE initial state - setDialogEntryOn reducer action - setDialogEntryOn export from uiSlice - setDialogEntryOn import and dispatch call from Chat.tsx Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: Dallin Romney <dallin@continue.dev>
This commit is contained in:
parent
a258974bf5
commit
367ed41fc1
2 changed files with 1 additions and 15 deletions
|
|
@ -52,11 +52,7 @@ import FeedbackDialog from "../../components/dialogs/FeedbackDialog";
|
|||
import { FatalErrorIndicator } from "../../components/config/FatalErrorNotice";
|
||||
import InlineErrorMessage from "../../components/mainInput/InlineErrorMessage";
|
||||
import { resolveEditorContent } from "../../components/mainInput/TipTapEditor/utils/resolveEditorContent";
|
||||
import {
|
||||
setDialogEntryOn,
|
||||
setDialogMessage,
|
||||
setShowDialog,
|
||||
} from "../../redux/slices/uiSlice";
|
||||
import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice";
|
||||
import { RootState } from "../../redux/store";
|
||||
import { cancelStream } from "../../redux/thunks/cancelStream";
|
||||
import { getLocalStorage, setLocalStorage } from "../../util/localStorage";
|
||||
|
|
@ -283,7 +279,6 @@ export function Chat() {
|
|||
setLocalStorage("mainTextEntryCounter", currentCount + 1);
|
||||
if (currentCount === 300) {
|
||||
dispatch(setDialogMessage(<FeedbackDialog />));
|
||||
dispatch(setDialogEntryOn(false));
|
||||
dispatch(setShowDialog(true));
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ export type ToolGroupPolicies = { [toolGroupName: string]: ToolGroupPolicy };
|
|||
type UIState = {
|
||||
showDialog: boolean;
|
||||
dialogMessage: JSX.Element | undefined;
|
||||
dialogEntryOn: boolean;
|
||||
onboardingCard: OnboardingCardState;
|
||||
isExploreDialogOpen: boolean;
|
||||
hasDismissedExploreDialog: boolean;
|
||||
|
|
@ -35,7 +34,6 @@ export const DEFAULT_RULE_SETTING: RulePolicy = "on";
|
|||
export const DEFAULT_UI_SLICE: UIState = {
|
||||
showDialog: false,
|
||||
dialogMessage: undefined,
|
||||
dialogEntryOn: false,
|
||||
onboardingCard: defaultOnboardingCardState,
|
||||
isExploreDialogOpen:
|
||||
getLocalStorage(LocalStorageKey.IsExploreDialogOpen) ?? false,
|
||||
|
|
@ -66,12 +64,6 @@ export const uiSlice = createSlice({
|
|||
) => {
|
||||
state.dialogMessage = action.payload;
|
||||
},
|
||||
setDialogEntryOn: (
|
||||
state,
|
||||
action: PayloadAction<UIState["dialogEntryOn"]>,
|
||||
) => {
|
||||
state.dialogEntryOn = action.payload;
|
||||
},
|
||||
setShowDialog: (state, action: PayloadAction<UIState["showDialog"]>) => {
|
||||
state.showDialog = action.payload;
|
||||
},
|
||||
|
|
@ -153,7 +145,6 @@ export const uiSlice = createSlice({
|
|||
export const {
|
||||
setOnboardingCard,
|
||||
setDialogMessage,
|
||||
setDialogEntryOn,
|
||||
setShowDialog,
|
||||
setIsExploreDialogOpen,
|
||||
toggleToolSetting,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue