fix: refine canvas composer controls
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-04-18 12:10:00 +08:00
parent fd95b9547e
commit aebdb72564
2 changed files with 9 additions and 9 deletions

View File

@ -11430,7 +11430,7 @@ export function CanvasChatPanel({
</div>
</div>
) : (
<div className="shrink-0">
<div className="min-w-0 shrink">
<ImageParamsBar
modelName={activeComposerMode === "agent" ? agentDisplayName : currentModel?.displayName}
initialParams={imageParams}
@ -11445,21 +11445,21 @@ export function CanvasChatPanel({
)}
</div>
<div className="flex items-center gap-2 flex-shrink-0">
<div className="flex flex-shrink-0 items-center gap-2.5">
{!isWorkspacePresentation && activeComposerMode === "image" ? (
<Button
variant="ghost"
size="icon"
title={`深度思考:${deepThinkingEnabled ? "开" : "关"}`}
className={cn(
"h-8 w-8 rounded-full border transition-colors",
"h-8 w-8 shrink-0 rounded-full border-0 bg-transparent p-0 shadow-none transition-colors",
isVideoWorkspace
? deepThinkingEnabled
? "border-primary/30 bg-primary/10 text-primary hover:bg-primary/12"
: "border-border/60 bg-background text-muted-foreground hover:bg-background/90"
? "bg-primary/10 text-primary hover:bg-primary/12"
: "text-muted-foreground hover:bg-muted/70"
: deepThinkingEnabled
? "border-[#8ab0ff] bg-[#eef4ff] text-[#3b5bcc] hover:bg-[#e5efff]"
: "border-[#d8dce3] bg-white text-[#6b7280] hover:bg-[#f4f6f8]"
? "bg-[#eef4ff] text-[#3b5bcc] hover:bg-[#e5efff]"
: "text-[#6b7280] hover:bg-[#f4f6f8]"
)}
onClick={() => setDeepThinkingEnabled((prev) => !prev)}
disabled={isSubmitting}

View File

@ -288,7 +288,7 @@ export function ImageParamsBar({
return (
<div
className={cn(
"ml-1 flex items-center gap-1 pl-1",
"ml-1 flex min-w-0 items-center gap-1 pl-1",
showInlineDivider &&
(isDarkInline ? "border-l border-white/10" : "border-l border-border/50")
)}
@ -298,7 +298,7 @@ export function ImageParamsBar({
<Button
variant="ghost"
className={cn(
"h-8 max-w-[168px] shrink rounded-[12px] px-2 text-[11px] font-semibold",
"h-8 min-w-0 max-w-[168px] shrink rounded-[12px] px-2 text-[11px] font-semibold",
isDarkInline
? "border border-white/12 bg-white/[0.06] text-white hover:bg-white/[0.1]"
: "border border-[#d6dbe2] bg-[#f3f4f6]/90 text-[#2f3b48] hover:bg-[#edeff2]/90"