-
- {currentTab === "main" ? (
-
setCurrentTab("local")}
- isDialog={isDialog}
- />
- ) : (
-
-
- By choosing this option, Continue will be configured by a local{" "}
- config.yaml file. If you're just looking to use
- Ollama and still want to manage your configuration through
- Continue, click{" "}
- setCurrentTab("main")}>
- here
-
-
-
-
-
- )}
-
+
onboardingCard.close()}
+ >
+
+ {currentTab === "main" ? (
+
setCurrentTab("local")}
+ isDialog={isDialog}
+ />
+ ) : (
+
+
+ By choosing this option, Continue will be configured by a local{" "}
+ config.yaml file. If you're just looking to use
+ Ollama and still want to manage your configuration through
+ Continue, click{" "}
+ setCurrentTab("main")}>
+ here
+
+
+
+
+ )}
-
+
);
}
diff --git a/gui/src/components/ReusableCard.tsx b/gui/src/components/ReusableCard.tsx
new file mode 100644
index 000000000..2eb2c483d
--- /dev/null
+++ b/gui/src/components/ReusableCard.tsx
@@ -0,0 +1,42 @@
+import { XMarkIcon } from "@heroicons/react/24/outline";
+import styled from "styled-components";
+import { CloseButton, defaultBorderRadius, vscInputBackground } from ".";
+
+const StyledCard = styled.div`
+ margin: auto;
+ border-radius: ${defaultBorderRadius};
+ background-color: ${vscInputBackground};
+ box-shadow:
+ 0 20px 25px -5px rgb(0 0 0 / 0.1),
+ 0 8px 10px -6px rgb(0 0 0 / 0.1);
+`;
+
+interface ReusableCardProps {
+ children: React.ReactNode;
+ showCloseButton?: boolean;
+ onClose?: () => void;
+ className?: string;
+ testId?: string;
+}
+
+export function ReusableCard({
+ children,
+ showCloseButton,
+ onClose,
+ className = "",
+ testId,
+}: ReusableCardProps) {
+ return (
+
+ {showCloseButton && (
+
+
+
+ )}
+ {children}
+
+ );
+}
diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx
index 51c164799..9fe39d41e 100644
--- a/gui/src/pages/gui/Chat.tsx
+++ b/gui/src/pages/gui/Chat.tsx
@@ -22,6 +22,7 @@ import {
import CodeToEditCard from "../../components/CodeToEditCard";
import FeedbackDialog from "../../components/dialogs/FeedbackDialog";
import FreeTrialOverDialog from "../../components/dialogs/FreeTrialOverDialog";
+import { ExploreHubCard } from "../../components/ExploreHubCard";
import { useFindWidget } from "../../components/find/FindWidget";
import TimelineItem from "../../components/gui/TimelineItem";
import ChatIndexingPeeks from "../../components/indexing/ChatIndexingPeeks";
@@ -76,9 +77,11 @@ import {
import getMultifileEditPrompt from "../../util/getMultifileEditPrompt";
import { getLocalStorage, setLocalStorage } from "../../util/localStorage";
import ConfigErrorIndicator from "./ConfigError";
+import { ExploreDialogWatcher } from "./ExploreDialogWatcher";
import { ToolCallDiv } from "./ToolCallDiv";
import { ToolCallButtons } from "./ToolCallDiv/ToolCallButtonsDiv";
import ToolOutput from "./ToolCallDiv/ToolOutput";
+import { useAutoScroll } from "./useAutoScroll";
const StopButton = styled.div`
background-color: ${vscBackground};
@@ -136,58 +139,6 @@ function fallbackRender({ error, resetErrorBoundary }: any) {
);
}
-const useAutoScroll = (
- ref: React.RefObject
,
- history: unknown[],
-) => {
- const [userHasScrolled, setUserHasScrolled] = useState(false);
-
- useEffect(() => {
- if (history.length) {
- setUserHasScrolled(false);
- }
- }, [history.length]);
-
- useEffect(() => {
- if (!ref.current || history.length === 0) return;
-
- const handleScroll = () => {
- const elem = ref.current;
- if (!elem) return;
-
- const isAtBottom =
- Math.abs(elem.scrollHeight - elem.scrollTop - elem.clientHeight) < 1;
-
- /**
- * We stop auto scrolling if a user manually scrolled up.
- * We resume auto scrolling if a user manually scrolled to the bottom.
- */
- setUserHasScrolled(!isAtBottom);
- };
-
- const resizeObserver = new ResizeObserver(() => {
- const elem = ref.current;
- if (!elem || userHasScrolled) return;
- elem.scrollTop = elem.scrollHeight;
- });
-
- ref.current.addEventListener("scroll", handleScroll);
-
- // Observe the container
- resizeObserver.observe(ref.current);
-
- // Observe all immediate children
- Array.from(ref.current.children).forEach((child) => {
- resizeObserver.observe(child);
- });
-
- return () => {
- resizeObserver.disconnect();
- ref.current?.removeEventListener("scroll", handleScroll);
- };
- }, [ref, history.length, userHasScrolled]);
-};
-
export function Chat() {
const posthog = usePostHog();
const dispatch = useAppDispatch();
@@ -227,6 +178,9 @@ export function Chat() {
);
const lastSessionId = useAppSelector((state) => state.session.lastSessionId);
const useHub = useAppSelector(selectUseHub);
+ const hasDismissedExploreDialog = useAppSelector(
+ (state) => state.ui.hasDismissedExploreDialog,
+ );
useEffect(() => {
// Cmd + Backspace to delete current step
@@ -570,6 +524,8 @@ export function Chat() {
/>
)}
+ {!hasDismissedExploreDialog && }
+
{history.length === 0 && (
<>
{onboardingCard.show && (
@@ -587,6 +543,12 @@ export function Chat() {
)}
+
+ {!onboardingCard.show && showTutorialCard === false && (
+