diff --git a/frontend/src/components/workspace/input-box.tsx b/frontend/src/components/workspace/input-box.tsx index e0605d7..eeb946b 100644 --- a/frontend/src/components/workspace/input-box.tsx +++ b/frontend/src/components/workspace/input-box.tsx @@ -5,13 +5,13 @@ import { CheckIcon, GraduationCapIcon, LightbulbIcon, + PaperclipIcon, ZapIcon, } from "lucide-react"; import { useCallback, useMemo, useState, type ComponentProps } from "react"; import { PromptInput, - PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, @@ -24,12 +24,12 @@ import { PromptInputSubmit, PromptInputTextarea, PromptInputTools, + usePromptInputAttachments, type PromptInputMessage, } from "@/components/ai-elements/prompt-input"; import { DropdownMenuGroup, DropdownMenuLabel, - DropdownMenuSeparator, } from "@/components/ui/dropdown-menu"; import { useI18n } from "@/core/i18n/hooks"; import { useModels } from "@/core/models/hooks"; @@ -46,6 +46,8 @@ import { ModelSelectorTrigger, } from "../ai-elements/model-selector"; +import { Tooltip } from "./tooltip"; + export function InputBox({ className, disabled, @@ -166,13 +168,25 @@ export function InputBox({ + - + +
+ {context.mode === "flash" && } + {context.mode === "thinking" && ( + + )} + {context.mode === "pro" && ( + + )} +
+
+ {(context.mode === "flash" && t.inputBox.flashMode) || + (context.mode === "thinking" && t.inputBox.reasoningMode) || + (context.mode === "pro" && t.inputBox.proMode)} +
+
- - {t.inputBox.mode} @@ -270,22 +284,6 @@ export function InputBox({
-
-
- {context.mode === "flash" && } - {context.mode === "thinking" && ( - - )} - {context.mode === "pro" && ( - - )} -
-
- {(context.mode === "flash" && t.inputBox.flashMode) || - (context.mode === "thinking" && t.inputBox.reasoningMode) || - (context.mode === "pro" && t.inputBox.proMode)} -
-
); } + +function AddAttachmentsButton({ className }: { className?: string }) { + const { t } = useI18n(); + const attachments = usePromptInputAttachments(); + return ( + + attachments.openFileDialog()} + > + + + + ); +}