mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-03 20:41:07 +02:00
feat: add tooltips to composer plus and web search buttons
This commit is contained in:
parent
5a822f178d
commit
530d807fab
1 changed files with 41 additions and 26 deletions
|
|
@ -629,15 +629,20 @@ function ChatInputInner({
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2 px-4 pb-3">
|
<div className="flex items-center gap-2 px-4 pb-3">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<Tooltip>
|
||||||
<button
|
<TooltipTrigger asChild>
|
||||||
type="button"
|
<DropdownMenuTrigger asChild>
|
||||||
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
<button
|
||||||
aria-label="Add"
|
type="button"
|
||||||
>
|
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||||
<Plus className="h-4 w-4" />
|
aria-label="Add"
|
||||||
</button>
|
>
|
||||||
</DropdownMenuTrigger>
|
<Plus className="h-4 w-4" />
|
||||||
|
</button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="top">Add files or set work directory</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
<DropdownMenuContent align="start" className="min-w-56">
|
<DropdownMenuContent align="start" className="min-w-56">
|
||||||
<DropdownMenuItem onSelect={() => fileInputRef.current?.click()}>
|
<DropdownMenuItem onSelect={() => fileInputRef.current?.click()}>
|
||||||
<ImagePlus className="size-4" />
|
<ImagePlus className="size-4" />
|
||||||
|
|
@ -677,24 +682,34 @@ function ChatInputInner({
|
||||||
)}
|
)}
|
||||||
{searchAvailable && (
|
{searchAvailable && (
|
||||||
searchEnabled ? (
|
searchEnabled ? (
|
||||||
<button
|
<Tooltip>
|
||||||
type="button"
|
<TooltipTrigger asChild>
|
||||||
onClick={() => setSearchEnabled(false)}
|
<button
|
||||||
className="flex h-7 shrink-0 items-center gap-1.5 rounded-full border border-blue-200 bg-blue-50 px-2.5 text-blue-600 transition-colors hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-400 dark:hover:bg-blue-900"
|
type="button"
|
||||||
>
|
onClick={() => setSearchEnabled(false)}
|
||||||
<Globe className="h-3.5 w-3.5" />
|
className="flex h-7 shrink-0 items-center gap-1.5 rounded-full border border-blue-200 bg-blue-50 px-2.5 text-blue-600 transition-colors hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-400 dark:hover:bg-blue-900"
|
||||||
<span className="text-xs font-medium">Search</span>
|
>
|
||||||
<X className="h-3 w-3" />
|
<Globe className="h-3.5 w-3.5" />
|
||||||
</button>
|
<span className="text-xs font-medium">Search</span>
|
||||||
|
<X className="h-3 w-3" />
|
||||||
|
</button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="top">Web search on — click to disable</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<Tooltip>
|
||||||
type="button"
|
<TooltipTrigger asChild>
|
||||||
onClick={() => setSearchEnabled(true)}
|
<button
|
||||||
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
type="button"
|
||||||
aria-label="Search"
|
onClick={() => setSearchEnabled(true)}
|
||||||
>
|
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||||
<Globe className="h-4 w-4" />
|
aria-label="Search"
|
||||||
</button>
|
>
|
||||||
|
<Globe className="h-4 w-4" />
|
||||||
|
</button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="top">Enable web search</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
{codeModeEnabled ? (
|
{codeModeEnabled ? (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue