feat: run Velum project jobs in the background and process DOCX locally

This commit is contained in:
muena
2026-11-30 16:12:11 +01:00
parent 11ddd6d70f
commit d2ed7130f0
32 changed files with 2325 additions and 462 deletions

View File

@@ -58,7 +58,8 @@ export async function prepareTextInContext(values: ContextFormValues, text: stri
if (!selected || selected === CHOOSE_CONTEXT_ID) throw new Error("Bitte ein Projekt oder eine Sitzung wählen.");
if (selected === NEW_PROJECT_ID || selected.startsWith("project:")) {
const folder = selected === NEW_PROJECT_ID ? values.newProjectPath?.[0] : selected.slice("project:".length);
if (!folder || !(await fs.stat(folder).catch(() => undefined))?.isDirectory()) {
// Existing projects use their saved mapping even when the source folder is unavailable.
if (!folder || (selected === NEW_PROJECT_ID && !(await fs.stat(folder).catch(() => undefined))?.isDirectory())) {
throw new Error("Bitte einen vorhandenen Projektordner wählen.");
}
const path = canonicalProjectPath(folder);
@@ -149,7 +150,8 @@ export async function pseudonymizeInContext(values: ContextFormValues, text: str
}
if (selected === NEW_PROJECT_ID || selected.startsWith("project:")) {
const folder = selected === NEW_PROJECT_ID ? values.newProjectPath?.[0] : selected.slice("project:".length);
if (!folder || !(await fs.stat(folder).catch(() => undefined))?.isDirectory()) {
// Existing projects use their saved mapping even when the source folder is unavailable.
if (!folder || (selected === NEW_PROJECT_ID && !(await fs.stat(folder).catch(() => undefined))?.isDirectory())) {
throw new Error("Bitte einen vorhandenen Projektordner wählen.");
}
const path = canonicalProjectPath(folder);