fix(canvas): keep launch payload on first chat mount for auto-send
This commit is contained in:
parent
82e6f5e947
commit
a9e601b2ac
@ -1182,6 +1182,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
|
||||
const autoContextRef = useRef<string | null>(null);
|
||||
const pendingLaunchRef = useRef<CanvasLaunchPayload | null>(null);
|
||||
const [launchAutoSendTick, setLaunchAutoSendTick] = useState(0);
|
||||
const hasInitializedChatStateRef = useRef(false);
|
||||
const sessionMenuRef = useRef<HTMLDivElement>(null);
|
||||
const historyScrollTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
@ -2681,6 +2682,11 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
|
||||
const hasHydratedHistoryRef = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasInitializedChatStateRef.current) {
|
||||
hasInitializedChatStateRef.current = true;
|
||||
return;
|
||||
}
|
||||
|
||||
loadedHistorySignatureRef.current = "";
|
||||
processedMessageIds.current.clear();
|
||||
hasHydratedHistoryRef.current = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user