mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 02:43:49 +08:00
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
29 lines
705 B
TypeScript
29 lines
705 B
TypeScript
import type { AgentLogConversationItemResponse } from '@dify/contracts/api/console/agent/types.gen'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { LogSourceIcon } from './source-icon'
|
|
|
|
export function LogSourceCell({
|
|
source,
|
|
}: {
|
|
source?: AgentLogConversationItemResponse['source']
|
|
}) {
|
|
const { t } = useTranslation('agentV2')
|
|
|
|
if (!source) {
|
|
return (
|
|
<div className="truncate text-text-quaternary">
|
|
{t('agentDetail.logs.notAvailable')}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<div className="flex min-w-0 items-center gap-2">
|
|
<LogSourceIcon source={source} />
|
|
<div className="min-w-0 flex-1 truncate">
|
|
{source.app_name}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|