feat(web): 刮削设置与对话框加「更新」覆盖方式,内容没变的跳过不逐条列出
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
37cf0a398e
commit
4306bff6d3
4 files changed
+15
-7
No files matched your search
@@ -70,7 +70,7 @@ function FileRow({ f }: { f: ScrapeFileResult }) {
|
||||
)}
|
||||
</span>
|
||||
<span className="text-meta text-muted-foreground">{ROLE[f.role] ?? f.role}</span>
|
||||
{f.action !== "written" && f.reason && f.reason !== "scrape_exists" ? (
|
||||
{f.action !== "written" && f.reason && !QUIET_SKIPS.has(f.reason) ? (
|
||||
<span className={f.action === "failed" ? "text-meta text-destructive" : "text-meta text-muted-foreground"}>
|
||||
{reasonLine(f.reason, "写入失败")}
|
||||
</span>
|
||||
@@ -80,11 +80,14 @@ function FileRow({ f }: { f: ScrapeFileResult }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 不必逐条列出的跳过:已存在(不是本工具写的 / 只补缺失)、内容没变 */
|
||||
const QUIET_SKIPS = new Set(["scrape_exists", "scrape_unchanged"]);
|
||||
|
||||
/** 一条刮削记录:状态、目录与识别结果、计数、逐文件结果(缺省不列"已存在"跳过的) */
|
||||
export function ScrapeRecordView({ record: s, showPath = false }: { record: ScrapeRecord; showPath?: boolean }) {
|
||||
const [showAll, setShowAll] = useState(false);
|
||||
const files = s.files;
|
||||
const important = files.filter((f) => f.action !== "skipped" || f.reason !== "scrape_exists");
|
||||
const important = files.filter((f) => f.action !== "skipped" || !QUIET_SKIPS.has(f.reason ?? ""));
|
||||
const shown = showAll ? files : important.slice(0, 12);
|
||||
const hidden = files.length - shown.length;
|
||||
const done = s.status !== "queued" && s.status !== "running";
|
||||
|
||||
Reference in new issue
Block a user