Merge branch 'rust-dev'

This commit is contained in:
Christbru 2025-10-19 08:25:26 -05:00
commit 9888e2dd0a
3 changed files with 51 additions and 11 deletions

View file

@ -17,9 +17,10 @@ export default function ChatHeader({ title = "Schematic Spelunker" }) {
setIngesting(true);
const res = await fetch("/api/files/import-demo", { method: "POST" });
const json = await res.json().catch(() => ({}));
setToast(
`Imported: ${json.imported ?? "?"}, Skipped: ${json.skipped ?? "?"}`
);
const imported = json.imported ?? "?";
const skipped = json.skipped ?? "?";
const summary = `Imported: ${imported}, Skipped: ${skipped}`;
setToast(json.error ? `${summary} - ${json.error}` : summary);
setTimeout(() => setToast(""), 4000);
} catch (e) {
setToast("Import failed");