fix: agent log

This commit is contained in:
zxhlyh 2025-01-09 16:13:17 +08:00
parent 145ef794b6
commit f7edff6c6b
5 changed files with 20 additions and 6 deletions

View File

@ -151,7 +151,7 @@ export const useSearchBoxAutoAnimate = (searchBoxAutoAnimate?: boolean) => {
if (!searchBoxAutoAnimate) {
const clientWidth = document.documentElement.clientWidth
if (clientWidth < 1350)
if (clientWidth < 1400)
setSearchBoxCanAnimate(false)
else
setSearchBoxCanAnimate(true)

View File

@ -37,10 +37,10 @@ const ListWrapper = ({
}, [handleQueryPlugins, marketplaceCollections, marketplaceCollectionsFromClient, isSuccessCollections])
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 && (
<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='mx-3 w-[1px] h-3.5 bg-divider-regular'></div>
<SortDropdown locale={locale} />

View File

@ -23,6 +23,7 @@ const AgentLogItem = ({
status,
children,
data,
metadata,
} = item
const [expanded, setExpanded] = useState(false)
@ -41,8 +42,17 @@ const AgentLogItem = ({
: <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='grow system-sm-semibold-uppercase text-text-secondary truncate'>{label}</div>
{/* <div className='shrink-0 mr-2 system-xs-regular text-text-tertiary'>0.02s</div> */}
<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} />
</div>
{

View File

@ -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='flex items-center px-[5px] system-xs-medium-uppercase text-text-tertiary'>

View File

@ -11,6 +11,10 @@ export type AgentLogItem = {
data: object, // debug data
error?: string,
status: string,
metadata?: {
elapsed_time?: number
provider?: string
},
}
export type AgentLogItemWithChildren = AgentLogItem & {