@@ -29,15 +33,6 @@ export const FileInfo = ({ filepath, range, onClick }: FileInfoProps) => {
{range && ` ${range}`}
-
- >
+
);
};
diff --git a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/InsertButton.tsx b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/InsertButton.tsx
index 6373673b6..9fecb2fa3 100644
--- a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/InsertButton.tsx
+++ b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/InsertButton.tsx
@@ -15,16 +15,15 @@ export function InsertButton({ onInsert }: InsertButtonProps) {
data-tooltip-id="codeblock-insert-button-tooltip"
className="!p-0"
>
-
-
-
- Insert Code
);
diff --git a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip.tsx b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip.tsx
index 6eb41dd3f..fcf3a76b1 100644
--- a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip.tsx
+++ b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip.tsx
@@ -1,4 +1,4 @@
-import { ReactNode, useMemo } from "react";
+import { ReactNode } from "react";
import { ToolTip } from "../../gui/Tooltip";
interface ToolbarButtonWithTooltipProps {
@@ -14,27 +14,18 @@ export function ToolbarButtonWithTooltip({
tooltipContent,
"data-testid": testId,
}: ToolbarButtonWithTooltipProps) {
- const tooltipId = useMemo(
- () => `tooltip-${Math.random().toString(36).slice(2, 11)}`,
- [],
- );
-
return (
- <>
+
{
e.stopPropagation();
onClick();
}}
- data-tooltip-id={tooltipId}
data-testid={testId}
className="hover:description-muted/30 flex cursor-pointer select-none items-center justify-center rounded bg-transparent px-0.5 py-0.5 hover:opacity-80"
>
{children}
-
- {tooltipContent}
-
- >
+
);
}
diff --git a/gui/src/components/StyledMarkdownPreview/SymbolLink.tsx b/gui/src/components/StyledMarkdownPreview/SymbolLink.tsx
index 8224af794..a2bf6c7a0 100644
--- a/gui/src/components/StyledMarkdownPreview/SymbolLink.tsx
+++ b/gui/src/components/StyledMarkdownPreview/SymbolLink.tsx
@@ -1,6 +1,5 @@
import { SymbolWithRange } from "core";
import { useContext, useMemo } from "react";
-import { v4 as uuidv4 } from "uuid";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { ToolTip } from "../gui/Tooltip";
@@ -35,21 +34,22 @@ function SymbolLink({ symbol, content }: SymbolLinkProps) {
return content.length > 200 ? content.slice(0, 196) + "\n..." : content;
}, [symbol]);
- const id = uuidv4();
return (
- <>
+
{processedContent ?? symbol.filepath}
+ }
+ >
{content}
-
- {processedContent ?? symbol.filepath}
-
- >
+
);
}
diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx
index 12cd24e20..7e87279a0 100644
--- a/gui/src/components/StyledMarkdownPreview/index.tsx
+++ b/gui/src/components/StyledMarkdownPreview/index.tsx
@@ -261,22 +261,12 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
rehypeReactOptions: {
components: {
a: ({ ...aProps }) => {
- const tooltipId = uuidv4();
-
return (
- <>
-
+
+
{aProps.children}
-
- {aProps.href}
-
- >
+
);
},
pre: ({ ...preProps }) => {
diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx
index 504ac94a8..b2f229fc2 100644
--- a/gui/src/components/dialogs/AddDocsDialog.tsx
+++ b/gui/src/components/dialogs/AddDocsDialog.tsx
@@ -94,13 +94,11 @@ function AddDocsDialog() {
Title
-
-
- The title that will be displayed to users in the `@docs`
- submenu
+
+
@@ -120,13 +118,11 @@ function AddDocsDialog() {
Start URL
-
-
- The starting location to begin crawling the documentation
- site
+
+
diff --git a/gui/src/components/gui/HeaderButtonWithToolTip.tsx b/gui/src/components/gui/HeaderButtonWithToolTip.tsx
index 2ee4496fe..602581e43 100644
--- a/gui/src/components/gui/HeaderButtonWithToolTip.tsx
+++ b/gui/src/components/gui/HeaderButtonWithToolTip.tsx
@@ -1,6 +1,5 @@
import React from "react";
import { type PlacesType } from "react-tooltip";
-import { v4 as uuidv4 } from "uuid";
import { HeaderButton } from "..";
import { ToolTip } from "./Tooltip";
@@ -25,15 +24,14 @@ const HeaderButtonWithToolTip = React.forwardRef<
HTMLButtonElement,
HeaderButtonWithToolTipProps
>((props: HeaderButtonWithToolTipProps, ref) => {
- const id = uuidv4();
- const tooltipId = `header_button_${id}`;
-
return (
- <>
+
{props.text}}
+ >
{props.children}
-
-
- {props.text}
-
- >
+
);
});
diff --git a/gui/src/components/gui/Tooltip.tsx b/gui/src/components/gui/Tooltip.tsx
index dcd3a8255..413c36f12 100644
--- a/gui/src/components/gui/Tooltip.tsx
+++ b/gui/src/components/gui/Tooltip.tsx
@@ -1,4 +1,4 @@
-import { CSSProperties } from "react";
+import { cloneElement, CSSProperties, ReactElement, useId } from "react";
import ReactDOM from "react-dom";
import { ITooltip, Tooltip } from "react-tooltip";
import { vscBackground, vscForeground } from "..";
@@ -17,7 +17,16 @@ const TooltipStyles: CSSProperties = {
textAlign: "center",
};
-export function ToolTip(props: ITooltip) {
+export function ToolTip({
+ children,
+ content,
+ ...props
+}: Omit
& {
+ content: ITooltip["children"];
+ children: ReactElement;
+}) {
+ const tooltipId = useId();
+
const combinedStyles = {
...TooltipStyles,
...props.style,
@@ -25,17 +34,27 @@ export function ToolTip(props: ITooltip) {
const tooltipPortalDiv = document.getElementById("tooltip-portal-div");
+ const childrenWithTooltipId = cloneElement(children, {
+ "data-tooltip-id": tooltipId,
+ });
+
return (
- tooltipPortalDiv &&
- ReactDOM.createPortal(
- ,
- tooltipPortalDiv,
- )
+ <>
+ {childrenWithTooltipId}
+ {tooltipPortalDiv &&
+ ReactDOM.createPortal(
+
+ {content}
+ ,
+ tooltipPortalDiv,
+ )}
+ >
);
}
diff --git a/gui/src/components/loaders/FreeTrialProgressBar.tsx b/gui/src/components/loaders/FreeTrialProgressBar.tsx
index f9c3b8b03..2b677bd9c 100644
--- a/gui/src/components/loaders/FreeTrialProgressBar.tsx
+++ b/gui/src/components/loaders/FreeTrialProgressBar.tsx
@@ -32,27 +32,25 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
if (completed > total) {
return (
- <>
-
+
+
Trial limit reached
-
-
- Configure a model above in order to continue
-
- >
+
);
}
return (
- <>
+
@@ -72,10 +70,7 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
{completed} / {total}
-
- {`Click to use your own API key or local LLM (required after ${FREE_TRIAL_LIMIT_REQUESTS} inputs)`}
-
- >
+
);
}
diff --git a/gui/src/components/mainInput/ContextStatus.tsx b/gui/src/components/mainInput/ContextStatus.tsx
index 7a97c2768..4ed048d86 100644
--- a/gui/src/components/mainInput/ContextStatus.tsx
+++ b/gui/src/components/mainInput/ContextStatus.tsx
@@ -22,7 +22,6 @@ const ContextStatus = () => {
return (
{
mouseup: false,
}}
clickable
- >
-
-
- {`${percent}% of context filled.`}
-
- {isPruned && (
+ content={
+
- {`Oldest messages are being removed.`}
+ {`${percent}% of context filled.`}
- )}
- {history.length > 0 && (
-
-
-
compactConversation(history.length - 1)}
- >
- Compact conversation
-
- {"\n"}
-
{
- dispatch(
- saveCurrentSession({
- openNewSession: true,
- generateTitle: false,
- }),
- );
- }}
- >
- Start a new session
-
+ {isPruned && (
+
+ {`Oldest messages are being removed.`}
+
+ )}
+ {history.length > 0 && (
+
+
+ compactConversation(history.length - 1)}
+ >
+ Compact conversation
+
+ {"\n"}
+ {
+ void dispatch(
+ saveCurrentSession({
+ openNewSession: true,
+ generateTitle: false,
+ }),
+ );
+ }}
+ >
+ Start a new session
+
+
-
- )}
+ )}
+
+ }
+ >
+
-
);
};
diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx
index 5911f537a..2d1cb89cc 100644
--- a/gui/src/components/mainInput/InputToolbar.tsx
+++ b/gui/src/components/mainInput/InputToolbar.tsx
@@ -80,19 +80,17 @@ function InputToolbar(props: InputToolbarProps) {
>
{!isInEdit && (
-
-
-
- Select Mode
-
-
- )}
-
-
-
- Select Model
+
+
+
+
-
+ )}
+
+
+
+
+
{props.toolbarOptions?.hideImageUpload ||
(supportsImages && (
@@ -112,32 +110,25 @@ function InputToolbar(props: InputToolbarProps) {
}
}}
/>
-
- {
- fileInputRef.current?.click();
- }}
- />
-
- Attach Image
-
-
+
+
+ {
+ fileInputRef.current?.click();
+ }}
+ />
+
+
>
))}
{props.toolbarOptions?.hideAddContext || (
-
-
-
-
- Attach Context
-
-
+
+
+
+
+
)}
{defaultModel?.underlyingProviderName === "anthropic" && (
- {hasReasoningEnabled ? (
-
- ) : (
-
- )}
-
-
- {hasReasoningEnabled
- ? "Disable model reasoning"
- : "Enable model reasoning"}
+
+ {hasReasoningEnabled ? (
+
+ ) : (
+
+ )}
)}
@@ -187,15 +175,19 @@ function InputToolbar(props: InputToolbarProps) {
})
}
>
-
- {getAltKeyLabel()}⏎{" "}
- {useActiveFile ? "No active file" : "Active file"}
-
-
- {useActiveFile
- ? "Send Without Active File"
- : "Send With Active File"}{" "}
- ({getAltKeyLabel()}⏎)
+
+
+ {getAltKeyLabel()}⏎{" "}
+ {useActiveFile ? "No active file" : "Active file"}
+
@@ -213,29 +205,27 @@ function InputToolbar(props: InputToolbarProps) {
)}
-
{
- if (props.onEnter) {
- props.onEnter({
- useCodebase: isMetaEquivalentKeyPressed(e as any),
- noContext: useActiveFile ? e.altKey : !e.altKey,
- });
- }
- }}
- disabled={isEnterDisabled}
- >
-
- ⏎ {props.toolbarOptions?.enterText ?? "Enter"}
-
- ⏎
-
- Send (⏎)
-
-
+
+ {
+ if (props.onEnter) {
+ props.onEnter({
+ useCodebase: isMetaEquivalentKeyPressed(e as any),
+ noContext: useActiveFile ? e.altKey : !e.altKey,
+ });
+ }
+ }}
+ disabled={isEnterDisabled}
+ >
+
+ ⏎ {props.toolbarOptions?.enterText ?? "Enter"}
+
+ ⏎
+
+
>
diff --git a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx
index 507f9aeb7..c2f86e0c1 100644
--- a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx
+++ b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx
@@ -81,13 +81,8 @@ function BlockSettingsToolbarIcon(
const fontSize = useFontSize(-3);
return (
- <>
-
+
+
-
- {props.tooltip}
-
- >
+
);
}
@@ -229,19 +221,21 @@ export function BlockSettingsTopToolbar() {
-
- {isUsingFreeTrial ? (
-
- ) : (
-
- )}
-
- {isUsingFreeTrial ? "View free trial usage" : "Select Agent"}
-
-
+
+ {isUsingFreeTrial ? (
+
+ ) : (
+
+ )}
+
+
);
diff --git a/gui/src/components/mainInput/Lump/sections/docs/StatusIndicator.tsx b/gui/src/components/mainInput/Lump/sections/docs/StatusIndicator.tsx
index d6dd2d55a..8d118b0a3 100644
--- a/gui/src/components/mainInput/Lump/sections/docs/StatusIndicator.tsx
+++ b/gui/src/components/mainInput/Lump/sections/docs/StatusIndicator.tsx
@@ -25,20 +25,13 @@ export function StatusIndicator({
}: StatusIndicatorProps) {
if (!status) return null;
- const indicator = (
-
-
+ {server.tools.map((tool, idx) => (
+ {tool.name}
+ ))}
+ {server.tools.length === 0 && (
+ No tools
+ )}
+ >
+ }
>
-
- {server.tools.length}
-
- {server.tools.map((tool, idx) => (
- {tool.name}
- ))}
- {server.tools.length === 0 && (
- No tools
- )}
-
-
-
+
+ {server.tools.length}
+
+
+
+
+ {server.prompts.map((prompt, idx) => (
+ {prompt.name}
+ ))}
+ {server.prompts.length === 0 && (
+ No prompts
+ )}
+ >
+ }
>
-
- {server.prompts.length}
-
- {server.prompts.map((prompt, idx) => (
- {prompt.name}
- ))}
- {server.prompts.length === 0 && (
- No prompts
- )}
-
-
-