fix: agent log

This commit is contained in:
zxhlyh
2025-01-08 14:19:50 +08:00
parent 53bb1bb937
commit 98ad18ba81
11 changed files with 71 additions and 17 deletions

View File

@ -30,26 +30,26 @@ const AgentLogItem = ({
<div className='border-[0.5px] border-components-panel-border rounded-[10px]'>
<div
className={cn(
'flex items-center pl-1.5 pt-2 pr-3 pb-2',
'flex items-center pl-1.5 pt-2 pr-3 pb-2 cursor-pointer',
expanded && 'pb-1',
)}
onClick={() => setExpanded(!expanded)}
>
{
expanded
? <RiArrowRightSLine className='shrink-0 w-4 h-4 rotate-90' />
: <RiArrowRightSLine className='shrink-0 w-4 h-4' />
? <RiArrowRightSLine className='shrink-0 w-4 h-4 rotate-90 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='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='shrink-0 mr-2 system-xs-regular text-text-tertiary'>0.02s</div> */}
<NodeStatusIcon status={status} />
</div>
{
expanded && (
<div className='p-1 pt-0'>
{
!!children.length && (
!!children?.length && (
<Button
className='flex items-center justify-between mb-1 w-full'
variant='tertiary'

View File

@ -19,7 +19,9 @@ const AgentLogNav = ({
className='shrink-0 px-[5px]'
size='small'
variant='ghost-accent'
onClick={() => onShowAgentOrToolLog()}
onClick={() => {
onShowAgentOrToolLog()
}}
>
<RiArrowLeftLine className='mr-1 w-3.5 h-3.5' />
Agent
@ -31,7 +33,6 @@ const AgentLogNav = ({
variant='ghost-accent'
onClick={() => {}}
>
<RiArrowLeftLine className='mr-1 w-3.5 h-3.5' />
Agent strategy
</Button>
{

View File

@ -24,7 +24,9 @@ const AgentLogTrigger = ({
<div className='grow mx-0.5 px-1 system-xs-medium text-text-secondary'></div>
<div
className='shrink-0 flex items-center px-[1px] system-xs-regular-uppercase text-text-tertiary cursor-pointer'
onClick={() => onShowAgentOrToolLog({ id: nodeInfo.id, children: agentLog || [] } as AgentLogItemWithChildren)}
onClick={() => {
onShowAgentOrToolLog({ id: nodeInfo.id, children: agentLog || [] } as AgentLogItemWithChildren)
}}
>
Detail
<RiArrowRightLine className='ml-0.5 w-3.5 h-3.5' />

View File

@ -36,7 +36,10 @@ const SpecialResultPanel = ({
handleShowAgentOrToolLog,
}: SpecialResultPanelProps) => {
return (
<>
<div onClick={(e) => {
e.stopPropagation()
e.nativeEvent.stopImmediatePropagation()
}}>
{
!!showRetryDetail && !!retryResultList?.length && setShowRetryDetailFalse && (
<RetryResultPanel
@ -63,7 +66,7 @@ const SpecialResultPanel = ({
/>
)
}
</>
</div>
)
}

View File

@ -166,7 +166,13 @@ const TracingPanel: FC<TracingPanelProps> = ({
}
return (
<div className={cn(className || 'bg-components-panel-bg', 'py-2')}>
<div
className={cn(className || 'bg-components-panel-bg', 'py-2')}
onClick={(e) => {
e.stopPropagation()
e.nativeEvent.stopImmediatePropagation()
}}
>
{treeNodes.map(renderNode)}
</div>
)