feat: run Velum project jobs in the background and process DOCX locally
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user