mirror of
https://github.com/langgenius/dify.git
synced 2026-04-26 18:27:15 +08:00
fix: agent log
This commit is contained in:
parent
145ef794b6
commit
f7edff6c6b
@ -151,7 +151,7 @@ export const useSearchBoxAutoAnimate = (searchBoxAutoAnimate?: boolean) => {
|
|||||||
if (!searchBoxAutoAnimate) {
|
if (!searchBoxAutoAnimate) {
|
||||||
const clientWidth = document.documentElement.clientWidth
|
const clientWidth = document.documentElement.clientWidth
|
||||||
|
|
||||||
if (clientWidth < 1350)
|
if (clientWidth < 1400)
|
||||||
setSearchBoxCanAnimate(false)
|
setSearchBoxCanAnimate(false)
|
||||||
else
|
else
|
||||||
setSearchBoxCanAnimate(true)
|
setSearchBoxCanAnimate(true)
|
||||||
|
|||||||
@ -37,10 +37,10 @@ const ListWrapper = ({
|
|||||||
}, [handleQueryPlugins, marketplaceCollections, marketplaceCollectionsFromClient, isSuccessCollections])
|
}, [handleQueryPlugins, marketplaceCollections, marketplaceCollectionsFromClient, isSuccessCollections])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='relative flex flex-col grow px-12 py-2 bg-background-default-subtle'>
|
<div className='relative flex flex-col grow h-0 px-12 py-2 bg-background-default-subtle'>
|
||||||
{
|
{
|
||||||
plugins && (
|
plugins && (
|
||||||
<div className='top-5 flex items-center mb-4 pt-3'>
|
<div className='flex items-center mb-4 pt-3'>
|
||||||
<div className='title-xl-semi-bold text-text-primary'>{t('plugin.marketplace.pluginsResult', { num: pluginsTotal })}</div>
|
<div className='title-xl-semi-bold text-text-primary'>{t('plugin.marketplace.pluginsResult', { num: pluginsTotal })}</div>
|
||||||
<div className='mx-3 w-[1px] h-3.5 bg-divider-regular'></div>
|
<div className='mx-3 w-[1px] h-3.5 bg-divider-regular'></div>
|
||||||
<SortDropdown locale={locale} />
|
<SortDropdown locale={locale} />
|
||||||
|
|||||||
@ -23,6 +23,7 @@ const AgentLogItem = ({
|
|||||||
status,
|
status,
|
||||||
children,
|
children,
|
||||||
data,
|
data,
|
||||||
|
metadata,
|
||||||
} = item
|
} = item
|
||||||
const [expanded, setExpanded] = useState(false)
|
const [expanded, setExpanded] = useState(false)
|
||||||
|
|
||||||
@ -41,8 +42,17 @@ const AgentLogItem = ({
|
|||||||
: <RiArrowRightSLine className='shrink-0 w-4 h-4 text-text-quaternary' />
|
: <RiArrowRightSLine className='shrink-0 w-4 h-4 text-text-quaternary' />
|
||||||
}
|
}
|
||||||
<div className='shrink-0 mr-1.5 w-5 h-5'></div>
|
<div className='shrink-0 mr-1.5 w-5 h-5'></div>
|
||||||
<div className='grow system-sm-semibold-uppercase text-text-secondary truncate'>{label}</div>
|
<div
|
||||||
{/* <div className='shrink-0 mr-2 system-xs-regular text-text-tertiary'>0.02s</div> */}
|
className='grow system-sm-semibold-uppercase text-text-secondary truncate'
|
||||||
|
title={label}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</div>
|
||||||
|
{
|
||||||
|
metadata?.elapsed_time && (
|
||||||
|
<div className='shrink-0 mr-2 system-xs-regular text-text-tertiary'>{metadata?.elapsed_time?.toFixed(3)}s</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
<NodeStatusIcon status={status} />
|
<NodeStatusIcon status={status} />
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,7 +62,7 @@ const AgentLogNav = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!!end && agentOrToolLogItemStackLength > 2 && (
|
!!end && agentOrToolLogItemStackLength > 1 && (
|
||||||
<>
|
<>
|
||||||
<div className='shrink-0 mx-0.5 system-xs-regular text-divider-deep'>/</div>
|
<div className='shrink-0 mx-0.5 system-xs-regular text-divider-deep'>/</div>
|
||||||
<div className='flex items-center px-[5px] system-xs-medium-uppercase text-text-tertiary'>
|
<div className='flex items-center px-[5px] system-xs-medium-uppercase text-text-tertiary'>
|
||||||
|
|||||||
@ -11,6 +11,10 @@ export type AgentLogItem = {
|
|||||||
data: object, // debug data
|
data: object, // debug data
|
||||||
error?: string,
|
error?: string,
|
||||||
status: string,
|
status: string,
|
||||||
|
metadata?: {
|
||||||
|
elapsed_time?: number
|
||||||
|
provider?: string
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AgentLogItemWithChildren = AgentLogItem & {
|
export type AgentLogItemWithChildren = AgentLogItem & {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user