mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Root cause: addFile()/addText() hash dedup only matched rows with status=completed, so the same file uploaded while in partial/pending/ processing/failed status would create a duplicate row. Fix: - Remove .eq(processingStatus, "completed") from dedup queries — match any non-deleted row with the same content hash in the KB - On dedup hit: completed/pending/processing → return as-is; partial/failed → trigger reprocess (partial enters resume branch) - Clean up the newly uploaded temp file when dedup discards it - Frontend: uploadRawFile/addRawText check for existing id in the list before unshift to prevent visual duplicates Test: WikiRawMaterialDedupTest — 10 cases covering all 5 statuses, reprocess triggers for partial/failed, no-op for others, insert only when no match. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| TEST_CASES.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| yarn.lock | ||