@rslsp1/fa-app-tools 4.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-566GHYAT.mjs → chunk-3MUI4ZV7.mjs} +1484 -744
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1893 -1159
- package/dist/index.mjs +9 -8
- package/dist/szenen.d.mts +155 -7
- package/dist/szenen.d.ts +155 -7
- package/dist/szenen.js +1510 -758
- package/dist/szenen.mjs +32 -5
- package/package.json +1 -1
|
@@ -149,15 +149,15 @@ function resolveRef(ref, baseId, schemas) {
|
|
|
149
149
|
const target = hash === -1 ? ref : ref.slice(0, hash);
|
|
150
150
|
const pointer = hash === -1 ? "" : ref.slice(hash + 1);
|
|
151
151
|
const documentId = target === "" ? baseId : new URL(target, baseId).href;
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
152
|
+
const document2 = schemas.byId.get(documentId);
|
|
153
|
+
if (!document2) {
|
|
154
154
|
throw new UnsupportedSchemaError(`Referenz "${ref}" zeigt auf unbekanntes Schema ${documentId}.`);
|
|
155
155
|
}
|
|
156
|
-
if (pointer === "" || pointer === "/") return { schema:
|
|
156
|
+
if (pointer === "" || pointer === "/") return { schema: document2, baseId: documentId };
|
|
157
157
|
if (!pointer.startsWith("/")) {
|
|
158
158
|
throw new UnsupportedSchemaError(`Referenz "${ref}": nur JSON-Pointer werden aufgeloest.`);
|
|
159
159
|
}
|
|
160
|
-
let node =
|
|
160
|
+
let node = document2;
|
|
161
161
|
for (const rawSegment of pointer.slice(1).split("/")) {
|
|
162
162
|
const segment = unescapePointer(rawSegment);
|
|
163
163
|
if (!isObject(node) || !(segment in node)) {
|
|
@@ -5225,6 +5225,30 @@ function findPromptRun(events, runId) {
|
|
|
5225
5225
|
return collectPromptRuns(events).find((run) => run.run_id === runId) ?? null;
|
|
5226
5226
|
}
|
|
5227
5227
|
|
|
5228
|
+
// src/lib/szenen/bildVorschau.ts
|
|
5229
|
+
async function ladeVorschauen(port, mediaRefs, fertig, optionen = {}) {
|
|
5230
|
+
const laden = port.loadPreview;
|
|
5231
|
+
if (!laden) return;
|
|
5232
|
+
const parallel = Math.max(1, optionen.parallel ?? 4);
|
|
5233
|
+
const lauf = optionen.lauf;
|
|
5234
|
+
const offen = mediaRefs.filter((ref) => !(optionen.hat?.(ref) ?? false));
|
|
5235
|
+
let naechster = 0;
|
|
5236
|
+
async function arbeiter() {
|
|
5237
|
+
while (naechster < offen.length) {
|
|
5238
|
+
if (lauf?.abgebrochen) return;
|
|
5239
|
+
const ref = offen[naechster];
|
|
5240
|
+
naechster += 1;
|
|
5241
|
+
const ergebnis = await laden.call(port, ref);
|
|
5242
|
+
if (lauf?.abgebrochen) return;
|
|
5243
|
+
if (ergebnis.kind === "ok") fertig(ref, ergebnis.value);
|
|
5244
|
+
else optionen.gescheitert?.(ref, ergebnis.message);
|
|
5245
|
+
}
|
|
5246
|
+
}
|
|
5247
|
+
await Promise.all(
|
|
5248
|
+
Array.from({ length: Math.min(parallel, offen.length) }, () => arbeiter())
|
|
5249
|
+
);
|
|
5250
|
+
}
|
|
5251
|
+
|
|
5228
5252
|
// src/lib/szenen/textGenerationPort.ts
|
|
5229
5253
|
function simulatedAnswerFor(request) {
|
|
5230
5254
|
let input;
|
|
@@ -6183,10 +6207,10 @@ async function runSceneDerivation(input, port, userPrompt) {
|
|
|
6183
6207
|
}
|
|
6184
6208
|
|
|
6185
6209
|
// src/features/szenen/SzenenView.tsx
|
|
6186
|
-
import { useMemo as
|
|
6210
|
+
import { useMemo as useMemo4, useState as useState17 } from "react";
|
|
6187
6211
|
|
|
6188
6212
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
6189
|
-
import { useState as
|
|
6213
|
+
import { useState as useState12 } from "react";
|
|
6190
6214
|
|
|
6191
6215
|
// src/features/szenen/areas/usePortQuery.ts
|
|
6192
6216
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -6218,7 +6242,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
6218
6242
|
}
|
|
6219
6243
|
|
|
6220
6244
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
6221
|
-
import { useEffect as
|
|
6245
|
+
import { useEffect as useEffect5, useMemo as useMemo2, useState as useState10 } from "react";
|
|
6222
6246
|
|
|
6223
6247
|
// src/features/szenen/elementLabels.ts
|
|
6224
6248
|
var LABELS = {
|
|
@@ -6578,6 +6602,9 @@ var LABELS2 = {
|
|
|
6578
6602
|
user_instruction: "Nutzeranweisung",
|
|
6579
6603
|
prompt_render_settings: "Prompt-Erzeugung",
|
|
6580
6604
|
blender_render_settings: "Blender-Ausgabe",
|
|
6605
|
+
// Nur Darstellung, keine Schemaaenderung (A4): Der Schluessel bleibt
|
|
6606
|
+
// `overrides`, und er steht als `<code>` weiterhin daneben.
|
|
6607
|
+
overrides: "Render-Abweichungen",
|
|
6581
6608
|
camera_rig: "Kamera-Rig",
|
|
6582
6609
|
media_refs: "Medien",
|
|
6583
6610
|
external_refs: "Externe Referenzen",
|
|
@@ -7556,41 +7583,91 @@ var FeldControl = (props) => {
|
|
|
7556
7583
|
);
|
|
7557
7584
|
}
|
|
7558
7585
|
};
|
|
7586
|
+
var LANGE_ERKLAERUNG = 120;
|
|
7587
|
+
function ersterSatz(text) {
|
|
7588
|
+
const ende = /[.!?](\s|$)/.exec(text);
|
|
7589
|
+
return ende ? text.slice(0, ende.index + 1) : text;
|
|
7590
|
+
}
|
|
7591
|
+
var Erklaerung = ({ text, testId }) => {
|
|
7592
|
+
const ganz = text.trim();
|
|
7593
|
+
const kern = ersterSatz(ganz);
|
|
7594
|
+
const rest = ganz.slice(kern.length).trim();
|
|
7595
|
+
if (ganz.length <= LANGE_ERKLAERUNG || !rest) {
|
|
7596
|
+
return /* @__PURE__ */ jsx("small", { "data-testid": `erklaerung-${testId}`, children: ganz });
|
|
7597
|
+
}
|
|
7598
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7599
|
+
/* @__PURE__ */ jsx("small", { "data-testid": `erklaerung-${testId}`, children: kern }),
|
|
7600
|
+
/* @__PURE__ */ jsxs("details", { className: "szenen-detail__warum", "data-testid": `warum-${testId}`, children: [
|
|
7601
|
+
/* @__PURE__ */ jsx("summary", { children: "Warum?" }),
|
|
7602
|
+
/* @__PURE__ */ jsx("small", { children: rest })
|
|
7603
|
+
] })
|
|
7604
|
+
] });
|
|
7605
|
+
};
|
|
7606
|
+
function gruppeKonfiguriert(feld, formular) {
|
|
7607
|
+
return Object.keys(payloadFromForm([feld], formular)).length > 0;
|
|
7608
|
+
}
|
|
7559
7609
|
var SchemaFieldRow = (props) => {
|
|
7560
7610
|
const { feld, elementType, formular } = props;
|
|
7561
7611
|
const label = feldLabel(elementType, feld.path, feld.name);
|
|
7562
7612
|
if (feld.kind === "group") {
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7613
|
+
const konfiguriert = gruppeKonfiguriert(feld, formular);
|
|
7614
|
+
return /* @__PURE__ */ jsxs(
|
|
7615
|
+
"details",
|
|
7616
|
+
{
|
|
7617
|
+
className: "szenen-detail__group",
|
|
7618
|
+
"data-testid": `gruppe-${feld.path}`,
|
|
7619
|
+
"data-konfiguriert": konfiguriert ? "ja" : "nein",
|
|
7620
|
+
open: feld.required,
|
|
7621
|
+
children: [
|
|
7622
|
+
/* @__PURE__ */ jsxs("summary", { children: [
|
|
7623
|
+
/* @__PURE__ */ jsx("span", { className: "szenen-detail__group-titel", children: label }),
|
|
7624
|
+
feld.required ? /* @__PURE__ */ jsx("strong", { title: "Pflichtfeld", children: " *" }) : (
|
|
7625
|
+
// A2: Dass hier schon etwas steht, muss man im
|
|
7626
|
+
// geschlossenen Zustand sehen — sonst übersieht man
|
|
7627
|
+
// eine gesetzte Blender-Ausgabe genau so lange, bis
|
|
7628
|
+
// sie im Ergebnis auftaucht.
|
|
7629
|
+
/* @__PURE__ */ jsx(
|
|
7630
|
+
"span",
|
|
7631
|
+
{
|
|
7632
|
+
className: "szenen-detail__group-status",
|
|
7633
|
+
"data-testid": `gruppe-${feld.path}-status`,
|
|
7634
|
+
children: konfiguriert ? "konfiguriert" : "optional"
|
|
7635
|
+
}
|
|
7636
|
+
)
|
|
7637
|
+
)
|
|
7638
|
+
] }),
|
|
7639
|
+
/* @__PURE__ */ jsxs("div", { className: "szenen-detail__group-inhalt", children: [
|
|
7640
|
+
feld.description && /* @__PURE__ */ jsx(Erklaerung, { text: feld.description, testId: `gruppe-${feld.path}` }),
|
|
7641
|
+
(feld.children ?? []).map((kind) => /* @__PURE__ */ jsx(SchemaFieldRow, { ...props, feld: kind }, kind.path))
|
|
7642
|
+
] })
|
|
7643
|
+
]
|
|
7644
|
+
}
|
|
7645
|
+
);
|
|
7571
7646
|
}
|
|
7572
7647
|
const wert = formular[feld.path] ?? "";
|
|
7573
|
-
return /* @__PURE__ */ jsxs("
|
|
7574
|
-
/* @__PURE__ */ jsxs("
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7648
|
+
return /* @__PURE__ */ jsxs("div", { className: "szenen-detail__fieldrow", "data-feld": feld.path, children: [
|
|
7649
|
+
/* @__PURE__ */ jsxs("label", { className: "szenen-detail__field", children: [
|
|
7650
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
7651
|
+
/* @__PURE__ */ jsx("span", { className: "szenen-detail__field-label", children: label }),
|
|
7652
|
+
feld.required && /* @__PURE__ */ jsx("strong", { title: "Pflichtfeld", children: " *" }),
|
|
7653
|
+
label !== feld.name && /* @__PURE__ */ jsx("code", { className: "szenen-detail__field-key", children: feld.name }),
|
|
7654
|
+
feld.complexHint && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsxs("em", { children: [
|
|
7655
|
+
" \u2014 ",
|
|
7656
|
+
feld.complexHint
|
|
7657
|
+
] })
|
|
7658
|
+
] }),
|
|
7659
|
+
/* @__PURE__ */ jsx(FeldControl, { ...props, wert }),
|
|
7660
|
+
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsx(
|
|
7661
|
+
NullSchalter,
|
|
7662
|
+
{
|
|
7663
|
+
feld,
|
|
7664
|
+
wert,
|
|
7665
|
+
onChange: props.onChange,
|
|
7666
|
+
readOnly: props.readOnly
|
|
7667
|
+
}
|
|
7668
|
+
)
|
|
7582
7669
|
] }),
|
|
7583
|
-
/* @__PURE__ */ jsx(
|
|
7584
|
-
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsx(
|
|
7585
|
-
NullSchalter,
|
|
7586
|
-
{
|
|
7587
|
-
feld,
|
|
7588
|
-
wert,
|
|
7589
|
-
onChange: props.onChange,
|
|
7590
|
-
readOnly: props.readOnly
|
|
7591
|
-
}
|
|
7592
|
-
),
|
|
7593
|
-
feld.description && /* @__PURE__ */ jsx("small", { children: feld.description })
|
|
7670
|
+
feld.description && /* @__PURE__ */ jsx(Erklaerung, { text: feld.description, testId: feld.path })
|
|
7594
7671
|
] });
|
|
7595
7672
|
};
|
|
7596
7673
|
|
|
@@ -8257,11 +8334,162 @@ var VersionNavigator = ({
|
|
|
8257
8334
|
};
|
|
8258
8335
|
|
|
8259
8336
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
8260
|
-
import { useState as
|
|
8337
|
+
import { useState as useState9 } from "react";
|
|
8261
8338
|
|
|
8262
8339
|
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
8263
|
-
import { useState as
|
|
8340
|
+
import { useEffect as useEffect4, useRef as useRef2, useState as useState8 } from "react";
|
|
8341
|
+
|
|
8342
|
+
// src/features/szenen/areas/Bildbausteine.tsx
|
|
8343
|
+
import { useCallback, useEffect as useEffect3, useState as useState7 } from "react";
|
|
8264
8344
|
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
8345
|
+
var Kachel = ({
|
|
8346
|
+
quelle,
|
|
8347
|
+
alt,
|
|
8348
|
+
leerText
|
|
8349
|
+
}) => /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ jsx7("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel__leer", title: leerText ?? alt, children: leerText ? /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel__zeichen", children: "?" }) : null }) });
|
|
8350
|
+
var BildViewer = ({
|
|
8351
|
+
bilder,
|
|
8352
|
+
position,
|
|
8353
|
+
onWechseln,
|
|
8354
|
+
onSchliessen,
|
|
8355
|
+
satzTitel,
|
|
8356
|
+
testId
|
|
8357
|
+
}) => {
|
|
8358
|
+
const anzahl = bilder.length;
|
|
8359
|
+
const bild = bilder[position];
|
|
8360
|
+
const blaettern = useCallback((schritt) => {
|
|
8361
|
+
if (anzahl === 0) return;
|
|
8362
|
+
onWechseln((position + schritt + anzahl) % anzahl);
|
|
8363
|
+
}, [anzahl, position, onWechseln]);
|
|
8364
|
+
useEffect3(() => {
|
|
8365
|
+
const taste = (e) => {
|
|
8366
|
+
if (e.key === "Escape") onSchliessen();
|
|
8367
|
+
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
8368
|
+
else if (e.key === "ArrowRight") blaettern(1);
|
|
8369
|
+
};
|
|
8370
|
+
document.addEventListener("keydown", taste);
|
|
8371
|
+
return () => document.removeEventListener("keydown", taste);
|
|
8372
|
+
}, [blaettern, onSchliessen]);
|
|
8373
|
+
if (!bild) return null;
|
|
8374
|
+
return /* @__PURE__ */ jsxs7(
|
|
8375
|
+
"div",
|
|
8376
|
+
{
|
|
8377
|
+
className: "szenen-bildviewer",
|
|
8378
|
+
"data-testid": testId,
|
|
8379
|
+
role: "dialog",
|
|
8380
|
+
"aria-modal": "true",
|
|
8381
|
+
"aria-label": satzTitel ? `${satzTitel} \u2014 ${bild.titel}` : bild.titel,
|
|
8382
|
+
children: [
|
|
8383
|
+
/* @__PURE__ */ jsxs7("header", { className: "szenen-bildviewer__kopf", children: [
|
|
8384
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildviewer__titel", children: [
|
|
8385
|
+
satzTitel ? `${satzTitel} \xB7 ` : "",
|
|
8386
|
+
bild.titel
|
|
8387
|
+
] }),
|
|
8388
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildviewer__zaehler", "data-testid": `${testId}-zaehler`, children: [
|
|
8389
|
+
position + 1,
|
|
8390
|
+
" / ",
|
|
8391
|
+
anzahl
|
|
8392
|
+
] }),
|
|
8393
|
+
/* @__PURE__ */ jsx7(
|
|
8394
|
+
"button",
|
|
8395
|
+
{
|
|
8396
|
+
type: "button",
|
|
8397
|
+
className: "szenen-bildviewer__schliessen",
|
|
8398
|
+
onClick: onSchliessen,
|
|
8399
|
+
"data-testid": `${testId}-schliessen`,
|
|
8400
|
+
children: "Schliessen"
|
|
8401
|
+
}
|
|
8402
|
+
)
|
|
8403
|
+
] }),
|
|
8404
|
+
/* @__PURE__ */ jsxs7("div", { className: "szenen-bildviewer__buehne", children: [
|
|
8405
|
+
anzahl > 1 && /* @__PURE__ */ jsx7(
|
|
8406
|
+
"button",
|
|
8407
|
+
{
|
|
8408
|
+
type: "button",
|
|
8409
|
+
className: "szenen-bildviewer__blaettern",
|
|
8410
|
+
onClick: () => blaettern(-1),
|
|
8411
|
+
"aria-label": "Vorheriges Bild",
|
|
8412
|
+
"data-testid": `${testId}-zurueck`,
|
|
8413
|
+
children: "\u2039"
|
|
8414
|
+
}
|
|
8415
|
+
),
|
|
8416
|
+
/* @__PURE__ */ jsx7("span", { className: "szenen-bildviewer__rahmen", children: bild.quelle ? /* @__PURE__ */ jsx7(
|
|
8417
|
+
"img",
|
|
8418
|
+
{
|
|
8419
|
+
className: "szenen-bildviewer__bild",
|
|
8420
|
+
src: bild.quelle,
|
|
8421
|
+
alt: bild.titel,
|
|
8422
|
+
"data-testid": `${testId}-bild`
|
|
8423
|
+
}
|
|
8424
|
+
) : (
|
|
8425
|
+
// Auch gross bleibt eine fehlende Quelle eine Auskunft
|
|
8426
|
+
// und kein Textblock (R12.3).
|
|
8427
|
+
/* @__PURE__ */ jsx7("span", { className: "szenen-bildviewer__leer", "data-testid": `${testId}-leer`, children: bild.leerText ?? "F\xFCr dieses Bild gibt es keine anzeigbare Quelle." })
|
|
8428
|
+
) }),
|
|
8429
|
+
anzahl > 1 && /* @__PURE__ */ jsx7(
|
|
8430
|
+
"button",
|
|
8431
|
+
{
|
|
8432
|
+
type: "button",
|
|
8433
|
+
className: "szenen-bildviewer__blaettern",
|
|
8434
|
+
onClick: () => blaettern(1),
|
|
8435
|
+
"aria-label": "N\xE4chstes Bild",
|
|
8436
|
+
"data-testid": `${testId}-weiter`,
|
|
8437
|
+
children: "\u203A"
|
|
8438
|
+
}
|
|
8439
|
+
)
|
|
8440
|
+
] }),
|
|
8441
|
+
bild.details && /* @__PURE__ */ jsx7("div", { className: "szenen-bildviewer__details", "data-testid": `${testId}-details`, children: bild.details })
|
|
8442
|
+
]
|
|
8443
|
+
}
|
|
8444
|
+
);
|
|
8445
|
+
};
|
|
8446
|
+
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
8447
|
+
const [offen, setOffen] = useState7(null);
|
|
8448
|
+
useEffect3(() => {
|
|
8449
|
+
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
8450
|
+
}, [bilder.length]);
|
|
8451
|
+
if (bilder.length === 0) return null;
|
|
8452
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
8453
|
+
/* @__PURE__ */ jsx7("ul", { className: "szenen-bildgalerie", "data-testid": testId, children: bilder.map((bild, position) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs7(
|
|
8454
|
+
"button",
|
|
8455
|
+
{
|
|
8456
|
+
type: "button",
|
|
8457
|
+
className: "szenen-bildgalerie__kachel",
|
|
8458
|
+
onClick: () => setOffen(position),
|
|
8459
|
+
"data-testid": `${testId}-oeffnen-${bild.id}`,
|
|
8460
|
+
title: bild.titel,
|
|
8461
|
+
children: [
|
|
8462
|
+
/* @__PURE__ */ jsx7(
|
|
8463
|
+
Kachel,
|
|
8464
|
+
{
|
|
8465
|
+
quelle: bild.quelle,
|
|
8466
|
+
alt: bild.titel,
|
|
8467
|
+
...bild.leerText ? { leerText: bild.leerText } : {}
|
|
8468
|
+
}
|
|
8469
|
+
),
|
|
8470
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildgalerie__nummer", children: [
|
|
8471
|
+
"#",
|
|
8472
|
+
position + 1
|
|
8473
|
+
] })
|
|
8474
|
+
]
|
|
8475
|
+
}
|
|
8476
|
+
) }, bild.id)) }),
|
|
8477
|
+
offen !== null && /* @__PURE__ */ jsx7(
|
|
8478
|
+
BildViewer,
|
|
8479
|
+
{
|
|
8480
|
+
bilder,
|
|
8481
|
+
position: offen,
|
|
8482
|
+
onWechseln: setOffen,
|
|
8483
|
+
onSchliessen: () => setOffen(null),
|
|
8484
|
+
testId: `${testId}-viewer`,
|
|
8485
|
+
...satzTitel ? { satzTitel } : {}
|
|
8486
|
+
}
|
|
8487
|
+
)
|
|
8488
|
+
] });
|
|
8489
|
+
};
|
|
8490
|
+
|
|
8491
|
+
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
8492
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8265
8493
|
var AUFTRAG_TEXT = {
|
|
8266
8494
|
// „gestartet/unterbrochen" in einem: Aus dem Log allein ist beides nicht
|
|
8267
8495
|
// unterscheidbar, und genau das ist beabsichtigt — es gibt keinen
|
|
@@ -8273,8 +8501,10 @@ var AUFTRAG_TEXT = {
|
|
|
8273
8501
|
};
|
|
8274
8502
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
8275
8503
|
const faehig = capabilitiesOf(port);
|
|
8276
|
-
const [nachladen, setNachladen] =
|
|
8504
|
+
const [nachladen, setNachladen] = useState8(0);
|
|
8277
8505
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
8506
|
+
const [erzeugenOffen, setErzeugenOffen] = useState8(null);
|
|
8507
|
+
const [zuordnenOffen, setZuordnenOffen] = useState8(null);
|
|
8278
8508
|
const quelle = sourceOf(lauf);
|
|
8279
8509
|
const [wahlPhase] = usePortQuery(
|
|
8280
8510
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -8291,38 +8521,40 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
8291
8521
|
);
|
|
8292
8522
|
const auftraege = auftraegePhase.status === "ready" ? auftraegePhase.value : [];
|
|
8293
8523
|
const batches = batchesPhase.status === "ready" ? batchesPhase.value : [];
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8524
|
+
const auffaellige = auftraege.filter((a) => a.status !== "succeeded");
|
|
8525
|
+
const erzeugenAuf = erzeugenOffen ?? batches.length === 0;
|
|
8526
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder", "data-testid": `bilder-${lauf.run_id}`, children: [
|
|
8527
|
+
/* @__PURE__ */ jsxs8("section", { className: "szenen-bilder__eingang", "data-testid": `eingang-${lauf.run_id}`, children: [
|
|
8528
|
+
/* @__PURE__ */ jsx8("h5", { children: "Eingang \u2014 woraus dieser Prompt entstand" }),
|
|
8529
|
+
/* @__PURE__ */ jsxs8("p", { className: "szenen-bilder__ids", children: [
|
|
8530
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8299
8531
|
"Lauf ",
|
|
8300
|
-
/* @__PURE__ */
|
|
8532
|
+
/* @__PURE__ */ jsx8("code", { "data-testid": `eingang-lauf-${lauf.run_id}`, children: lauf.run_id })
|
|
8301
8533
|
] }),
|
|
8302
|
-
quelle.kind === "published" && /* @__PURE__ */
|
|
8534
|
+
quelle.kind === "published" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8303
8535
|
"ver\xF6ffentlichte Shot-Version ",
|
|
8304
|
-
/* @__PURE__ */
|
|
8536
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.shot_version_id })
|
|
8305
8537
|
] }),
|
|
8306
|
-
quelle.kind === "draft_chain" && /* @__PURE__ */
|
|
8538
|
+
quelle.kind === "draft_chain" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8307
8539
|
"Draft-Kette ",
|
|
8308
|
-
/* @__PURE__ */
|
|
8540
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.chain_id })
|
|
8309
8541
|
] }),
|
|
8310
|
-
quelle.kind === "scene_direct" && /* @__PURE__ */
|
|
8542
|
+
quelle.kind === "scene_direct" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8311
8543
|
"Szene ",
|
|
8312
|
-
/* @__PURE__ */
|
|
8313
|
-
quelle.scene.draft_id ? /* @__PURE__ */
|
|
8544
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.element_id }),
|
|
8545
|
+
quelle.scene.draft_id ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8314
8546
|
" \xB7 Entwurf ",
|
|
8315
|
-
/* @__PURE__ */
|
|
8547
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.draft_id }),
|
|
8316
8548
|
" (Revision ",
|
|
8317
8549
|
quelle.scene.revision,
|
|
8318
8550
|
")"
|
|
8319
|
-
] }) : /* @__PURE__ */
|
|
8551
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8320
8552
|
" \xB7 Version ",
|
|
8321
|
-
/* @__PURE__ */
|
|
8553
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.version_id })
|
|
8322
8554
|
] })
|
|
8323
8555
|
] })
|
|
8324
8556
|
] }),
|
|
8325
|
-
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */
|
|
8557
|
+
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ jsx8(
|
|
8326
8558
|
InputBilder,
|
|
8327
8559
|
{
|
|
8328
8560
|
port,
|
|
@@ -8333,67 +8565,148 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
8333
8565
|
// Nichts raten: Ein Lauf vor 6.7 trägt die
|
|
8334
8566
|
// Rekonstruktionsherkunft nicht, und ein veröffentlichter
|
|
8335
8567
|
// Lauf hat keine (D-123).
|
|
8336
|
-
/* @__PURE__ */
|
|
8568
|
+
/* @__PURE__ */ jsx8("p", { "data-testid": `eingang-ohne-bilder-${lauf.run_id}`, children: "Zu diesem Lauf ist kein Rekonstruktionslauf hinterlegt \u2014 die Eingangsbilder sind darum nicht sicher aufl\xF6sbar und werden nicht geraten." })
|
|
8337
8569
|
)
|
|
8338
8570
|
] }),
|
|
8339
|
-
/* @__PURE__ */
|
|
8340
|
-
/* @__PURE__ */
|
|
8341
|
-
!faehig.
|
|
8342
|
-
|
|
8571
|
+
/* @__PURE__ */ jsxs8("section", { className: "szenen-bilder__ausgang", "data-testid": `ausgang-${lauf.run_id}`, children: [
|
|
8572
|
+
/* @__PURE__ */ jsx8("h5", { children: "Ausgang \u2014 die Bilder aus diesem Prompt" }),
|
|
8573
|
+
!faehig.imageBatchHistory && /* @__PURE__ */ jsx8("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
8574
|
+
batchesPhase.status === "error" && /* @__PURE__ */ jsxs8("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8575
|
+
"Batches konnten nicht geladen werden: ",
|
|
8576
|
+
batchesPhase.message
|
|
8577
|
+
] }),
|
|
8578
|
+
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
8579
|
+
batches.map((batch) => /* @__PURE__ */ jsx8(BatchKachel, { port, batch }, batch.item_id)),
|
|
8580
|
+
!faehig.imageOrderHistory && /* @__PURE__ */ jsx8("p", { "data-testid": `auftraege-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bildgenerierungsauftr\xE4ge. Bereits gespeicherte Batches sind oben trotzdem sichtbar." }),
|
|
8581
|
+
auftraegePhase.status === "error" && /* @__PURE__ */ jsxs8("p", { "data-testid": `auftraege-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8343
8582
|
"Auftr\xE4ge konnten nicht geladen werden: ",
|
|
8344
8583
|
auftraegePhase.message
|
|
8345
8584
|
] }),
|
|
8346
|
-
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */
|
|
8347
|
-
|
|
8348
|
-
"
|
|
8585
|
+
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `keine-auftraege-${lauf.run_id}`, children: "F\xFCr diesen Lauf wurde noch kein Bildauftrag gestartet." }),
|
|
8586
|
+
auffaellige.length > 0 && /* @__PURE__ */ jsxs8(
|
|
8587
|
+
"p",
|
|
8349
8588
|
{
|
|
8350
|
-
"
|
|
8351
|
-
"data-
|
|
8589
|
+
className: "szenen-bilder__auffaellig",
|
|
8590
|
+
"data-testid": `auftraege-auffaellig-${lauf.run_id}`,
|
|
8591
|
+
role: "alert",
|
|
8352
8592
|
children: [
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
"
|
|
8370
|
-
/* @__PURE__ */ jsx7("code", { children: auftrag.item_id })
|
|
8593
|
+
auffaellige.length === 1 ? `Ein Bildauftrag ist ${AUFTRAG_TEXT[auffaellige[0].status]}.` : `${auffaellige.length} Bildauftr\xE4ge sind nicht sauber durchgelaufen.`,
|
|
8594
|
+
" ",
|
|
8595
|
+
"Einzelheiten im Verlauf."
|
|
8596
|
+
]
|
|
8597
|
+
}
|
|
8598
|
+
),
|
|
8599
|
+
auftraege.length > 0 && /* @__PURE__ */ jsxs8(
|
|
8600
|
+
"details",
|
|
8601
|
+
{
|
|
8602
|
+
className: "szenen-bilder__verlauf",
|
|
8603
|
+
"data-testid": `auftraege-verlauf-${lauf.run_id}`,
|
|
8604
|
+
open: auffaellige.length > 0,
|
|
8605
|
+
children: [
|
|
8606
|
+
/* @__PURE__ */ jsxs8("summary", { children: [
|
|
8607
|
+
"Bildauftr\xE4ge / Verlauf (",
|
|
8608
|
+
auftraege.length,
|
|
8609
|
+
")"
|
|
8371
8610
|
] }),
|
|
8372
|
-
|
|
8373
|
-
|
|
8611
|
+
/* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__auftraege", "data-testid": `auftraege-${lauf.run_id}`, children: auftraege.map((auftrag) => /* @__PURE__ */ jsxs8(
|
|
8612
|
+
"li",
|
|
8613
|
+
{
|
|
8614
|
+
"data-testid": `auftrag-${auftrag.generation_batch_id}`,
|
|
8615
|
+
"data-status": auftrag.status,
|
|
8616
|
+
children: [
|
|
8617
|
+
/* @__PURE__ */ jsx8("strong", { children: AUFTRAG_TEXT[auftrag.status] }),
|
|
8618
|
+
/* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-modell-${auftrag.generation_batch_id}`, children: [
|
|
8619
|
+
auftrag.request?.image_count ?? "?",
|
|
8620
|
+
" Bild(er) \xB7",
|
|
8621
|
+
" ",
|
|
8622
|
+
auftrag.request?.callable_model_id ?? "Modell unbekannt",
|
|
8623
|
+
auftrag.request?.provider ? ` bei ${auftrag.request.provider}` : ""
|
|
8624
|
+
] }),
|
|
8625
|
+
auftrag.request?.prompt_target_model_key && auftrag.request.target_model_matched === false && /* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-abweichung-${auftrag.generation_batch_id}`, children: [
|
|
8626
|
+
"abweichend \u2014 Prompt optimiert f\xFCr",
|
|
8627
|
+
" ",
|
|
8628
|
+
/* @__PURE__ */ jsx8("code", { children: auftrag.request.prompt_target_model_key })
|
|
8629
|
+
] }),
|
|
8630
|
+
auftrag.request?.negative_prompt_transmitted === false && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-negativ-${auftrag.generation_batch_id}`, children: "Ein negativer Prompt lief \xFCber dieses Profil nicht mit." }),
|
|
8631
|
+
auftrag.item_id && /* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-item-${auftrag.generation_batch_id}`, children: [
|
|
8632
|
+
"Item ",
|
|
8633
|
+
/* @__PURE__ */ jsx8("code", { children: auftrag.item_id })
|
|
8634
|
+
] }),
|
|
8635
|
+
auftrag.status === "started" && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-hinweis-${auftrag.generation_batch_id}`, children: "Kein automatischer neuer Versuch \u2014 ob noch einmal erzeugt wird, entscheiden Sie." }),
|
|
8636
|
+
auftrag.diagnostic && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-diagnose-${auftrag.generation_batch_id}`, children: auftrag.diagnostic }),
|
|
8637
|
+
/* @__PURE__ */ jsx8("code", { className: "szenen-bilder__auftragskennung", children: auftrag.generation_batch_id })
|
|
8638
|
+
]
|
|
8639
|
+
},
|
|
8640
|
+
auftrag.generation_batch_id
|
|
8641
|
+
)) })
|
|
8374
8642
|
]
|
|
8375
|
-
}
|
|
8376
|
-
|
|
8377
|
-
)) }),
|
|
8378
|
-
!faehig.imageBatchHistory && /* @__PURE__ */ jsx7("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
8379
|
-
batchesPhase.status === "error" && /* @__PURE__ */ jsxs7("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8380
|
-
"Batches konnten nicht geladen werden: ",
|
|
8381
|
-
batchesPhase.message
|
|
8382
|
-
] }),
|
|
8383
|
-
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ jsx7("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
8384
|
-
batches.map((batch) => /* @__PURE__ */ jsx7(BatchKachel, { port, batch }, batch.item_id))
|
|
8643
|
+
}
|
|
8644
|
+
)
|
|
8385
8645
|
] }),
|
|
8386
|
-
/* @__PURE__ */
|
|
8387
|
-
|
|
8646
|
+
/* @__PURE__ */ jsxs8(
|
|
8647
|
+
"details",
|
|
8388
8648
|
{
|
|
8389
|
-
|
|
8390
|
-
lauf
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8649
|
+
className: "szenen-bilder__aktion",
|
|
8650
|
+
"data-testid": `erzeugen-bereich-${lauf.run_id}`,
|
|
8651
|
+
open: erzeugenAuf,
|
|
8652
|
+
children: [
|
|
8653
|
+
/* @__PURE__ */ jsx8(
|
|
8654
|
+
"summary",
|
|
8655
|
+
{
|
|
8656
|
+
onClick: (e) => {
|
|
8657
|
+
e.preventDefault();
|
|
8658
|
+
setErzeugenOffen(!erzeugenAuf);
|
|
8659
|
+
},
|
|
8660
|
+
children: "Bilder aus diesem Prompt erzeugen"
|
|
8661
|
+
}
|
|
8662
|
+
),
|
|
8663
|
+
/* @__PURE__ */ jsx8(
|
|
8664
|
+
ErzeugenAktion,
|
|
8665
|
+
{
|
|
8666
|
+
port,
|
|
8667
|
+
lauf,
|
|
8668
|
+
wahl,
|
|
8669
|
+
wahlFehler: wahlPhase.status === "error" ? wahlPhase.message : null,
|
|
8670
|
+
onFertig: () => {
|
|
8671
|
+
setErzeugenOffen(true);
|
|
8672
|
+
neuLesen();
|
|
8673
|
+
}
|
|
8674
|
+
}
|
|
8675
|
+
)
|
|
8676
|
+
]
|
|
8394
8677
|
}
|
|
8395
8678
|
),
|
|
8396
|
-
/* @__PURE__ */
|
|
8679
|
+
/* @__PURE__ */ jsxs8(
|
|
8680
|
+
"details",
|
|
8681
|
+
{
|
|
8682
|
+
className: "szenen-bilder__aktion",
|
|
8683
|
+
"data-testid": `zuordnen-bereich-${lauf.run_id}`,
|
|
8684
|
+
open: zuordnenOffen ?? false,
|
|
8685
|
+
children: [
|
|
8686
|
+
/* @__PURE__ */ jsx8(
|
|
8687
|
+
"summary",
|
|
8688
|
+
{
|
|
8689
|
+
onClick: (e) => {
|
|
8690
|
+
e.preventDefault();
|
|
8691
|
+
setZuordnenOffen(!(zuordnenOffen ?? false));
|
|
8692
|
+
},
|
|
8693
|
+
children: "Externe Bilder diesem Lauf zuordnen"
|
|
8694
|
+
}
|
|
8695
|
+
),
|
|
8696
|
+
/* @__PURE__ */ jsx8(
|
|
8697
|
+
ZuordnenAktion,
|
|
8698
|
+
{
|
|
8699
|
+
port,
|
|
8700
|
+
lauf,
|
|
8701
|
+
onFertig: () => {
|
|
8702
|
+
setZuordnenOffen(true);
|
|
8703
|
+
neuLesen();
|
|
8704
|
+
}
|
|
8705
|
+
}
|
|
8706
|
+
)
|
|
8707
|
+
]
|
|
8708
|
+
}
|
|
8709
|
+
)
|
|
8397
8710
|
] });
|
|
8398
8711
|
};
|
|
8399
8712
|
var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
@@ -8401,9 +8714,9 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
8401
8714
|
() => port.derivation ? port.derivation.getDerivation(derivationRunId) : Promise.resolve({ kind: "ok", value: null }),
|
|
8402
8715
|
[port, derivationRunId]
|
|
8403
8716
|
);
|
|
8404
|
-
if (phase.status === "loading") return /* @__PURE__ */
|
|
8717
|
+
if (phase.status === "loading") return /* @__PURE__ */ jsx8("p", { children: "Rekonstruktionslauf wird geladen \u2026" });
|
|
8405
8718
|
if (phase.status === "error") {
|
|
8406
|
-
return /* @__PURE__ */
|
|
8719
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `eingang-fehler-${runId}`, role: "alert", children: [
|
|
8407
8720
|
"Der Rekonstruktionslauf ",
|
|
8408
8721
|
derivationRunId,
|
|
8409
8722
|
" konnte nicht geladen werden: ",
|
|
@@ -8411,22 +8724,22 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
8411
8724
|
] });
|
|
8412
8725
|
}
|
|
8413
8726
|
if (!phase.value) {
|
|
8414
|
-
return /* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `eingang-unbekannt-${runId}`, children: [
|
|
8415
8728
|
"Der Rekonstruktionslauf ",
|
|
8416
|
-
/* @__PURE__ */
|
|
8729
|
+
/* @__PURE__ */ jsx8("code", { children: derivationRunId }),
|
|
8417
8730
|
" ist in diesem Host nicht auffindbar."
|
|
8418
8731
|
] });
|
|
8419
8732
|
}
|
|
8420
8733
|
const bilder = phase.value.input.images;
|
|
8421
|
-
return /* @__PURE__ */
|
|
8422
|
-
/* @__PURE__ */
|
|
8734
|
+
return /* @__PURE__ */ jsxs8("div", { "data-testid": `eingang-bilder-${runId}`, children: [
|
|
8735
|
+
/* @__PURE__ */ jsxs8("p", { children: [
|
|
8423
8736
|
"aus Rekonstruktionslauf ",
|
|
8424
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsx8("code", { children: derivationRunId }),
|
|
8425
8738
|
phase.value.input.prompt_text ? " \xB7 mit Referenzprompt" : ""
|
|
8426
8739
|
] }),
|
|
8427
|
-
bilder.length === 0 ? /* @__PURE__ */
|
|
8740
|
+
bilder.length === 0 ? /* @__PURE__ */ jsx8("p", { children: "Der Rekonstruktionslauf lief ohne Eingangsbild." }) : /* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__eingangsliste", children: bilder.map((bild, index) => /* @__PURE__ */ jsx8("li", { "data-kind": bild.kind, children: bild.kind === "library" ? /* @__PURE__ */ jsx8(BestandsBild, { port, mediaRef: bild.media_ref }) : /* @__PURE__ */ jsxs8("span", { children: [
|
|
8428
8741
|
"Upload, nur \xFCber seinen Digest belegt (",
|
|
8429
|
-
/* @__PURE__ */
|
|
8742
|
+
/* @__PURE__ */ jsxs8("code", { children: [
|
|
8430
8743
|
bild.sha256.slice(0, 12),
|
|
8431
8744
|
"\u2026"
|
|
8432
8745
|
] }),
|
|
@@ -8444,113 +8757,177 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
8444
8757
|
() => port.imageLibrary ? port.imageLibrary.resolveImage(mediaRef) : Promise.resolve({ kind: "ok", value: null }),
|
|
8445
8758
|
[port, mediaRef]
|
|
8446
8759
|
);
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8760
|
+
const quelle = phase.status === "ready" && phase.value ? `data:${phase.value.mime_type};base64,${phase.value.data}` : null;
|
|
8761
|
+
return /* @__PURE__ */ jsxs8("span", { "data-testid": `eingangsbild-${mediaRef}`, children: [
|
|
8762
|
+
/* @__PURE__ */ jsx8(
|
|
8763
|
+
Kachel,
|
|
8450
8764
|
{
|
|
8451
|
-
|
|
8452
|
-
alt: `Eingangsbild ${mediaRef}
|
|
8765
|
+
quelle,
|
|
8766
|
+
alt: `Eingangsbild ${mediaRef}`,
|
|
8767
|
+
...phase.status === "error" ? { leerText: "Nicht ladbar" } : {}
|
|
8453
8768
|
}
|
|
8454
8769
|
),
|
|
8455
8770
|
phase.status === "error" && // Verzeichnet, aber nicht lesbar ist etwas anderes als
|
|
8456
8771
|
// unbekannt — der Unterschied gehoert sichtbar.
|
|
8457
|
-
/* @__PURE__ */
|
|
8458
|
-
/* @__PURE__ */
|
|
8772
|
+
/* @__PURE__ */ jsx8("em", { "data-testid": `eingangsbild-fehler-${mediaRef}`, children: phase.message }),
|
|
8773
|
+
/* @__PURE__ */ jsx8("code", { children: mediaRef })
|
|
8459
8774
|
] });
|
|
8460
8775
|
};
|
|
8461
|
-
|
|
8462
|
-
const [
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
);
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8776
|
+
function useBildQuellen(port, bilder) {
|
|
8777
|
+
const [stand, setStand] = useState8(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
8778
|
+
const gehalten = useRef2(/* @__PURE__ */ new Map());
|
|
8779
|
+
const gescheitert = useRef2(/* @__PURE__ */ new Map());
|
|
8780
|
+
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
8781
|
+
useEffect4(() => {
|
|
8782
|
+
const bestand = port.imageLibrary;
|
|
8783
|
+
if (!bestand) return void 0;
|
|
8784
|
+
let abgebrochen = false;
|
|
8785
|
+
void (async () => {
|
|
8786
|
+
for (const bild of bilder) {
|
|
8787
|
+
if (abgebrochen) return;
|
|
8788
|
+
if (gehalten.current.has(bild.media_ref) || gescheitert.current.has(bild.media_ref)) continue;
|
|
8789
|
+
const ergebnis = await bestand.resolveImage(bild.media_ref, bild.mime_type ?? null);
|
|
8790
|
+
if (abgebrochen) return;
|
|
8791
|
+
if (ergebnis.kind === "ok" && ergebnis.value) {
|
|
8792
|
+
gehalten.current.set(
|
|
8793
|
+
bild.media_ref,
|
|
8794
|
+
`data:${ergebnis.value.mime_type};base64,${ergebnis.value.data}`
|
|
8795
|
+
);
|
|
8796
|
+
} else if (ergebnis.kind === "error") {
|
|
8797
|
+
gescheitert.current.set(bild.media_ref, ergebnis.message);
|
|
8798
|
+
}
|
|
8799
|
+
setStand({
|
|
8800
|
+
quellen: new Map(gehalten.current),
|
|
8801
|
+
fehler: new Map(gescheitert.current)
|
|
8802
|
+
});
|
|
8803
|
+
}
|
|
8804
|
+
})();
|
|
8805
|
+
return () => {
|
|
8806
|
+
abgebrochen = true;
|
|
8807
|
+
};
|
|
8808
|
+
}, [port, schluessel]);
|
|
8809
|
+
return stand;
|
|
8810
|
+
}
|
|
8811
|
+
var BildDetails = ({ bild, fehler: fehler4, aufloesbar }) => /* @__PURE__ */ jsxs8("span", { className: "szenen-bilder__meta", "data-testid": `batchbild-${bild.media_ref}`, children: [
|
|
8812
|
+
/* @__PURE__ */ jsx8("code", { children: bild.media_ref }),
|
|
8813
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8814
|
+
"Position ",
|
|
8815
|
+
bild.position
|
|
8816
|
+
] }),
|
|
8817
|
+
/* @__PURE__ */ jsx8("span", { children: bild.model || "Modell unbekannt" }),
|
|
8818
|
+
/* @__PURE__ */ jsx8("span", { children: bild.seed === null || bild.seed === void 0 || bild.seed === -1 ? "ohne Seed" : `Seed ${bild.seed}` }),
|
|
8819
|
+
bild.width && bild.height ? /* @__PURE__ */ jsxs8("span", { children: [
|
|
8820
|
+
bild.width,
|
|
8821
|
+
"\xD7",
|
|
8822
|
+
bild.height
|
|
8823
|
+
] }) : null,
|
|
8824
|
+
fehler4 && /* @__PURE__ */ jsx8("em", { "data-testid": `batchbild-fehler-${bild.media_ref}`, children: fehler4 }),
|
|
8825
|
+
!aufloesbar && // Capability-Grenze, kein Fehler: Dieser Host kann Batches lesen,
|
|
8826
|
+
// aber keine Bilder auflösen (E). Kein erfundener Fallback auf eine
|
|
8827
|
+
// Serverroute (A6).
|
|
8828
|
+
/* @__PURE__ */ jsx8("em", { "data-testid": `batchbild-unsupported-${bild.media_ref}`, children: "Dieser Host l\xF6st keine Bilder auf \u2014 nur die Metadaten sind bekannt." })
|
|
8829
|
+
] });
|
|
8830
|
+
var BatchKachel = ({ port, batch }) => {
|
|
8831
|
+
const { quellen, fehler: fehler4 } = useBildQuellen(port, batch.images);
|
|
8832
|
+
const aufloesbar = Boolean(port.imageLibrary);
|
|
8833
|
+
const bilder = batch.images.map((bild) => ({
|
|
8834
|
+
id: bild.media_ref,
|
|
8835
|
+
quelle: quellen.get(bild.media_ref) ?? null,
|
|
8836
|
+
titel: `Bild ${bild.position + 1}`,
|
|
8837
|
+
...fehler4.get(bild.media_ref) ? { leerText: "Nicht ladbar" } : {},
|
|
8838
|
+
details: /* @__PURE__ */ jsx8(
|
|
8839
|
+
BildDetails,
|
|
8469
8840
|
{
|
|
8470
|
-
|
|
8471
|
-
|
|
8841
|
+
bild,
|
|
8842
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
8843
|
+
aufloesbar
|
|
8472
8844
|
}
|
|
8473
|
-
)
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
bild.width,
|
|
8491
|
-
"\xD7",
|
|
8492
|
-
bild.height
|
|
8493
|
-
] }) : null
|
|
8494
|
-
] });
|
|
8495
|
-
};
|
|
8496
|
-
var BatchKachel = ({ port, batch }) => /* @__PURE__ */ jsxs7(
|
|
8497
|
-
"div",
|
|
8498
|
-
{
|
|
8499
|
-
className: "szenen-bilder__batch",
|
|
8500
|
-
"data-testid": `batch-${batch.item_id}`,
|
|
8501
|
-
"data-source-kind": batch.source_kind,
|
|
8502
|
-
children: [
|
|
8503
|
-
/* @__PURE__ */ jsxs7("p", { className: "szenen-bilder__ids", children: [
|
|
8504
|
-
/* @__PURE__ */ jsx7("strong", { children: batch.title }),
|
|
8505
|
-
/* @__PURE__ */ jsx7("span", { children: batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert" }),
|
|
8506
|
-
/* @__PURE__ */ jsxs7("span", { children: [
|
|
8507
|
-
"Item ",
|
|
8508
|
-
/* @__PURE__ */ jsx7("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
8845
|
+
)
|
|
8846
|
+
}));
|
|
8847
|
+
return /* @__PURE__ */ jsxs8(
|
|
8848
|
+
"section",
|
|
8849
|
+
{
|
|
8850
|
+
className: "szenen-bilder__batch",
|
|
8851
|
+
"data-testid": `batch-${batch.item_id}`,
|
|
8852
|
+
"data-source-kind": batch.source_kind,
|
|
8853
|
+
children: [
|
|
8854
|
+
/* @__PURE__ */ jsxs8("header", { className: "szenen-bilder__batchkopf", children: [
|
|
8855
|
+
/* @__PURE__ */ jsx8("strong", { children: batch.title }),
|
|
8856
|
+
/* @__PURE__ */ jsxs8("span", { className: "szenen-bilder__herkunft", children: [
|
|
8857
|
+
batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert",
|
|
8858
|
+
" \xB7 ",
|
|
8859
|
+
batch.images.length,
|
|
8860
|
+
" Bild(er)"
|
|
8861
|
+
] })
|
|
8509
8862
|
] }),
|
|
8510
|
-
/* @__PURE__ */
|
|
8511
|
-
|
|
8512
|
-
|
|
8863
|
+
/* @__PURE__ */ jsx8(
|
|
8864
|
+
BildGalerie,
|
|
8865
|
+
{
|
|
8866
|
+
bilder,
|
|
8867
|
+
testId: `batchgalerie-${batch.item_id}`,
|
|
8868
|
+
satzTitel: batch.title
|
|
8869
|
+
}
|
|
8870
|
+
),
|
|
8871
|
+
/* @__PURE__ */ jsxs8("details", { className: "szenen-bilder__technik", "data-testid": `batch-technik-${batch.item_id}`, children: [
|
|
8872
|
+
/* @__PURE__ */ jsx8("summary", { children: "Technische Details" }),
|
|
8873
|
+
/* @__PURE__ */ jsxs8("p", { className: "szenen-bilder__ids", children: [
|
|
8874
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8875
|
+
"Item ",
|
|
8876
|
+
/* @__PURE__ */ jsx8("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
8877
|
+
] }),
|
|
8878
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8879
|
+
"Batches ",
|
|
8880
|
+
/* @__PURE__ */ jsx8("code", { children: batch.generation_batch_ids.join(", ") })
|
|
8881
|
+
] })
|
|
8882
|
+
] }),
|
|
8883
|
+
/* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__batchliste", children: batch.images.map((bild) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
|
|
8884
|
+
BildDetails,
|
|
8885
|
+
{
|
|
8886
|
+
bild,
|
|
8887
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
8888
|
+
aufloesbar
|
|
8889
|
+
}
|
|
8890
|
+
) }, bild.media_ref)) })
|
|
8513
8891
|
] })
|
|
8514
|
-
]
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
);
|
|
8892
|
+
]
|
|
8893
|
+
}
|
|
8894
|
+
);
|
|
8895
|
+
};
|
|
8519
8896
|
var ProfilBefunde = ({ wahl, runId }) => {
|
|
8520
8897
|
if (wahl.invalid_profiles.length === 0) return null;
|
|
8521
|
-
return /* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-profilbefunde-${runId}`, role: "alert", children: [
|
|
8522
8899
|
"Nicht angeboten, weil das Profil unvollst\xE4ndig ist:",
|
|
8523
8900
|
" ",
|
|
8524
8901
|
wahl.invalid_profiles.join(" \xB7 ")
|
|
8525
8902
|
] });
|
|
8526
8903
|
};
|
|
8527
8904
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
8528
|
-
const [modellWahl, setModellWahl] =
|
|
8529
|
-
const [anzahlText, setAnzahlText] =
|
|
8530
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] =
|
|
8531
|
-
const [laeuft, setLaeuft] =
|
|
8532
|
-
const [notiz, setNotiz] =
|
|
8905
|
+
const [modellWahl, setModellWahl] = useState8(null);
|
|
8906
|
+
const [anzahlText, setAnzahlText] = useState8("1");
|
|
8907
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = useState8("");
|
|
8908
|
+
const [laeuft, setLaeuft] = useState8(false);
|
|
8909
|
+
const [notiz, setNotiz] = useState8(null);
|
|
8533
8910
|
if (!port.imageGeneration) {
|
|
8534
|
-
return /* @__PURE__ */
|
|
8911
|
+
return /* @__PURE__ */ jsx8("p", { "data-testid": `erzeugen-unsupported-${lauf.run_id}`, children: "Dieser Host erzeugt keine Bilder \u2014 entweder fehlt der Providerzugang oder der gesicherte Speicherweg. Externe Bilder lassen sich trotzdem zuordnen." });
|
|
8535
8912
|
}
|
|
8536
8913
|
if (wahlFehler) {
|
|
8537
|
-
return /* @__PURE__ */
|
|
8914
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8538
8915
|
"Die F\xE4higkeitsauskunft schlug fehl: ",
|
|
8539
8916
|
wahlFehler
|
|
8540
8917
|
] });
|
|
8541
8918
|
}
|
|
8542
|
-
if (!wahl) return /* @__PURE__ */
|
|
8919
|
+
if (!wahl) return /* @__PURE__ */ jsx8("p", { children: "Bildf\xE4higkeit wird gepr\xFCft \u2026" });
|
|
8543
8920
|
if (wahl.models.length === 0) {
|
|
8544
8921
|
return (
|
|
8545
8922
|
// Kein Fehler und kein Grund, den Lauf zu sperren: Der externe
|
|
8546
8923
|
// Importweg bleibt daneben stehen (D-104.5).
|
|
8547
|
-
/* @__PURE__ */
|
|
8548
|
-
/* @__PURE__ */
|
|
8924
|
+
/* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8925
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-unsupported-modell-${lauf.run_id}`, children: [
|
|
8549
8926
|
"Hier kann derzeit kein Bild erzeugt werden:",
|
|
8550
8927
|
" ",
|
|
8551
8928
|
wahl.reason ?? "Kein sichtbares Zielmodell tr\xE4gt ein ausf\xFChrbares Profil."
|
|
8552
8929
|
] }),
|
|
8553
|
-
/* @__PURE__ */
|
|
8930
|
+
/* @__PURE__ */ jsx8(ProfilBefunde, { wahl, runId: lauf.run_id })
|
|
8554
8931
|
] })
|
|
8555
8932
|
);
|
|
8556
8933
|
}
|
|
@@ -8599,22 +8976,21 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8599
8976
|
onFertig();
|
|
8600
8977
|
};
|
|
8601
8978
|
const negativVorhanden = Boolean(lauf.output?.negative && lauf.output.negative.trim());
|
|
8602
|
-
return /* @__PURE__ */
|
|
8603
|
-
/* @__PURE__ */
|
|
8604
|
-
/* @__PURE__ */
|
|
8605
|
-
/* @__PURE__ */ jsx7("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
8979
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `erzeugen-${lauf.run_id}`, children: [
|
|
8980
|
+
/* @__PURE__ */ jsx8(ProfilBefunde, { wahl, runId: lauf.run_id }),
|
|
8981
|
+
/* @__PURE__ */ jsx8("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8606
8982
|
"Prompt optimiert f\xFCr ",
|
|
8607
|
-
/* @__PURE__ */
|
|
8983
|
+
/* @__PURE__ */ jsx8("code", { children: wahl.prompt_target_model_key })
|
|
8608
8984
|
] }) : "Dieser Lauf tr\xE4gt keine Optimierungsabsicht (kein target_model)." }),
|
|
8609
|
-
/* @__PURE__ */
|
|
8985
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8610
8986
|
"Bildmodell",
|
|
8611
|
-
/* @__PURE__ */
|
|
8987
|
+
/* @__PURE__ */ jsx8(
|
|
8612
8988
|
"select",
|
|
8613
8989
|
{
|
|
8614
8990
|
value: aktiv.selection_id,
|
|
8615
8991
|
"data-testid": `erzeugen-modellwahl-${lauf.run_id}`,
|
|
8616
8992
|
onChange: (e) => modellWechseln(e.target.value),
|
|
8617
|
-
children: wahl.models.map((m) => /* @__PURE__ */
|
|
8993
|
+
children: wahl.models.map((m) => /* @__PURE__ */ jsxs8("option", { value: m.selection_id, children: [
|
|
8618
8994
|
m.display_name,
|
|
8619
8995
|
" (",
|
|
8620
8996
|
m.provider,
|
|
@@ -8624,7 +9000,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8624
9000
|
}
|
|
8625
9001
|
)
|
|
8626
9002
|
] }),
|
|
8627
|
-
/* @__PURE__ */
|
|
9003
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-modell-${lauf.run_id}`, children: [
|
|
8628
9004
|
aktiv.display_name,
|
|
8629
9005
|
" bei ",
|
|
8630
9006
|
aktiv.provider,
|
|
@@ -8633,26 +9009,26 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8633
9009
|
aktiv.max_images,
|
|
8634
9010
|
" Bilder je Auftrag"
|
|
8635
9011
|
] }),
|
|
8636
|
-
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */
|
|
9012
|
+
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-abweichung-${lauf.run_id}`, children: [
|
|
8637
9013
|
"Hinweis: Prompt optimiert f\xFCr ",
|
|
8638
|
-
/* @__PURE__ */
|
|
9014
|
+
/* @__PURE__ */ jsx8("code", { children: wahl.prompt_target_model_key }),
|
|
8639
9015
|
", Bilder werden mit ",
|
|
8640
|
-
/* @__PURE__ */
|
|
9016
|
+
/* @__PURE__ */ jsx8("code", { children: aktiv.display_name }),
|
|
8641
9017
|
" erzeugt. Das ist zul\xE4ssig \u2014 ein abweichendes Ergebnis liegt dann nicht zwingend am Prompt."
|
|
8642
9018
|
] }),
|
|
8643
9019
|
negativVorhanden && !aktiv.accepts_negative_prompt && // Nicht still verlieren: Der eingefrorene Lauf trägt einen
|
|
8644
9020
|
// negativen Prompt, den dieser Modellweg nicht führt. Wer das
|
|
8645
9021
|
// weiß, kann ihn in den positiven Prompt einarbeiten — wer es
|
|
8646
9022
|
// nicht weiß, wundert sich über das Bild.
|
|
8647
|
-
/* @__PURE__ */
|
|
9023
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-negativ-hinweis-${lauf.run_id}`, children: [
|
|
8648
9024
|
"Achtung: Dieser Lauf tr\xE4gt einen negativen Prompt.",
|
|
8649
9025
|
" ",
|
|
8650
9026
|
aktiv.display_name,
|
|
8651
9027
|
" f\xFChrt diesen Promptkanal nicht \u2014 der negative Prompt l\xE4uft nicht mit."
|
|
8652
9028
|
] }),
|
|
8653
|
-
/* @__PURE__ */
|
|
9029
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8654
9030
|
"Anzahl",
|
|
8655
|
-
/* @__PURE__ */
|
|
9031
|
+
/* @__PURE__ */ jsx8(
|
|
8656
9032
|
"input",
|
|
8657
9033
|
{
|
|
8658
9034
|
type: "number",
|
|
@@ -8664,27 +9040,27 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8664
9040
|
}
|
|
8665
9041
|
)
|
|
8666
9042
|
] }),
|
|
8667
|
-
/* @__PURE__ */
|
|
9043
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8668
9044
|
"Seitenverh\xE4ltnis",
|
|
8669
|
-
/* @__PURE__ */
|
|
9045
|
+
/* @__PURE__ */ jsxs8(
|
|
8670
9046
|
"select",
|
|
8671
9047
|
{
|
|
8672
9048
|
value: seitenverhaeltnis,
|
|
8673
9049
|
"data-testid": `erzeugen-format-${lauf.run_id}`,
|
|
8674
9050
|
onChange: (e) => setSeitenverhaeltnis(e.target.value),
|
|
8675
9051
|
children: [
|
|
8676
|
-
/* @__PURE__ */
|
|
8677
|
-
aktiv.aspect_ratios.map((v) => /* @__PURE__ */
|
|
9052
|
+
/* @__PURE__ */ jsx8("option", { value: "", children: "(Vorgabe des Modells)" }),
|
|
9053
|
+
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ jsx8("option", { value: v, children: v }, v))
|
|
8678
9054
|
]
|
|
8679
9055
|
}
|
|
8680
9056
|
)
|
|
8681
9057
|
] }),
|
|
8682
|
-
!aktiv.accepts_seed && /* @__PURE__ */
|
|
9058
|
+
!aktiv.accepts_seed && /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-ohne-seed-${lauf.run_id}`, children: [
|
|
8683
9059
|
aktiv.display_name,
|
|
8684
9060
|
" kennt keinen Seed \u2014 er wird deshalb weder angeboten noch protokolliert."
|
|
8685
9061
|
] }),
|
|
8686
|
-
parameterBefunde.length > 0 && /* @__PURE__ */
|
|
8687
|
-
/* @__PURE__ */
|
|
9062
|
+
parameterBefunde.length > 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `erzeugen-parameterbefund-${lauf.run_id}`, role: "alert", children: parameterBefunde.join(" ") }),
|
|
9063
|
+
/* @__PURE__ */ jsx8(
|
|
8688
9064
|
"button",
|
|
8689
9065
|
{
|
|
8690
9066
|
type: "button",
|
|
@@ -8694,7 +9070,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8694
9070
|
children: laeuft ? "Bilder werden erzeugt \u2026" : "Bilder erzeugen"
|
|
8695
9071
|
}
|
|
8696
9072
|
),
|
|
8697
|
-
notiz && /* @__PURE__ */
|
|
9073
|
+
notiz && /* @__PURE__ */ jsx8(
|
|
8698
9074
|
"p",
|
|
8699
9075
|
{
|
|
8700
9076
|
"data-testid": `erzeugen-notiz-${lauf.run_id}`,
|
|
@@ -8706,14 +9082,14 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8706
9082
|
] });
|
|
8707
9083
|
};
|
|
8708
9084
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
8709
|
-
const [dateien, setDateien] =
|
|
8710
|
-
const [seeds, setSeeds] =
|
|
8711
|
-
const [modell, setModell] =
|
|
8712
|
-
const [itemId, setItemId] =
|
|
8713
|
-
const [laeuft, setLaeuft] =
|
|
8714
|
-
const [notiz, setNotiz] =
|
|
9085
|
+
const [dateien, setDateien] = useState8([]);
|
|
9086
|
+
const [seeds, setSeeds] = useState8({});
|
|
9087
|
+
const [modell, setModell] = useState8("");
|
|
9088
|
+
const [itemId, setItemId] = useState8("");
|
|
9089
|
+
const [laeuft, setLaeuft] = useState8(false);
|
|
9090
|
+
const [notiz, setNotiz] = useState8(null);
|
|
8715
9091
|
if (!port.imageBatchWrite) {
|
|
8716
|
-
return /* @__PURE__ */
|
|
9092
|
+
return /* @__PURE__ */ jsx8("p", { "data-testid": `zuordnen-unsupported-${lauf.run_id}`, children: "Dieser Host ordnet keine externen Bilder zu \u2014 er hat keinen gesicherten Batch-Schreibweg. Die Historie oben bleibt trotzdem sichtbar." });
|
|
8717
9093
|
}
|
|
8718
9094
|
const importieren = async () => {
|
|
8719
9095
|
setLaeuft(true);
|
|
@@ -8768,11 +9144,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8768
9144
|
setLaeuft(false);
|
|
8769
9145
|
onFertig();
|
|
8770
9146
|
};
|
|
8771
|
-
return /* @__PURE__ */
|
|
8772
|
-
/* @__PURE__ */
|
|
8773
|
-
/* @__PURE__ */ jsxs7("label", { children: [
|
|
9147
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `zuordnen-${lauf.run_id}`, children: [
|
|
9148
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8774
9149
|
"Bilddateien",
|
|
8775
|
-
/* @__PURE__ */
|
|
9150
|
+
/* @__PURE__ */ jsx8(
|
|
8776
9151
|
"input",
|
|
8777
9152
|
{
|
|
8778
9153
|
type: "file",
|
|
@@ -8786,10 +9161,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8786
9161
|
}
|
|
8787
9162
|
)
|
|
8788
9163
|
] }),
|
|
8789
|
-
dateien.length > 0 && /* @__PURE__ */
|
|
8790
|
-
/* @__PURE__ */
|
|
9164
|
+
dateien.length > 0 && /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
9165
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8791
9166
|
"Modell (f\xFCr alle Bilder, leer = unbekannt)",
|
|
8792
|
-
/* @__PURE__ */
|
|
9167
|
+
/* @__PURE__ */ jsx8(
|
|
8793
9168
|
"input",
|
|
8794
9169
|
{
|
|
8795
9170
|
value: modell,
|
|
@@ -8798,16 +9173,16 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8798
9173
|
}
|
|
8799
9174
|
)
|
|
8800
9175
|
] }),
|
|
8801
|
-
/* @__PURE__ */
|
|
8802
|
-
/* @__PURE__ */
|
|
9176
|
+
/* @__PURE__ */ jsx8("ol", { "data-testid": `zuordnen-vorschau-${lauf.run_id}`, children: dateien.map((datei, index) => /* @__PURE__ */ jsxs8("li", { children: [
|
|
9177
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8803
9178
|
"Position ",
|
|
8804
9179
|
index,
|
|
8805
9180
|
": ",
|
|
8806
9181
|
datei.name
|
|
8807
9182
|
] }),
|
|
8808
|
-
/* @__PURE__ */
|
|
9183
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8809
9184
|
"Seed (leer = unbekannt)",
|
|
8810
|
-
/* @__PURE__ */
|
|
9185
|
+
/* @__PURE__ */ jsx8(
|
|
8811
9186
|
"input",
|
|
8812
9187
|
{
|
|
8813
9188
|
"data-testid": `zuordnen-seed-${lauf.run_id}-${index}`,
|
|
@@ -8817,7 +9192,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8817
9192
|
)
|
|
8818
9193
|
] })
|
|
8819
9194
|
] }, `${datei.name}-${index}`)) }),
|
|
8820
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ jsxs8(
|
|
8821
9196
|
"button",
|
|
8822
9197
|
{
|
|
8823
9198
|
type: "button",
|
|
@@ -8831,9 +9206,9 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8831
9206
|
}
|
|
8832
9207
|
)
|
|
8833
9208
|
] }),
|
|
8834
|
-
/* @__PURE__ */
|
|
9209
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8835
9210
|
"Oder ein bestehendes Library-Item",
|
|
8836
|
-
/* @__PURE__ */
|
|
9211
|
+
/* @__PURE__ */ jsx8(
|
|
8837
9212
|
"input",
|
|
8838
9213
|
{
|
|
8839
9214
|
value: itemId,
|
|
@@ -8843,7 +9218,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8843
9218
|
}
|
|
8844
9219
|
)
|
|
8845
9220
|
] }),
|
|
8846
|
-
/* @__PURE__ */
|
|
9221
|
+
/* @__PURE__ */ jsx8(
|
|
8847
9222
|
"button",
|
|
8848
9223
|
{
|
|
8849
9224
|
type: "button",
|
|
@@ -8853,7 +9228,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8853
9228
|
children: "Bestehendes Item zuordnen"
|
|
8854
9229
|
}
|
|
8855
9230
|
),
|
|
8856
|
-
notiz && /* @__PURE__ */
|
|
9231
|
+
notiz && /* @__PURE__ */ jsx8(
|
|
8857
9232
|
"p",
|
|
8858
9233
|
{
|
|
8859
9234
|
"data-testid": `zuordnen-notiz-${lauf.run_id}`,
|
|
@@ -8878,12 +9253,12 @@ function readAsBase64(datei) {
|
|
|
8878
9253
|
}
|
|
8879
9254
|
|
|
8880
9255
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
8881
|
-
import { jsx as
|
|
9256
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8882
9257
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
8883
|
-
const [anweisung, setAnweisung] =
|
|
8884
|
-
const [laeuft, setLaeuft] =
|
|
8885
|
-
const [notiz, setNotiz] =
|
|
8886
|
-
const [nachladen, setNachladen] =
|
|
9258
|
+
const [anweisung, setAnweisung] = useState9("");
|
|
9259
|
+
const [laeuft, setLaeuft] = useState9(false);
|
|
9260
|
+
const [notiz, setNotiz] = useState9(null);
|
|
9261
|
+
const [nachladen, setNachladen] = useState9(0);
|
|
8887
9262
|
const faehig = capabilitiesOf(port);
|
|
8888
9263
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
8889
9264
|
const [phase, neuLaden] = usePortQuery(
|
|
@@ -8908,12 +9283,15 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8908
9283
|
neuLaden();
|
|
8909
9284
|
};
|
|
8910
9285
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
9286
|
+
const [gewaehlteRunde, setGewaehlteRunde] = useState9(void 0);
|
|
9287
|
+
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
9288
|
+
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
9289
|
+
return /* @__PURE__ */ jsxs9("div", { className: "szenen-runs", "data-testid": "laeufe-bereich", "data-shot-version": quellSchluessel, children: [
|
|
9290
|
+
/* @__PURE__ */ jsx9("h4", { children: "Prompt-L\xE4ufe" }),
|
|
9291
|
+
source.kind === "published" && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__start", children: [
|
|
9292
|
+
/* @__PURE__ */ jsxs9("label", { children: [
|
|
8915
9293
|
"Anweisung (optional)",
|
|
8916
|
-
/* @__PURE__ */
|
|
9294
|
+
/* @__PURE__ */ jsx9(
|
|
8917
9295
|
"input",
|
|
8918
9296
|
{
|
|
8919
9297
|
"data-testid": "lauf-anweisung",
|
|
@@ -8922,21 +9300,25 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8922
9300
|
}
|
|
8923
9301
|
)
|
|
8924
9302
|
] }),
|
|
8925
|
-
/* @__PURE__ */
|
|
9303
|
+
/* @__PURE__ */ jsx9("button", { type: "button", "data-testid": "lauf-starten", disabled: laeuft, onClick: starten, children: "Prompt-Lauf starten" })
|
|
8926
9304
|
] }),
|
|
8927
|
-
notiz && /* @__PURE__ */
|
|
8928
|
-
phase.status === "loading" && /* @__PURE__ */
|
|
8929
|
-
phase.status === "error" && /* @__PURE__ */
|
|
9305
|
+
notiz && /* @__PURE__ */ jsx9("p", { "data-testid": "lauf-notiz", "data-tone": notiz.tone, role: notiz.tone === "error" ? "alert" : "status", children: notiz.text }),
|
|
9306
|
+
phase.status === "loading" && /* @__PURE__ */ jsx9("p", { "data-testid": "laeufe-laden", children: "L\xE4ufe werden geladen \u2026" }),
|
|
9307
|
+
phase.status === "error" && /* @__PURE__ */ jsxs9("p", { "data-testid": "laeufe-fehler", role: "alert", children: [
|
|
8930
9308
|
"L\xE4ufe konnten nicht geladen werden: ",
|
|
8931
9309
|
phase.message
|
|
8932
9310
|
] }),
|
|
8933
|
-
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
9311
|
+
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */ jsx9("p", { "data-testid": "keine-laeufe", children: source.kind === "published" ? "F\xFCr diese Shot-Version gibt es noch keinen Lauf." : source.kind === "draft_chain" ? "F\xFCr diese Draft-Kette gibt es noch keinen Lauf." : "F\xFCr diese Szene gibt es noch keinen direkten Lauf." }),
|
|
9312
|
+
/* @__PURE__ */ jsx9("ol", { "data-testid": "runden-liste", children: laeufe.map((lauf) => /* @__PURE__ */ jsx9(
|
|
8935
9313
|
RundenEintrag,
|
|
8936
9314
|
{
|
|
8937
9315
|
port,
|
|
8938
9316
|
lauf,
|
|
8939
9317
|
runde: roundOfRun(lauf, laeufe),
|
|
9318
|
+
offen: lauf.run_id === offeneRunde,
|
|
9319
|
+
onUmschalten: () => setGewaehlteRunde(
|
|
9320
|
+
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
9321
|
+
),
|
|
8940
9322
|
itemMoeglich: faehig.saveRunAsItem,
|
|
8941
9323
|
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
8942
9324
|
},
|
|
@@ -8944,13 +9326,43 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8944
9326
|
)) })
|
|
8945
9327
|
] });
|
|
8946
9328
|
};
|
|
8947
|
-
var
|
|
8948
|
-
|
|
8949
|
-
const
|
|
8950
|
-
|
|
9329
|
+
var AUSZUG = 90;
|
|
9330
|
+
function auszug(text, laenge = AUSZUG) {
|
|
9331
|
+
const sauber = text.replace(/\s+/g, " ").trim();
|
|
9332
|
+
if (sauber.length <= laenge) return sauber;
|
|
9333
|
+
const schnitt = sauber.lastIndexOf(" ", laenge);
|
|
9334
|
+
return `${sauber.slice(0, schnitt > laenge / 2 ? schnitt : laenge)} \u2026`;
|
|
9335
|
+
}
|
|
9336
|
+
var STATUS_TEXT = {
|
|
9337
|
+
succeeded: "erfolgreich",
|
|
9338
|
+
failed: "fehlgeschlagen"
|
|
9339
|
+
};
|
|
9340
|
+
var LANGER_TEXT = 240;
|
|
9341
|
+
var Sekundaertext = ({ titel, text, testId }) => {
|
|
9342
|
+
const [ganz, setGanz] = useState9(false);
|
|
9343
|
+
const lang = text.length > LANGER_TEXT;
|
|
9344
|
+
return /* @__PURE__ */ jsxs9("section", { className: "szenen-runs__sekundaer", children: [
|
|
9345
|
+
/* @__PURE__ */ jsx9("h5", { children: titel }),
|
|
9346
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": testId, children: lang && !ganz ? auszug(text, LANGER_TEXT) : text }),
|
|
9347
|
+
lang && /* @__PURE__ */ jsx9(
|
|
9348
|
+
"button",
|
|
9349
|
+
{
|
|
9350
|
+
type: "button",
|
|
9351
|
+
className: "szenen-runs__mehr",
|
|
9352
|
+
onClick: () => setGanz(!ganz),
|
|
9353
|
+
"data-testid": `${testId}-mehr`,
|
|
9354
|
+
children: ganz ? "weniger anzeigen" : "vollst\xE4ndig anzeigen"
|
|
9355
|
+
}
|
|
9356
|
+
)
|
|
9357
|
+
] });
|
|
9358
|
+
};
|
|
9359
|
+
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
9360
|
+
const [notiz, setNotiz] = useState9(null);
|
|
9361
|
+
const [laeuft, setLaeuft] = useState9(false);
|
|
9362
|
+
const [nachladen, setNachladen] = useState9(0);
|
|
8951
9363
|
const [itemPhase] = usePortQuery(
|
|
8952
|
-
() => port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
8953
|
-
[port, lauf.run_id, nachladen]
|
|
9364
|
+
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
9365
|
+
[port, lauf.run_id, nachladen, offen]
|
|
8954
9366
|
);
|
|
8955
9367
|
const item = itemPhase.status === "ready" ? itemPhase.value : null;
|
|
8956
9368
|
const speichern = async () => {
|
|
@@ -8964,75 +9376,121 @@ var RundenEintrag = ({ port, lauf, runde, itemMoeglich, onItemGespeichert }) =>
|
|
|
8964
9376
|
setNachladen((n) => n + 1);
|
|
8965
9377
|
onItemGespeichert();
|
|
8966
9378
|
};
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
9379
|
+
const zusammenfassung = lauf.status === "succeeded" && lauf.output ? auszug(lauf.output.positive) : null;
|
|
9380
|
+
return /* @__PURE__ */ jsxs9("li", { "data-testid": `runde-${lauf.run_id}`, "data-runde": runde, "data-status": lauf.status, children: [
|
|
9381
|
+
/* @__PURE__ */ jsxs9(
|
|
9382
|
+
"button",
|
|
9383
|
+
{
|
|
9384
|
+
type: "button",
|
|
9385
|
+
className: "szenen-runs__kopf",
|
|
9386
|
+
onClick: onUmschalten,
|
|
9387
|
+
"aria-expanded": offen,
|
|
9388
|
+
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
9389
|
+
children: [
|
|
9390
|
+
/* @__PURE__ */ jsxs9("span", { className: "szenen-runs__marke", children: [
|
|
9391
|
+
"Runde ",
|
|
9392
|
+
runde
|
|
9393
|
+
] }),
|
|
9394
|
+
/* @__PURE__ */ jsx9(
|
|
9395
|
+
"span",
|
|
9396
|
+
{
|
|
9397
|
+
className: "szenen-runs__status",
|
|
9398
|
+
"data-status": lauf.status,
|
|
9399
|
+
"data-testid": `status-${lauf.run_id}`,
|
|
9400
|
+
children: STATUS_TEXT[lauf.status]
|
|
9401
|
+
}
|
|
9402
|
+
),
|
|
9403
|
+
/* @__PURE__ */ jsxs9("span", { className: "szenen-runs__modell", "data-testid": `provider-${lauf.run_id}`, children: [
|
|
9404
|
+
lauf.provider,
|
|
9405
|
+
" \xB7 ",
|
|
9406
|
+
lauf.model_id
|
|
9407
|
+
] }),
|
|
9408
|
+
zusammenfassung && /* @__PURE__ */ jsx9(
|
|
9409
|
+
"span",
|
|
9410
|
+
{
|
|
9411
|
+
className: "szenen-runs__auszug",
|
|
9412
|
+
"data-testid": `auszug-${lauf.run_id}`,
|
|
9413
|
+
children: zusammenfassung
|
|
9414
|
+
}
|
|
9415
|
+
)
|
|
9416
|
+
]
|
|
9417
|
+
}
|
|
9418
|
+
),
|
|
9419
|
+
lauf.status === "failed" && lauf.failure && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__fehler", "data-testid": `fehler-${lauf.run_id}`, role: "alert", children: [
|
|
9420
|
+
/* @__PURE__ */ jsxs9("strong", { children: [
|
|
9421
|
+
"Fehlgeschlagen \u2014 ",
|
|
9422
|
+
lauf.failure.class
|
|
8972
9423
|
] }),
|
|
8973
|
-
/* @__PURE__ */
|
|
8974
|
-
/* @__PURE__ */ jsx8("span", { "data-testid": `status-${lauf.run_id}`, children: lauf.status }),
|
|
8975
|
-
/* @__PURE__ */ jsxs8("span", { "data-testid": `provider-${lauf.run_id}`, children: [
|
|
8976
|
-
lauf.provider,
|
|
8977
|
-
" \xB7 ",
|
|
8978
|
-
lauf.model_id
|
|
8979
|
-
] })
|
|
9424
|
+
/* @__PURE__ */ jsx9("p", { children: lauf.failure.message })
|
|
8980
9425
|
] }),
|
|
8981
|
-
|
|
8982
|
-
/* @__PURE__ */
|
|
8983
|
-
/* @__PURE__ */
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
/* @__PURE__ */
|
|
8988
|
-
|
|
9426
|
+
offen && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__inhalt", "data-testid": `runde-inhalt-${lauf.run_id}`, children: [
|
|
9427
|
+
lauf.status === "succeeded" && lauf.output && /* @__PURE__ */ jsxs9("div", { "data-testid": `ausgabe-${lauf.run_id}`, children: [
|
|
9428
|
+
/* @__PURE__ */ jsxs9("section", { className: "szenen-runs__prompt", children: [
|
|
9429
|
+
/* @__PURE__ */ jsx9("h5", { children: "Positiver Prompt" }),
|
|
9430
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": `positiv-${lauf.run_id}`, children: lauf.output.positive })
|
|
9431
|
+
] }),
|
|
9432
|
+
/* @__PURE__ */ jsxs9("section", { className: "szenen-runs__prompt szenen-runs__prompt--negativ", children: [
|
|
9433
|
+
/* @__PURE__ */ jsx9("h5", { children: "Negativer Prompt" }),
|
|
9434
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": `negativ-${lauf.run_id}`, children: lauf.output.negative ?? "(keiner)" })
|
|
9435
|
+
] }),
|
|
9436
|
+
/* @__PURE__ */ jsx9(
|
|
9437
|
+
Sekundaertext,
|
|
9438
|
+
{
|
|
9439
|
+
titel: "Erl\xE4uterung",
|
|
9440
|
+
text: lauf.output.feedback,
|
|
9441
|
+
testId: `feedback-${lauf.run_id}`
|
|
9442
|
+
}
|
|
9443
|
+
),
|
|
9444
|
+
lauf.output.visibility.assumptions.length > 0 && /* @__PURE__ */ jsxs9("section", { className: "szenen-runs__sekundaer", children: [
|
|
9445
|
+
/* @__PURE__ */ jsx9("h5", { children: "Annahmen" }),
|
|
9446
|
+
/* @__PURE__ */ jsx9("ul", { "data-testid": `annahmen-${lauf.run_id}`, children: lauf.output.visibility.assumptions.map((a, i) => /* @__PURE__ */ jsx9("li", { children: a }, i)) })
|
|
9447
|
+
] }),
|
|
9448
|
+
lauf.output.notes.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "szenen-runs__notizen", "data-testid": `notizen-${lauf.run_id}`, children: lauf.output.notes.map((n, i) => /* @__PURE__ */ jsx9("li", { children: n }, i)) })
|
|
8989
9449
|
] }),
|
|
8990
|
-
/* @__PURE__ */
|
|
8991
|
-
/* @__PURE__ */
|
|
8992
|
-
/* @__PURE__ */
|
|
9450
|
+
lauf.raw_output && /* @__PURE__ */ jsxs9("details", { "data-testid": `diagnose-${lauf.run_id}`, children: [
|
|
9451
|
+
/* @__PURE__ */ jsx9("summary", { children: "Rohantwort (Diagnose)" }),
|
|
9452
|
+
/* @__PURE__ */ jsx9("pre", { children: lauf.raw_output })
|
|
8993
9453
|
] }),
|
|
8994
|
-
|
|
8995
|
-
/* @__PURE__ */
|
|
8996
|
-
/* @__PURE__ */
|
|
9454
|
+
/* @__PURE__ */ jsxs9("details", { className: "szenen-runs__technisch", "data-testid": `technisch-${lauf.run_id}`, children: [
|
|
9455
|
+
/* @__PURE__ */ jsx9("summary", { children: "Technische Informationen" }),
|
|
9456
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9457
|
+
"Lauf-ID: ",
|
|
9458
|
+
/* @__PURE__ */ jsx9("code", { "data-testid": `run-id-${lauf.run_id}`, children: lauf.run_id })
|
|
9459
|
+
] }),
|
|
9460
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9461
|
+
"Modell: ",
|
|
9462
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.model_id }),
|
|
9463
|
+
" bei ",
|
|
9464
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.provider })
|
|
9465
|
+
] }),
|
|
9466
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9467
|
+
"erzeugt: ",
|
|
9468
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.created_at })
|
|
9469
|
+
] })
|
|
8997
9470
|
] }),
|
|
8998
|
-
lauf.
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
"Fehlgeschlagen \u2014 ",
|
|
9003
|
-
lauf.failure.class
|
|
9471
|
+
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ jsx9("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
9472
|
+
item && /* @__PURE__ */ jsxs9("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
9473
|
+
"Bereits als Item gespeichert: ",
|
|
9474
|
+
/* @__PURE__ */ jsx9("code", { children: item.itemId })
|
|
9004
9475
|
] }),
|
|
9005
|
-
/* @__PURE__ */
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
/* @__PURE__ */ jsx8("summary", { children: "Rohantwort (Diagnose)" }),
|
|
9009
|
-
/* @__PURE__ */ jsx8("pre", { children: lauf.raw_output })
|
|
9010
|
-
] }),
|
|
9011
|
-
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ jsx8("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
9012
|
-
item && /* @__PURE__ */ jsxs8("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
9013
|
-
"Bereits als Item gespeichert: ",
|
|
9014
|
-
/* @__PURE__ */ jsx8("code", { children: item.itemId })
|
|
9015
|
-
] }),
|
|
9016
|
-
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ jsx8("p", { "data-testid": `item-unsupported-${lauf.run_id}`, children: "Dieser Host speichert keine Runden als Item. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
9017
|
-
notiz && /* @__PURE__ */ jsx8("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
9018
|
-
lauf.status === "succeeded" && /* @__PURE__ */ jsxs8("details", { "data-testid": `bilder-bereich-${lauf.run_id}`, children: [
|
|
9019
|
-
/* @__PURE__ */ jsx8("summary", { children: "Bilder zu diesem Lauf" }),
|
|
9020
|
-
/* @__PURE__ */ jsx8(RunImagesPanel, { port, lauf })
|
|
9476
|
+
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ jsx9("p", { "data-testid": `item-unsupported-${lauf.run_id}`, children: "Dieser Host speichert keine Runden als Item. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
9477
|
+
notiz && /* @__PURE__ */ jsx9("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
9478
|
+
lauf.status === "succeeded" && /* @__PURE__ */ jsx9(RunImagesPanel, { port, lauf })
|
|
9021
9479
|
] })
|
|
9022
9480
|
] });
|
|
9023
9481
|
};
|
|
9024
9482
|
|
|
9025
9483
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
9026
|
-
import { Fragment as
|
|
9484
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
9027
9485
|
var STRUKTURELL_BEDIENT = {
|
|
9028
9486
|
scene: ["nodes", "relations"]
|
|
9029
9487
|
};
|
|
9030
9488
|
var AbgeleitetesBildmodell = ({ schluessel }) => {
|
|
9031
9489
|
if (!schluessel) return null;
|
|
9032
|
-
return /* @__PURE__ */
|
|
9033
|
-
/* @__PURE__ */
|
|
9034
|
-
/* @__PURE__ */
|
|
9035
|
-
/* @__PURE__ */
|
|
9490
|
+
return /* @__PURE__ */ jsxs10("section", { className: "szenen-detail__derived", "data-testid": "abgeleitetes-bildmodell", children: [
|
|
9491
|
+
/* @__PURE__ */ jsx10("h4", { children: "Bildgenerierung \u2014 wo das Modell entschieden wird" }),
|
|
9492
|
+
/* @__PURE__ */ jsxs10("p", { "data-testid": "bildmodell-hinweis", children: [
|
|
9493
|
+
/* @__PURE__ */ jsx10("code", { children: schluessel }),
|
|
9036
9494
|
" beschreibt, wof\xFCr dieser Prompt optimiert wird \u2014 nicht, mit welchem Bildmodell er ausgef\xFChrt wird. Welche Bildmodelle wirklich ausf\xFChrbar sind, ist Konfiguration der jeweiligen Umgebung und wird an der Bildaktion eines Laufs gew\xE4hlt (D-129)."
|
|
9037
9495
|
] })
|
|
9038
9496
|
] });
|
|
@@ -9044,16 +9502,16 @@ var ElementDetail = ({
|
|
|
9044
9502
|
author,
|
|
9045
9503
|
onChanged
|
|
9046
9504
|
}) => {
|
|
9047
|
-
const [nachladen, setNachladen] =
|
|
9505
|
+
const [nachladen, setNachladen] = useState10(0);
|
|
9048
9506
|
const [phase] = usePortQuery(
|
|
9049
9507
|
() => port.elements.getElement(elementId),
|
|
9050
9508
|
[port, elementId, nachladen]
|
|
9051
9509
|
);
|
|
9052
|
-
const [entwurf, setEntwurf] =
|
|
9053
|
-
const [notiz, setNotiz] =
|
|
9054
|
-
const [laeuft, setLaeuft] =
|
|
9055
|
-
const [wahl, setWahl] =
|
|
9056
|
-
const [basiswechsel, setBasiswechsel] =
|
|
9510
|
+
const [entwurf, setEntwurf] = useState10({});
|
|
9511
|
+
const [notiz, setNotiz] = useState10(null);
|
|
9512
|
+
const [laeuft, setLaeuft] = useState10(false);
|
|
9513
|
+
const [wahl, setWahl] = useState10(null);
|
|
9514
|
+
const [basiswechsel, setBasiswechsel] = useState10(null);
|
|
9057
9515
|
const [kettenPhase] = usePortQuery(
|
|
9058
9516
|
() => port.context.chainFor(contextId),
|
|
9059
9517
|
[port, contextId]
|
|
@@ -9075,7 +9533,7 @@ var ElementDetail = ({
|
|
|
9075
9533
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
9076
9534
|
[schnappschuss?.element.type]
|
|
9077
9535
|
);
|
|
9078
|
-
|
|
9536
|
+
useEffect5(() => {
|
|
9079
9537
|
setWahl(null);
|
|
9080
9538
|
setBasiswechsel(null);
|
|
9081
9539
|
setNotiz(null);
|
|
@@ -9106,7 +9564,7 @@ var ElementDetail = ({
|
|
|
9106
9564
|
return {};
|
|
9107
9565
|
}, [schnappschuss, angezeigt]);
|
|
9108
9566
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
9109
|
-
|
|
9567
|
+
useEffect5(() => {
|
|
9110
9568
|
if (!schnappschuss) return;
|
|
9111
9569
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
9112
9570
|
}, [
|
|
@@ -9165,9 +9623,9 @@ var ElementDetail = ({
|
|
|
9165
9623
|
return { valid: false, errors: [{ instancePath: "", message: String(e) }] };
|
|
9166
9624
|
}
|
|
9167
9625
|
}, [entwurf, felder, schnappschuss?.element.type, kettenfeld]);
|
|
9168
|
-
if (phase.status === "loading") return /* @__PURE__ */
|
|
9626
|
+
if (phase.status === "loading") return /* @__PURE__ */ jsx10("p", { "data-testid": "element-laden", children: "Element wird geladen \u2026" });
|
|
9169
9627
|
if (phase.status === "error") {
|
|
9170
|
-
return /* @__PURE__ */
|
|
9628
|
+
return /* @__PURE__ */ jsxs10("p", { "data-testid": "element-fehler", role: "alert", children: [
|
|
9171
9629
|
"Element ",
|
|
9172
9630
|
elementId,
|
|
9173
9631
|
" konnte nicht geladen werden: ",
|
|
@@ -9175,7 +9633,7 @@ var ElementDetail = ({
|
|
|
9175
9633
|
] });
|
|
9176
9634
|
}
|
|
9177
9635
|
if (!schnappschuss) {
|
|
9178
|
-
return /* @__PURE__ */
|
|
9636
|
+
return /* @__PURE__ */ jsxs10("p", { "data-testid": "element-unbekannt", children: [
|
|
9179
9637
|
"Element ",
|
|
9180
9638
|
elementId,
|
|
9181
9639
|
" ist unbekannt."
|
|
@@ -9281,28 +9739,28 @@ var ElementDetail = ({
|
|
|
9281
9739
|
formular: entwurf
|
|
9282
9740
|
};
|
|
9283
9741
|
const laufVersionId = angezeigt.kind === "version" ? angezeigt.versionId : usableHeadVersionId(kopfAufloesung);
|
|
9284
|
-
return /* @__PURE__ */
|
|
9285
|
-
/* @__PURE__ */
|
|
9286
|
-
/* @__PURE__ */
|
|
9287
|
-
/* @__PURE__ */
|
|
9288
|
-
/* @__PURE__ */
|
|
9289
|
-
schnappschuss.element.retired && /* @__PURE__ */
|
|
9742
|
+
return /* @__PURE__ */ jsxs10("div", { className: "szenen-detail", "data-testid": "element-detail", "data-element-id": elementId, children: [
|
|
9743
|
+
/* @__PURE__ */ jsxs10("header", { children: [
|
|
9744
|
+
/* @__PURE__ */ jsx10("h3", { children: schnappschuss.metadata?.title ?? "(ohne Titel)" }),
|
|
9745
|
+
/* @__PURE__ */ jsxs10("p", { className: "szenen-detail__ids", children: [
|
|
9746
|
+
/* @__PURE__ */ jsx10("span", { "data-testid": "element-typ", children: elementTypLabel(typ) }),
|
|
9747
|
+
schnappschuss.element.retired && /* @__PURE__ */ jsx10("span", { "data-testid": "ist-stillgelegt", children: "stillgelegt" })
|
|
9290
9748
|
] })
|
|
9291
9749
|
] }),
|
|
9292
|
-
kontextkette.status === "error" && /* @__PURE__ */
|
|
9750
|
+
kontextkette.status === "error" && /* @__PURE__ */ jsxs10("p", { role: "alert", "data-testid": "kontextkette-fehler", className: "szenen-detail__hint", children: [
|
|
9293
9751
|
"Die Kontextkette konnte nicht gelesen werden: ",
|
|
9294
9752
|
kontextkette.message,
|
|
9295
9753
|
". Solange das so ist, lassen sich weder der bevorzugte Kopf noch die ausw\xE4hlbaren Referenzen bestimmen \u2014 sie sind ",
|
|
9296
|
-
/* @__PURE__ */
|
|
9754
|
+
/* @__PURE__ */ jsx10("strong", { children: "unbekannt" }),
|
|
9297
9755
|
", nicht leer."
|
|
9298
9756
|
] }),
|
|
9299
|
-
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */
|
|
9757
|
+
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ jsxs10("p", { role: "alert", "data-testid": "versionsgraph-fehler", className: "szenen-detail__hint", children: [
|
|
9300
9758
|
"Der Versionsgraph dieses Elements ist nicht aufbaubar:",
|
|
9301
9759
|
" ",
|
|
9302
9760
|
kopfErgebnis.message,
|
|
9303
9761
|
". Die Versionen bleiben einzeln anzeigbar; ein bevorzugter Kopf l\xE4sst sich daraus nicht ableiten."
|
|
9304
9762
|
] }),
|
|
9305
|
-
/* @__PURE__ */
|
|
9763
|
+
/* @__PURE__ */ jsx10(
|
|
9306
9764
|
VersionNavigator,
|
|
9307
9765
|
{
|
|
9308
9766
|
versions: schnappschuss.versions,
|
|
@@ -9325,22 +9783,22 @@ var ElementDetail = ({
|
|
|
9325
9783
|
}
|
|
9326
9784
|
}
|
|
9327
9785
|
),
|
|
9328
|
-
basiswechsel && draft && /* @__PURE__ */
|
|
9329
|
-
/* @__PURE__ */
|
|
9786
|
+
basiswechsel && draft && /* @__PURE__ */ jsxs10("div", { className: "szenen-detail__confirm", "data-testid": "basiswechsel-bestaetigung", role: "alertdialog", children: [
|
|
9787
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9330
9788
|
"Es gibt bereits einen Entwurf (Revision ",
|
|
9331
9789
|
draft.revision,
|
|
9332
|
-
draft.base_version_id ? /* @__PURE__ */
|
|
9790
|
+
draft.base_version_id ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9333
9791
|
" auf Basis ",
|
|
9334
|
-
/* @__PURE__ */
|
|
9335
|
-
] }) : /* @__PURE__ */
|
|
9792
|
+
/* @__PURE__ */ jsx10("code", { children: draft.base_version_id })
|
|
9793
|
+
] }) : /* @__PURE__ */ jsx10(Fragment5, { children: " ohne Basis" }),
|
|
9336
9794
|
"). Ihn auf Version ",
|
|
9337
|
-
/* @__PURE__ */
|
|
9795
|
+
/* @__PURE__ */ jsx10("code", { children: basiswechsel }),
|
|
9338
9796
|
" neu aufzusetzen",
|
|
9339
9797
|
" ",
|
|
9340
|
-
/* @__PURE__ */
|
|
9798
|
+
/* @__PURE__ */ jsx10("strong", { children: "ersetzt seinen Inhalt" }),
|
|
9341
9799
|
" durch die Payload dieser Version."
|
|
9342
9800
|
] }),
|
|
9343
|
-
/* @__PURE__ */
|
|
9801
|
+
/* @__PURE__ */ jsx10(
|
|
9344
9802
|
"button",
|
|
9345
9803
|
{
|
|
9346
9804
|
type: "button",
|
|
@@ -9352,7 +9810,7 @@ var ElementDetail = ({
|
|
|
9352
9810
|
children: "Entwurf auf diese Version neu aufsetzen"
|
|
9353
9811
|
}
|
|
9354
9812
|
),
|
|
9355
|
-
/* @__PURE__ */
|
|
9813
|
+
/* @__PURE__ */ jsx10(
|
|
9356
9814
|
"button",
|
|
9357
9815
|
{
|
|
9358
9816
|
type: "button",
|
|
@@ -9363,26 +9821,26 @@ var ElementDetail = ({
|
|
|
9363
9821
|
}
|
|
9364
9822
|
)
|
|
9365
9823
|
] }),
|
|
9366
|
-
/* @__PURE__ */
|
|
9367
|
-
/* @__PURE__ */
|
|
9824
|
+
/* @__PURE__ */ jsxs10("section", { className: "szenen-detail__draft", "data-testid": "draft-bereich", children: [
|
|
9825
|
+
/* @__PURE__ */ jsx10("h4", { children: bearbeitbar ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9368
9826
|
"Entwurf",
|
|
9369
|
-
draft && /* @__PURE__ */
|
|
9827
|
+
draft && /* @__PURE__ */ jsxs10("span", { children: [
|
|
9370
9828
|
" \xB7 Revision ",
|
|
9371
9829
|
draft.revision
|
|
9372
9830
|
] })
|
|
9373
|
-
] }) : /* @__PURE__ */
|
|
9374
|
-
angezeigt.kind === "keiner" && /* @__PURE__ */
|
|
9831
|
+
] }) : /* @__PURE__ */ jsx10(Fragment5, { children: "Ver\xF6ffentlichte Version \u2014 nur Ansicht" }) }),
|
|
9832
|
+
angezeigt.kind === "keiner" && /* @__PURE__ */ jsxs10("p", { "data-testid": "nichts-angezeigt", children: [
|
|
9375
9833
|
"Es ist kein Stand ausgew\xE4hlt. Oben eine Version anzeigen oder \xFCber ",
|
|
9376
|
-
/* @__PURE__ */
|
|
9834
|
+
/* @__PURE__ */ jsx10("strong", { children: "als Grundlage bearbeiten" }),
|
|
9377
9835
|
" einen Entwurf beginnen."
|
|
9378
9836
|
] }),
|
|
9379
|
-
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */
|
|
9837
|
+
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ jsxs10("p", { "data-testid": "nur-ansicht", className: "szenen-detail__hint", children: [
|
|
9380
9838
|
"Ver\xF6ffentlichte Versionen sind unver\xE4nderlich (D-02). Zum Bearbeiten oben ",
|
|
9381
|
-
/* @__PURE__ */
|
|
9839
|
+
/* @__PURE__ */ jsx10("strong", { children: "als Grundlage bearbeiten" }),
|
|
9382
9840
|
" w\xE4hlen \u2014 das erzeugt einen Entwurf mit genau dieser Version als Basis."
|
|
9383
9841
|
] }),
|
|
9384
|
-
angezeigt.kind !== "keiner" && /* @__PURE__ */
|
|
9385
|
-
typ === "scene" && /* @__PURE__ */
|
|
9842
|
+
angezeigt.kind !== "keiner" && /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9843
|
+
typ === "scene" && /* @__PURE__ */ jsx10(
|
|
9386
9844
|
SceneEditor,
|
|
9387
9845
|
{
|
|
9388
9846
|
port,
|
|
@@ -9396,57 +9854,57 @@ var ElementDetail = ({
|
|
|
9396
9854
|
}))
|
|
9397
9855
|
}
|
|
9398
9856
|
),
|
|
9399
|
-
felder.length === 0 && /* @__PURE__ */
|
|
9857
|
+
felder.length === 0 && /* @__PURE__ */ jsxs10("p", { "data-testid": "kein-schema", children: [
|
|
9400
9858
|
"F\xFCr den Typ ",
|
|
9401
9859
|
typ,
|
|
9402
9860
|
" liegt kein Payload-Schema vor."
|
|
9403
9861
|
] }),
|
|
9404
|
-
primaer.map((feld) => /* @__PURE__ */
|
|
9405
|
-
advanced.length > 0 && /* @__PURE__ */
|
|
9406
|
-
/* @__PURE__ */
|
|
9862
|
+
primaer.map((feld) => /* @__PURE__ */ jsx10(SchemaFieldRow, { ...feldProps, feld }, feld.path)),
|
|
9863
|
+
advanced.length > 0 && /* @__PURE__ */ jsxs10("details", { className: "szenen-detail__technical", "data-testid": "technische-felder", children: [
|
|
9864
|
+
/* @__PURE__ */ jsxs10("summary", { children: [
|
|
9407
9865
|
"Technische Felder / JSON (",
|
|
9408
9866
|
advanced.length,
|
|
9409
9867
|
")"
|
|
9410
9868
|
] }),
|
|
9411
|
-
advanced.map((feld) => /* @__PURE__ */
|
|
9869
|
+
advanced.map((feld) => /* @__PURE__ */ jsx10(SchemaFieldRow, { ...feldProps, feld }, feld.path))
|
|
9412
9870
|
] }),
|
|
9413
|
-
/* @__PURE__ */
|
|
9414
|
-
/* @__PURE__ */
|
|
9415
|
-
/* @__PURE__ */
|
|
9871
|
+
/* @__PURE__ */ jsxs10("details", { className: "szenen-detail__technical", "data-testid": "technische-informationen", children: [
|
|
9872
|
+
/* @__PURE__ */ jsx10("summary", { children: "Technische Informationen" }),
|
|
9873
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9416
9874
|
"Element-ID: ",
|
|
9417
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ jsx10("code", { children: schnappschuss.element.element_id })
|
|
9418
9876
|
] }),
|
|
9419
|
-
/* @__PURE__ */
|
|
9877
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9420
9878
|
"angezeigter Stand:",
|
|
9421
9879
|
" ",
|
|
9422
|
-
/* @__PURE__ */
|
|
9880
|
+
/* @__PURE__ */ jsx10("code", { "data-testid": "angezeigter-stand", children: angezeigt.kind === "version" ? angezeigt.versionId : "Entwurf" })
|
|
9423
9881
|
] }),
|
|
9424
|
-
draft && /* @__PURE__ */
|
|
9882
|
+
draft && /* @__PURE__ */ jsxs10("p", { children: [
|
|
9425
9883
|
"Basis des Entwurfs:",
|
|
9426
9884
|
" ",
|
|
9427
|
-
/* @__PURE__ */
|
|
9885
|
+
/* @__PURE__ */ jsx10("code", { children: draft.base_version_id ?? "(keine)" })
|
|
9428
9886
|
] })
|
|
9429
9887
|
] })
|
|
9430
9888
|
] }),
|
|
9431
|
-
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */
|
|
9889
|
+
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */ jsx10("ul", { "data-testid": "vorschau-befunde", className: "szenen-detail__preview-errors", children: vorschau.errors.map((f, i) => /* @__PURE__ */ jsxs10("li", { children: [
|
|
9432
9890
|
f.instancePath || "/",
|
|
9433
9891
|
": ",
|
|
9434
9892
|
f.message
|
|
9435
9893
|
] }, i)) }),
|
|
9436
|
-
kettenfeld && /* @__PURE__ */
|
|
9894
|
+
kettenfeld && /* @__PURE__ */ jsxs10("p", { "data-testid": "kettenfeld-hinweis", className: "szenen-detail__hint", children: [
|
|
9437
9895
|
"Der Verweis ",
|
|
9438
|
-
/* @__PURE__ */
|
|
9896
|
+
/* @__PURE__ */ jsx10("code", { children: kettenfeld }),
|
|
9439
9897
|
" steht in den Kettenmetadaten, nicht in der Payload (D-96) \u2014 f\xFCr den Prompt-Lauf aus der Kette gen\xFCgt das. Zum",
|
|
9440
9898
|
" ",
|
|
9441
|
-
/* @__PURE__ */
|
|
9899
|
+
/* @__PURE__ */ jsx10("strong", { children: "Ver\xF6ffentlichen" }),
|
|
9442
9900
|
" muss er als regul\xE4re Referenz auf eine ver\xF6ffentlichte Version gesetzt werden."
|
|
9443
9901
|
] }),
|
|
9444
|
-
bearbeitbar && /* @__PURE__ */
|
|
9445
|
-
/* @__PURE__ */
|
|
9446
|
-
/* @__PURE__ */
|
|
9902
|
+
bearbeitbar && /* @__PURE__ */ jsxs10("div", { className: "szenen-detail__actions", children: [
|
|
9903
|
+
/* @__PURE__ */ jsx10("button", { type: "button", "data-testid": "draft-speichern", disabled: laeuft, onClick: speichern, children: "Entwurf speichern" }),
|
|
9904
|
+
/* @__PURE__ */ jsx10("button", { type: "button", "data-testid": "veroeffentlichen", disabled: laeuft, onClick: veroeffentlichen, children: "ver\xF6ffentlichen" })
|
|
9447
9905
|
] })
|
|
9448
9906
|
] }),
|
|
9449
|
-
typ === "target_model" && /* @__PURE__ */
|
|
9907
|
+
typ === "target_model" && /* @__PURE__ */ jsx10(
|
|
9450
9908
|
AbgeleitetesBildmodell,
|
|
9451
9909
|
{
|
|
9452
9910
|
schluessel: (() => {
|
|
@@ -9461,8 +9919,8 @@ var ElementDetail = ({
|
|
|
9461
9919
|
// einer Draft-Kette, fuehrt der Weg ueber das Einfrieren —
|
|
9462
9920
|
// der alte Satz „setzen eine veroeffentlichte Version
|
|
9463
9921
|
// voraus" gilt nur noch fuer den Einzel-Shot.
|
|
9464
|
-
draft?.chain ? /* @__PURE__ */
|
|
9465
|
-
/* @__PURE__ */
|
|
9922
|
+
draft?.chain ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9923
|
+
/* @__PURE__ */ jsx10(
|
|
9466
9924
|
PromptStartAction,
|
|
9467
9925
|
{
|
|
9468
9926
|
port,
|
|
@@ -9472,7 +9930,7 @@ var ElementDetail = ({
|
|
|
9472
9930
|
}
|
|
9473
9931
|
}
|
|
9474
9932
|
),
|
|
9475
|
-
/* @__PURE__ */
|
|
9933
|
+
/* @__PURE__ */ jsx10(
|
|
9476
9934
|
RunsPanel,
|
|
9477
9935
|
{
|
|
9478
9936
|
port,
|
|
@@ -9480,17 +9938,17 @@ var ElementDetail = ({
|
|
|
9480
9938
|
source: { kind: "draft_chain", chainId: draft.chain.chain_id }
|
|
9481
9939
|
}
|
|
9482
9940
|
)
|
|
9483
|
-
] }) : /* @__PURE__ */
|
|
9484
|
-
) : laufVersionId ? /* @__PURE__ */
|
|
9941
|
+
] }) : /* @__PURE__ */ jsx10("p", { "data-testid": "shot-ohne-version", children: "Dieser Shot ist noch nicht ver\xF6ffentlicht und geh\xF6rt zu keiner Draft-Kette. Ein Prompt-Lauf braucht hier eine ver\xF6ffentlichte Version \u2014 oder einen Shot, der aus einer Rekonstruktion als Kette entstanden ist." })
|
|
9942
|
+
) : laufVersionId ? /* @__PURE__ */ jsx10(
|
|
9485
9943
|
RunsPanel,
|
|
9486
9944
|
{
|
|
9487
9945
|
port,
|
|
9488
9946
|
contextId,
|
|
9489
9947
|
source: { kind: "published", shotVersionId: laufVersionId }
|
|
9490
9948
|
}
|
|
9491
|
-
) : /* @__PURE__ */
|
|
9492
|
-
typ === "scene" && /* @__PURE__ */
|
|
9493
|
-
/* @__PURE__ */
|
|
9949
|
+
) : /* @__PURE__ */ jsx10("p", { "data-testid": "laufquelle-unklar", children: "Dieser Shot hat mehrere ver\xF6ffentlichte Versionen und keinen bevorzugten Kopf in diesem Kontext. Welche davon einen Lauf tr\xE4gt, entscheidet keine Reihenfolge \u2014 bitte oben eine Version anzeigen oder als bevorzugt setzen." })),
|
|
9950
|
+
typ === "scene" && /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9951
|
+
/* @__PURE__ */ jsx10(
|
|
9494
9952
|
PromptStartAction,
|
|
9495
9953
|
{
|
|
9496
9954
|
port,
|
|
@@ -9504,7 +9962,7 @@ var ElementDetail = ({
|
|
|
9504
9962
|
onLauf: () => setNachladen((n) => n + 1)
|
|
9505
9963
|
}
|
|
9506
9964
|
),
|
|
9507
|
-
/* @__PURE__ */
|
|
9965
|
+
/* @__PURE__ */ jsx10(
|
|
9508
9966
|
RunsPanel,
|
|
9509
9967
|
{
|
|
9510
9968
|
port,
|
|
@@ -9513,7 +9971,7 @@ var ElementDetail = ({
|
|
|
9513
9971
|
}
|
|
9514
9972
|
)
|
|
9515
9973
|
] }),
|
|
9516
|
-
typ === "scene_setup" && /* @__PURE__ */
|
|
9974
|
+
typ === "scene_setup" && /* @__PURE__ */ jsx10(
|
|
9517
9975
|
CapabilityPanel,
|
|
9518
9976
|
{
|
|
9519
9977
|
port,
|
|
@@ -9521,7 +9979,7 @@ var ElementDetail = ({
|
|
|
9521
9979
|
setupPayload: payloadAusFormular()
|
|
9522
9980
|
}
|
|
9523
9981
|
),
|
|
9524
|
-
notiz && /* @__PURE__ */
|
|
9982
|
+
notiz && /* @__PURE__ */ jsxs10(
|
|
9525
9983
|
"div",
|
|
9526
9984
|
{
|
|
9527
9985
|
className: `szenen-detail__notice szenen-detail__notice--${notiz.tone}`,
|
|
@@ -9529,8 +9987,8 @@ var ElementDetail = ({
|
|
|
9529
9987
|
"data-tone": notiz.tone,
|
|
9530
9988
|
role: notiz.tone === "error" ? "alert" : "status",
|
|
9531
9989
|
children: [
|
|
9532
|
-
/* @__PURE__ */
|
|
9533
|
-
notiz.details && notiz.details.length > 0 && /* @__PURE__ */
|
|
9990
|
+
/* @__PURE__ */ jsx10("p", { children: notiz.text }),
|
|
9991
|
+
notiz.details && notiz.details.length > 0 && /* @__PURE__ */ jsx10("ul", { "data-testid": "notiz-befunde", children: notiz.details.map((d, i) => /* @__PURE__ */ jsx10("li", { children: d }, i)) })
|
|
9534
9992
|
]
|
|
9535
9993
|
}
|
|
9536
9994
|
)
|
|
@@ -9538,15 +9996,15 @@ var ElementDetail = ({
|
|
|
9538
9996
|
};
|
|
9539
9997
|
|
|
9540
9998
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
9541
|
-
import { useEffect as
|
|
9999
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
9542
10000
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
9543
10001
|
function messen(abfrage) {
|
|
9544
10002
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
9545
10003
|
return window.matchMedia(abfrage).matches;
|
|
9546
10004
|
}
|
|
9547
10005
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
9548
|
-
const [schmal, setSchmal] =
|
|
9549
|
-
|
|
10006
|
+
const [schmal, setSchmal] = useState11(() => messen(abfrage));
|
|
10007
|
+
useEffect6(() => {
|
|
9550
10008
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
9551
10009
|
const liste = window.matchMedia(abfrage);
|
|
9552
10010
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -9558,7 +10016,7 @@ function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
|
9558
10016
|
}
|
|
9559
10017
|
|
|
9560
10018
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
9561
|
-
import { jsx as
|
|
10019
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
9562
10020
|
var ElementsArea = ({
|
|
9563
10021
|
port,
|
|
9564
10022
|
contextId,
|
|
@@ -9573,16 +10031,16 @@ var ElementsArea = ({
|
|
|
9573
10031
|
const gemischt = auswahlTypen.length > 1;
|
|
9574
10032
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
9575
10033
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
9576
|
-
const [typ, setTyp] =
|
|
9577
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] =
|
|
9578
|
-
const [gewaehlt, setGewaehlt] =
|
|
9579
|
-
const [neuerTitel, setNeuerTitel] =
|
|
9580
|
-
const [neuerTyp, setNeuerTyp] =
|
|
9581
|
-
const [notiz, setNotiz] =
|
|
9582
|
-
const [anlegend, setAnlegend] =
|
|
9583
|
-
const [anlageOffen, setAnlageOffen] =
|
|
10034
|
+
const [typ, setTyp] = useState12(einzelTyp ?? "");
|
|
10035
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = useState12(false);
|
|
10036
|
+
const [gewaehlt, setGewaehlt] = useState12(null);
|
|
10037
|
+
const [neuerTitel, setNeuerTitel] = useState12("");
|
|
10038
|
+
const [neuerTyp, setNeuerTyp] = useState12(auswahlTypen[0]);
|
|
10039
|
+
const [notiz, setNotiz] = useState12(null);
|
|
10040
|
+
const [anlegend, setAnlegend] = useState12(false);
|
|
10041
|
+
const [anlageOffen, setAnlageOffen] = useState12(false);
|
|
9584
10042
|
const schmal = useSchmalesDisplay();
|
|
9585
|
-
const [ansicht, setAnsicht] =
|
|
10043
|
+
const [ansicht, setAnsicht] = useState12("liste");
|
|
9586
10044
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
9587
10045
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
9588
10046
|
const waehle = (elementId) => {
|
|
@@ -9602,17 +10060,17 @@ var ElementsArea = ({
|
|
|
9602
10060
|
setAnlageOffen(false);
|
|
9603
10061
|
setNeuerTitel("");
|
|
9604
10062
|
};
|
|
9605
|
-
return /* @__PURE__ */
|
|
10063
|
+
return /* @__PURE__ */ jsxs11(
|
|
9606
10064
|
"div",
|
|
9607
10065
|
{
|
|
9608
10066
|
className: "szenen-elements",
|
|
9609
10067
|
"data-testid": "bereich-elemente",
|
|
9610
10068
|
"data-ansicht": schmal ? ansicht : "beide",
|
|
9611
10069
|
children: [
|
|
9612
|
-
zeigeListe && /* @__PURE__ */
|
|
9613
|
-
/* @__PURE__ */
|
|
9614
|
-
/* @__PURE__ */
|
|
9615
|
-
/* @__PURE__ */
|
|
10070
|
+
zeigeListe && /* @__PURE__ */ jsxs11("div", { className: "szenen-elements__master", "data-testid": "elemente-master", children: [
|
|
10071
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__toolbar", children: [
|
|
10072
|
+
/* @__PURE__ */ jsx11("h3", { className: "szenen-elements__heading", children: ueberschrift }),
|
|
10073
|
+
/* @__PURE__ */ jsx11(
|
|
9616
10074
|
"button",
|
|
9617
10075
|
{
|
|
9618
10076
|
type: "button",
|
|
@@ -9628,22 +10086,22 @@ var ElementsArea = ({
|
|
|
9628
10086
|
}
|
|
9629
10087
|
)
|
|
9630
10088
|
] }),
|
|
9631
|
-
gemischt && /* @__PURE__ */
|
|
10089
|
+
gemischt && /* @__PURE__ */ jsxs11("label", { className: "szenen-elements__scope", children: [
|
|
9632
10090
|
"Art",
|
|
9633
|
-
/* @__PURE__ */
|
|
10091
|
+
/* @__PURE__ */ jsxs11(
|
|
9634
10092
|
"select",
|
|
9635
10093
|
{
|
|
9636
10094
|
"data-testid": "filter-typ",
|
|
9637
10095
|
value: typ,
|
|
9638
10096
|
onChange: (e) => setTyp(e.target.value),
|
|
9639
10097
|
children: [
|
|
9640
|
-
/* @__PURE__ */
|
|
9641
|
-
auswahlTypen.map((t) => /* @__PURE__ */
|
|
10098
|
+
/* @__PURE__ */ jsx11("option", { value: "", children: allTypesLabel ?? "alle Typen" }),
|
|
10099
|
+
auswahlTypen.map((t) => /* @__PURE__ */ jsx11("option", { value: t, children: elementTypPlural(t) }, t))
|
|
9642
10100
|
]
|
|
9643
10101
|
}
|
|
9644
10102
|
)
|
|
9645
10103
|
] }),
|
|
9646
|
-
anlageOffen && /* @__PURE__ */
|
|
10104
|
+
anlageOffen && /* @__PURE__ */ jsxs11(
|
|
9647
10105
|
"form",
|
|
9648
10106
|
{
|
|
9649
10107
|
className: "szenen-elements__create",
|
|
@@ -9671,9 +10129,9 @@ var ElementsArea = ({
|
|
|
9671
10129
|
}
|
|
9672
10130
|
},
|
|
9673
10131
|
children: [
|
|
9674
|
-
/* @__PURE__ */
|
|
10132
|
+
/* @__PURE__ */ jsxs11("label", { className: "szenen-elements__create-title", children: [
|
|
9675
10133
|
einzelTyp ? `Neue ${einzahl}` : "Titel",
|
|
9676
|
-
/* @__PURE__ */
|
|
10134
|
+
/* @__PURE__ */ jsx11(
|
|
9677
10135
|
"input",
|
|
9678
10136
|
{
|
|
9679
10137
|
"data-testid": "neuer-titel",
|
|
@@ -9684,20 +10142,20 @@ var ElementsArea = ({
|
|
|
9684
10142
|
}
|
|
9685
10143
|
)
|
|
9686
10144
|
] }),
|
|
9687
|
-
gemischt && /* @__PURE__ */
|
|
10145
|
+
gemischt && /* @__PURE__ */ jsxs11("label", { className: "szenen-elements__create-type", children: [
|
|
9688
10146
|
"Art",
|
|
9689
|
-
/* @__PURE__ */
|
|
10147
|
+
/* @__PURE__ */ jsx11(
|
|
9690
10148
|
"select",
|
|
9691
10149
|
{
|
|
9692
10150
|
"data-testid": "neuer-typ",
|
|
9693
10151
|
value: neuerTyp,
|
|
9694
10152
|
onChange: (e) => setNeuerTyp(e.target.value),
|
|
9695
|
-
children: auswahlTypen.map((t) => /* @__PURE__ */
|
|
10153
|
+
children: auswahlTypen.map((t) => /* @__PURE__ */ jsx11("option", { value: t, children: elementTypLabel(t) }, t))
|
|
9696
10154
|
}
|
|
9697
10155
|
)
|
|
9698
10156
|
] }),
|
|
9699
|
-
/* @__PURE__ */
|
|
9700
|
-
/* @__PURE__ */
|
|
10157
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__create-actions", children: [
|
|
10158
|
+
/* @__PURE__ */ jsx11(
|
|
9701
10159
|
"button",
|
|
9702
10160
|
{
|
|
9703
10161
|
type: "submit",
|
|
@@ -9706,7 +10164,7 @@ var ElementsArea = ({
|
|
|
9706
10164
|
children: "anlegen"
|
|
9707
10165
|
}
|
|
9708
10166
|
),
|
|
9709
|
-
/* @__PURE__ */
|
|
10167
|
+
/* @__PURE__ */ jsx11(
|
|
9710
10168
|
"button",
|
|
9711
10169
|
{
|
|
9712
10170
|
type: "button",
|
|
@@ -9719,19 +10177,19 @@ var ElementsArea = ({
|
|
|
9719
10177
|
]
|
|
9720
10178
|
}
|
|
9721
10179
|
),
|
|
9722
|
-
notiz && /* @__PURE__ */
|
|
9723
|
-
phase.status === "loading" && /* @__PURE__ */
|
|
9724
|
-
phase.status === "error" && /* @__PURE__ */
|
|
10180
|
+
notiz && /* @__PURE__ */ jsx11("p", { "data-testid": "anlegen-notiz", "data-tone": notiz.tone, children: notiz.text }),
|
|
10181
|
+
phase.status === "loading" && /* @__PURE__ */ jsx11("p", { "data-testid": "elemente-laden", children: "Elemente werden geladen \u2026" }),
|
|
10182
|
+
phase.status === "error" && /* @__PURE__ */ jsxs11("p", { "data-testid": "elemente-fehler", role: "alert", children: [
|
|
9725
10183
|
"Elemente konnten nicht geladen werden: ",
|
|
9726
10184
|
phase.message,
|
|
9727
10185
|
phase.retryable && " \u2014 ein erneuter Versuch kann helfen."
|
|
9728
10186
|
] }),
|
|
9729
|
-
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */
|
|
10187
|
+
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ jsxs11("p", { "data-testid": "elemente-leer", children: [
|
|
9730
10188
|
typ ? `Keine ${elementTypPlural(typ)} in diesem Kontext.` : "Nichts in diesem Kontext.",
|
|
9731
10189
|
" ",
|
|
9732
10190
|
'Mit \u201E+ Neu" anlegen.'
|
|
9733
10191
|
] }),
|
|
9734
|
-
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */
|
|
10192
|
+
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "szenen-elements__list", "data-testid": "elemente-liste", children: phase.value.map((element) => /* @__PURE__ */ jsx11("li", { "data-element-id": element.element_id, children: /* @__PURE__ */ jsxs11(
|
|
9735
10193
|
"button",
|
|
9736
10194
|
{
|
|
9737
10195
|
type: "button",
|
|
@@ -9740,18 +10198,18 @@ var ElementsArea = ({
|
|
|
9740
10198
|
className: element.element_id === gewaehlt ? "is-selected" : void 0,
|
|
9741
10199
|
onClick: () => waehle(element.element_id),
|
|
9742
10200
|
children: [
|
|
9743
|
-
/* @__PURE__ */
|
|
9744
|
-
gemischt && /* @__PURE__ */
|
|
9745
|
-
element.subtype && /* @__PURE__ */
|
|
9746
|
-
element.retired && /* @__PURE__ */
|
|
10201
|
+
/* @__PURE__ */ jsx11("strong", { className: "szenen-elements__title", children: element.title || "Unbenanntes Element" }),
|
|
10202
|
+
gemischt && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__type", children: elementTypLabel(element.type) }),
|
|
10203
|
+
element.subtype && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__subtype", children: element.subtype }),
|
|
10204
|
+
element.retired && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__retired", children: "stillgelegt" })
|
|
9747
10205
|
]
|
|
9748
10206
|
}
|
|
9749
10207
|
) }, element.element_id)) }),
|
|
9750
|
-
/* @__PURE__ */
|
|
9751
|
-
/* @__PURE__ */
|
|
9752
|
-
/* @__PURE__ */
|
|
9753
|
-
/* @__PURE__ */
|
|
9754
|
-
/* @__PURE__ */
|
|
10208
|
+
/* @__PURE__ */ jsxs11("details", { className: "szenen-elements__options", "data-testid": "listen-optionen", children: [
|
|
10209
|
+
/* @__PURE__ */ jsx11("summary", { children: "Listenoptionen" }),
|
|
10210
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__filter", children: [
|
|
10211
|
+
/* @__PURE__ */ jsxs11("label", { children: [
|
|
10212
|
+
/* @__PURE__ */ jsx11(
|
|
9755
10213
|
"input",
|
|
9756
10214
|
{
|
|
9757
10215
|
type: "checkbox",
|
|
@@ -9762,12 +10220,12 @@ var ElementsArea = ({
|
|
|
9762
10220
|
),
|
|
9763
10221
|
"stillgelegte Elemente einblenden"
|
|
9764
10222
|
] }),
|
|
9765
|
-
/* @__PURE__ */
|
|
10223
|
+
/* @__PURE__ */ jsx11("button", { type: "button", "data-testid": "neu-laden", onClick: neuLaden, children: "neu laden" })
|
|
9766
10224
|
] })
|
|
9767
10225
|
] })
|
|
9768
10226
|
] }),
|
|
9769
|
-
zeigeDetail && /* @__PURE__ */
|
|
9770
|
-
schmal && /* @__PURE__ */
|
|
10227
|
+
zeigeDetail && /* @__PURE__ */ jsxs11("div", { className: "szenen-elements__detail", "data-testid": "elemente-detail-spalte", children: [
|
|
10228
|
+
schmal && /* @__PURE__ */ jsx11(
|
|
9771
10229
|
"button",
|
|
9772
10230
|
{
|
|
9773
10231
|
type: "button",
|
|
@@ -9777,7 +10235,7 @@ var ElementsArea = ({
|
|
|
9777
10235
|
children: "\u2190 Zur\xFCck zur Liste"
|
|
9778
10236
|
}
|
|
9779
10237
|
),
|
|
9780
|
-
gewaehlt ? /* @__PURE__ */
|
|
10238
|
+
gewaehlt ? /* @__PURE__ */ jsx11(
|
|
9781
10239
|
ElementDetail,
|
|
9782
10240
|
{
|
|
9783
10241
|
port,
|
|
@@ -9786,7 +10244,7 @@ var ElementsArea = ({
|
|
|
9786
10244
|
author,
|
|
9787
10245
|
onChanged: neuLaden
|
|
9788
10246
|
}
|
|
9789
|
-
) : /* @__PURE__ */
|
|
10247
|
+
) : /* @__PURE__ */ jsx11("p", { className: "szenen-elements__empty-detail", "data-testid": "keine-auswahl", children: "Nichts ausgew\xE4hlt. Ein Eintrag aus der Liste \xF6ffnet die Bearbeitung." })
|
|
9790
10248
|
] })
|
|
9791
10249
|
]
|
|
9792
10250
|
}
|
|
@@ -9794,17 +10252,17 @@ var ElementsArea = ({
|
|
|
9794
10252
|
};
|
|
9795
10253
|
|
|
9796
10254
|
// src/features/szenen/areas/SceneArea.tsx
|
|
9797
|
-
import { jsx as
|
|
9798
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9799
|
-
/* @__PURE__ */
|
|
9800
|
-
/* @__PURE__ */
|
|
10255
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10256
|
+
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ jsxs12("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
10257
|
+
/* @__PURE__ */ jsx12("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
10258
|
+
/* @__PURE__ */ jsx12(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
9801
10259
|
] });
|
|
9802
10260
|
|
|
9803
10261
|
// src/features/szenen/areas/SetupArea.tsx
|
|
9804
|
-
import { jsx as
|
|
9805
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9806
|
-
/* @__PURE__ */
|
|
9807
|
-
/* @__PURE__ */
|
|
10262
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10263
|
+
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ jsxs13("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
10264
|
+
/* @__PURE__ */ jsx13("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
10265
|
+
/* @__PURE__ */ jsx13(
|
|
9808
10266
|
ElementsArea,
|
|
9809
10267
|
{
|
|
9810
10268
|
port,
|
|
@@ -9817,10 +10275,10 @@ var SetupArea = ({ port, contextId }) => /* @__PURE__ */ jsxs12("div", { classNa
|
|
|
9817
10275
|
] });
|
|
9818
10276
|
|
|
9819
10277
|
// src/features/szenen/areas/ShotArea.tsx
|
|
9820
|
-
import { jsx as
|
|
9821
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9822
|
-
/* @__PURE__ */
|
|
9823
|
-
/* @__PURE__ */
|
|
10278
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10279
|
+
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ jsxs14("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
10280
|
+
/* @__PURE__ */ jsx14("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
10281
|
+
/* @__PURE__ */ jsx14(
|
|
9824
10282
|
ElementsArea,
|
|
9825
10283
|
{
|
|
9826
10284
|
port,
|
|
@@ -9833,21 +10291,21 @@ var ShotArea = ({ port, contextId }) => /* @__PURE__ */ jsxs13("div", { classNam
|
|
|
9833
10291
|
] });
|
|
9834
10292
|
|
|
9835
10293
|
// src/features/szenen/areas/MediaArea.tsx
|
|
9836
|
-
import { useState as
|
|
9837
|
-
import { jsx as
|
|
10294
|
+
import { useState as useState13 } from "react";
|
|
10295
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9838
10296
|
var leer = async () => ({ kind: "ok", value: [] });
|
|
9839
10297
|
var MediaArea = ({ port }) => {
|
|
9840
10298
|
const media = port.media;
|
|
9841
|
-
const [versionInput, setVersionInput] =
|
|
9842
|
-
const [versionId, setVersionId] =
|
|
9843
|
-
const [itemInput, setItemInput] =
|
|
9844
|
-
const [itemId, setItemId] =
|
|
9845
|
-
const [assetId, setAssetId] =
|
|
9846
|
-
const [role, setRole] =
|
|
9847
|
-
const [position, setPosition] =
|
|
9848
|
-
const [notiz, setNotiz] =
|
|
9849
|
-
const [busy, setBusy] =
|
|
9850
|
-
const [refresh, setRefresh] =
|
|
10299
|
+
const [versionInput, setVersionInput] = useState13("");
|
|
10300
|
+
const [versionId, setVersionId] = useState13("");
|
|
10301
|
+
const [itemInput, setItemInput] = useState13("");
|
|
10302
|
+
const [itemId, setItemId] = useState13("");
|
|
10303
|
+
const [assetId, setAssetId] = useState13("");
|
|
10304
|
+
const [role, setRole] = useState13("reference");
|
|
10305
|
+
const [position, setPosition] = useState13("0");
|
|
10306
|
+
const [notiz, setNotiz] = useState13(null);
|
|
10307
|
+
const [busy, setBusy] = useState13(false);
|
|
10308
|
+
const [refresh, setRefresh] = useState13(0);
|
|
9851
10309
|
const [versionPhase] = usePortQuery(
|
|
9852
10310
|
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
9853
10311
|
[media, versionId, refresh]
|
|
@@ -9893,145 +10351,145 @@ var MediaArea = ({ port }) => {
|
|
|
9893
10351
|
};
|
|
9894
10352
|
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
9895
10353
|
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
9896
|
-
return /* @__PURE__ */
|
|
9897
|
-
/* @__PURE__ */
|
|
9898
|
-
/* @__PURE__ */
|
|
9899
|
-
/* @__PURE__ */
|
|
9900
|
-
/* @__PURE__ */
|
|
9901
|
-
/* @__PURE__ */
|
|
10354
|
+
return /* @__PURE__ */ jsxs15("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
10355
|
+
/* @__PURE__ */ jsx15("p", { className: "szenen-area__lead", children: "Bereits vorhandene Medien-Assets einer Elementversion zuordnen. Hochgeladen wird hier nichts \u2014 Medien entstehen \xFCber den bestehenden Speicherweg aus Stufe 5." }),
|
|
10356
|
+
/* @__PURE__ */ jsxs15("section", { children: [
|
|
10357
|
+
/* @__PURE__ */ jsx15("h3", { children: "Version" }),
|
|
10358
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__lookup", children: [
|
|
10359
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9902
10360
|
"Version-ID",
|
|
9903
|
-
/* @__PURE__ */
|
|
10361
|
+
/* @__PURE__ */ jsx15("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
9904
10362
|
] }),
|
|
9905
|
-
/* @__PURE__ */
|
|
10363
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
9906
10364
|
] }),
|
|
9907
|
-
/* @__PURE__ */
|
|
9908
|
-
/* @__PURE__ */
|
|
10365
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__attach", children: [
|
|
10366
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9909
10367
|
"Asset-ID",
|
|
9910
|
-
/* @__PURE__ */
|
|
10368
|
+
/* @__PURE__ */ jsx15("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
9911
10369
|
] }),
|
|
9912
|
-
/* @__PURE__ */
|
|
10370
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9913
10371
|
"Rolle",
|
|
9914
|
-
/* @__PURE__ */
|
|
9915
|
-
/* @__PURE__ */
|
|
9916
|
-
/* @__PURE__ */
|
|
9917
|
-
/* @__PURE__ */
|
|
9918
|
-
/* @__PURE__ */
|
|
10372
|
+
/* @__PURE__ */ jsxs15("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
10373
|
+
/* @__PURE__ */ jsx15("option", { value: "reference", children: "reference" }),
|
|
10374
|
+
/* @__PURE__ */ jsx15("option", { value: "mask", children: "mask" }),
|
|
10375
|
+
/* @__PURE__ */ jsx15("option", { value: "palette", children: "palette" }),
|
|
10376
|
+
/* @__PURE__ */ jsx15("option", { value: "example", children: "example" })
|
|
9919
10377
|
] })
|
|
9920
10378
|
] }),
|
|
9921
|
-
/* @__PURE__ */
|
|
10379
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9922
10380
|
"Position",
|
|
9923
|
-
/* @__PURE__ */
|
|
10381
|
+
/* @__PURE__ */ jsx15("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
9924
10382
|
] }),
|
|
9925
|
-
/* @__PURE__ */
|
|
10383
|
+
/* @__PURE__ */ jsx15("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
9926
10384
|
] }),
|
|
9927
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */
|
|
9928
|
-
versionPhase.status === "error" && /* @__PURE__ */
|
|
10385
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ jsx15("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
10386
|
+
versionPhase.status === "error" && /* @__PURE__ */ jsxs15("p", { role: "alert", children: [
|
|
9929
10387
|
"Versionsmedien konnten nicht geladen werden: ",
|
|
9930
10388
|
versionPhase.message
|
|
9931
10389
|
] }),
|
|
9932
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */
|
|
10390
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ jsxs15("p", { children: [
|
|
9933
10391
|
"Version ",
|
|
9934
10392
|
versionId,
|
|
9935
10393
|
" hat keine Medien."
|
|
9936
10394
|
] }),
|
|
9937
|
-
/* @__PURE__ */
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
/* @__PURE__ */
|
|
10395
|
+
/* @__PURE__ */ jsx15("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ jsxs15("li", { children: [
|
|
10396
|
+
/* @__PURE__ */ jsx15("code", { children: medium.assetId }),
|
|
10397
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
9940
10398
|
medium.role,
|
|
9941
10399
|
" \xB7 Position ",
|
|
9942
10400
|
medium.position
|
|
9943
10401
|
] }),
|
|
9944
|
-
medium.url && /* @__PURE__ */
|
|
9945
|
-
/* @__PURE__ */
|
|
10402
|
+
medium.url && /* @__PURE__ */ jsx15("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
10403
|
+
/* @__PURE__ */ jsx15("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
9946
10404
|
] }, `${medium.assetId}:${medium.role}`)) })
|
|
9947
10405
|
] }),
|
|
9948
|
-
/* @__PURE__ */
|
|
9949
|
-
/* @__PURE__ */
|
|
9950
|
-
/* @__PURE__ */
|
|
9951
|
-
/* @__PURE__ */
|
|
10406
|
+
/* @__PURE__ */ jsxs15("section", { children: [
|
|
10407
|
+
/* @__PURE__ */ jsx15("h3", { children: "Item-Medien" }),
|
|
10408
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__lookup", children: [
|
|
10409
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9952
10410
|
"Item-ID",
|
|
9953
|
-
/* @__PURE__ */
|
|
10411
|
+
/* @__PURE__ */ jsx15("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
9954
10412
|
] }),
|
|
9955
|
-
/* @__PURE__ */
|
|
10413
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
9956
10414
|
] }),
|
|
9957
|
-
itemPhase.status === "error" && /* @__PURE__ */
|
|
10415
|
+
itemPhase.status === "error" && /* @__PURE__ */ jsxs15("p", { role: "alert", children: [
|
|
9958
10416
|
"Item-Medien konnten nicht geladen werden: ",
|
|
9959
10417
|
itemPhase.message
|
|
9960
10418
|
] }),
|
|
9961
|
-
/* @__PURE__ */
|
|
9962
|
-
/* @__PURE__ */
|
|
9963
|
-
/* @__PURE__ */
|
|
10419
|
+
/* @__PURE__ */ jsx15("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ jsxs15("li", { children: [
|
|
10420
|
+
/* @__PURE__ */ jsx15("code", { children: medium.assetId }),
|
|
10421
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
9964
10422
|
medium.role,
|
|
9965
10423
|
" \xB7 Position ",
|
|
9966
10424
|
medium.position
|
|
9967
10425
|
] }),
|
|
9968
|
-
medium.url && /* @__PURE__ */
|
|
10426
|
+
medium.url && /* @__PURE__ */ jsx15("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
9969
10427
|
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
9970
10428
|
] }),
|
|
9971
|
-
notiz && /* @__PURE__ */
|
|
10429
|
+
notiz && /* @__PURE__ */ jsx15("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
9972
10430
|
] });
|
|
9973
10431
|
};
|
|
9974
10432
|
|
|
9975
10433
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
9976
|
-
import { useRef as
|
|
10434
|
+
import { useEffect as useEffect7, useMemo as useMemo3, useRef as useRef3, useState as useState16 } from "react";
|
|
9977
10435
|
|
|
9978
10436
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
9979
|
-
import { useState as
|
|
9980
|
-
import { Fragment as
|
|
10437
|
+
import { useState as useState14 } from "react";
|
|
10438
|
+
import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9981
10439
|
var Diagnosen = ({ befunde, testId }) => {
|
|
9982
10440
|
if (befunde.length === 0) return null;
|
|
9983
|
-
return /* @__PURE__ */
|
|
9984
|
-
/* @__PURE__ */
|
|
9985
|
-
d.proposal_type && /* @__PURE__ */
|
|
10441
|
+
return /* @__PURE__ */ jsx16("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ jsxs16("li", { "data-severity": d.severity, children: [
|
|
10442
|
+
/* @__PURE__ */ jsx16("code", { children: d.code }),
|
|
10443
|
+
d.proposal_type && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
9986
10444
|
" \xB7 ",
|
|
9987
|
-
/* @__PURE__ */
|
|
10445
|
+
/* @__PURE__ */ jsx16("strong", { children: d.proposal_type })
|
|
9988
10446
|
] }),
|
|
9989
|
-
d.pointer && /* @__PURE__ */
|
|
10447
|
+
d.pointer && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
9990
10448
|
" \xB7 ",
|
|
9991
|
-
/* @__PURE__ */
|
|
10449
|
+
/* @__PURE__ */ jsx16("code", { children: d.pointer })
|
|
9992
10450
|
] }),
|
|
9993
|
-
typeof d.line === "number" && /* @__PURE__ */
|
|
10451
|
+
typeof d.line === "number" && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
9994
10452
|
" \xB7 Zeile ",
|
|
9995
10453
|
d.line,
|
|
9996
10454
|
", Spalte ",
|
|
9997
10455
|
d.column
|
|
9998
10456
|
] }),
|
|
9999
|
-
/* @__PURE__ */
|
|
10457
|
+
/* @__PURE__ */ jsx16("div", { children: d.message })
|
|
10000
10458
|
] }, i)) });
|
|
10001
10459
|
};
|
|
10002
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */
|
|
10003
|
-
/* @__PURE__ */
|
|
10460
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ jsxs16("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
10461
|
+
/* @__PURE__ */ jsxs16("p", { "data-testid": "rettung-status", children: [
|
|
10004
10462
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
10005
10463
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
10006
10464
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
10007
10465
|
] }),
|
|
10008
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */
|
|
10009
|
-
/* @__PURE__ */
|
|
10010
|
-
/* @__PURE__ */
|
|
10011
|
-
/* @__PURE__ */
|
|
10466
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10467
|
+
/* @__PURE__ */ jsx16("h5", { children: "Verwertbar" }),
|
|
10468
|
+
/* @__PURE__ */ jsx16("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ jsxs16("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
|
|
10469
|
+
/* @__PURE__ */ jsx16("strong", { children: p.type }),
|
|
10012
10470
|
" \u2014 ",
|
|
10013
10471
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
10014
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */
|
|
10015
|
-
/* @__PURE__ */
|
|
10472
|
+
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ jsx16("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ jsxs16("li", { children: [
|
|
10473
|
+
/* @__PURE__ */ jsx16("code", { children: l.pointer }),
|
|
10016
10474
|
": ",
|
|
10017
10475
|
l.reason
|
|
10018
10476
|
] }, i)) })
|
|
10019
10477
|
] }, p.type)) })
|
|
10020
10478
|
] }),
|
|
10021
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */
|
|
10022
|
-
/* @__PURE__ */
|
|
10023
|
-
/* @__PURE__ */
|
|
10024
|
-
/* @__PURE__ */
|
|
10025
|
-
/* @__PURE__ */
|
|
10479
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10480
|
+
/* @__PURE__ */ jsx16("h5", { children: "Nicht verwertbar" }),
|
|
10481
|
+
/* @__PURE__ */ jsx16("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ jsxs16("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
|
|
10482
|
+
/* @__PURE__ */ jsx16("strong", { children: r.type }),
|
|
10483
|
+
/* @__PURE__ */ jsx16(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
10026
10484
|
] }, r.type)) })
|
|
10027
10485
|
] })
|
|
10028
10486
|
] });
|
|
10029
10487
|
var RecoveryPanel = ({ port, lauf }) => {
|
|
10030
|
-
const [arbeitskopie, setArbeitskopie] =
|
|
10031
|
-
const [bewertung, setBewertung] =
|
|
10032
|
-
const [gesichert, setGesichert] =
|
|
10033
|
-
const [meldung, setMeldung] =
|
|
10034
|
-
const [laeuft, setLaeuft] =
|
|
10488
|
+
const [arbeitskopie, setArbeitskopie] = useState14(null);
|
|
10489
|
+
const [bewertung, setBewertung] = useState14(null);
|
|
10490
|
+
const [gesichert, setGesichert] = useState14(null);
|
|
10491
|
+
const [meldung, setMeldung] = useState14(null);
|
|
10492
|
+
const [laeuft, setLaeuft] = useState14(false);
|
|
10035
10493
|
if (!port.derivation) return null;
|
|
10036
10494
|
if (typeof lauf.raw_output !== "string" || lauf.raw_output.length === 0) return null;
|
|
10037
10495
|
const derivation = port.derivation;
|
|
@@ -10067,16 +10525,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10067
10525
|
setLaeuft(false);
|
|
10068
10526
|
}
|
|
10069
10527
|
}
|
|
10070
|
-
return /* @__PURE__ */
|
|
10071
|
-
/* @__PURE__ */
|
|
10072
|
-
/* @__PURE__ */
|
|
10528
|
+
return /* @__PURE__ */ jsxs16("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
10529
|
+
/* @__PURE__ */ jsx16("h4", { children: "Antwort retten" }),
|
|
10530
|
+
/* @__PURE__ */ jsxs16("p", { className: "szenen-area__lead", children: [
|
|
10073
10531
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
10074
|
-
/* @__PURE__ */
|
|
10532
|
+
/* @__PURE__ */ jsx16("strong", { children: "ohne" }),
|
|
10075
10533
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
10076
10534
|
] }),
|
|
10077
|
-
/* @__PURE__ */
|
|
10078
|
-
/* @__PURE__ */
|
|
10079
|
-
/* @__PURE__ */
|
|
10535
|
+
/* @__PURE__ */ jsxs16("label", { className: "szenen-field", children: [
|
|
10536
|
+
/* @__PURE__ */ jsx16("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
10537
|
+
/* @__PURE__ */ jsx16(
|
|
10080
10538
|
"textarea",
|
|
10081
10539
|
{
|
|
10082
10540
|
readOnly: true,
|
|
@@ -10087,12 +10545,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10087
10545
|
}
|
|
10088
10546
|
)
|
|
10089
10547
|
] }),
|
|
10090
|
-
/* @__PURE__ */
|
|
10091
|
-
/* @__PURE__ */
|
|
10548
|
+
/* @__PURE__ */ jsxs16("label", { className: "szenen-field", children: [
|
|
10549
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
10092
10550
|
"Arbeitskopie",
|
|
10093
10551
|
bearbeitet ? " (bearbeitet)" : ""
|
|
10094
10552
|
] }),
|
|
10095
|
-
/* @__PURE__ */
|
|
10553
|
+
/* @__PURE__ */ jsx16(
|
|
10096
10554
|
"textarea",
|
|
10097
10555
|
{
|
|
10098
10556
|
rows: 8,
|
|
@@ -10102,8 +10560,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10102
10560
|
}
|
|
10103
10561
|
)
|
|
10104
10562
|
] }),
|
|
10105
|
-
/* @__PURE__ */
|
|
10106
|
-
/* @__PURE__ */
|
|
10563
|
+
/* @__PURE__ */ jsxs16("div", { className: "szenen-rettung__aktionen", children: [
|
|
10564
|
+
/* @__PURE__ */ jsx16(
|
|
10107
10565
|
"button",
|
|
10108
10566
|
{
|
|
10109
10567
|
type: "button",
|
|
@@ -10113,7 +10571,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10113
10571
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
10114
10572
|
}
|
|
10115
10573
|
),
|
|
10116
|
-
/* @__PURE__ */
|
|
10574
|
+
/* @__PURE__ */ jsx16(
|
|
10117
10575
|
"button",
|
|
10118
10576
|
{
|
|
10119
10577
|
type: "button",
|
|
@@ -10123,7 +10581,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10123
10581
|
children: "Arbeitsfassung speichern"
|
|
10124
10582
|
}
|
|
10125
10583
|
),
|
|
10126
|
-
arbeitskopie !== null && /* @__PURE__ */
|
|
10584
|
+
arbeitskopie !== null && /* @__PURE__ */ jsx16(
|
|
10127
10585
|
"button",
|
|
10128
10586
|
{
|
|
10129
10587
|
type: "button",
|
|
@@ -10138,15 +10596,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10138
10596
|
}
|
|
10139
10597
|
)
|
|
10140
10598
|
] }),
|
|
10141
|
-
meldung && /* @__PURE__ */
|
|
10142
|
-
bewertung && /* @__PURE__ */
|
|
10143
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */
|
|
10144
|
-
/* @__PURE__ */
|
|
10145
|
-
/* @__PURE__ */
|
|
10599
|
+
meldung && /* @__PURE__ */ jsx16("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
10600
|
+
bewertung && /* @__PURE__ */ jsx16(Ausbeute, { bewertung }),
|
|
10601
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "szenen-diagnose", children: [
|
|
10602
|
+
/* @__PURE__ */ jsx16("h5", { children: "Befunde an dieser Fassung" }),
|
|
10603
|
+
/* @__PURE__ */ jsx16(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
10146
10604
|
] }),
|
|
10147
|
-
gesichert && /* @__PURE__ */
|
|
10605
|
+
gesichert && /* @__PURE__ */ jsxs16("p", { "data-testid": "rettung-gesichert", children: [
|
|
10148
10606
|
"Gespeichert als Arbeitsfassung ",
|
|
10149
|
-
/* @__PURE__ */
|
|
10607
|
+
/* @__PURE__ */ jsx16("code", { children: gesichert.recovery_id }),
|
|
10150
10608
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
10151
10609
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
10152
10610
|
] })
|
|
@@ -10154,12 +10612,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10154
10612
|
};
|
|
10155
10613
|
|
|
10156
10614
|
// src/features/szenen/areas/ChainActions.tsx
|
|
10157
|
-
import { useState as
|
|
10158
|
-
import { Fragment as
|
|
10615
|
+
import { useState as useState15 } from "react";
|
|
10616
|
+
import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10159
10617
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
10160
|
-
const [graph, setGraph] =
|
|
10161
|
-
const [meldung, setMeldung] =
|
|
10162
|
-
const [laeuft, setLaeuft] =
|
|
10618
|
+
const [graph, setGraph] = useState15(null);
|
|
10619
|
+
const [meldung, setMeldung] = useState15(null);
|
|
10620
|
+
const [laeuft, setLaeuft] = useState15(false);
|
|
10163
10621
|
if (!port.derivation) return null;
|
|
10164
10622
|
const derivation = port.derivation;
|
|
10165
10623
|
const runs = port.runs;
|
|
@@ -10181,14 +10639,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10181
10639
|
setLaeuft(false);
|
|
10182
10640
|
}
|
|
10183
10641
|
}
|
|
10184
|
-
return /* @__PURE__ */
|
|
10185
|
-
/* @__PURE__ */
|
|
10186
|
-
/* @__PURE__ */
|
|
10642
|
+
return /* @__PURE__ */ jsxs17("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
10643
|
+
/* @__PURE__ */ jsx17("h4", { children: "Draft-Kette" }),
|
|
10644
|
+
/* @__PURE__ */ jsxs17("p", { className: "szenen-area__lead", children: [
|
|
10187
10645
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
10188
|
-
/* @__PURE__ */
|
|
10646
|
+
/* @__PURE__ */ jsx17("strong", { children: "ohne" }),
|
|
10189
10647
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
10190
10648
|
] }),
|
|
10191
|
-
!graph && /* @__PURE__ */
|
|
10649
|
+
!graph && /* @__PURE__ */ jsx17(
|
|
10192
10650
|
"button",
|
|
10193
10651
|
{
|
|
10194
10652
|
type: "button",
|
|
@@ -10198,34 +10656,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10198
10656
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
10199
10657
|
}
|
|
10200
10658
|
),
|
|
10201
|
-
graph && /* @__PURE__ */
|
|
10202
|
-
/* @__PURE__ */
|
|
10659
|
+
graph && /* @__PURE__ */ jsxs17("div", { "data-testid": "kette-ergebnis", children: [
|
|
10660
|
+
/* @__PURE__ */ jsxs17("p", { children: [
|
|
10203
10661
|
"Kette ",
|
|
10204
|
-
/* @__PURE__ */
|
|
10662
|
+
/* @__PURE__ */ jsx17("code", { children: graph.chainId }),
|
|
10205
10663
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
10206
10664
|
] }),
|
|
10207
|
-
/* @__PURE__ */
|
|
10208
|
-
/* @__PURE__ */
|
|
10665
|
+
/* @__PURE__ */ jsx17("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ jsxs17("li", { "data-testid": `kette-knoten-${k.type}`, children: [
|
|
10666
|
+
/* @__PURE__ */ jsx17("strong", { children: k.type }),
|
|
10209
10667
|
" \u2014 Element ",
|
|
10210
|
-
/* @__PURE__ */
|
|
10668
|
+
/* @__PURE__ */ jsx17("code", { children: k.elementId }),
|
|
10211
10669
|
", Entwurf ",
|
|
10212
|
-
/* @__PURE__ */
|
|
10670
|
+
/* @__PURE__ */ jsx17("code", { children: k.draftId }),
|
|
10213
10671
|
" (Revision ",
|
|
10214
10672
|
k.revision,
|
|
10215
10673
|
")"
|
|
10216
10674
|
] }, k.type)) }),
|
|
10217
|
-
graph.missing.length > 0 && /* @__PURE__ */
|
|
10218
|
-
/* @__PURE__ */
|
|
10219
|
-
/* @__PURE__ */
|
|
10220
|
-
/* @__PURE__ */
|
|
10675
|
+
graph.missing.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
10676
|
+
/* @__PURE__ */ jsx17("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
10677
|
+
/* @__PURE__ */ jsx17("ul", { children: graph.missing.map((m) => /* @__PURE__ */ jsxs17("li", { children: [
|
|
10678
|
+
/* @__PURE__ */ jsx17("strong", { children: m.type }),
|
|
10221
10679
|
": ",
|
|
10222
10680
|
m.reason
|
|
10223
10681
|
] }, m.type)) })
|
|
10224
10682
|
] })
|
|
10225
10683
|
] }),
|
|
10226
|
-
shotKnoten && /* @__PURE__ */
|
|
10227
|
-
/* @__PURE__ */
|
|
10228
|
-
/* @__PURE__ */
|
|
10684
|
+
shotKnoten && /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
10685
|
+
/* @__PURE__ */ jsx17("p", { children: 'Die Entw\xFCrfe lassen sich jetzt unter \u201E1 \xB7 Bausteine" \xE4ndern. Der Prompt-Lauf friert den Stand ein, den er dabei vorfindet \u2014 dieselbe Aktion steht auch am Shot selbst, unter \u201E4 \xB7 Prompt".' }),
|
|
10686
|
+
/* @__PURE__ */ jsx17(
|
|
10229
10687
|
PromptStartAction,
|
|
10230
10688
|
{
|
|
10231
10689
|
port,
|
|
@@ -10233,20 +10691,20 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10233
10691
|
}
|
|
10234
10692
|
)
|
|
10235
10693
|
] }),
|
|
10236
|
-
meldung && /* @__PURE__ */
|
|
10694
|
+
meldung && /* @__PURE__ */ jsx17("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
10237
10695
|
] });
|
|
10238
10696
|
};
|
|
10239
10697
|
|
|
10240
10698
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
10241
|
-
import { Fragment as
|
|
10699
|
+
import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10242
10700
|
var MODUS_TEXT = {
|
|
10243
10701
|
prompt: "Nur Prompt",
|
|
10244
10702
|
image: "Nur Bild",
|
|
10245
10703
|
image_prompt: "Bild und Prompt"
|
|
10246
10704
|
};
|
|
10247
10705
|
var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
10248
|
-
const [kopiert, setKopiert] =
|
|
10249
|
-
const feld =
|
|
10706
|
+
const [kopiert, setKopiert] = useState16(false);
|
|
10707
|
+
const feld = useRef3(null);
|
|
10250
10708
|
async function kopieren() {
|
|
10251
10709
|
try {
|
|
10252
10710
|
await navigator.clipboard.writeText(text);
|
|
@@ -10256,15 +10714,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10256
10714
|
setKopiert(false);
|
|
10257
10715
|
}
|
|
10258
10716
|
}
|
|
10259
|
-
return /* @__PURE__ */
|
|
10260
|
-
/* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsxs18("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
10718
|
+
/* @__PURE__ */ jsxs18("summary", { children: [
|
|
10261
10719
|
titel,
|
|
10262
10720
|
" (",
|
|
10263
10721
|
text.length,
|
|
10264
10722
|
" Zeichen)"
|
|
10265
10723
|
] }),
|
|
10266
|
-
/* @__PURE__ */
|
|
10267
|
-
/* @__PURE__ */
|
|
10724
|
+
/* @__PURE__ */ jsxs18("div", { className: "szenen-beleg__kopf", children: [
|
|
10725
|
+
/* @__PURE__ */ jsx18(
|
|
10268
10726
|
"button",
|
|
10269
10727
|
{
|
|
10270
10728
|
type: "button",
|
|
@@ -10273,9 +10731,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10273
10731
|
children: "Kopieren"
|
|
10274
10732
|
}
|
|
10275
10733
|
),
|
|
10276
|
-
kopiert && /* @__PURE__ */
|
|
10734
|
+
kopiert && /* @__PURE__ */ jsx18("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
10277
10735
|
] }),
|
|
10278
|
-
/* @__PURE__ */
|
|
10736
|
+
/* @__PURE__ */ jsx18(
|
|
10279
10737
|
"textarea",
|
|
10280
10738
|
{
|
|
10281
10739
|
ref: feld,
|
|
@@ -10289,8 +10747,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10289
10747
|
)
|
|
10290
10748
|
] });
|
|
10291
10749
|
};
|
|
10292
|
-
var Belege = ({ lauf }) => /* @__PURE__ */
|
|
10293
|
-
lauf.raw_output ? /* @__PURE__ */
|
|
10750
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
10751
|
+
lauf.raw_output ? /* @__PURE__ */ jsx18(
|
|
10294
10752
|
BelegFeld,
|
|
10295
10753
|
{
|
|
10296
10754
|
titel: "Rohantwort des Modells",
|
|
@@ -10301,9 +10759,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ jsxs17("div", { className: "szenen-di
|
|
|
10301
10759
|
) : (
|
|
10302
10760
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
10303
10761
|
das Modell hat also nicht „falsch geantwortet". */
|
|
10304
|
-
/* @__PURE__ */
|
|
10762
|
+
/* @__PURE__ */ jsx18("p", { "data-testid": "roh-antwort-fehlt", children: "Es gibt keine Rohantwort \u2014 der Lauf ist gescheitert, bevor ein Text ankam (etwa Netz, Sperre oder Providerfehler)." })
|
|
10305
10763
|
),
|
|
10306
|
-
/* @__PURE__ */
|
|
10764
|
+
/* @__PURE__ */ jsx18(
|
|
10307
10765
|
BelegFeld,
|
|
10308
10766
|
{
|
|
10309
10767
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -10315,18 +10773,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ jsxs17("div", { className: "szenen-di
|
|
|
10315
10773
|
] });
|
|
10316
10774
|
var Herkunft = ({ lauf }) => {
|
|
10317
10775
|
if (!lauf.follows) return null;
|
|
10318
|
-
return /* @__PURE__ */
|
|
10776
|
+
return /* @__PURE__ */ jsxs18("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
10319
10777
|
"Folgt auf Lauf ",
|
|
10320
|
-
/* @__PURE__ */
|
|
10778
|
+
/* @__PURE__ */ jsx18("code", { children: lauf.follows.run_id }),
|
|
10321
10779
|
".",
|
|
10322
10780
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
10323
10781
|
] });
|
|
10324
10782
|
};
|
|
10325
10783
|
var Widerspruch = ({ lauf }) => {
|
|
10326
10784
|
if (!lauf.reply) return null;
|
|
10327
|
-
return /* @__PURE__ */
|
|
10328
|
-
/* @__PURE__ */
|
|
10329
|
-
/* @__PURE__ */
|
|
10785
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
10786
|
+
/* @__PURE__ */ jsx18("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
10787
|
+
/* @__PURE__ */ jsx18("p", { children: lauf.reply })
|
|
10330
10788
|
] });
|
|
10331
10789
|
};
|
|
10332
10790
|
function readAsBase642(datei) {
|
|
@@ -10341,47 +10799,216 @@ function readAsBase642(datei) {
|
|
|
10341
10799
|
leser.readAsDataURL(datei);
|
|
10342
10800
|
});
|
|
10343
10801
|
}
|
|
10802
|
+
var ERSTE_KACHELN = 12;
|
|
10803
|
+
function useSichtbareKacheln(alle, wurzel) {
|
|
10804
|
+
const [gesehen, setGesehen] = useState16([]);
|
|
10805
|
+
const schluessel = alle.join(" ");
|
|
10806
|
+
useEffect7(() => {
|
|
10807
|
+
const ziel = wurzel.current;
|
|
10808
|
+
if (!ziel || typeof IntersectionObserver === "undefined") return void 0;
|
|
10809
|
+
const beobachter = new IntersectionObserver((eintraege) => {
|
|
10810
|
+
const neue = eintraege.filter((e) => e.isIntersecting).map((e) => e.target.dataset.mediaRef).filter((r) => Boolean(r));
|
|
10811
|
+
if (neue.length === 0) return;
|
|
10812
|
+
setGesehen((bisher) => [.../* @__PURE__ */ new Set([...bisher, ...neue])]);
|
|
10813
|
+
for (const e of eintraege) if (e.isIntersecting) beobachter.unobserve(e.target);
|
|
10814
|
+
}, { root: ziel, rootMargin: "200px" });
|
|
10815
|
+
ziel.querySelectorAll("[data-media-ref]").forEach((el) => beobachter.observe(el));
|
|
10816
|
+
return () => beobachter.disconnect();
|
|
10817
|
+
}, [wurzel, schluessel]);
|
|
10818
|
+
return useMemo3(
|
|
10819
|
+
() => [.../* @__PURE__ */ new Set([...alle.slice(0, ERSTE_KACHELN), ...gesehen])],
|
|
10820
|
+
[schluessel, gesehen]
|
|
10821
|
+
);
|
|
10822
|
+
}
|
|
10823
|
+
function useVorschauen(port, mediaRefs) {
|
|
10824
|
+
const [stand, setStand] = useState16(() => ({ quellen: /* @__PURE__ */ new Map(), gescheitert: /* @__PURE__ */ new Set() }));
|
|
10825
|
+
const gehalten = useRef3(/* @__PURE__ */ new Map());
|
|
10826
|
+
const ohneBild = useRef3(/* @__PURE__ */ new Set());
|
|
10827
|
+
const schluessel = mediaRefs.join(" ");
|
|
10828
|
+
useEffect7(() => {
|
|
10829
|
+
const bestand = port.imageLibrary;
|
|
10830
|
+
if (!bestand?.loadPreview) return void 0;
|
|
10831
|
+
const refs = schluessel ? schluessel.split(" ") : [];
|
|
10832
|
+
const lauf = { abgebrochen: false };
|
|
10833
|
+
void ladeVorschauen(
|
|
10834
|
+
bestand,
|
|
10835
|
+
refs,
|
|
10836
|
+
(mediaRef, quelle) => {
|
|
10837
|
+
if (quelle) gehalten.current.set(mediaRef, quelle);
|
|
10838
|
+
else ohneBild.current.add(mediaRef);
|
|
10839
|
+
setStand({
|
|
10840
|
+
quellen: new Map(gehalten.current),
|
|
10841
|
+
gescheitert: new Set(ohneBild.current)
|
|
10842
|
+
});
|
|
10843
|
+
},
|
|
10844
|
+
{
|
|
10845
|
+
parallel: 4,
|
|
10846
|
+
hat: (ref) => gehalten.current.has(ref) || ohneBild.current.has(ref),
|
|
10847
|
+
lauf,
|
|
10848
|
+
// Ein Fehlschlag ist eine Auskunft, kein Grund weiterzuprobieren:
|
|
10849
|
+
// Die Kachel bekommt einen Platzhalter, das Werk bleibt wählbar.
|
|
10850
|
+
gescheitert: (ref) => {
|
|
10851
|
+
ohneBild.current.add(ref);
|
|
10852
|
+
setStand({
|
|
10853
|
+
quellen: new Map(gehalten.current),
|
|
10854
|
+
gescheitert: new Set(ohneBild.current)
|
|
10855
|
+
});
|
|
10856
|
+
}
|
|
10857
|
+
}
|
|
10858
|
+
);
|
|
10859
|
+
return () => {
|
|
10860
|
+
lauf.abgebrochen = true;
|
|
10861
|
+
};
|
|
10862
|
+
}, [port, schluessel]);
|
|
10863
|
+
return stand;
|
|
10864
|
+
}
|
|
10344
10865
|
var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
10345
|
-
const [suche, setSuche] =
|
|
10346
|
-
const [
|
|
10347
|
-
|
|
10866
|
+
const [suche, setSuche] = useState16("");
|
|
10867
|
+
const [fokus, setFokus] = useState16(null);
|
|
10868
|
+
const browser = useRef3(null);
|
|
10869
|
+
const [items] = usePortQuery(
|
|
10870
|
+
() => port.imageLibrary.listItems({ search: suche.trim() || void 0, limit: 60 }),
|
|
10348
10871
|
[port, suche]
|
|
10349
10872
|
);
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10873
|
+
const werke = items.status === "ready" ? items.value : [];
|
|
10874
|
+
const werk = werke.find((i) => i.itemRef === fokus) ?? null;
|
|
10875
|
+
const deckbilder = useMemo3(
|
|
10876
|
+
() => werke.map((i) => i.images[0]?.mediaRef).filter((r) => Boolean(r)),
|
|
10877
|
+
[werke]
|
|
10878
|
+
);
|
|
10879
|
+
const sichtbareDeckbilder = useSichtbareKacheln(deckbilder, browser);
|
|
10880
|
+
const anzufordern = useMemo3(() => [.../* @__PURE__ */ new Set([
|
|
10881
|
+
...sichtbareDeckbilder,
|
|
10882
|
+
...werk ? werk.images.map((b) => b.mediaRef) : [],
|
|
10883
|
+
...gewaehlt.map((b) => b.mediaRef)
|
|
10884
|
+
])], [sichtbareDeckbilder, werk, gewaehlt]);
|
|
10885
|
+
const { quellen, gescheitert } = useVorschauen(port, anzufordern);
|
|
10886
|
+
const quelleVon = (bild) => bild.thumbUrl || quellen.get(bild.mediaRef) || null;
|
|
10887
|
+
const istGewaehlt = (mediaRef) => gewaehlt.some((b) => b.mediaRef === mediaRef);
|
|
10888
|
+
function werkAntippen(item) {
|
|
10889
|
+
const deckbild = item.images[0];
|
|
10890
|
+
if (!deckbild) return;
|
|
10891
|
+
if (item.images.length === 1) onWaehlen(deckbild);
|
|
10892
|
+
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
10893
|
+
}
|
|
10894
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
10895
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
10896
|
+
/* @__PURE__ */ jsx18("span", { children: "Bild aus dem Bestand" }),
|
|
10897
|
+
/* @__PURE__ */ jsx18(
|
|
10354
10898
|
"input",
|
|
10355
10899
|
{
|
|
10356
10900
|
type: "search",
|
|
10357
10901
|
value: suche,
|
|
10358
10902
|
onChange: (e) => setSuche(e.target.value),
|
|
10903
|
+
onKeyDown: (e) => {
|
|
10904
|
+
if (e.key === "Enter") e.preventDefault();
|
|
10905
|
+
},
|
|
10359
10906
|
placeholder: "Suchen \u2026",
|
|
10360
10907
|
"data-testid": "bild-suche"
|
|
10361
10908
|
}
|
|
10362
10909
|
)
|
|
10363
10910
|
] }),
|
|
10364
|
-
|
|
10365
|
-
|
|
10911
|
+
items.status === "loading" && /* @__PURE__ */ jsx18("p", { children: "Bilder werden geladen \u2026" }),
|
|
10912
|
+
items.status === "error" && /* @__PURE__ */ jsxs18("p", { className: "szenen-error", role: "alert", children: [
|
|
10366
10913
|
"Der Bildbestand ist nicht lesbar: ",
|
|
10367
|
-
|
|
10914
|
+
items.message
|
|
10368
10915
|
] }),
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
"
|
|
10916
|
+
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ jsx18("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
|
|
10917
|
+
werke.length > 0 && /* @__PURE__ */ jsx18(
|
|
10918
|
+
"div",
|
|
10372
10919
|
{
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
"data-testid":
|
|
10376
|
-
children:
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10920
|
+
className: "szenen-bildwahl__browser",
|
|
10921
|
+
ref: browser,
|
|
10922
|
+
"data-testid": "bildwahl-werke",
|
|
10923
|
+
children: /* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
10924
|
+
const deckbild = item.images[0];
|
|
10925
|
+
if (!deckbild) return null;
|
|
10926
|
+
const fokussiert = item.itemRef === fokus;
|
|
10927
|
+
return /* @__PURE__ */ jsx18("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ jsxs18(
|
|
10928
|
+
"button",
|
|
10929
|
+
{
|
|
10930
|
+
type: "button",
|
|
10931
|
+
className: `szenen-bildwahl__karte${fokussiert ? " is-fokus" : ""}`,
|
|
10932
|
+
onClick: () => werkAntippen(item),
|
|
10933
|
+
"aria-pressed": fokussiert,
|
|
10934
|
+
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
10935
|
+
title: item.title,
|
|
10936
|
+
children: [
|
|
10937
|
+
/* @__PURE__ */ jsx18(
|
|
10938
|
+
Kachel,
|
|
10939
|
+
{
|
|
10940
|
+
quelle: quelleVon(deckbild),
|
|
10941
|
+
alt: item.title,
|
|
10942
|
+
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
10943
|
+
}
|
|
10944
|
+
),
|
|
10945
|
+
item.images.length > 1 && /* @__PURE__ */ jsxs18(
|
|
10946
|
+
"span",
|
|
10947
|
+
{
|
|
10948
|
+
className: "szenen-bildwahl__anzahl",
|
|
10949
|
+
"data-testid": `item-anzahl-${item.itemRef}`,
|
|
10950
|
+
children: [
|
|
10951
|
+
item.images.length,
|
|
10952
|
+
"x"
|
|
10953
|
+
]
|
|
10954
|
+
}
|
|
10955
|
+
),
|
|
10956
|
+
/* @__PURE__ */ jsx18("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
10957
|
+
]
|
|
10958
|
+
}
|
|
10959
|
+
) }, item.itemRef);
|
|
10960
|
+
}) })
|
|
10380
10961
|
}
|
|
10381
|
-
)
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10962
|
+
),
|
|
10963
|
+
werk && /* @__PURE__ */ jsxs18("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
10964
|
+
/* @__PURE__ */ jsxs18("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
10965
|
+
/* @__PURE__ */ jsxs18("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
10966
|
+
werk.title,
|
|
10967
|
+
" \xB7 ",
|
|
10968
|
+
werk.images.length,
|
|
10969
|
+
" Bilder"
|
|
10970
|
+
] }),
|
|
10971
|
+
/* @__PURE__ */ jsx18(
|
|
10972
|
+
"button",
|
|
10973
|
+
{
|
|
10974
|
+
type: "button",
|
|
10975
|
+
className: "szenen-bildwahl__zurueck",
|
|
10976
|
+
onClick: () => setFokus(null),
|
|
10977
|
+
"data-testid": "bildwahl-zurueck",
|
|
10978
|
+
children: "Schliessen"
|
|
10979
|
+
}
|
|
10980
|
+
)
|
|
10981
|
+
] }),
|
|
10982
|
+
/* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs18(
|
|
10983
|
+
"button",
|
|
10984
|
+
{
|
|
10985
|
+
type: "button",
|
|
10986
|
+
className: `szenen-bildwahl__variante${istGewaehlt(bild.mediaRef) ? " is-gewaehlt" : ""}`,
|
|
10987
|
+
onClick: () => onWaehlen(bild),
|
|
10988
|
+
"aria-pressed": istGewaehlt(bild.mediaRef),
|
|
10989
|
+
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
10990
|
+
title: bild.title,
|
|
10991
|
+
children: [
|
|
10992
|
+
/* @__PURE__ */ jsx18(
|
|
10993
|
+
Kachel,
|
|
10994
|
+
{
|
|
10995
|
+
quelle: quelleVon(bild),
|
|
10996
|
+
alt: bild.title,
|
|
10997
|
+
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
10998
|
+
}
|
|
10999
|
+
),
|
|
11000
|
+
/* @__PURE__ */ jsxs18("span", { className: "szenen-bildwahl__nummer", children: [
|
|
11001
|
+
"#",
|
|
11002
|
+
position + 1
|
|
11003
|
+
] })
|
|
11004
|
+
]
|
|
11005
|
+
}
|
|
11006
|
+
) }, bild.mediaRef)) })
|
|
11007
|
+
] }),
|
|
11008
|
+
gewaehlt.length > 0 && /* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11009
|
+
/* @__PURE__ */ jsx18(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
11010
|
+
/* @__PURE__ */ jsx18("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
11011
|
+
/* @__PURE__ */ jsx18(
|
|
10385
11012
|
"button",
|
|
10386
11013
|
{
|
|
10387
11014
|
type: "button",
|
|
@@ -10400,26 +11027,29 @@ async function digestOf(datei) {
|
|
|
10400
11027
|
return [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
10401
11028
|
}
|
|
10402
11029
|
var DeriveArea = ({ port, contextId }) => {
|
|
10403
|
-
const [policyVersionId, setPolicyVersionId] =
|
|
10404
|
-
const [modus, setModus] =
|
|
10405
|
-
const [promptText, setPromptText] =
|
|
10406
|
-
const [dateien, setDateien] =
|
|
10407
|
-
const [bestandsbilder, setBestandsbilder] =
|
|
10408
|
-
const [laeuft, setLaeuft] =
|
|
10409
|
-
const [lauf, setLauf] =
|
|
10410
|
-
const [meldung, setMeldung] =
|
|
10411
|
-
const [uebernommen, setUebernommen] =
|
|
10412
|
-
const [titel, setTitel] =
|
|
10413
|
-
const [referenzen, setReferenzen] =
|
|
10414
|
-
const [beanstandung, setBeanstandung] =
|
|
10415
|
-
const [zusatz, setZusatz] =
|
|
11030
|
+
const [policyVersionId, setPolicyVersionId] = useState16("");
|
|
11031
|
+
const [modus, setModus] = useState16("prompt");
|
|
11032
|
+
const [promptText, setPromptText] = useState16("");
|
|
11033
|
+
const [dateien, setDateien] = useState16([]);
|
|
11034
|
+
const [bestandsbilder, setBestandsbilder] = useState16([]);
|
|
11035
|
+
const [laeuft, setLaeuft] = useState16(false);
|
|
11036
|
+
const [lauf, setLauf] = useState16(null);
|
|
11037
|
+
const [meldung, setMeldung] = useState16(null);
|
|
11038
|
+
const [uebernommen, setUebernommen] = useState16({});
|
|
11039
|
+
const [titel, setTitel] = useState16({});
|
|
11040
|
+
const [referenzen, setReferenzen] = useState16({});
|
|
11041
|
+
const [beanstandung, setBeanstandung] = useState16(null);
|
|
11042
|
+
const [zusatz, setZusatz] = useState16("");
|
|
10416
11043
|
const [regeln] = usePortQuery(
|
|
10417
11044
|
() => port.derivation.listPolicies(contextId),
|
|
10418
11045
|
[port, contextId]
|
|
10419
11046
|
);
|
|
10420
11047
|
const gewaehlt = regeln.status === "ready" ? regeln.value.find((r) => r.versionId === policyVersionId) ?? null : null;
|
|
10421
11048
|
async function starten(folgt) {
|
|
10422
|
-
if (!gewaehlt)
|
|
11049
|
+
if (!gewaehlt) {
|
|
11050
|
+
setMeldung("Bitte zuerst eine Rekonstruktionsregel waehlen \u2014 ohne sie ist kein Lauf reproduzierbar (D-03).");
|
|
11051
|
+
return;
|
|
11052
|
+
}
|
|
10423
11053
|
setLaeuft(true);
|
|
10424
11054
|
setMeldung(null);
|
|
10425
11055
|
setLauf(null);
|
|
@@ -10490,12 +11120,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10490
11120
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
10491
11121
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
10492
11122
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
10493
|
-
return /* @__PURE__ */
|
|
10494
|
-
/* @__PURE__ */
|
|
10495
|
-
/* @__PURE__ */
|
|
10496
|
-
/* @__PURE__ */
|
|
10497
|
-
/* @__PURE__ */
|
|
10498
|
-
/* @__PURE__ */
|
|
11123
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
11124
|
+
/* @__PURE__ */ jsx18("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
11125
|
+
/* @__PURE__ */ jsx18("p", { className: "szenen-area__lead", children: satz.status === "failed" ? "Das Modell bekommt seine Antwort und die Beanstandung noch einmal vorgelegt." : "Das Ergebnis steht. Wenn etwas offen blieb, kann das Modell nachbessern." }),
|
|
11126
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11127
|
+
/* @__PURE__ */ jsx18("span", { children: "Beanstandung" }),
|
|
11128
|
+
/* @__PURE__ */ jsx18(
|
|
10499
11129
|
"textarea",
|
|
10500
11130
|
{
|
|
10501
11131
|
rows: 4,
|
|
@@ -10505,9 +11135,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10505
11135
|
}
|
|
10506
11136
|
)
|
|
10507
11137
|
] }),
|
|
10508
|
-
/* @__PURE__ */
|
|
10509
|
-
/* @__PURE__ */
|
|
10510
|
-
/* @__PURE__ */
|
|
11138
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11139
|
+
/* @__PURE__ */ jsx18("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
11140
|
+
/* @__PURE__ */ jsx18(
|
|
10511
11141
|
"textarea",
|
|
10512
11142
|
{
|
|
10513
11143
|
rows: 2,
|
|
@@ -10518,8 +11148,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10518
11148
|
}
|
|
10519
11149
|
)
|
|
10520
11150
|
] }),
|
|
10521
|
-
bilderFehlen && /* @__PURE__ */
|
|
10522
|
-
/* @__PURE__ */
|
|
11151
|
+
bilderFehlen && /* @__PURE__ */ jsx18("p", { className: "szenen-error", "data-testid": "folgelauf-ohne-bild", children: "Die Bilder dieses Laufs wurden nicht im Bestand abgelegt \u2014 er ist \xE4lter als diese M\xF6glichkeit. Ein Folgelauf ohne sie k\xF6nnte ein fehlendes Pflichtfeld nur erfinden. Starten Sie einen neuen Lauf mit dem Referenzbild; dessen Bilder bleiben dann erhalten." }),
|
|
11152
|
+
/* @__PURE__ */ jsx18(
|
|
10523
11153
|
"button",
|
|
10524
11154
|
{
|
|
10525
11155
|
type: "button",
|
|
@@ -10561,19 +11191,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10561
11191
|
setMeldung(ergebnis.message);
|
|
10562
11192
|
}
|
|
10563
11193
|
}
|
|
10564
|
-
return /* @__PURE__ */
|
|
10565
|
-
/* @__PURE__ */
|
|
10566
|
-
regeln.status === "loading" && /* @__PURE__ */
|
|
10567
|
-
regeln.status === "error" && /* @__PURE__ */
|
|
11194
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
11195
|
+
/* @__PURE__ */ jsx18("p", { className: "szenen-area__lead", children: "Aus einem Referenzbild, einem Prompt oder beidem einen Szenenentwurf vorschlagen lassen. Der Vorschlag wird nie ver\xF6ffentlicht \u2014 er wird ein Entwurf, den Sie pr\xFCfen und \xE4ndern." }),
|
|
11196
|
+
regeln.status === "loading" && /* @__PURE__ */ jsx18("p", { children: "Regeln werden geladen \u2026" }),
|
|
11197
|
+
regeln.status === "error" && /* @__PURE__ */ jsxs18("p", { className: "szenen-error", role: "alert", children: [
|
|
10568
11198
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
10569
11199
|
regeln.message
|
|
10570
11200
|
] }),
|
|
10571
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */
|
|
11201
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ jsxs18("p", { className: "szenen-empty", children: [
|
|
10572
11202
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
10573
|
-
/* @__PURE__ */
|
|
11203
|
+
/* @__PURE__ */ jsx18("code", { children: "scene_derivation_policy" }),
|
|
10574
11204
|
') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie hier eine unter \u201E1 \xB7 Bausteine" an, oder wechseln Sie in den Kontext, in dem Ihre Regel liegt. Regeln aus anderen Kontexten stehen hier bewusst nicht zur Auswahl.'
|
|
10575
11205
|
] }),
|
|
10576
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */
|
|
11206
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ jsxs18(
|
|
10577
11207
|
"form",
|
|
10578
11208
|
{
|
|
10579
11209
|
className: "szenen-form",
|
|
@@ -10582,17 +11212,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10582
11212
|
void starten();
|
|
10583
11213
|
},
|
|
10584
11214
|
children: [
|
|
10585
|
-
/* @__PURE__ */
|
|
10586
|
-
/* @__PURE__ */
|
|
10587
|
-
/* @__PURE__ */
|
|
11215
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11216
|
+
/* @__PURE__ */ jsx18("span", { children: "Regel" }),
|
|
11217
|
+
/* @__PURE__ */ jsxs18(
|
|
10588
11218
|
"select",
|
|
10589
11219
|
{
|
|
10590
11220
|
value: policyVersionId,
|
|
10591
11221
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
10592
11222
|
"data-testid": "regel-auswahl",
|
|
10593
11223
|
children: [
|
|
10594
|
-
/* @__PURE__ */
|
|
10595
|
-
regeln.value.map((regel) => /* @__PURE__ */
|
|
11224
|
+
/* @__PURE__ */ jsx18("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
11225
|
+
regeln.value.map((regel) => /* @__PURE__ */ jsxs18("option", { value: regel.versionId, children: [
|
|
10596
11226
|
regel.title,
|
|
10597
11227
|
" (",
|
|
10598
11228
|
regel.produces.join(", "),
|
|
@@ -10602,21 +11232,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10602
11232
|
}
|
|
10603
11233
|
)
|
|
10604
11234
|
] }),
|
|
10605
|
-
/* @__PURE__ */
|
|
10606
|
-
/* @__PURE__ */
|
|
10607
|
-
/* @__PURE__ */
|
|
11235
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11236
|
+
/* @__PURE__ */ jsx18("span", { children: "Eingang" }),
|
|
11237
|
+
/* @__PURE__ */ jsx18(
|
|
10608
11238
|
"select",
|
|
10609
11239
|
{
|
|
10610
11240
|
value: modus,
|
|
10611
11241
|
onChange: (e) => setModus(e.target.value),
|
|
10612
11242
|
"data-testid": "modus-auswahl",
|
|
10613
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */
|
|
11243
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ jsx18("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
10614
11244
|
}
|
|
10615
11245
|
)
|
|
10616
11246
|
] }),
|
|
10617
|
-
modus !== "image" && /* @__PURE__ */
|
|
10618
|
-
/* @__PURE__ */
|
|
10619
|
-
/* @__PURE__ */
|
|
11247
|
+
modus !== "image" && /* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11248
|
+
/* @__PURE__ */ jsx18("span", { children: "Referenzprompt" }),
|
|
11249
|
+
/* @__PURE__ */ jsx18(
|
|
10620
11250
|
"textarea",
|
|
10621
11251
|
{
|
|
10622
11252
|
value: promptText,
|
|
@@ -10626,8 +11256,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10626
11256
|
}
|
|
10627
11257
|
)
|
|
10628
11258
|
] }),
|
|
10629
|
-
modus !== "prompt" && /* @__PURE__ */
|
|
10630
|
-
port.imageLibrary && /* @__PURE__ */
|
|
11259
|
+
modus !== "prompt" && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
11260
|
+
port.imageLibrary && /* @__PURE__ */ jsx18(
|
|
10631
11261
|
BildWaehler,
|
|
10632
11262
|
{
|
|
10633
11263
|
port,
|
|
@@ -10636,9 +11266,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10636
11266
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
10637
11267
|
}
|
|
10638
11268
|
),
|
|
10639
|
-
/* @__PURE__ */
|
|
10640
|
-
/* @__PURE__ */
|
|
10641
|
-
/* @__PURE__ */
|
|
11269
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11270
|
+
/* @__PURE__ */ jsx18("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
11271
|
+
/* @__PURE__ */ jsx18(
|
|
10642
11272
|
"input",
|
|
10643
11273
|
{
|
|
10644
11274
|
type: "file",
|
|
@@ -10648,40 +11278,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10648
11278
|
"data-testid": "bild-eingabe"
|
|
10649
11279
|
}
|
|
10650
11280
|
),
|
|
10651
|
-
port.imageLibrary && /* @__PURE__ */
|
|
11281
|
+
port.imageLibrary && /* @__PURE__ */ jsx18("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
|
|
10652
11282
|
] })
|
|
10653
11283
|
] }),
|
|
10654
|
-
/* @__PURE__ */
|
|
11284
|
+
/* @__PURE__ */ jsx18("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
10655
11285
|
]
|
|
10656
11286
|
}
|
|
10657
11287
|
),
|
|
10658
|
-
meldung && /* @__PURE__ */
|
|
10659
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */
|
|
10660
|
-
/* @__PURE__ */
|
|
10661
|
-
/* @__PURE__ */
|
|
10662
|
-
/* @__PURE__ */
|
|
11288
|
+
meldung && /* @__PURE__ */ jsx18("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
11289
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ jsxs18("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
11290
|
+
/* @__PURE__ */ jsx18("h3", { children: "Der Lauf ist gescheitert" }),
|
|
11291
|
+
/* @__PURE__ */ jsxs18("p", { children: [
|
|
11292
|
+
/* @__PURE__ */ jsx18("strong", { children: lauf.failure?.class }),
|
|
10663
11293
|
" \u2014 ",
|
|
10664
11294
|
lauf.failure?.message
|
|
10665
11295
|
] }),
|
|
10666
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */
|
|
10667
|
-
/* @__PURE__ */
|
|
10668
|
-
/* @__PURE__ */
|
|
11296
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
11297
|
+
/* @__PURE__ */ jsx18("h4", { children: "Befunde" }),
|
|
11298
|
+
/* @__PURE__ */ jsx18(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
10669
11299
|
] }),
|
|
10670
|
-
/* @__PURE__ */
|
|
10671
|
-
/* @__PURE__ */
|
|
10672
|
-
/* @__PURE__ */
|
|
10673
|
-
/* @__PURE__ */
|
|
11300
|
+
/* @__PURE__ */ jsx18(Herkunft, { lauf }),
|
|
11301
|
+
/* @__PURE__ */ jsx18(Widerspruch, { lauf }),
|
|
11302
|
+
/* @__PURE__ */ jsx18(Belege, { lauf }),
|
|
11303
|
+
/* @__PURE__ */ jsx18(RecoveryPanel, { port, lauf }),
|
|
10674
11304
|
folgeblock(lauf)
|
|
10675
11305
|
] }),
|
|
10676
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */
|
|
10677
|
-
/* @__PURE__ */
|
|
10678
|
-
/* @__PURE__ */
|
|
10679
|
-
/* @__PURE__ */
|
|
10680
|
-
/* @__PURE__ */
|
|
10681
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */
|
|
10682
|
-
/* @__PURE__ */
|
|
10683
|
-
/* @__PURE__ */
|
|
10684
|
-
/* @__PURE__ */
|
|
11306
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ jsxs18("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
11307
|
+
/* @__PURE__ */ jsx18("h3", { children: "Vorschlag" }),
|
|
11308
|
+
/* @__PURE__ */ jsx18(Herkunft, { lauf }),
|
|
11309
|
+
/* @__PURE__ */ jsx18(Widerspruch, { lauf }),
|
|
11310
|
+
/* @__PURE__ */ jsx18("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
11311
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
11312
|
+
/* @__PURE__ */ jsx18("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
11313
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11314
|
+
/* @__PURE__ */ jsx18("code", { children: k.field }),
|
|
10685
11315
|
": Bild sagt \u201E",
|
|
10686
11316
|
k.from_image,
|
|
10687
11317
|
'", Prompt sagt \u201E',
|
|
@@ -10689,31 +11319,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10689
11319
|
'". Nichts davon wurde \xFCbernommen.'
|
|
10690
11320
|
] }, i)) })
|
|
10691
11321
|
] }),
|
|
10692
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */
|
|
10693
|
-
/* @__PURE__ */
|
|
10694
|
-
/* @__PURE__ */
|
|
10695
|
-
/* @__PURE__ */
|
|
11322
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
11323
|
+
/* @__PURE__ */ jsx18("h4", { children: "Nicht ableitbar" }),
|
|
11324
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11325
|
+
/* @__PURE__ */ jsx18("code", { children: n.field }),
|
|
10696
11326
|
": ",
|
|
10697
11327
|
n.reason
|
|
10698
11328
|
] }, i)) })
|
|
10699
11329
|
] }),
|
|
10700
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */
|
|
10701
|
-
/* @__PURE__ */
|
|
10702
|
-
/* @__PURE__ */
|
|
11330
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
11331
|
+
/* @__PURE__ */ jsx18("h4", { children: "Erschlossen, nicht belegt" }),
|
|
11332
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ jsx18("li", { children: a }, i)) })
|
|
10703
11333
|
] }),
|
|
10704
11334
|
lauf.proposals.map((vorschlag) => {
|
|
10705
11335
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
10706
11336
|
const fertig = uebernommen[vorschlag.type];
|
|
10707
|
-
return /* @__PURE__ */
|
|
11337
|
+
return /* @__PURE__ */ jsxs18(
|
|
10708
11338
|
"article",
|
|
10709
11339
|
{
|
|
10710
11340
|
className: "szenen-proposal",
|
|
10711
11341
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
10712
11342
|
children: [
|
|
10713
|
-
/* @__PURE__ */
|
|
10714
|
-
!fertig && /* @__PURE__ */
|
|
10715
|
-
/* @__PURE__ */
|
|
10716
|
-
/* @__PURE__ */
|
|
11343
|
+
/* @__PURE__ */ jsx18("h4", { children: vorschlag.type }),
|
|
11344
|
+
!fertig && /* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11345
|
+
/* @__PURE__ */ jsx18("span", { children: "Titel" }),
|
|
11346
|
+
/* @__PURE__ */ jsx18(
|
|
10717
11347
|
"input",
|
|
10718
11348
|
{
|
|
10719
11349
|
type: "text",
|
|
@@ -10727,9 +11357,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10727
11357
|
}
|
|
10728
11358
|
)
|
|
10729
11359
|
] }),
|
|
10730
|
-
/* @__PURE__ */
|
|
10731
|
-
bezug && !fertig && /* @__PURE__ */
|
|
10732
|
-
/* @__PURE__ */
|
|
11360
|
+
/* @__PURE__ */ jsx18("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
11361
|
+
bezug && !fertig && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
11362
|
+
/* @__PURE__ */ jsx18(
|
|
10733
11363
|
ReferencePicker,
|
|
10734
11364
|
{
|
|
10735
11365
|
port,
|
|
@@ -10743,30 +11373,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10743
11373
|
}))
|
|
10744
11374
|
}
|
|
10745
11375
|
),
|
|
10746
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */
|
|
11376
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ jsxs18("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
10747
11377
|
"Zeigt auf Version ",
|
|
10748
|
-
/* @__PURE__ */
|
|
11378
|
+
/* @__PURE__ */ jsx18("code", { children: referenzen[vorschlag.type] }),
|
|
10749
11379
|
"."
|
|
10750
11380
|
] }) : (
|
|
10751
11381
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
10752
11382
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
10753
11383
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
10754
|
-
/* @__PURE__ */
|
|
11384
|
+
/* @__PURE__ */ jsxs18("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
10755
11385
|
"Diese ",
|
|
10756
|
-
/* @__PURE__ */
|
|
11386
|
+
/* @__PURE__ */ jsx18("strong", { children: "Einzel\xFCbernahme" }),
|
|
10757
11387
|
" braucht eine ver\xF6ffentlichte ",
|
|
10758
11388
|
bezug.refersTo,
|
|
10759
11389
|
"-Version, auf die der Entwurf zeigt (D-03) \u2014 sie ist der Weg in einen bestehenden, l\xE4ngst ver\xF6ffentlichten Zusammenhang. Wollen Sie aus diesem Lauf erst einmal einen Prompt ausprobieren, nehmen Sie unten die ",
|
|
10760
|
-
/* @__PURE__ */
|
|
11390
|
+
/* @__PURE__ */ jsx18("strong", { children: "Draft-Kette" }),
|
|
10761
11391
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
10762
11392
|
] })
|
|
10763
11393
|
)
|
|
10764
11394
|
] }),
|
|
10765
|
-
fertig ? /* @__PURE__ */
|
|
11395
|
+
fertig ? /* @__PURE__ */ jsxs18("p", { className: "szenen-proposal__done", children: [
|
|
10766
11396
|
"Als Entwurf \xFCbernommen: ",
|
|
10767
|
-
/* @__PURE__ */
|
|
11397
|
+
/* @__PURE__ */ jsx18("code", { children: fertig }),
|
|
10768
11398
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
10769
|
-
] }) : /* @__PURE__ */
|
|
11399
|
+
] }) : /* @__PURE__ */ jsx18(
|
|
10770
11400
|
"button",
|
|
10771
11401
|
{
|
|
10772
11402
|
type: "button",
|
|
@@ -10781,39 +11411,39 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10781
11411
|
vorschlag.type
|
|
10782
11412
|
);
|
|
10783
11413
|
}),
|
|
10784
|
-
/* @__PURE__ */
|
|
10785
|
-
/* @__PURE__ */
|
|
11414
|
+
/* @__PURE__ */ jsx18(ChainActions, { port, runId: lauf.run_id }),
|
|
11415
|
+
/* @__PURE__ */ jsx18(Belege, { lauf }),
|
|
10786
11416
|
folgeblock(lauf)
|
|
10787
11417
|
] })
|
|
10788
11418
|
] });
|
|
10789
11419
|
};
|
|
10790
11420
|
|
|
10791
11421
|
// src/features/szenen/SzenenView.tsx
|
|
10792
|
-
import { jsx as
|
|
11422
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10793
11423
|
var SzenenView = ({
|
|
10794
11424
|
port,
|
|
10795
11425
|
contextId = null,
|
|
10796
11426
|
initialArea,
|
|
10797
11427
|
onAreaChange
|
|
10798
11428
|
}) => {
|
|
10799
|
-
const bereiche =
|
|
10800
|
-
const faehig =
|
|
10801
|
-
const [aktiv, setAktiv] =
|
|
11429
|
+
const bereiche = useMemo4(() => areasFor(port), [port]);
|
|
11430
|
+
const faehig = useMemo4(() => capabilitiesOf(port), [port]);
|
|
11431
|
+
const [aktiv, setAktiv] = useState17(() => resolveArea(port, initialArea));
|
|
10802
11432
|
const wechsle = (id) => {
|
|
10803
11433
|
setAktiv(id);
|
|
10804
11434
|
onAreaChange?.(id);
|
|
10805
11435
|
};
|
|
10806
11436
|
const aktuellerBereich = bereiche.find((b) => b.id === aktiv) ?? bereiche[0];
|
|
10807
|
-
return /* @__PURE__ */
|
|
10808
|
-
/* @__PURE__ */
|
|
10809
|
-
/* @__PURE__ */
|
|
10810
|
-
/* @__PURE__ */
|
|
10811
|
-
/* @__PURE__ */
|
|
10812
|
-
/* @__PURE__ */
|
|
11437
|
+
return /* @__PURE__ */ jsxs19("div", { className: "szenen-view", "data-testid": "szenen-view", children: [
|
|
11438
|
+
/* @__PURE__ */ jsxs19("header", { className: "szenen-view__intro", children: [
|
|
11439
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
11440
|
+
/* @__PURE__ */ jsx19("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
11441
|
+
/* @__PURE__ */ jsx19("h2", { children: "Bildprompt aus einer Szene" }),
|
|
11442
|
+
/* @__PURE__ */ jsx19("p", { children: "Bausteine w\xE4hlen, Szene und Bildaufbau festlegen und daraus einen wiederholbaren Prompt erzeugen." })
|
|
10813
11443
|
] }),
|
|
10814
|
-
/* @__PURE__ */
|
|
11444
|
+
/* @__PURE__ */ jsx19("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
10815
11445
|
] }),
|
|
10816
|
-
/* @__PURE__ */
|
|
11446
|
+
/* @__PURE__ */ jsx19("nav", { className: "szenen-view__nav", "aria-label": "Szenen-Bereiche", children: bereiche.map((bereich) => /* @__PURE__ */ jsx19(
|
|
10817
11447
|
"button",
|
|
10818
11448
|
{
|
|
10819
11449
|
type: "button",
|
|
@@ -10827,9 +11457,9 @@ var SzenenView = ({
|
|
|
10827
11457
|
},
|
|
10828
11458
|
bereich.id
|
|
10829
11459
|
)) }),
|
|
10830
|
-
/* @__PURE__ */
|
|
10831
|
-
aktiv === "derive" && port.derivation && /* @__PURE__ */
|
|
10832
|
-
aktiv === "elements" && /* @__PURE__ */
|
|
11460
|
+
/* @__PURE__ */ jsxs19("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
11461
|
+
aktiv === "derive" && port.derivation && /* @__PURE__ */ jsx19(DeriveArea, { port, contextId }),
|
|
11462
|
+
aktiv === "elements" && /* @__PURE__ */ jsx19(
|
|
10833
11463
|
ElementsArea,
|
|
10834
11464
|
{
|
|
10835
11465
|
port,
|
|
@@ -10839,20 +11469,31 @@ var SzenenView = ({
|
|
|
10839
11469
|
listTitle: "Bausteine"
|
|
10840
11470
|
}
|
|
10841
11471
|
),
|
|
10842
|
-
aktiv === "scene" && /* @__PURE__ */
|
|
10843
|
-
aktiv === "setup" && /* @__PURE__ */
|
|
10844
|
-
aktiv === "shot" && /* @__PURE__ */
|
|
10845
|
-
aktiv === "media" && port.media && /* @__PURE__ */
|
|
11472
|
+
aktiv === "scene" && /* @__PURE__ */ jsx19(SceneArea, { port, contextId }),
|
|
11473
|
+
aktiv === "setup" && /* @__PURE__ */ jsx19(SetupArea, { port, contextId }),
|
|
11474
|
+
aktiv === "shot" && /* @__PURE__ */ jsx19(ShotArea, { port, contextId }),
|
|
11475
|
+
aktiv === "media" && port.media && /* @__PURE__ */ jsx19(MediaArea, { port, contextId })
|
|
10846
11476
|
] }),
|
|
10847
|
-
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */
|
|
10848
|
-
/* @__PURE__ */
|
|
10849
|
-
!faehig.saveRunAsItem && /* @__PURE__ */
|
|
10850
|
-
!faehig.media && /* @__PURE__ */
|
|
11477
|
+
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ jsxs19("details", { className: "szenen-view__host-notes", children: [
|
|
11478
|
+
/* @__PURE__ */ jsx19("summary", { children: "Funktionen dieses Hosts" }),
|
|
11479
|
+
!faehig.saveRunAsItem && /* @__PURE__ */ jsx19("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-kein-item", children: "Runden k\xF6nnen hier nicht als Library-Item gespeichert werden." }),
|
|
11480
|
+
!faehig.media && /* @__PURE__ */ jsx19("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-keine-medien", children: "Referenzmedien werden in diesem Host nicht verwaltet." })
|
|
10851
11481
|
] })
|
|
10852
11482
|
] });
|
|
10853
11483
|
};
|
|
10854
11484
|
|
|
10855
11485
|
// src/lib/szenen/flowTextGenerationPort.ts
|
|
11486
|
+
function alsFlowTextZugang(sdk) {
|
|
11487
|
+
return async (prompt, options) => {
|
|
11488
|
+
const antwort = await sdk(prompt, options);
|
|
11489
|
+
if (typeof antwort?.text !== "string") {
|
|
11490
|
+
throw new Error(
|
|
11491
|
+
`Flow.generate.text lieferte kein { text: string }, sondern ${antwort === null || antwort === void 0 ? String(antwort) : typeof antwort}: ${JSON.stringify(antwort)?.slice(0, 200)}`
|
|
11492
|
+
);
|
|
11493
|
+
}
|
|
11494
|
+
return antwort.text;
|
|
11495
|
+
};
|
|
11496
|
+
}
|
|
10856
11497
|
function createFlowTextGenerationPort(generateText, options = {}) {
|
|
10857
11498
|
const provider = options.provider ?? "flow";
|
|
10858
11499
|
const modelId = options.modelId ?? "flow.generate.text";
|
|
@@ -13962,6 +14603,7 @@ function createHfImageStore(options) {
|
|
|
13962
14603
|
const basisMs = options.leseBasisMs ?? 400;
|
|
13963
14604
|
const schlafen = options.schlafen ?? warten;
|
|
13964
14605
|
const abgelegt = /* @__PURE__ */ new Map();
|
|
14606
|
+
const vorschauen = /* @__PURE__ */ new Map();
|
|
13965
14607
|
const bekanntePfade = /* @__PURE__ */ new Set();
|
|
13966
14608
|
let gefalteterBestand = null;
|
|
13967
14609
|
let laufenderAbgleich = null;
|
|
@@ -13985,7 +14627,7 @@ function createHfImageStore(options) {
|
|
|
13985
14627
|
}
|
|
13986
14628
|
return laufenderAbgleich;
|
|
13987
14629
|
}
|
|
13988
|
-
|
|
14630
|
+
const speicher = {
|
|
13989
14631
|
bestand: bestandAbgleichen,
|
|
13990
14632
|
async putWithId(id, base64, mimeType, titel) {
|
|
13991
14633
|
const echterTyp = typAusBytes(base64, mimeType);
|
|
@@ -14004,6 +14646,38 @@ function createHfImageStore(options) {
|
|
|
14004
14646
|
}, []);
|
|
14005
14647
|
abgelegt.set(id, { data: base64, mimeType: echterTyp });
|
|
14006
14648
|
},
|
|
14649
|
+
async preview(id) {
|
|
14650
|
+
const bekannt = vorschauen.get(id);
|
|
14651
|
+
if (bekannt) return bekannt;
|
|
14652
|
+
const eben = abgelegt.get(id);
|
|
14653
|
+
if (eben) {
|
|
14654
|
+
const quelle2 = `data:${eben.mimeType};base64,${eben.data}`;
|
|
14655
|
+
vorschauen.set(id, quelle2);
|
|
14656
|
+
return quelle2;
|
|
14657
|
+
}
|
|
14658
|
+
const zustand = await bestandAbgleichen();
|
|
14659
|
+
const eintrag = zustand.metadata.find((e) => e.id === id);
|
|
14660
|
+
if (eintrag?.hasThumb && eintrag.filename) {
|
|
14661
|
+
const klein = await hfLoadImageAsBase64(
|
|
14662
|
+
id,
|
|
14663
|
+
token,
|
|
14664
|
+
void 0,
|
|
14665
|
+
eintrag.filename,
|
|
14666
|
+
void 0,
|
|
14667
|
+
eintrag.mimeType,
|
|
14668
|
+
true
|
|
14669
|
+
);
|
|
14670
|
+
if (klein) {
|
|
14671
|
+
const quelle2 = `data:${eintrag.mimeType || "image/jpeg"};base64,${klein}`;
|
|
14672
|
+
vorschauen.set(id, quelle2);
|
|
14673
|
+
return quelle2;
|
|
14674
|
+
}
|
|
14675
|
+
}
|
|
14676
|
+
const voll = await speicher.resolve(id);
|
|
14677
|
+
const quelle = `data:${voll.mimeType};base64,${voll.data}`;
|
|
14678
|
+
vorschauen.set(id, quelle);
|
|
14679
|
+
return quelle;
|
|
14680
|
+
},
|
|
14007
14681
|
async resolve(id, mimeType) {
|
|
14008
14682
|
const eben = abgelegt.get(id);
|
|
14009
14683
|
if (eben) return eben;
|
|
@@ -14041,6 +14715,47 @@ function createHfImageStore(options) {
|
|
|
14041
14715
|
);
|
|
14042
14716
|
}
|
|
14043
14717
|
};
|
|
14718
|
+
return speicher;
|
|
14719
|
+
}
|
|
14720
|
+
|
|
14721
|
+
// src/lib/szenen/libraryItems.ts
|
|
14722
|
+
var LOCATOR = /^(.+)-(\d+)$/;
|
|
14723
|
+
function locatorTeile(mediaRef) {
|
|
14724
|
+
const treffer = LOCATOR.exec(mediaRef);
|
|
14725
|
+
if (!treffer) return { stamm: mediaRef, position: null };
|
|
14726
|
+
return { stamm: treffer[1], position: Number(treffer[2]) };
|
|
14727
|
+
}
|
|
14728
|
+
function gruppiereZuItems(bilder) {
|
|
14729
|
+
const gruppen = /* @__PURE__ */ new Map();
|
|
14730
|
+
for (const bild of bilder) {
|
|
14731
|
+
const { stamm } = locatorTeile(bild.mediaRef);
|
|
14732
|
+
const vorhanden = gruppen.get(stamm);
|
|
14733
|
+
if (vorhanden) vorhanden.push(bild);
|
|
14734
|
+
else gruppen.set(stamm, [bild]);
|
|
14735
|
+
}
|
|
14736
|
+
const items = [...gruppen.entries()].map(([stamm, mitglieder]) => {
|
|
14737
|
+
const sortiert = [...mitglieder].sort((a, b) => {
|
|
14738
|
+
const pa = locatorTeile(a.mediaRef).position ?? 0;
|
|
14739
|
+
const pb = locatorTeile(b.mediaRef).position ?? 0;
|
|
14740
|
+
return pa - pb;
|
|
14741
|
+
});
|
|
14742
|
+
const erstes = sortiert[0];
|
|
14743
|
+
const itemRef = sortiert.length === 1 ? erstes.mediaRef : stamm;
|
|
14744
|
+
const juengstes = sortiert.reduce(
|
|
14745
|
+
(max, b) => Math.max(max, b.timestamp ?? 0),
|
|
14746
|
+
0
|
|
14747
|
+
);
|
|
14748
|
+
return {
|
|
14749
|
+
item: {
|
|
14750
|
+
itemRef,
|
|
14751
|
+
title: erstes.itemTitle?.trim() || erstes.title || itemRef,
|
|
14752
|
+
images: sortiert.map(({ timestamp: _t, itemTitle: _i, ...bild }) => bild)
|
|
14753
|
+
},
|
|
14754
|
+
juengstes
|
|
14755
|
+
};
|
|
14756
|
+
});
|
|
14757
|
+
items.sort((a, b) => b.juengstes - a.juengstes);
|
|
14758
|
+
return items.map((e) => e.item);
|
|
14044
14759
|
}
|
|
14045
14760
|
|
|
14046
14761
|
// src/lib/szenen/hfImageLibrary.ts
|
|
@@ -14048,13 +14763,22 @@ function fehler2(nachricht, retryable = false) {
|
|
|
14048
14763
|
return { kind: "error", message: nachricht, retryable };
|
|
14049
14764
|
}
|
|
14050
14765
|
function alsBild(eintrag) {
|
|
14766
|
+
const { position } = locatorTeile(eintrag.id);
|
|
14767
|
+
const werk = eintrag.prompt?.trim() || "";
|
|
14051
14768
|
return {
|
|
14052
14769
|
mediaRef: eintrag.id,
|
|
14053
|
-
//
|
|
14054
|
-
//
|
|
14055
|
-
|
|
14770
|
+
// Innerhalb eines mehrbildigen Werkes tragen alle Einträge denselben
|
|
14771
|
+
// Prompt — der Abgleich schreibt ihn je Bild aus derselben Library-Zeile.
|
|
14772
|
+
// Deshalb bekommt die Kachel dort die Position dazu, sonst stünde
|
|
14773
|
+
// vierzehnmal derselbe Satz.
|
|
14774
|
+
title: position === null ? werk || eintrag.id : `${werk || eintrag.id} \xB7 Bild ${position + 1}`,
|
|
14056
14775
|
mimeType: eintrag.mimeType || "image/jpeg",
|
|
14057
|
-
thumbUrl
|
|
14776
|
+
// Kein `thumbUrl`: Die Datei liegt auf HF hinter einem Token, und ein
|
|
14777
|
+
// `<img src>` käme dort nicht durch. Die Quelle entsteht über
|
|
14778
|
+
// `loadPreview()` — und nur für die Kacheln, die wirklich gezeigt werden.
|
|
14779
|
+
thumbUrl: null,
|
|
14780
|
+
itemTitle: werk || null,
|
|
14781
|
+
...typeof eintrag.timestamp === "number" ? { timestamp: eintrag.timestamp } : {}
|
|
14058
14782
|
};
|
|
14059
14783
|
}
|
|
14060
14784
|
function createHfImageLibrary(options) {
|
|
@@ -14065,15 +14789,14 @@ function createHfImageLibrary(options) {
|
|
|
14065
14789
|
...options.now ? { now: options.now } : {}
|
|
14066
14790
|
});
|
|
14067
14791
|
return {
|
|
14068
|
-
async
|
|
14792
|
+
async listItems(query) {
|
|
14069
14793
|
try {
|
|
14070
14794
|
const zustand = await store.bestand();
|
|
14071
14795
|
const eintraege = zustand?.metadata ?? [];
|
|
14796
|
+
const items = gruppiereZuItems(eintraege.map(alsBild));
|
|
14072
14797
|
const gesucht = query?.search?.trim().toLowerCase();
|
|
14073
|
-
const gefiltert = gesucht ?
|
|
14074
|
-
|
|
14075
|
-
const begrenzt = query?.limit ? sortiert.slice(0, query.limit) : sortiert;
|
|
14076
|
-
return { kind: "ok", value: begrenzt.map(alsBild) };
|
|
14798
|
+
const gefiltert = gesucht ? items.filter((i) => i.title.toLowerCase().includes(gesucht) || i.itemRef.toLowerCase().includes(gesucht)) : items;
|
|
14799
|
+
return { kind: "ok", value: query?.limit ? gefiltert.slice(0, query.limit) : gefiltert };
|
|
14077
14800
|
} catch (error) {
|
|
14078
14801
|
return fehler2(
|
|
14079
14802
|
`Der Bildbestand konnte nicht gelesen werden: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -14081,6 +14804,16 @@ function createHfImageLibrary(options) {
|
|
|
14081
14804
|
);
|
|
14082
14805
|
}
|
|
14083
14806
|
},
|
|
14807
|
+
async loadPreview(mediaRef) {
|
|
14808
|
+
try {
|
|
14809
|
+
return { kind: "ok", value: await store.preview(mediaRef) };
|
|
14810
|
+
} catch (error) {
|
|
14811
|
+
return fehler2(
|
|
14812
|
+
`Die Vorschau von ${mediaRef} ist nicht ladbar: ${error instanceof Error ? error.message : String(error)}`,
|
|
14813
|
+
true
|
|
14814
|
+
);
|
|
14815
|
+
}
|
|
14816
|
+
},
|
|
14084
14817
|
async resolveImage(mediaRef, mimeTypeHinweis) {
|
|
14085
14818
|
try {
|
|
14086
14819
|
const bild = await store.resolve(mediaRef, mimeTypeHinweis);
|
|
@@ -14093,10 +14826,13 @@ function createHfImageLibrary(options) {
|
|
|
14093
14826
|
const id = newImageId();
|
|
14094
14827
|
try {
|
|
14095
14828
|
await store.putWithId(id, input.data, input.mime_type, input.title);
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14829
|
+
const abgelegt = {
|
|
14830
|
+
mediaRef: id,
|
|
14831
|
+
title: input.title,
|
|
14832
|
+
mimeType: input.mime_type,
|
|
14833
|
+
thumbUrl: null
|
|
14099
14834
|
};
|
|
14835
|
+
return { kind: "ok", value: abgelegt };
|
|
14100
14836
|
} catch (error) {
|
|
14101
14837
|
return fehler2(
|
|
14102
14838
|
`Das Bild konnte nicht abgelegt werden: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -14824,6 +15560,7 @@ export {
|
|
|
14824
15560
|
preferredHeadRevisionOf,
|
|
14825
15561
|
collectPromptRuns,
|
|
14826
15562
|
findPromptRun,
|
|
15563
|
+
ladeVorschauen,
|
|
14827
15564
|
simulatedAnswerFor,
|
|
14828
15565
|
SIMULATION_PROVIDER,
|
|
14829
15566
|
createSimulationTextGenerationPort,
|
|
@@ -14844,6 +15581,7 @@ export {
|
|
|
14844
15581
|
createSimulationSceneDerivationPort,
|
|
14845
15582
|
runSceneDerivation,
|
|
14846
15583
|
SzenenView,
|
|
15584
|
+
alsFlowTextZugang,
|
|
14847
15585
|
createFlowTextGenerationPort,
|
|
14848
15586
|
CATALOGUE_TYPES,
|
|
14849
15587
|
publishedHeadsOf,
|
|
@@ -14896,6 +15634,8 @@ export {
|
|
|
14896
15634
|
bildPfad,
|
|
14897
15635
|
typAusBytes,
|
|
14898
15636
|
createHfImageStore,
|
|
15637
|
+
locatorTeile,
|
|
15638
|
+
gruppiereZuItems,
|
|
14899
15639
|
createHfImageLibrary,
|
|
14900
15640
|
FLOW_EXECUTION_PATH,
|
|
14901
15641
|
createFlowImageProvider,
|