Skip to content

Commit

Permalink
fix: agent chat multiple model debug (langgenius#3258)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored and dengpeng committed Jun 16, 2024
1 parent 69528d3 commit 01cfc51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 01cfc51

Please sign in to comment.