feat: run Velum project jobs in the background and process DOCX locally
This commit is contained in:
@@ -24,6 +24,7 @@ import { ContextPicker, type ContextFormValues } from "./context-picker";
|
||||
import { prepareTextInContext } from "./text-context";
|
||||
import { TextHitReview } from "./text-hit-review";
|
||||
import { getPreferences } from "./preferences";
|
||||
import RelocateProjectCommand from "./relocate-project";
|
||||
|
||||
type FormValues = ContextFormValues & {
|
||||
text: string;
|
||||
@@ -33,6 +34,7 @@ type FormValues = ContextFormValues & {
|
||||
export default function Command(props: { initialSource?: "selection" | "clipboard"; autoOutput?: boolean;
|
||||
forcePaste?: boolean } = {}) {
|
||||
const [text, setText] = useState("");
|
||||
const [contextVersion, setContextVersion] = useState(0);
|
||||
const [sessions, setSessions] = useState<VelumSession[]>([]);
|
||||
const [activeSessionId, setActiveSessionId] = useState<string>();
|
||||
const [entityTypes, setEntityTypes] = useState<EntityType[]>([]);
|
||||
@@ -151,6 +153,8 @@ export default function Command(props: { initialSource?: "selection" | "clipboar
|
||||
icon={Icon.EyeDisabled}
|
||||
onSubmit={handleSubmit}
|
||||
/>
|
||||
<Action.Push title="Projektordner ändern" icon={Icon.Folder}
|
||||
target={<RelocateProjectCommand onMoved={() => setContextVersion((version) => version + 1)} />} />
|
||||
<Action
|
||||
title="Markierten Text übernehmen"
|
||||
icon={Icon.TextSelection}
|
||||
@@ -171,7 +175,7 @@ export default function Command(props: { initialSource?: "selection" | "clipboar
|
||||
onChange={setText}
|
||||
placeholder="Zu pseudonymisierender Text"
|
||||
/>
|
||||
<ContextPicker sessions={sessions} activeSessionId={activeSessionId}
|
||||
<ContextPicker key={contextVersion} sessions={sessions} activeSessionId={activeSessionId}
|
||||
availableEntityTypes={entityTypes} onEntityTypesChange={setSelectedEntityTypes} />
|
||||
{entityTypes.length > 0 ? (
|
||||
<Form.TagPicker
|
||||
|
||||
Reference in New Issue
Block a user