media abstraction: add structured MediaItem model and expose media-source audit in task queue detail

This commit is contained in:
DBT
2026-02-28 02:49:13 +00:00
parent f274acf818
commit 46a0403b0f
5 changed files with 71 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ type TaskAuditItem = {
error?: string;
input_preview?: string;
logs?: string[];
media_items?: Array<{ source?: string; type?: string; ref?: string; path?: string; channel?: string }>;
[key: string]: any;
};
@@ -110,6 +111,21 @@ const TaskAudit: React.FC = () => {
<div className="p-2 rounded bg-zinc-950/60 border border-zinc-800 whitespace-pre-wrap text-zinc-200">{Array.isArray(selected.logs) && selected.logs.length ? selected.logs.join('\n') : '-'}</div>
</div>
<div>
<div className="text-zinc-500 text-xs mb-1">{t('mediaSources')}</div>
<div className="p-2 rounded bg-zinc-950/60 border border-zinc-800 text-xs">
{Array.isArray(selected.media_items) && selected.media_items.length > 0 ? (
<div className="space-y-1">
{selected.media_items.map((m, i) => (
<div key={i} className="font-mono break-all text-zinc-200">
[{m.channel || '-'}] {m.source || '-'} / {m.type || '-'} · {m.path || m.ref || '-'}
</div>
))}
</div>
) : '-'}
</div>
</div>
<div>
<div className="text-zinc-500 text-xs mb-1">{t('rawJson')}</div>
<pre className="p-2 rounded bg-zinc-950/60 border border-zinc-800 text-xs overflow-auto">{selectedPretty}</pre>