+ {/* 搜索栏 + 刷新 */}
+
+ setSearchQuery(e.target.value)}
+ style={{
+ flex: 1, padding: '4px 8px', borderRadius: 4, fontSize: 11,
+ border: '1px solid #2a3550', background: '#161b2e', color: '#dde4f8',
+ outline: 'none',
+ }}
+ />
+
+ {tasks.length} 条
+
+
+ {/* 事件列表 */}
+
+ {tasks.length === 0 && (
+
+ {loading ? '加载中...' : '暂无工具链事件'}
+
+ )}
+ {tasks.map((t: any) => (
+
setSelectedId(t.id)} style={{
+ padding: '10px 14px', borderBottom: '1px solid var(--line)',
+ cursor: 'pointer', transition: 'background .15s',
+ background: selectedId === t.id ? 'var(--panel2)' : 'transparent',
+ }}
+ onMouseEnter={e => e.currentTarget.style.background = 'var(--panel2)'}
+ onMouseLeave={e => e.currentTarget.style.background = selectedId === t.id ? 'var(--panel2)' : 'transparent'}
+ >
+
+ {STATUS_LABELS[t.status] || t.status}
+ {fmtTime(t.created_at)}
+
+
{t.title}
+
+ ))}
+
+
+ {!detail ? (
+
+ ) : (
+ <>
+ {/* 头部 */}
+
+
+
+ {STATUS_LABELS[detail.status] || detail.status}
+
+ {detail.id}
+
+
{detail.title}
+
+ {fmtTime(detail.created_at)}
+
+
+
+ {/* 正文 */}
+ {detail.description && (
+
+ {detail.description}
+
+ )}
+
+ {/* action_report 评论 — expand 格式 {items, total_count} */}
+ {detail.comments && detail.comments.items && detail.comments.items.length > 0 &&
+ renderComments(detail.comments.items)
+ }
+ {/* 兼容裸 list 格式 */}
+ {detail.comments && Array.isArray(detail.comments) && detail.comments.length > 0 &&
+ renderComments(detail.comments)
+ }
+ >
+ )}
+