Merge pull request #6533 from continuedev/pe/remove-feedback-dialog
chore: remove feedback dialog
This commit is contained in:
commit
37a4492969
4 changed files with 0 additions and 96 deletions
|
|
@ -1,64 +0,0 @@
|
|||
import { usePostHog } from "posthog-js/react";
|
||||
import { setDialogMessage } from "../../redux/slices/uiSlice";
|
||||
import { useAppDispatch } from "../../redux/hooks";
|
||||
|
||||
export default function FeedbackDialog() {
|
||||
const posthog = usePostHog();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
return (
|
||||
<div className="p-4 text-center">
|
||||
👋 Thanks for using Continue. We are always trying to improve and love
|
||||
hearing from users. If you're interested in speaking, enter your name and
|
||||
email. We won't use this information for anything other than reaching out.
|
||||
<br />
|
||||
<br />
|
||||
<form
|
||||
onSubmit={(e: any) => {
|
||||
e.preventDefault();
|
||||
posthog?.capture("user_interest_form", {
|
||||
name: e.target.elements[0].value,
|
||||
email: e.target.elements[1].value,
|
||||
});
|
||||
dispatch(
|
||||
setDialogMessage(
|
||||
<div className="p-4 text-center">
|
||||
Thanks! We'll be in touch soon.
|
||||
</div>,
|
||||
),
|
||||
);
|
||||
}}
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: "10px",
|
||||
}}
|
||||
>
|
||||
<input
|
||||
style={{ padding: "10px", borderRadius: "5px" }}
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="Name"
|
||||
required
|
||||
/>
|
||||
<input
|
||||
style={{ padding: "10px", borderRadius: "5px" }}
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="Email"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
style={{
|
||||
padding: "10px",
|
||||
borderRadius: "5px",
|
||||
cursor: "pointer",
|
||||
}}
|
||||
type="submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -16,7 +16,6 @@ import {
|
|||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import styled from "styled-components";
|
||||
import { Button, lightGray, vscBackground } from "../../components";
|
||||
import FeedbackDialog from "../../components/dialogs/FeedbackDialog";
|
||||
import { useFindWidget } from "../../components/find/FindWidget";
|
||||
import TimelineItem from "../../components/gui/TimelineItem";
|
||||
import { NewSessionButton } from "../../components/mainInput/belowMainInput/NewSessionButton";
|
||||
|
|
@ -37,18 +36,12 @@ import {
|
|||
newSession,
|
||||
updateToolCallOutput,
|
||||
} from "../../redux/slices/sessionSlice";
|
||||
import {
|
||||
setDialogEntryOn,
|
||||
setDialogMessage,
|
||||
setShowDialog,
|
||||
} from "../../redux/slices/uiSlice";
|
||||
import { streamEditThunk } from "../../redux/thunks/edit";
|
||||
import { loadLastSession } from "../../redux/thunks/session";
|
||||
import { streamResponseThunk } from "../../redux/thunks/streamResponse";
|
||||
import { isJetBrains, isMetaEquivalentKeyPressed } from "../../util";
|
||||
|
||||
import { cancelStream } from "../../redux/thunks/cancelStream";
|
||||
import { getLocalStorage, setLocalStorage } from "../../util/localStorage";
|
||||
import { EmptyChatBody } from "./EmptyChatBody";
|
||||
import { ExploreDialogWatcher } from "./ExploreDialogWatcher";
|
||||
import { ToolCallDiv } from "./ToolCallDiv";
|
||||
|
|
@ -221,19 +214,6 @@ export function Chat() {
|
|||
editorToClearOnSend.commands.clearContent();
|
||||
}
|
||||
}
|
||||
|
||||
// Increment localstorage counter for popup
|
||||
const currentCount = getLocalStorage("mainTextEntryCounter");
|
||||
if (currentCount) {
|
||||
setLocalStorage("mainTextEntryCounter", currentCount + 1);
|
||||
if (currentCount === 300) {
|
||||
dispatch(setDialogMessage(<FeedbackDialog />));
|
||||
dispatch(setDialogEntryOn(false));
|
||||
dispatch(setShowDialog(true));
|
||||
}
|
||||
} else {
|
||||
setLocalStorage("mainTextEntryCounter", 1);
|
||||
}
|
||||
},
|
||||
[
|
||||
history,
|
||||
|
|
|
|||
|
|
@ -83,12 +83,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;
|
||||
},
|
||||
|
|
@ -98,9 +92,6 @@ export const uiSlice = createSlice({
|
|||
) => {
|
||||
state.isExploreDialogOpen = action.payload;
|
||||
},
|
||||
setHasDismissedExploreDialog: (state, action: PayloadAction<boolean>) => {
|
||||
state.hasDismissedExploreDialog = action.payload;
|
||||
},
|
||||
// Tools
|
||||
addTool: (state, action: PayloadAction<Tool>) => {
|
||||
state.toolSettings[action.payload.function.name] =
|
||||
|
|
@ -173,10 +164,8 @@ export const uiSlice = createSlice({
|
|||
export const {
|
||||
setOnboardingCard,
|
||||
setDialogMessage,
|
||||
setDialogEntryOn,
|
||||
setShowDialog,
|
||||
setIsExploreDialogOpen,
|
||||
setHasDismissedExploreDialog,
|
||||
toggleToolSetting,
|
||||
setToolPolicy,
|
||||
clearToolPolicy,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ type LocalStorageTypes = {
|
|||
hasDismissedExploreDialog: boolean;
|
||||
onboardingStatus?: OnboardingStatus;
|
||||
hasDismissedOnboardingCard: boolean;
|
||||
mainTextEntryCounter: number;
|
||||
ide: "vscode" | "jetbrains";
|
||||
vsCodeUriScheme: string;
|
||||
ftc: number;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue