diff --git a/gui/src/components/HeaderButtonWithText.tsx b/gui/src/components/ButtonWithTooltip.tsx
similarity index 95%
rename from gui/src/components/HeaderButtonWithText.tsx
rename to gui/src/components/ButtonWithTooltip.tsx
index 9af9a4236..abf9173da 100644
--- a/gui/src/components/HeaderButtonWithText.tsx
+++ b/gui/src/components/ButtonWithTooltip.tsx
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import ReactDOM from "react-dom";
-import { HeaderButton, StyledTooltip } from ".";
import { type PlacesType } from "react-tooltip";
+import { HeaderButton, StyledTooltip } from ".";
import { v4 as uuidv4 } from "uuid";
@@ -21,7 +21,7 @@ interface HeaderButtonWithTextProps {
tooltipPlacement?: PlacesType;
}
-const HeaderButtonWithText = React.forwardRef<
+const ButtonWithTooltip = React.forwardRef<
HTMLButtonElement,
HeaderButtonWithTextProps
>((props: HeaderButtonWithTextProps, ref) => {
@@ -71,4 +71,4 @@ const HeaderButtonWithText = React.forwardRef<
);
});
-export default HeaderButtonWithText;
+export default ButtonWithTooltip;
diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx
index 2ec23ea2f..eede7e04c 100644
--- a/gui/src/components/Layout.tsx
+++ b/gui/src/components/Layout.tsx
@@ -22,8 +22,8 @@ import { RootState } from "../redux/store";
import { getFontSize, isMetaEquivalentKeyPressed } from "../util";
import { FREE_TRIAL_LIMIT_REQUESTS } from "../util/freeTrial";
import { getLocalStorage, setLocalStorage } from "../util/localStorage";
+import ButtonWithTooltip from "./ButtonWithTooltip";
import TextDialog from "./dialogs";
-import HeaderButtonWithText from "./HeaderButtonWithText";
import ProgressBar from "./loaders/ProgressBar";
import PostHogPageView from "./PosthogPageView";
import ProfileSwitcher from "./ProfileSwitcher";
@@ -264,7 +264,7 @@ const Layout = () => {
- {
@@ -276,7 +276,7 @@ const Layout = () => {
}}
>
-
+
)}
diff --git a/gui/src/components/ProfileSwitcher.tsx b/gui/src/components/ProfileSwitcher.tsx
index 44ba57b42..b6d9729a3 100644
--- a/gui/src/components/ProfileSwitcher.tsx
+++ b/gui/src/components/ProfileSwitcher.tsx
@@ -24,7 +24,7 @@ import { useWebviewListener } from "../hooks/useWebviewListener";
import { setLastControlServerBetaEnabledStatus } from "../redux/slices/miscSlice";
import { RootState } from "../redux/store";
import { getFontSize } from "../util";
-import HeaderButtonWithText from "./HeaderButtonWithText";
+import ButtonWithTooltip from "./ButtonWithTooltip";
const StyledListbox = styled(Listbox)`
background-color: ${vscBackground};
@@ -235,7 +235,7 @@ function ProfileSwitcher(props: {}) {
)}
{/* Settings button (either opens config.json or /settings page in control plane) */}
- {
if (selectedProfileId === "local") {
@@ -250,11 +250,11 @@ function ProfileSwitcher(props: {}) {
text="Configure Continue"
>
-
+
{/* Only show login if beta explicitly enabled */}
{controlServerBetaEnabled && (
-
-
+
)}
>
);
diff --git a/gui/src/components/gui/ErrorStepContainer.tsx b/gui/src/components/gui/ErrorStepContainer.tsx
index 5eb353831..e1d0515ce 100644
--- a/gui/src/components/gui/ErrorStepContainer.tsx
+++ b/gui/src/components/gui/ErrorStepContainer.tsx
@@ -2,7 +2,7 @@ import { MinusCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { ContinueError } from "core";
import styled from "styled-components";
import { defaultBorderRadius, vscBackground } from "..";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
const Div = styled.div`
padding: 8px;
@@ -29,12 +29,12 @@ function ErrorStepContainer(props: ErrorStepContainerProps) {
display: "flex",
}}
>
- props.onClose()}>
+ props.onClose()}>
-
- props.onDelete()}>
+
+ props.onDelete()}>
-
+
diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx
index 48958805f..f238feaa0 100644
--- a/gui/src/components/gui/StepContainer.tsx
+++ b/gui/src/components/gui/StepContainer.tsx
@@ -20,7 +20,7 @@ import { IdeMessengerContext } from "../../context/IdeMessenger";
import useUIConfig from "../../hooks/useUIConfig";
import { RootState } from "../../redux/store";
import { getFontSize } from "../../util";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import { CopyButton } from "../markdown/CopyButton";
import StyledMarkdownPreview from "../markdown/StyledMarkdownPreview";
@@ -145,7 +145,8 @@ function StepContainer(props: StepContainerProps) {
)}
{truncatedEarly && (
- {
props.onContinueGeneration();
@@ -156,23 +157,25 @@ function StepContainer(props: StepContainerProps) {
width="1.2em"
height="1.2em"
/>
-
+
)}
- {
props.onRetry();
}}
>
-
+
{feedback === false || (
-
+
-
+
)}
{feedback === true || (
-
+
-
+
)}
-
+
-
+
)}
diff --git a/gui/src/components/mainInput/MentionList.tsx b/gui/src/components/mainInput/MentionList.tsx
index 7ad231a39..ebe6048d2 100644
--- a/gui/src/components/mainInput/MentionList.tsx
+++ b/gui/src/components/mainInput/MentionList.tsx
@@ -2,6 +2,7 @@ import {
ArrowRightIcon,
ArrowUpOnSquareIcon,
AtSymbolIcon,
+ BoltIcon,
BookOpenIcon,
CodeBracketIcon,
CommandLineIcon,
@@ -16,7 +17,6 @@ import {
PlusIcon,
SparklesIcon,
TrashIcon,
- BoltIcon,
} from "@heroicons/react/24/outline";
import { Editor } from "@tiptap/react";
import {
@@ -40,8 +40,8 @@ import {
setDialogMessage,
setShowDialog,
} from "../../redux/slices/uiStateSlice";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import FileIcon from "../FileIcon";
-import HeaderButtonWithText from "../HeaderButtonWithText";
import SafeImg from "../SafeImg";
import AddDocsDialog from "../dialogs/AddDocsDialog";
import { ComboBoxItem } from "./types";
@@ -113,7 +113,9 @@ function DropdownIcon(props: { className?: string; item: ComboBoxItem }) {
const ItemsDiv = styled.div`
border-radius: ${defaultBorderRadius};
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0px 10px 20px rgba(0, 0, 0, 0.1);
+ box-shadow:
+ 0 0 0 1px rgba(0, 0, 0, 0.05),
+ 0px 10px 20px rgba(0, 0, 0, 0.1);
font-size: 0.9rem;
overflow-x: hidden;
overflow-y: auto;
@@ -410,7 +412,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
{item.subActions?.map((subAction) => {
const Icon = ICONS_FOR_DROPDOWN[subAction.icon];
return (
- {
subAction.action(item);
e.stopPropagation();
@@ -420,7 +422,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
text={undefined}
>
-
+
);
})}
diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx
index c7f695f00..f01a86c18 100644
--- a/gui/src/components/markdown/CodeBlockToolbar.tsx
+++ b/gui/src/components/markdown/CodeBlockToolbar.tsx
@@ -8,7 +8,7 @@ import styled from "styled-components";
import { defaultBorderRadius, vscEditorBackground } from "..";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { isJetBrains } from "../../util";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import { CopyButton } from "./CopyButton";
const TopDiv = styled.div`
@@ -78,13 +78,13 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
{isJetBrains() || (
-
)}
-
+
)}
- {
@@ -121,7 +121,7 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
}}
>
-
+
diff --git a/gui/src/components/markdown/CodeSnippetPreview.tsx b/gui/src/components/markdown/CodeSnippetPreview.tsx
index a47261cb2..80b8fe1a4 100644
--- a/gui/src/components/markdown/CodeSnippetPreview.tsx
+++ b/gui/src/components/markdown/CodeSnippetPreview.tsx
@@ -11,8 +11,8 @@ import styled from "styled-components";
import { defaultBorderRadius, lightGray, vscEditorBackground } from "..";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { getFontSize } from "../../util";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import FileIcon from "../FileIcon";
-import HeaderButtonWithText from "../HeaderButtonWithText";
import StyledMarkdownPreview from "./StyledMarkdownPreview";
const PreviewMarkdownDiv = styled.div<{
@@ -49,7 +49,7 @@ interface CodeSnippetPreviewProps {
editing?: boolean;
}
-const StyledHeaderButtonWithText = styled(HeaderButtonWithText)<{
+const StyledHeaderButtonWithText = styled(ButtonWithTooltip)<{
color?: string;
}>`
${(props) => props.color && `background-color: ${props.color};`}
@@ -133,7 +133,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
)}
- {
e.stopPropagation();
@@ -141,7 +141,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
}}
>
-
+
{(codeBlockRef.current?.scrollHeight ?? 0) > MAX_PREVIEW_HEIGHT && (
-
@@ -179,7 +179,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
onClick={() => setCollapsed(true)}
/>
)}
-
+
)}
);
diff --git a/gui/src/components/markdown/CopyButton.tsx b/gui/src/components/markdown/CopyButton.tsx
index 0627f4e47..cd47df6db 100644
--- a/gui/src/components/markdown/CopyButton.tsx
+++ b/gui/src/components/markdown/CopyButton.tsx
@@ -2,11 +2,12 @@ import { CheckIcon, ClipboardIcon } from "@heroicons/react/24/outline";
import { useContext, useState } from "react";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { isJetBrains } from "../../util";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
interface CopyButtonProps {
text: string | (() => string);
color?: string;
+ tabIndex?: number;
}
export function CopyButton(props: CopyButtonProps) {
@@ -16,7 +17,8 @@ export function CopyButton(props: CopyButtonProps) {
return (
<>
-
{
const text =
@@ -36,7 +38,7 @@ export function CopyButton(props: CopyButtonProps) {
) : (
)}
-
+
>
);
}
diff --git a/gui/src/components/markdown/PreWithToolbar.tsx b/gui/src/components/markdown/PreWithToolbar.tsx
index 3731109f5..ca9631c1c 100644
--- a/gui/src/components/markdown/PreWithToolbar.tsx
+++ b/gui/src/components/markdown/PreWithToolbar.tsx
@@ -41,6 +41,7 @@ function PreWithToolbar(props: { children: any; language: string | null }) {
return (
setHovering(true)}
diff --git a/gui/src/components/modelSelection/LegacyModelSelect.tsx b/gui/src/components/modelSelection/LegacyModelSelect.tsx
index c5bcb4026..21d81ccbb 100644
--- a/gui/src/components/modelSelection/LegacyModelSelect.tsx
+++ b/gui/src/components/modelSelection/LegacyModelSelect.tsx
@@ -27,7 +27,7 @@ import {
} from "../../redux/slices/uiStateSlice";
import { RootState } from "../../redux/store";
import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../../util";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import ConfirmationDialog from "../dialogs/ConfirmationDialog";
const GridDiv = styled.div`
@@ -149,7 +149,7 @@ function ListBoxOption({
{option.title}
{hovered && showDelete && (
- {
dispatch(setShowDialog(true));
@@ -173,7 +173,7 @@ function ListBoxOption({
className="absolute right-0 p-1"
>
-
+
)}
diff --git a/gui/src/components/modelSelection/ModelCard.tsx b/gui/src/components/modelSelection/ModelCard.tsx
index 71820d0a3..e17204301 100644
--- a/gui/src/components/modelSelection/ModelCard.tsx
+++ b/gui/src/components/modelSelection/ModelCard.tsx
@@ -9,7 +9,7 @@ import {
} from "..";
import { PackageDimension } from "../../pages/AddNewModel/configs/models";
import { providers } from "../../pages/AddNewModel/configs/providers";
-import HeaderButtonWithText from "../HeaderButtonWithText";
+import ButtonWithTooltip from "../ButtonWithTooltip";
import InfoHover from "../InfoHover";
import ModelProviderTag, { ModelProviderTags } from "./ModelProviderTag";
@@ -161,9 +161,9 @@ function ModelCard(props: ModelCardProps) {
href={props.refUrl}
target="_blank"
>
-
+
-
+
)}
@@ -216,7 +216,7 @@ function ModelCard(props: ModelCardProps) {
return null;
}
return (
-
)}
-
+
);
})}
diff --git a/gui/src/index.css b/gui/src/index.css
index 8511531f3..77022daf3 100644
--- a/gui/src/index.css
+++ b/gui/src/index.css
@@ -45,6 +45,13 @@ a:focus {
outline: none;
}
+*:focus {
+ outline: 1px solid red;
+ border: 1px solid black;
+ background-color: gainsboro;
+ visibility: visible !important;
+}
+
@keyframes fadeIn {
from {
opacity: 0;
diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx
index f81dd1769..2bfa45355 100644
--- a/gui/src/pages/history.tsx
+++ b/gui/src/pages/history.tsx
@@ -18,7 +18,7 @@ import {
vscForeground,
vscInputBackground,
} from "../components";
-import HeaderButtonWithText from "../components/HeaderButtonWithText";
+import ButtonWithTooltip from "../components/ButtonWithTooltip";
import useHistory from "../hooks/useHistory";
import { useNavigationListener } from "../hooks/useNavigationListener";
import { getFontSize } from "../util";
@@ -175,7 +175,7 @@ function TableRow({
{hovered && (
- {
@@ -183,11 +183,11 @@ function TableRow({
}}
>
-
+
)}
{hovered && (
- {
@@ -196,7 +196,7 @@ function TableRow({
}}
>
-
+
)}
diff --git a/gui/src/pages/monaco.tsx b/gui/src/pages/monaco.tsx
index ba441d0c8..1e1e9879f 100644
--- a/gui/src/pages/monaco.tsx
+++ b/gui/src/pages/monaco.tsx
@@ -3,7 +3,7 @@ import { DiffEditor } from "@monaco-editor/react";
import React, { useContext, useEffect } from "react";
import { v4 } from "uuid";
import { vscInputBackground } from "../components";
-import HeaderButtonWithText from "../components/HeaderButtonWithText";
+import ButtonWithTooltip from "../components/ButtonWithTooltip";
import { IdeMessengerContext } from "../context/IdeMessenger";
interface EditorFrameProps {
@@ -53,12 +53,12 @@ function EditorFrame(props: EditorFrameProps) {
{props.filename.split("/").pop()}
- {}}>
+ {}}>
-
- {}}>
+
+ {}}>
-
+
{/*