feat: multiple model configuration (#2196)

Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
zxhlyh 2024-01-25 12:36:55 +08:00 • committed by GitHub
commit d5361b8d09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 3209 additions and 188 deletions

View file

@ -7,6 +7,8 @@ import {
AlignLeft01,
AlignRight01,
} from '@/app/components/base/icons/src/vender/line/layout'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import { APP_SIDEBAR_SHOULD_COLLAPSE } from '@/app/components/app/configuration/debug/types'
export type IAppDetailNavProps = {
iconType?: 'app' | 'dataset' | 'notion'
@ -39,6 +41,14 @@ const AppDetailNav = ({ title, desc, icon, icon_background, navigation, extraInf
})
}, [])
const { eventEmitter } = useEventEmitterContextContext()
eventEmitter?.useSubscription((v: any) => {
if (v.type === APP_SIDEBAR_SHOULD_COLLAPSE) {
setModeState('collapse')
localStorage.setItem('app-detail-collapse-or-expand', 'collapse')
}
})
return (
<div
className={`