workspace/ files existed on disk but were not included in previous incremental commit, causing git to record them as deleted. Re-adding all workspace card components, AgentWorkspace, ActivityTimeline, and WorkspaceCardRenderer to properly track them. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
42 lines
1.6 KiB
TypeScript
42 lines
1.6 KiB
TypeScript
"use client";
|
|
import { FileText, Download } from "lucide-react";
|
|
|
|
interface DocumentResultCardProps {
|
|
title: string;
|
|
type: string;
|
|
file_url: string;
|
|
size_hint?: string;
|
|
}
|
|
|
|
export function DocumentResultCard({ title, type, file_url, size_hint }: DocumentResultCardProps) {
|
|
return (
|
|
<div className="rounded-xl border border-[var(--gem-border)] bg-[var(--gem-surface)] p-4">
|
|
<div className="flex items-center gap-2 mb-3">
|
|
<FileText size={15} className="text-[var(--gem-blue,#4285f4)]" />
|
|
<span className="text-sm font-medium text-[var(--gem-text)]">文档生成</span>
|
|
<span className="ml-auto text-xs text-[var(--gem-text-muted)] bg-[var(--gem-surface-2)] px-2 py-0.5 rounded-full">
|
|
{type}
|
|
</span>
|
|
</div>
|
|
<div className="flex items-center gap-3 p-3 rounded-lg bg-[var(--gem-surface-2)]">
|
|
<FileText size={24} className="text-[var(--gem-blue,#4285f4)] flex-shrink-0" />
|
|
<div className="flex-1 min-w-0">
|
|
<p className="text-sm font-medium text-[var(--gem-text)] truncate">{title}</p>
|
|
{size_hint && <p className="text-xs text-[var(--gem-text-muted)]">{size_hint}</p>}
|
|
</div>
|
|
{file_url && (
|
|
<a
|
|
href={file_url}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-[var(--gem-blue,#4285f4)] text-white text-xs font-medium hover:opacity-90 transition-opacity flex-shrink-0"
|
|
>
|
|
<Download size={12} />
|
|
下载
|
|
</a>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|