From 365174ffc59ed209149ee11c04a0bf1c2aa81b70 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Feb 2026 20:01:43 +0800 Subject: [PATCH] fix: hide image advanced settings icon and keep deep-thinking toggle --- components/canvas/CanvasChatPanel.tsx | 23 +++++++++++++++++++++-- components/image-params-bar.tsx | 4 +++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/components/canvas/CanvasChatPanel.tsx b/components/canvas/CanvasChatPanel.tsx index 3c3d5c1ad..11c2af1c3 100644 --- a/components/canvas/CanvasChatPanel.tsx +++ b/components/canvas/CanvasChatPanel.tsx @@ -5,7 +5,7 @@ import { DefaultChatTransport } from "ai"; import { useEffect, useRef, useState, useCallback, useMemo } from "react"; import { createPortal } from "react-dom"; import useSWR, { useSWRConfig } from "swr"; -import { Send, Loader2, ImagePlus, Paperclip, X, Plus, History, LayoutGrid, Maximize2, RefreshCw, Globe, Box, ArrowUp, Video, Sparkles, Check, ChevronDown, ChevronUp, AlertCircle, CheckCircle2, ThumbsUp, ThumbsDown, Eye, Trash2 } from "lucide-react"; +import { Send, Loader2, ImagePlus, Paperclip, X, Plus, History, LayoutGrid, Maximize2, RefreshCw, Globe, Box, ArrowUp, Video, Sparkles, Check, ChevronDown, ChevronUp, AlertCircle, CheckCircle2, Brain, ThumbsUp, ThumbsDown, Eye, Trash2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { @@ -1328,7 +1328,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF const [videoSlotUploading, setVideoSlotUploading] = useState(null); const [lastImageModelId, setLastImageModelId] = useState(null); const [lastVideoModelId, setLastVideoModelId] = useState(null); - const [deepThinkingEnabled] = useState(false); + const [deepThinkingEnabled, setDeepThinkingEnabled] = useState(false); const [analysisCollapseState, setAnalysisCollapseState] = useState>({}); const [typedAssistantSections, setTypedAssistantSections] = useState>({}); const [activeTypingSections, setActiveTypingSections] = useState>({}); @@ -7328,6 +7328,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF inline={true} providerType={currentModel?.providerType} imageGenConfig={currentModel?.imageGenConfig || undefined} + hideAdvancedOptions={activeComposerMode === "image"} /> )} @@ -7352,6 +7353,24 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF ) : null} + {activeComposerMode === "image" ? ( + + ) : null} + {activeComposerMode !== "agent" ? (