Просмотр исходного кода

fix: agent chat multiple model debug (#3258)

tags/0.6.2
zxhlyh 1 год назад
Родитель
Сommit
af9ccb7072
Аккаунт пользователя с таким Email не найден

+ 1
- 1
web/app/components/app/configuration/debug/debug-with-multiple-model/debug-item.tsx Просмотреть файл

</div> </div>
<div style={{ height: 'calc(100% - 40px)' }}> <div style={{ height: 'calc(100% - 40px)' }}>
{ {
mode === 'chat' && currentProvider && currentModel && currentModel.status === ModelStatusEnum.active && (
(mode === 'chat' || mode === 'agent-chat') && currentProvider && currentModel && currentModel.status === ModelStatusEnum.active && (
<ChatItem modelAndParameter={modelAndParameter} /> <ChatItem modelAndParameter={modelAndParameter} />
) )
} }

+ 3
- 2
web/app/components/app/configuration/debug/debug-with-multiple-model/index.tsx Просмотреть файл

checkCanSend, checkCanSend,
} = useDebugWithMultipleModelContext() } = useDebugWithMultipleModelContext()
const { eventEmitter } = useEventEmitterContextContext() const { eventEmitter } = useEventEmitterContextContext()
const isChatMode = mode === 'chat' || mode === 'agent-chat'


const handleSend = useCallback((message: string, files?: VisionFile[]) => { const handleSend = useCallback((message: string, files?: VisionFile[]) => {
if (checkCanSend && !checkCanSend()) if (checkCanSend && !checkCanSend())
className={` className={`
grow mb-3 relative px-6 overflow-auto grow mb-3 relative px-6 overflow-auto
`} `}
style={{ height: mode === 'chat' ? 'calc(100% - 60px)' : '100%' }}
style={{ height: isChatMode ? 'calc(100% - 60px)' : '100%' }}
> >
{ {
multipleModelConfigs.map((modelConfig, index) => ( multipleModelConfigs.map((modelConfig, index) => (
} }
</div> </div>
{ {
mode === 'chat' && (
isChatMode && (
<div className='shrink-0 pb-4 px-6'> <div className='shrink-0 pb-4 px-6'>
<ChatInput <ChatInput
onSend={handleSend} onSend={handleSend}

Загрузка…
Отмена
Сохранить