mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-12-03 10:47:06 +03:00
fix chat reasoning not splitting after tool calls
This commit is contained in:
@@ -34,9 +34,10 @@ export function ReasoningBubble({
|
||||
const { t } = useTranslation(["views/chat"]);
|
||||
// Open while the model is still mid-thought (no answer tokens yet);
|
||||
// once the answer begins, collapse on its own but let the user reopen.
|
||||
const [open, setOpen] = useState(true);
|
||||
// Reasoning that is already finished on mount starts collapsed.
|
||||
const [open, setOpen] = useState(!answerStarted);
|
||||
const userInteractedRef = useRef(false);
|
||||
const lastAutoState = useRef(true);
|
||||
const lastAutoState = useRef(!answerStarted);
|
||||
|
||||
useEffect(() => {
|
||||
if (userInteractedRef.current) return;
|
||||
@@ -66,6 +67,7 @@ export function ReasoningBubble({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label={label}
|
||||
className="h-auto w-full min-w-0 justify-start gap-2 whitespace-normal p-0 text-left text-xs hover:bg-transparent"
|
||||
>
|
||||
<Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user