Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: agent chat multiple model debug #3258

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const DebugItem: FC<DebugItemProps> = ({
</div>
<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} />
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const DebugWithMultipleModel = () => {
checkCanSend,
} = useDebugWithMultipleModelContext()
const { eventEmitter } = useEventEmitterContextContext()
const isChatMode = mode === 'chat' || mode === 'agent-chat'

const handleSend = useCallback((message: string, files?: VisionFile[]) => {
if (checkCanSend && !checkCanSend())
Expand Down Expand Up @@ -97,7 +98,7 @@ const DebugWithMultipleModel = () => {
className={`
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) => (
Expand All @@ -121,7 +122,7 @@ const DebugWithMultipleModel = () => {
}
</div>
{
mode === 'chat' && (
isChatMode && (
<div className='shrink-0 pb-4 px-6'>
<ChatInput
onSend={handleSend}
Expand Down
Loading