diff --git a/refact-agent/gui/src/components/ChatForm/ToolUseSwitch.tsx b/refact-agent/gui/src/components/ChatForm/ToolUseSwitch.tsx index 9b0a7de60..2f23521b5 100644 --- a/refact-agent/gui/src/components/ChatForm/ToolUseSwitch.tsx +++ b/refact-agent/gui/src/components/ChatForm/ToolUseSwitch.tsx @@ -1,7 +1,7 @@ -import React from "react"; -import { Flex, SegmentedControl, Text, HoverCard } from "@radix-ui/themes"; +import React, { useMemo } from "react"; +import { Flex, Text } from "@radix-ui/themes"; import { ToolUse } from "../../features/Chat/Thread"; -import { QuestionMarkCircledIcon } from "@radix-ui/react-icons"; +import { Select, type ItemProps } from "../Select"; type ToolUseSwitchProps = { toolUse: ToolUse; @@ -12,50 +12,64 @@ export const ToolUseSwitch = React.forwardRef< HTMLDivElement, ToolUseSwitchProps >(({ toolUse, setToolUse }, ref) => { + const options: ItemProps[] = useMemo(() => [ + { + value: "quick", + children: "Quick", + tooltip: ( +
+ Quick + + The model doesn't have access to any tools and answers + immediately. You still can provide context using @-commands, try + @help. + +
+ ), + }, + { + value: "explore", + children: "Explore", + tooltip: ( +
+ Explore + + The model has access to exploration tools and collects the + necessary context for you. + +
+ ), + }, + { + value: "agent", + children: "Agent", + tooltip: ( +
+ Agent + + The model has agent capabilities, might take a long time to + respond. For example it can provide a high-quality context to + solve a problem. + +
+ ), + }, + ], []); + + const handleChange = (value: string) => { + setToolUse(value as ToolUse); + }; + return ( How fast do you want the answer: - - { - setToolUse(x as ToolUse); - }} - > - Quick - Explore - Agent - - - - - - - Quick - - The model doesn't have access to any tools and answers - immediately. You still can provide context using @-commands, try - @help. - - - Explore - - - The model has access to exploration tools and collects the - necessary context for you. - - - Agent - - - The model has agent capabilities, might take a long time to - respond. For example it can provide a high-quality context to - solve a problem. - - - - +