refactor: soften chat composer hint

This commit is contained in:
lc6464 2026-06-11 22:56:21 +08:00 committed by Guoguo
parent 890f4d6bcb
commit dc746fbe66

View file

@ -10,11 +10,6 @@ import TextareaAutosize from "react-textarea-autosize"
import { ContextUsageRing } from "@/components/chat/context-usage-ring" import { ContextUsageRing } from "@/components/chat/context-usage-ring"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
import type { ChatAttachment, ContextUsage } from "@/store/chat" import type { ChatAttachment, ContextUsage } from "@/store/chat"
@ -188,8 +183,6 @@ export function ChatComposer({
/> />
)} )}
{canInput ? ( {canInput ? (
<Tooltip delayDuration={700}>
<TooltipTrigger asChild>
<span tabIndex={!canSend ? 0 : undefined}> <span tabIndex={!canSend ? 0 : undefined}>
<Button <Button
type="button" type="button"
@ -202,14 +195,6 @@ export function ChatComposer({
<IconArrowUp className="size-4" /> <IconArrowUp className="size-4" />
</Button> </Button>
</span> </span>
</TooltipTrigger>
<TooltipContent
className="border-border/70 bg-muted text-foreground border text-center whitespace-pre-line shadow-lg shadow-black/10 dark:shadow-black/30"
arrowClassName="bg-muted fill-muted"
>
{t("chat.sendHint")}
</TooltipContent>
</Tooltip>
) : null} ) : null}
</div> </div>
</div> </div>
@ -218,7 +203,7 @@ export function ChatComposer({
<div <div
aria-hidden={!hasInput} aria-hidden={!hasInput}
className={cn( className={cn(
"border-border/70 bg-muted text-foreground mt-2 inline-flex items-center rounded-md border px-3 py-1.5 text-xs shadow-lg shadow-black/10 transition-all duration-200 dark:shadow-black/30", "border-border/50 bg-muted/55 text-muted-foreground mt-2 inline-flex items-center rounded-md border px-3 py-1 text-[11px] shadow-sm transition-all duration-200 dark:bg-muted/45",
hasInput hasInput
? "translate-y-0 opacity-100" ? "translate-y-0 opacity-100"
: "pointer-events-none -translate-y-1 opacity-0", : "pointer-events-none -translate-y-1 opacity-0",