Remove include map state and refactor file/website data structures; remove 'Add to Repo' column

This commit is contained in:
2026-05-07 23:28:40 +02:00
parent 8e6d868954
commit d0d79150e7

View File

@@ -354,7 +354,6 @@ export default function App() {
notes, notes,
files: files.map((f) => f.path), files: files.map((f) => f.path),
websites: websites.map((w) => w.url), websites: websites.map((w) => w.url),
include_map: includeMap,
ollama_host: ollamaHost, ollama_host: ollamaHost,
model: ollamaModel, model: ollamaModel,
} }
@@ -442,7 +441,6 @@ export default function App() {
notes, notes,
files: files.map((f) => f.path), files: files.map((f) => f.path),
websites: websites.map((w) => w.url), websites: websites.map((w) => w.url),
include_map: includeMap,
ollama_host: ollamaHost, ollama_host: ollamaHost,
model: ollamaModel, model: ollamaModel,
searx_url: searxUrl, searx_url: searxUrl,
@@ -471,7 +469,6 @@ export default function App() {
concept, concept,
title, title,
files: files.map((f) => f.path), files: files.map((f) => f.path),
include_map: includeMap,
}); });
if (result.ok) { if (result.ok) {
setStatus("Opening preview PDF..."); setStatus("Opening preview PDF...");
@@ -531,8 +528,8 @@ export default function App() {
description, description,
notes, notes,
concept, concept,
files: files.map((f) => ({ path: f.path, include: f.include })), files: files.map((f) => ({ path: f.path })),
websites: websites.map((w) => ({ url: w.url, include: w.include })), websites: websites.map((w) => ({ url: w.url })),
rephrase_variants: rephraseVariants, rephrase_variants: rephraseVariants,
rephrase_selected_key: rephraseSelected, rephrase_selected_key: rephraseSelected,
image_prompt: imagePrompt === IMAGE_PROMPT_PLACEHOLDER ? "" : imagePrompt, image_prompt: imagePrompt === IMAGE_PROMPT_PLACEHOLDER ? "" : imagePrompt,
@@ -572,7 +569,6 @@ export default function App() {
name: f.path.split(/[\\/]/).pop() || f.path, name: f.path.split(/[\\/]/).pop() || f.path,
type: (f.path.split(".").pop() || "file").toLowerCase(), type: (f.path.split(".").pop() || "file").toLowerCase(),
size: "?", size: "?",
include: f.include ?? true,
})) }))
); );
setWebsites( setWebsites(
@@ -582,7 +578,6 @@ export default function App() {
name: w.url.replace(/^https?:\/\//, "").slice(0, 60), name: w.url.replace(/^https?:\/\//, "").slice(0, 60),
type: "url", type: "url",
size: "web", size: "web",
include: w.include ?? true,
})) }))
); );
setRephraseVariants(data.rephrase_variants || []); setRephraseVariants(data.rephrase_variants || []);
@@ -652,7 +647,6 @@ export default function App() {
<div>Path</div> <div>Path</div>
<div>Type</div> <div>Type</div>
<div>Size</div> <div>Size</div>
<div>Add to Repo</div>
</div> </div>
<div className="table-body"> <div className="table-body">
{rows.length === 0 && ( {rows.length === 0 && (
@@ -670,14 +664,6 @@ export default function App() {
<div>{row.kind === "file" ? row.path : row.url}</div> <div>{row.kind === "file" ? row.path : row.url}</div>
<div>{row.type}</div> <div>{row.type}</div>
<div>{row.size}</div> <div>{row.size}</div>
<div
onClick={(event) => {
event.stopPropagation();
toggleInclude(row);
}}
>
<div className={`checkbox ${row.include ? "checked" : ""}`}>{row.include ? "✓" : ""}</div>
</div>
</div> </div>
))} ))}
</div> </div>