Feat: Move less important chat settings into a collapsible panel. (#16024)

### What problem does this PR solve?

Feat: Move less important chat settings into a collapsible panel.

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2026-06-15 19:09:19 +08:00
committed by GitHub
parent f6a2075ad0
commit ba93ac3bd7
10 changed files with 323 additions and 305 deletions

View File

@@ -29,7 +29,7 @@ export function Collapse({
title,
children,
rightContent,
open = true,
open,
defaultOpen = false,
onOpenChange,
disabled,
@@ -37,8 +37,12 @@ export function Collapse({
const [currentOpen, setCurrentOpen] = useState(open);
useEffect(() => {
setCurrentOpen(open);
}, [open]);
if (typeof open === 'boolean') {
setCurrentOpen(open);
} else {
setCurrentOpen(defaultOpen);
}
}, [defaultOpen, open]);
const handleOpenChange = useCallback(
(open: boolean) => {