feat(semi-auto): 报文列表展示接口用途说明

This commit is contained in:
2026-11-17 11:16:44 +08:00
parent 136c392f8f
commit 72cca72ae5
3 changed files with 289 additions and 1 deletions
@@ -27,6 +27,7 @@ import type { CSSProperties } from 'react'
import { fetchAdminSemiAutoTaskHistory } from '@/services/admin/semi-auto'
import type { SemiAutoTaskHistoryEvent, SemiAutoTraceItem } from '@/types/admin/semi-auto'
import { formatAdminDateTime } from '@/utils/admin-time'
import { describeSemiAutoTraceAction } from '@/utils/semi-auto-trace-action'
import { useIsMobile } from '@/utils/use-is-mobile'
const { Text } = Typography
@@ -584,6 +585,10 @@ function EventItem({
}
function TraceLabel({ item }: { item: SemiAutoTraceItem }) {
const actionLabel = describeSemiAutoTraceAction({
channel: item.channel,
action: item.action,
})
return (
<Space direction="vertical" size={2} style={{ width: '100%' }}>
<Space size={6} wrap>
@@ -602,6 +607,7 @@ function TraceLabel({ item }: { item: SemiAutoTraceItem }) {
) : null}
<Text type="secondary">{formatAdminDateTime(item.createdAt)}</Text>
</Space>
{actionLabel ? <Text strong>{actionLabel}</Text> : null}
<Text code style={{ whiteSpace: 'break-all' }}>
{item.action}
</Text>
@@ -621,6 +627,10 @@ function TracePayload({
onCopy: (text: string, label: string) => void
onFilterRequest: (requestId: string) => void
}) {
const actionLabel = describeSemiAutoTraceAction({
channel: item.channel,
action: item.action,
})
return (
<Space direction="vertical" size={10} style={{ width: '100%' }}>
<Row gutter={[12, 12]}>
@@ -644,7 +654,7 @@ function TracePayload({
onClick={() =>
onCopy(
[
`动作:${item.action}`,
`动作:${actionLabel ? `${actionLabel} · ` : ''}${item.action}`,
`requestId:${item.requestId}`,
'',
'# 请求',