@rslsp1/fa-app-tools 7.4.0 → 9.0.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-HUGUH4VB.mjs → chunk-2ADFDRFX.mjs} +1325 -804
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1114 -607
- package/dist/index.mjs +3 -3
- package/dist/szenen.d.mts +364 -8
- package/dist/szenen.d.ts +364 -8
- package/dist/szenen.js +1067 -529
- package/dist/szenen.mjs +30 -2
- package/package.json +1 -1
package/dist/szenen.js
CHANGED
|
@@ -40,6 +40,7 @@ __export(szenen_exports, {
|
|
|
40
40
|
DERIVABLE_TYPES: () => DERIVABLE_TYPES,
|
|
41
41
|
ELEMENT_VERSION_SCHEMA_FILE: () => ELEMENT_VERSION_SCHEMA_FILE,
|
|
42
42
|
FLOW_EXECUTION_PATH: () => FLOW_EXECUTION_PATH,
|
|
43
|
+
GENERAL_POLICY_SUBTYPE: () => GENERAL_POLICY_SUBTYPE,
|
|
43
44
|
MCP_CLIENT_PROVIDER: () => MCP_CLIENT_PROVIDER,
|
|
44
45
|
PROBE_VERSION_ID: () => PROBE_VERSION_ID,
|
|
45
46
|
PROMPT_RULE_EFFECT: () => PROMPT_RULE_EFFECT,
|
|
@@ -114,6 +115,7 @@ __export(szenen_exports, {
|
|
|
114
115
|
collectVersionRefs: () => collectVersionRefs2,
|
|
115
116
|
compileSchemas: () => compileSchemas,
|
|
116
117
|
completePromptOperation: () => completePromptOperation,
|
|
118
|
+
contextOfRun: () => contextOfRun,
|
|
117
119
|
createBrowserTextGenerationPort: () => createBrowserTextGenerationPort,
|
|
118
120
|
createClientDerivationPort: () => createClientDerivationPort,
|
|
119
121
|
createClientRunPort: () => createClientRunPort,
|
|
@@ -164,6 +166,8 @@ __export(szenen_exports, {
|
|
|
164
166
|
generationBatchIdOf: () => generationBatchIdOf,
|
|
165
167
|
gesamtHerkunft: () => gesamtHerkunft,
|
|
166
168
|
getSzenenSchemas: () => getSzenenSchemas,
|
|
169
|
+
groupKeyOf: () => groupKeyOf,
|
|
170
|
+
groupOf: () => groupOf,
|
|
167
171
|
gruppiereZuItems: () => gruppiereZuItems,
|
|
168
172
|
hasPlacementCapability: () => hasPlacementCapability,
|
|
169
173
|
isKnownElementType: () => isKnownElementType,
|
|
@@ -185,6 +189,7 @@ __export(szenen_exports, {
|
|
|
185
189
|
mergeSzenenBatchOrigin: () => mergeSzenenBatchOrigin,
|
|
186
190
|
mimeTypAus: () => mimeTypAus,
|
|
187
191
|
mitDefaultVorlage: () => mitDefaultVorlage,
|
|
192
|
+
namingElementOf: () => namingElementOf,
|
|
188
193
|
noticeFor: () => noticeFor,
|
|
189
194
|
ordersForPromptRun: () => ordersForPromptRun,
|
|
190
195
|
ordneSeedsZu: () => ordneSeedsZu,
|
|
@@ -201,6 +206,7 @@ __export(szenen_exports, {
|
|
|
201
206
|
recoveryStatusOf: () => recoveryStatusOf,
|
|
202
207
|
reduceElementEvents: () => reduceElementEvents,
|
|
203
208
|
resolveArea: () => resolveArea,
|
|
209
|
+
resolveGeneralScenePolicies: () => resolveGeneralScenePolicies,
|
|
204
210
|
resolvePreferredHead: () => resolvePreferredHead,
|
|
205
211
|
resolveScenePayload: () => resolveScenePayload,
|
|
206
212
|
resolveShot: () => resolveShot,
|
|
@@ -218,11 +224,16 @@ __export(szenen_exports, {
|
|
|
218
224
|
runStoreDifferential: () => runStoreDifferential,
|
|
219
225
|
sameResponseAs: () => sameResponseAs,
|
|
220
226
|
sceneOnlyCapabilities: () => sceneOnlyCapabilities,
|
|
227
|
+
scenePolicyFingerprint: () => scenePolicyFingerprint,
|
|
221
228
|
scopeOfPath: () => scopeOfPath,
|
|
222
229
|
seedFehlerText: () => seedFehlerText,
|
|
230
|
+
selectPromptRuns: () => selectPromptRuns,
|
|
223
231
|
selectableTargetModels: () => selectableTargetModels,
|
|
224
232
|
showChain: () => showChain,
|
|
233
|
+
siblingsOf: () => siblingsOf,
|
|
225
234
|
simulatedAnswerFor: () => simulatedAnswerFor,
|
|
235
|
+
sortScenePolicies: () => sortScenePolicies,
|
|
236
|
+
sourceOf: () => sourceOf,
|
|
226
237
|
szenenSnapshotFilename: () => szenenSnapshotFilename,
|
|
227
238
|
totalModelCalls: () => totalModelCalls,
|
|
228
239
|
typAusBytes: () => typAusBytes,
|
|
@@ -4923,7 +4934,8 @@ async function resolveScenePayload(input) {
|
|
|
4923
4934
|
sceneVersionId = "",
|
|
4924
4935
|
resolver,
|
|
4925
4936
|
contextChain,
|
|
4926
|
-
userInstruction
|
|
4937
|
+
userInstruction,
|
|
4938
|
+
autoPolicies
|
|
4927
4939
|
} = input;
|
|
4928
4940
|
if (!isObject7(scenePayload)) {
|
|
4929
4941
|
return {
|
|
@@ -4958,6 +4970,7 @@ async function resolveScenePayload(input) {
|
|
|
4958
4970
|
resolver,
|
|
4959
4971
|
contextChain,
|
|
4960
4972
|
userInstruction,
|
|
4973
|
+
autoPolicies,
|
|
4961
4974
|
assumptions,
|
|
4962
4975
|
diagnostics
|
|
4963
4976
|
});
|
|
@@ -4973,6 +4986,7 @@ async function komponiere(z) {
|
|
|
4973
4986
|
resolver,
|
|
4974
4987
|
contextChain,
|
|
4975
4988
|
userInstruction,
|
|
4989
|
+
autoPolicies,
|
|
4976
4990
|
assumptions,
|
|
4977
4991
|
diagnostics
|
|
4978
4992
|
} = z;
|
|
@@ -5135,6 +5149,11 @@ async function komponiere(z) {
|
|
|
5135
5149
|
}
|
|
5136
5150
|
const payload = resolved.version.payload;
|
|
5137
5151
|
policies.push({
|
|
5152
|
+
// Die Herkunft steht in der aufgeloesten Version, nicht in der Referenz:
|
|
5153
|
+
// `element_id` gehoert zur Version und wird hier nicht aus dem `ref`
|
|
5154
|
+
// uebernommen, der nur eine `version_id` fuehrt.
|
|
5155
|
+
element_id: resolved.version.element_id,
|
|
5156
|
+
version_id: resolved.version.version_id,
|
|
5138
5157
|
subtype: str(payload.subtype) ?? "general",
|
|
5139
5158
|
rank: num(payload.rank) ?? 0,
|
|
5140
5159
|
text: str(payload.text) ?? "",
|
|
@@ -5142,6 +5161,16 @@ async function komponiere(z) {
|
|
|
5142
5161
|
});
|
|
5143
5162
|
}
|
|
5144
5163
|
policies.sort((a, b) => a.rank - b.rank);
|
|
5164
|
+
for (const auto of autoPolicies ?? []) {
|
|
5165
|
+
policies.push({
|
|
5166
|
+
element_id: auto.element_id,
|
|
5167
|
+
version_id: auto.version_id,
|
|
5168
|
+
subtype: auto.subtype,
|
|
5169
|
+
rank: auto.rank,
|
|
5170
|
+
text: auto.text,
|
|
5171
|
+
locale: auto.locale
|
|
5172
|
+
});
|
|
5173
|
+
}
|
|
5145
5174
|
const fragments = [];
|
|
5146
5175
|
for (const [i, ref] of asArray3(settings.fragment_refs).entries()) {
|
|
5147
5176
|
const resolved = await refOf(
|
|
@@ -5345,6 +5374,10 @@ async function komponiere(z) {
|
|
|
5345
5374
|
assumptions,
|
|
5346
5375
|
diagnostics,
|
|
5347
5376
|
capabilities: eingefroreneFaehigkeiten,
|
|
5377
|
+
// Die eine kanonische Stelle: die Anweisung des Aufrufers, sonst die im
|
|
5378
|
+
// Shot hinterlegte. Beim Szene-Direktlauf gibt es nur die erste — und
|
|
5379
|
+
// genau sie fehlte dem Renderer bisher (Schritt 03 §7).
|
|
5380
|
+
user_instruction: userInstruction ?? shotInstruction,
|
|
5348
5381
|
context_chain: [...contextChain],
|
|
5349
5382
|
target_model_resolution: targetModelResolution
|
|
5350
5383
|
}
|
|
@@ -5543,6 +5576,24 @@ function buildSystemInstruction(input) {
|
|
|
5543
5576
|
'Widersprechen sie einander, nenne den Widerspruch mit beiden Quellen in "notes" \u2014',
|
|
5544
5577
|
"waehle nicht still eine Seite."
|
|
5545
5578
|
);
|
|
5579
|
+
if (input.policies.length > 0) {
|
|
5580
|
+
zeilen.push(
|
|
5581
|
+
"",
|
|
5582
|
+
'In "policies" stehen verbindliche Transformationsregeln fuer die Formulierung.',
|
|
5583
|
+
"Setze sie um, ohne ihren Wortlaut in den Prompt zu uebernehmen; sie sind",
|
|
5584
|
+
"Anweisung an dich, nicht Prompttext. Bei gleichem Rang gilt die Reihenfolge",
|
|
5585
|
+
"der Liste."
|
|
5586
|
+
);
|
|
5587
|
+
}
|
|
5588
|
+
if (input.user_instruction !== null && input.user_instruction !== void 0) {
|
|
5589
|
+
zeilen.push(
|
|
5590
|
+
"",
|
|
5591
|
+
'"user_instruction" ist eine ZUSAETZLICHE Arbeitsanweisung fuer genau diesen Lauf.',
|
|
5592
|
+
"Sie tritt zu den Policies hinzu und hebt keine davon auf. Widerspricht sie einer",
|
|
5593
|
+
'Policy erkennbar, nenne den Widerspruch mit beiden Quellen in "feedback" bzw.',
|
|
5594
|
+
'"notes" \u2014 waehle nicht still eine Seite.'
|
|
5595
|
+
);
|
|
5596
|
+
}
|
|
5546
5597
|
if (input.camera === null) {
|
|
5547
5598
|
zeilen.push(
|
|
5548
5599
|
"",
|
|
@@ -6152,6 +6203,88 @@ function collectPromptRuns(events) {
|
|
|
6152
6203
|
function findPromptRun(events, runId) {
|
|
6153
6204
|
return collectPromptRuns(events).find((run) => run.run_id === runId) ?? null;
|
|
6154
6205
|
}
|
|
6206
|
+
var istKennung = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
6207
|
+
function groupOf(run) {
|
|
6208
|
+
const quelle = sourceOf(run);
|
|
6209
|
+
if (quelle.kind === "published") {
|
|
6210
|
+
return istKennung(quelle.shot_version_id) ? {
|
|
6211
|
+
kind: "published",
|
|
6212
|
+
key: `published:${quelle.shot_version_id}`,
|
|
6213
|
+
shot_version_id: quelle.shot_version_id
|
|
6214
|
+
} : {
|
|
6215
|
+
kind: "unresolved",
|
|
6216
|
+
key: `run:${run.run_id}`,
|
|
6217
|
+
reason: `Der Lauf ${run.run_id} gilt als ver\xF6ffentlichte Herkunft, tr\xE4gt aber keine shot_version_id. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
|
|
6218
|
+
};
|
|
6219
|
+
}
|
|
6220
|
+
if (quelle.kind === "draft_chain") {
|
|
6221
|
+
return istKennung(quelle.chain_id) ? { kind: "draft_chain", key: `chain:${quelle.chain_id}`, chain_id: quelle.chain_id } : {
|
|
6222
|
+
kind: "unresolved",
|
|
6223
|
+
key: `run:${run.run_id}`,
|
|
6224
|
+
reason: `Der Lauf ${run.run_id} stammt aus einer Draft-Kette ohne chain_id. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
|
|
6225
|
+
};
|
|
6226
|
+
}
|
|
6227
|
+
const elementId = quelle.scene?.element_id;
|
|
6228
|
+
return istKennung(elementId) ? { kind: "scene_direct", key: `scene:${elementId}`, scene_element_id: elementId } : {
|
|
6229
|
+
kind: "unresolved",
|
|
6230
|
+
key: `run:${run.run_id}`,
|
|
6231
|
+
reason: `Der Lauf ${run.run_id} entstand direkt aus einer Szene, nennt aber kein Szenen-Element. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
|
|
6232
|
+
};
|
|
6233
|
+
}
|
|
6234
|
+
function groupKeyOf(run) {
|
|
6235
|
+
return groupOf(run).key;
|
|
6236
|
+
}
|
|
6237
|
+
function siblingsOf(run, alle) {
|
|
6238
|
+
const schluessel = groupKeyOf(run);
|
|
6239
|
+
return alle.filter((kandidat) => groupKeyOf(kandidat) === schluessel);
|
|
6240
|
+
}
|
|
6241
|
+
function namingElementOf(run) {
|
|
6242
|
+
const quelle = sourceOf(run);
|
|
6243
|
+
if (quelle.kind === "scene_direct") {
|
|
6244
|
+
return istKennung(quelle.scene?.element_id) ? quelle.scene.element_id : null;
|
|
6245
|
+
}
|
|
6246
|
+
if (quelle.kind === "draft_chain") {
|
|
6247
|
+
const szene = (quelle.nodes ?? []).find((knoten) => knoten?.type === "scene");
|
|
6248
|
+
if (szene && istKennung(szene.element_id)) return szene.element_id;
|
|
6249
|
+
const shot = (quelle.nodes ?? []).find((knoten) => knoten?.type === "shot");
|
|
6250
|
+
if (shot && istKennung(shot.element_id)) return shot.element_id;
|
|
6251
|
+
}
|
|
6252
|
+
return istKennung(run.shot_element_id) ? run.shot_element_id : null;
|
|
6253
|
+
}
|
|
6254
|
+
function contextOfRun(run) {
|
|
6255
|
+
const kette = run.input_payload?.context_chain;
|
|
6256
|
+
if (!Array.isArray(kette) || kette.length === 0) return void 0;
|
|
6257
|
+
const erstes = kette[0];
|
|
6258
|
+
if (erstes === null) return null;
|
|
6259
|
+
return istKennung(erstes) ? erstes : void 0;
|
|
6260
|
+
}
|
|
6261
|
+
function selectPromptRuns(alle, filter = {}) {
|
|
6262
|
+
const status = filter.status ?? "succeeded";
|
|
6263
|
+
const nachKontext = filter.contextId !== void 0;
|
|
6264
|
+
const runs = [];
|
|
6265
|
+
let hiddenByStatus = 0;
|
|
6266
|
+
let hiddenByContext = 0;
|
|
6267
|
+
let withoutContext = 0;
|
|
6268
|
+
for (const run of alle) {
|
|
6269
|
+
if (status !== "all" && run.status !== status) {
|
|
6270
|
+
hiddenByStatus += 1;
|
|
6271
|
+
continue;
|
|
6272
|
+
}
|
|
6273
|
+
if (nachKontext) {
|
|
6274
|
+
const kontext = contextOfRun(run);
|
|
6275
|
+
if (kontext === void 0) {
|
|
6276
|
+
withoutContext += 1;
|
|
6277
|
+
continue;
|
|
6278
|
+
}
|
|
6279
|
+
if (kontext !== filter.contextId) {
|
|
6280
|
+
hiddenByContext += 1;
|
|
6281
|
+
continue;
|
|
6282
|
+
}
|
|
6283
|
+
}
|
|
6284
|
+
runs.push(run);
|
|
6285
|
+
}
|
|
6286
|
+
return { runs, hiddenByStatus, hiddenByContext, withoutContext };
|
|
6287
|
+
}
|
|
6155
6288
|
|
|
6156
6289
|
// src/lib/szenen/derivationExamples.ts
|
|
6157
6290
|
var PROPOSAL_EXAMPLE = {
|
|
@@ -7346,6 +7479,110 @@ async function selectableTargetModels(queries, contextChain) {
|
|
|
7346
7479
|
return { kind: "ok", value: { selectable, unselectable } };
|
|
7347
7480
|
}
|
|
7348
7481
|
|
|
7482
|
+
// src/lib/szenen/scenePolicies.ts
|
|
7483
|
+
var GENERAL_POLICY_SUBTYPE = "general";
|
|
7484
|
+
var isObject11 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
7485
|
+
var str2 = (v) => typeof v === "string" && v.trim().length > 0 ? v : null;
|
|
7486
|
+
var num2 = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
7487
|
+
function sortScenePolicies(policies) {
|
|
7488
|
+
return [...policies].sort((a, b) => a.rank - b.rank || a.chain_index - b.chain_index || (a.element_id < b.element_id ? -1 : a.element_id > b.element_id ? 1 : 0));
|
|
7489
|
+
}
|
|
7490
|
+
function scenePolicyFingerprint(policies) {
|
|
7491
|
+
return policies.map((p) => `${p.element_id}@${p.version_id}`).join(",");
|
|
7492
|
+
}
|
|
7493
|
+
function resolveGeneralScenePolicies(snapshot, contextChain) {
|
|
7494
|
+
if (typeof snapshot.listElements !== "function") {
|
|
7495
|
+
return {
|
|
7496
|
+
kind: "error",
|
|
7497
|
+
message: "Die Momentaufnahme liefert keine Elementliste. Allgemeine Kontext-Policies eines Szene-Direktlaufs lassen sich damit nicht bestimmen; eine leere Policy-Liste waere eine Behauptung ueber den Bestand, die niemand geprueft hat.",
|
|
7498
|
+
retryable: false
|
|
7499
|
+
};
|
|
7500
|
+
}
|
|
7501
|
+
const kette = contextChain.length > 0 ? contextChain : [null];
|
|
7502
|
+
const gesehen = /* @__PURE__ */ new Set();
|
|
7503
|
+
const gefunden = [];
|
|
7504
|
+
for (const [chainIndex, link] of kette.entries()) {
|
|
7505
|
+
const liste = snapshot.listElements({ contextId: link, type: "prompt_policy" });
|
|
7506
|
+
if (liste.kind !== "ok" || !liste.value) {
|
|
7507
|
+
return {
|
|
7508
|
+
kind: "error",
|
|
7509
|
+
message: liste.message ?? `Die prompt_policy-Elemente des Kontexts ${link ?? "global"} konnten nicht gelesen werden.`,
|
|
7510
|
+
retryable: true
|
|
7511
|
+
};
|
|
7512
|
+
}
|
|
7513
|
+
for (const element of liste.value) {
|
|
7514
|
+
if (gesehen.has(element.element_id)) continue;
|
|
7515
|
+
gesehen.add(element.element_id);
|
|
7516
|
+
const gelesen = snapshot.getElement(element.element_id);
|
|
7517
|
+
if (gelesen.kind !== "ok") {
|
|
7518
|
+
return {
|
|
7519
|
+
kind: "error",
|
|
7520
|
+
message: gelesen.message ?? `Element ${element.element_id} konnte nicht gelesen werden.`,
|
|
7521
|
+
retryable: true
|
|
7522
|
+
};
|
|
7523
|
+
}
|
|
7524
|
+
const stand = gelesen.value;
|
|
7525
|
+
if (!stand) {
|
|
7526
|
+
return {
|
|
7527
|
+
kind: "error",
|
|
7528
|
+
message: `Element ${element.element_id} steht in der Elementliste des Kontexts ${link ?? "global"}, aber nicht in derselben Momentaufnahme.`,
|
|
7529
|
+
retryable: false
|
|
7530
|
+
};
|
|
7531
|
+
}
|
|
7532
|
+
const versionen = stand.versions ?? [];
|
|
7533
|
+
const payloadVon = (versionId2) => {
|
|
7534
|
+
const payload2 = versionen.find((v) => v.version_id === versionId2)?.payload;
|
|
7535
|
+
return isObject11(payload2) ? payload2 : null;
|
|
7536
|
+
};
|
|
7537
|
+
const istGeneral = (versionId2) => str2(payloadVon(versionId2)?.subtype) === GENERAL_POLICY_SUBTYPE;
|
|
7538
|
+
const kopf = effectivePreferredHeadSafe(
|
|
7539
|
+
{ element: stand.element, versions: versionen, preferredHeads: stand.preferredHeads },
|
|
7540
|
+
kette
|
|
7541
|
+
);
|
|
7542
|
+
if (kopf.kind === "dag_fehler") {
|
|
7543
|
+
return {
|
|
7544
|
+
kind: "error",
|
|
7545
|
+
message: `Der Versionsgraph der Policy ${element.element_id} ist nicht aufbaubar: ${kopf.message}`,
|
|
7546
|
+
retryable: false
|
|
7547
|
+
};
|
|
7548
|
+
}
|
|
7549
|
+
if (kopf.kind === "keine_version") continue;
|
|
7550
|
+
const resolution = kopf.outcome.resolution;
|
|
7551
|
+
if (resolution.kind === "fork") {
|
|
7552
|
+
const relevant = resolution.heads.filter(istGeneral);
|
|
7553
|
+
if (relevant.length === 0) continue;
|
|
7554
|
+
return {
|
|
7555
|
+
kind: "rejected",
|
|
7556
|
+
message: `Die Policy ${element.element_id} hat ${resolution.heads.length} veroeffentlichte Koepfe und in diesem Kontext keine greifende Auswahl. Mindestens einer davon ist eine allgemeine Regel (${relevant.join(", ")}). Welche gilt, entscheidet keine Reihenfolge (D-36) \u2014 bitte einen bevorzugten Kopf setzen. Es wurde kein Modell gerufen.`,
|
|
7557
|
+
element_id: element.element_id,
|
|
7558
|
+
heads: resolution.heads
|
|
7559
|
+
};
|
|
7560
|
+
}
|
|
7561
|
+
const versionId = usableHeadVersionId(resolutionOf(kopf));
|
|
7562
|
+
if (!versionId) continue;
|
|
7563
|
+
const payload = payloadVon(versionId);
|
|
7564
|
+
if (!payload) {
|
|
7565
|
+
return {
|
|
7566
|
+
kind: "error",
|
|
7567
|
+
message: `Die wirksame Version ${versionId} der Policy ${element.element_id} steht nicht mit lesbarer Payload in der Momentaufnahme.`,
|
|
7568
|
+
retryable: false
|
|
7569
|
+
};
|
|
7570
|
+
}
|
|
7571
|
+
if (str2(payload.subtype) !== GENERAL_POLICY_SUBTYPE) continue;
|
|
7572
|
+
gefunden.push({
|
|
7573
|
+
element_id: element.element_id,
|
|
7574
|
+
version_id: versionId,
|
|
7575
|
+
subtype: GENERAL_POLICY_SUBTYPE,
|
|
7576
|
+
rank: num2(payload.rank) ?? 0,
|
|
7577
|
+
text: str2(payload.text) ?? "",
|
|
7578
|
+
locale: str2(payload.locale),
|
|
7579
|
+
chain_index: chainIndex
|
|
7580
|
+
});
|
|
7581
|
+
}
|
|
7582
|
+
}
|
|
7583
|
+
return { kind: "ok", policies: sortScenePolicies(gefunden) };
|
|
7584
|
+
}
|
|
7585
|
+
|
|
7349
7586
|
// src/lib/szenen/freezeDraftChain.ts
|
|
7350
7587
|
function ladeKnoten(sicht, elementId, erwarteterTyp) {
|
|
7351
7588
|
const gelesen = sicht.getElement(elementId);
|
|
@@ -7547,9 +7784,19 @@ async function freezeSceneWorkingState(input) {
|
|
|
7547
7784
|
const a = await store.readSnapshot({ fresh: false });
|
|
7548
7785
|
const szene = ladeSzene(a, sceneElementId, contextChain);
|
|
7549
7786
|
if ("fehler" in szene) return ausfallErgebnis(szene);
|
|
7787
|
+
const policiesA = resolveGeneralScenePolicies(a, contextChain);
|
|
7788
|
+
if (policiesA.kind === "error") {
|
|
7789
|
+
return { kind: "error", message: policiesA.message, retryable: policiesA.retryable };
|
|
7790
|
+
}
|
|
7791
|
+
if (policiesA.kind !== "ok") return { kind: "rejected", message: policiesA.message };
|
|
7550
7792
|
const b = await store.readSnapshot({ fresh: true });
|
|
7551
7793
|
const erneut = ladeSzene(b, sceneElementId, contextChain);
|
|
7552
7794
|
if ("fehler" in erneut) return ausfallErgebnis(erneut);
|
|
7795
|
+
const policiesB = resolveGeneralScenePolicies(b, contextChain);
|
|
7796
|
+
if (policiesB.kind === "error") {
|
|
7797
|
+
return { kind: "error", message: policiesB.message, retryable: policiesB.retryable };
|
|
7798
|
+
}
|
|
7799
|
+
if (policiesB.kind !== "ok") return { kind: "rejected", message: policiesB.message };
|
|
7553
7800
|
if (erneut.draft_id !== szene.draft_id || erneut.revision !== szene.revision || erneut.version_id !== szene.version_id) {
|
|
7554
7801
|
return {
|
|
7555
7802
|
kind: "conflict",
|
|
@@ -7559,6 +7806,17 @@ async function freezeSceneWorkingState(input) {
|
|
|
7559
7806
|
actualRevision: erneut.revision ?? 0
|
|
7560
7807
|
};
|
|
7561
7808
|
}
|
|
7809
|
+
const vorher = scenePolicyFingerprint(policiesA.policies);
|
|
7810
|
+
const nachher = scenePolicyFingerprint(policiesB.policies);
|
|
7811
|
+
if (vorher !== nachher) {
|
|
7812
|
+
return {
|
|
7813
|
+
kind: "conflict",
|
|
7814
|
+
message: `Die wirksamen allgemeinen Policies der Szene ${sceneElementId} haben sich waehrend des Einfrierens geaendert (erwartet [${vorher || "\u2014"}], vorhanden [${nachher || "\u2014"}]). Es wurde kein Modell gerufen.`,
|
|
7815
|
+
node: { type: "scene", element_id: sceneElementId, draft_id: szene.draft_id ?? "" },
|
|
7816
|
+
expectedRevision: szene.revision ?? 0,
|
|
7817
|
+
actualRevision: erneut.revision ?? 0
|
|
7818
|
+
};
|
|
7819
|
+
}
|
|
7562
7820
|
const aufgeloest = await resolveScenePayload({
|
|
7563
7821
|
scenePayload: szene.payload,
|
|
7564
7822
|
sceneElementId: szene.element_id,
|
|
@@ -7567,7 +7825,10 @@ async function freezeSceneWorkingState(input) {
|
|
|
7567
7825
|
sceneVersionId: szene.version_id ?? "",
|
|
7568
7826
|
resolver,
|
|
7569
7827
|
contextChain,
|
|
7570
|
-
userInstruction
|
|
7828
|
+
userInstruction,
|
|
7829
|
+
// Der aus A gebildete und gegen B bestaetigte Satz — kein dritter
|
|
7830
|
+
// Leseweg nach dem Freeze.
|
|
7831
|
+
autoPolicies: policiesA.policies
|
|
7571
7832
|
});
|
|
7572
7833
|
if (aufgeloest.kind !== "resolved") {
|
|
7573
7834
|
return {
|
|
@@ -7584,7 +7845,8 @@ async function freezeSceneWorkingState(input) {
|
|
|
7584
7845
|
revision: szene.revision,
|
|
7585
7846
|
version_id: szene.version_id
|
|
7586
7847
|
},
|
|
7587
|
-
input: aufgeloest.input
|
|
7848
|
+
input: aufgeloest.input,
|
|
7849
|
+
policies: policiesA.policies
|
|
7588
7850
|
};
|
|
7589
7851
|
}
|
|
7590
7852
|
|
|
@@ -7719,7 +7981,10 @@ function deriveItemFromRun(input) {
|
|
|
7719
7981
|
kind: "rejected",
|
|
7720
7982
|
failure: {
|
|
7721
7983
|
class: "run_not_among_siblings",
|
|
7722
|
-
|
|
7984
|
+
// Regel 11: Die Meldung nennt die **Bezugsgruppe**, nicht ein Feld,
|
|
7985
|
+
// das bei einem shotlosen Lauf leer ist. „des Shots ''" war keine
|
|
7986
|
+
// Auskunft (P1-B).
|
|
7987
|
+
message: `Der Lauf ${run.run_id} ist unter den ${runsOfShot.length} Laeufen seiner Bezugsgruppe ${groupKeyOf(run)} nicht enthalten. Ohne seinen Platz gaebe es keine Rundennummer.`
|
|
7723
7988
|
}
|
|
7724
7989
|
};
|
|
7725
7990
|
}
|
|
@@ -7992,6 +8257,15 @@ function createHfElementStore(options) {
|
|
|
7992
8257
|
return {
|
|
7993
8258
|
getElement(elementId) {
|
|
7994
8259
|
return { kind: "ok", value: state.elements.get(elementId) ?? null };
|
|
8260
|
+
},
|
|
8261
|
+
// Aus **derselben** gefalteten Sicht wie `getElement` und ohne
|
|
8262
|
+
// weiteren Netzzugriff: Nur so faellt die Policy-Auswahl des
|
|
8263
|
+
// Szene-Direktlaufs in dieselbe Konsistenzgrenze wie das Einfrieren
|
|
8264
|
+
// der Szene (Schritt 03 §3). Stillgelegte Elemente sind nicht dabei —
|
|
8265
|
+
// Stilllegen ist Ausblenden (D-04), wie bei `listElements`.
|
|
8266
|
+
listElements(filter) {
|
|
8267
|
+
const gefunden = [...state.elements.values()].map((snapshot) => snapshot.element).filter((element) => !element.retired && element.type === filter.type && (element.context_id ?? null) === (filter.contextId ?? null));
|
|
8268
|
+
return { kind: "ok", value: gefunden };
|
|
7995
8269
|
}
|
|
7996
8270
|
};
|
|
7997
8271
|
} catch (error) {
|
|
@@ -7999,6 +8273,9 @@ function createHfElementStore(options) {
|
|
|
7999
8273
|
return {
|
|
8000
8274
|
getElement() {
|
|
8001
8275
|
return { kind: "error", message };
|
|
8276
|
+
},
|
|
8277
|
+
listElements() {
|
|
8278
|
+
return { kind: "error", message };
|
|
8002
8279
|
}
|
|
8003
8280
|
};
|
|
8004
8281
|
}
|
|
@@ -10267,7 +10544,10 @@ function capabilitiesOf(port) {
|
|
|
10267
10544
|
imageOrderHistory: typeof port.imageBatchHistory?.listOrdersForPromptRun === "function",
|
|
10268
10545
|
imageBatchWrite: typeof port.imageBatchWrite?.importBatch === "function",
|
|
10269
10546
|
imageGeneration: typeof port.imageGeneration?.startFromPromptRun === "function",
|
|
10270
|
-
imageJobs: typeof port.imageJobs?.claimAndRun === "function"
|
|
10547
|
+
imageJobs: typeof port.imageJobs?.claimAndRun === "function",
|
|
10548
|
+
// P1-A: die herkunftsuebergreifende Prompt-Sicht. Ein Host ohne sie
|
|
10549
|
+
// verliert nur diesen Bereich — nicht die drei bestehenden Einstiege.
|
|
10550
|
+
promptOverview: typeof port.runs.listAllRuns === "function"
|
|
10271
10551
|
};
|
|
10272
10552
|
}
|
|
10273
10553
|
function unsupportedReason(capability) {
|
|
@@ -10821,11 +11101,11 @@ function findImageBatch(events, batchId) {
|
|
|
10821
11101
|
}
|
|
10822
11102
|
|
|
10823
11103
|
// src/lib/szenen/imageGenerationCapability.ts
|
|
10824
|
-
var
|
|
11104
|
+
var isObject12 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
10825
11105
|
var istText6 = (v) => typeof v === "string" && v.trim().length > 0;
|
|
10826
11106
|
function checkImageExecutionProfile(profile) {
|
|
10827
11107
|
const befunde = [];
|
|
10828
|
-
if (!
|
|
11108
|
+
if (!isObject12(profile)) return ["Das Ausfuehrungsprofil ist kein Objekt."];
|
|
10829
11109
|
for (const feld of ["profile_id", "execution_path", "execution_model_id"]) {
|
|
10830
11110
|
if (!istText6(profile[feld])) befunde.push(`"${feld}" fehlt als nicht-leerer Text.`);
|
|
10831
11111
|
}
|
|
@@ -10848,12 +11128,12 @@ function checkImageExecutionProfile(profile) {
|
|
|
10848
11128
|
function checkImageExecutionProfiles(profiles) {
|
|
10849
11129
|
const anzahlJeKennung = /* @__PURE__ */ new Map();
|
|
10850
11130
|
for (const profil of profiles ?? []) {
|
|
10851
|
-
if (!
|
|
11131
|
+
if (!isObject12(profil) || !istText6(profil.profile_id)) continue;
|
|
10852
11132
|
anzahlJeKennung.set(profil.profile_id, (anzahlJeKennung.get(profil.profile_id) ?? 0) + 1);
|
|
10853
11133
|
}
|
|
10854
11134
|
return (profiles ?? []).map((profil) => {
|
|
10855
11135
|
const befunde = [...checkImageExecutionProfile(profil)];
|
|
10856
|
-
if (
|
|
11136
|
+
if (isObject12(profil) && istText6(profil.profile_id) && (anzahlJeKennung.get(profil.profile_id) ?? 0) > 1) {
|
|
10857
11137
|
befunde.push(
|
|
10858
11138
|
`Die profile_id "${profil.profile_id}" kommt in diesem Zielmodell mehrfach vor \u2014 die Auswahl waere nicht mehr eindeutig aufloesbar.`
|
|
10859
11139
|
);
|
|
@@ -10878,7 +11158,7 @@ function executableImageModels(promptTargetModelKey, targets, capability) {
|
|
|
10878
11158
|
for (const [index, roh] of (target.executionProfiles ?? []).entries()) {
|
|
10879
11159
|
const befunde = profilBefunde[index] ?? [];
|
|
10880
11160
|
if (befunde.length > 0) {
|
|
10881
|
-
const kennung =
|
|
11161
|
+
const kennung = isObject12(roh) && istText6(roh.profile_id) ? roh.profile_id : "(ohne profile_id)";
|
|
10882
11162
|
invalid.push(`${target.key}/${kennung}: ${befunde.join(" ")}`);
|
|
10883
11163
|
continue;
|
|
10884
11164
|
}
|
|
@@ -11241,7 +11521,7 @@ function createMemoryViewPort(options = {}) {
|
|
|
11241
11521
|
const itemMedien = /* @__PURE__ */ new Map();
|
|
11242
11522
|
const runs = {
|
|
11243
11523
|
async listRunsForShot(shotVersionId) {
|
|
11244
|
-
return ok2(laeufe.filter((l) => l
|
|
11524
|
+
return ok2(laeufe.filter((l) => groupKeyOf(l) === `published:${shotVersionId}`));
|
|
11245
11525
|
},
|
|
11246
11526
|
async getRun(runId) {
|
|
11247
11527
|
return ok2(laeufe.find((l) => l.run_id === runId) ?? null);
|
|
@@ -11325,6 +11605,12 @@ function createMemoryViewPort(options = {}) {
|
|
|
11325
11605
|
return ok2(laeufe.filter(
|
|
11326
11606
|
(r) => r.source?.kind === "scene_direct" && r.source.scene.element_id === sceneElementId
|
|
11327
11607
|
));
|
|
11608
|
+
},
|
|
11609
|
+
// P1-A: die gemeinsame Sicht. Auch hier nur die **Form** — gefiltert wird
|
|
11610
|
+
// mit `selectPromptRuns()`, derselben Funktion wie im Client und im
|
|
11611
|
+
// Server. Ein eigener Filter waere eine zweite Wahrheit.
|
|
11612
|
+
async listAllRuns(filter) {
|
|
11613
|
+
return ok2(selectPromptRuns(laeufe, filter));
|
|
11328
11614
|
}
|
|
11329
11615
|
};
|
|
11330
11616
|
const itemPort = {
|
|
@@ -12439,8 +12725,13 @@ function createEventLogRunPersistence(channel) {
|
|
|
12439
12725
|
// Nur veroeffentlichte Laeufe. Ein Draft-Lauf hat eine **leere**
|
|
12440
12726
|
// shot_version_id (D-98) und wuerde bei der Suche nach '' sonst
|
|
12441
12727
|
// faelschlich mitkommen — eine stille Vermischung zweier Herkuenfte.
|
|
12728
|
+
//
|
|
12729
|
+
// Seit P1-B faellt die Entscheidung nicht mehr hier, sondern in
|
|
12730
|
+
// `groupKeyOf()`: dieselbe Regel, aus der auch die Geschwister und
|
|
12731
|
+
// damit die Rundennummer entstehen. Vorher stand sie hier **und**
|
|
12732
|
+
// — anders — in `domainService.getPromptRunWithSiblings()`.
|
|
12442
12733
|
value: collectPromptRuns(events).filter(
|
|
12443
|
-
(run) =>
|
|
12734
|
+
(run) => groupKeyOf(run) === `published:${shotVersionId}`
|
|
12444
12735
|
)
|
|
12445
12736
|
};
|
|
12446
12737
|
} catch (error) {
|
|
@@ -12462,10 +12753,9 @@ function createEventLogRunPersistence(channel) {
|
|
|
12462
12753
|
const events = await channel.readEvents();
|
|
12463
12754
|
return {
|
|
12464
12755
|
kind: "ok",
|
|
12465
|
-
value: collectPromptRuns(events).filter(
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
})
|
|
12756
|
+
value: collectPromptRuns(events).filter(
|
|
12757
|
+
(run) => groupKeyOf(run) === `chain:${chainId}`
|
|
12758
|
+
)
|
|
12469
12759
|
};
|
|
12470
12760
|
} catch (error) {
|
|
12471
12761
|
return queryError2(error, `Laeufe der Kette ${chainId} konnten nicht gelesen werden`);
|
|
@@ -12476,10 +12766,9 @@ function createEventLogRunPersistence(channel) {
|
|
|
12476
12766
|
const events = await channel.readEvents();
|
|
12477
12767
|
return {
|
|
12478
12768
|
kind: "ok",
|
|
12479
|
-
value: collectPromptRuns(events).filter(
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
})
|
|
12769
|
+
value: collectPromptRuns(events).filter(
|
|
12770
|
+
(run) => groupKeyOf(run) === `scene:${sceneElementId}`
|
|
12771
|
+
)
|
|
12483
12772
|
};
|
|
12484
12773
|
} catch (error) {
|
|
12485
12774
|
return queryError2(
|
|
@@ -12488,6 +12777,16 @@ function createEventLogRunPersistence(channel) {
|
|
|
12488
12777
|
);
|
|
12489
12778
|
}
|
|
12490
12779
|
},
|
|
12780
|
+
// P1-A: dieselbe Faltung, nur ohne Herkunftsfilter. Sie las schon bisher
|
|
12781
|
+
// in jedem der drei Fälle den **vollen** Log — hier fällt lediglich das
|
|
12782
|
+
// Aussieben weg.
|
|
12783
|
+
async listAll() {
|
|
12784
|
+
try {
|
|
12785
|
+
return { kind: "ok", value: collectPromptRuns(await channel.readEvents()) };
|
|
12786
|
+
} catch (error) {
|
|
12787
|
+
return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
|
|
12788
|
+
}
|
|
12789
|
+
},
|
|
12491
12790
|
async record(record) {
|
|
12492
12791
|
try {
|
|
12493
12792
|
await channel.appendEvent(SZENEN_EVENT_TYPES.promptRunRecorded, record);
|
|
@@ -12784,7 +13083,25 @@ function createClientRunPort(options) {
|
|
|
12784
13083
|
`Laeufe der Szene ${sceneElementId} konnten nicht gelesen werden`
|
|
12785
13084
|
);
|
|
12786
13085
|
}
|
|
12787
|
-
}
|
|
13086
|
+
},
|
|
13087
|
+
// ── Die gemeinsame Prompt-Sicht (P1-A) ────────────────────────────────
|
|
13088
|
+
//
|
|
13089
|
+
// Sie wird nur angeboten, wenn die **Persistenz** aufzählen kann. Ein
|
|
13090
|
+
// Host, dessen Speicher das nicht hergibt, bekommt hier keine Operation —
|
|
13091
|
+
// und die Ansicht nennt den Grund, statt eine leere Liste zu zeigen (§8).
|
|
13092
|
+
// Der Filter läuft über `selectPromptRuns()`, dieselbe Funktion, die auch
|
|
13093
|
+
// der Server benutzt; zwei Bezugsrahmen wären zwei Wahrheiten.
|
|
13094
|
+
...typeof runs.listAll === "function" ? {
|
|
13095
|
+
async listAllRuns(filter) {
|
|
13096
|
+
try {
|
|
13097
|
+
const alle = await runs.listAll();
|
|
13098
|
+
if (alle.kind !== "ok") return alle;
|
|
13099
|
+
return { kind: "ok", value: selectPromptRuns(alle.value, filter) };
|
|
13100
|
+
} catch (error) {
|
|
13101
|
+
return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
|
|
13102
|
+
}
|
|
13103
|
+
}
|
|
13104
|
+
} : {}
|
|
12788
13105
|
};
|
|
12789
13106
|
}
|
|
12790
13107
|
|
|
@@ -13544,13 +13861,13 @@ var VERBOTEN_JE_HERKUNFT = {
|
|
|
13544
13861
|
function istText8(wert) {
|
|
13545
13862
|
return typeof wert === "string" && wert.trim().length > 0;
|
|
13546
13863
|
}
|
|
13547
|
-
function
|
|
13864
|
+
function isObject13(wert) {
|
|
13548
13865
|
return typeof wert === "object" && wert !== null && !Array.isArray(wert);
|
|
13549
13866
|
}
|
|
13550
13867
|
var KETTEN_TYPEN = ["scene", "scene_setup", "shot"];
|
|
13551
13868
|
var HERKUENFTE = ["published", "draft_chain", "scene_direct"];
|
|
13552
13869
|
function pruefeLaufherkunft(quelle) {
|
|
13553
|
-
if (!
|
|
13870
|
+
if (!isObject13(quelle)) {
|
|
13554
13871
|
return { ok: false, message: '"source" muss ein Objekt sein.' };
|
|
13555
13872
|
}
|
|
13556
13873
|
if (!HERKUENFTE.includes(quelle.kind)) {
|
|
@@ -13569,7 +13886,7 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13569
13886
|
}
|
|
13570
13887
|
if (quelle.kind === "scene_direct") {
|
|
13571
13888
|
const szene = quelle.scene;
|
|
13572
|
-
if (!
|
|
13889
|
+
if (!isObject13(szene)) {
|
|
13573
13890
|
return { ok: false, message: '"source.scene" muss ein Objekt sein.' };
|
|
13574
13891
|
}
|
|
13575
13892
|
if (!istText8(szene.element_id)) {
|
|
@@ -13607,7 +13924,7 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13607
13924
|
};
|
|
13608
13925
|
}
|
|
13609
13926
|
for (const [index, knoten] of quelle.nodes.entries()) {
|
|
13610
|
-
if (!
|
|
13927
|
+
if (!isObject13(knoten)) {
|
|
13611
13928
|
return { ok: false, message: `"source.nodes[${index}]" ist kein Objekt.` };
|
|
13612
13929
|
}
|
|
13613
13930
|
if (!KETTEN_TYPEN.includes(knoten.type)) {
|
|
@@ -13650,7 +13967,7 @@ function checkPromptRunRecord(candidate) {
|
|
|
13650
13967
|
const urteil2 = pruefeLaufherkunft(quelle);
|
|
13651
13968
|
if (!urteil2.ok) return urteil2;
|
|
13652
13969
|
}
|
|
13653
|
-
const herkunft =
|
|
13970
|
+
const herkunft = isObject13(quelle) && typeof quelle.kind === "string" ? quelle.kind : "published";
|
|
13654
13971
|
for (const feld of PFLICHTFELDER) {
|
|
13655
13972
|
if (!istText8(record[feld])) {
|
|
13656
13973
|
return { ok: false, message: `"${feld}" fehlt oder ist leer.` };
|
|
@@ -14285,40 +14602,55 @@ async function leseBilderAusZip(datei) {
|
|
|
14285
14602
|
}
|
|
14286
14603
|
|
|
14287
14604
|
// src/features/szenen/SzenenView.tsx
|
|
14288
|
-
var
|
|
14605
|
+
var import_react20 = require("react");
|
|
14289
14606
|
|
|
14290
14607
|
// src/features/szenen/szenenViewModel.ts
|
|
14291
|
-
var
|
|
14292
|
-
"
|
|
14608
|
+
var BAUSTEIN_TYPES = [
|
|
14609
|
+
"scene_component",
|
|
14610
|
+
"style",
|
|
14611
|
+
"shot_concept",
|
|
14612
|
+
"prompt_fragment",
|
|
14613
|
+
"prompt_policy"
|
|
14614
|
+
];
|
|
14615
|
+
var ERWEITERT_REIHENFOLGE = [
|
|
14293
14616
|
"scene_setup",
|
|
14294
|
-
"shot"
|
|
14617
|
+
"shot",
|
|
14618
|
+
"camera_preset",
|
|
14619
|
+
"camera_pattern",
|
|
14620
|
+
"target_model",
|
|
14621
|
+
"scene_derivation_policy",
|
|
14622
|
+
"sequence"
|
|
14295
14623
|
];
|
|
14296
|
-
var
|
|
14624
|
+
var ERWEITERT_TYPES = (() => {
|
|
14625
|
+
const gehoertHierher = (typ) => typ !== "scene" && !BAUSTEIN_TYPES.includes(typ);
|
|
14626
|
+
const bekannt = ERWEITERT_REIHENFOLGE.filter(
|
|
14627
|
+
(typ) => SZENEN_ELEMENT_TYPES.includes(typ) && gehoertHierher(typ)
|
|
14628
|
+
);
|
|
14629
|
+
const rest = SZENEN_ELEMENT_TYPES.filter(
|
|
14630
|
+
(typ) => gehoertHierher(typ) && !bekannt.includes(typ)
|
|
14631
|
+
);
|
|
14632
|
+
return [...bekannt, ...rest];
|
|
14633
|
+
})();
|
|
14297
14634
|
var ALLE_BEREICHE = [
|
|
14298
14635
|
{
|
|
14299
|
-
id: "
|
|
14300
|
-
title: "
|
|
14301
|
-
description: "
|
|
14302
|
-
},
|
|
14303
|
-
{
|
|
14304
|
-
id: "elements",
|
|
14305
|
-
title: "1 \xB7 Bausteine",
|
|
14306
|
-
description: "Figuren, Orte, Stile und Regeln f\xFCr sp\xE4tere Bildprompts pflegen."
|
|
14636
|
+
id: "scene",
|
|
14637
|
+
title: "Szenen",
|
|
14638
|
+
description: "Szenen anlegen, aus Bild oder Text ableiten und daraus Prompts starten."
|
|
14307
14639
|
},
|
|
14308
14640
|
{
|
|
14309
|
-
id: "
|
|
14310
|
-
title: "
|
|
14311
|
-
description: "
|
|
14641
|
+
id: "prompts",
|
|
14642
|
+
title: "Prompts",
|
|
14643
|
+
description: "Alle erzeugten Prompts mit ihren Bildern \u2014 unabhaengig davon, ueber welchen Weg sie entstanden sind."
|
|
14312
14644
|
},
|
|
14313
14645
|
{
|
|
14314
|
-
id: "
|
|
14315
|
-
title: "
|
|
14316
|
-
description: "
|
|
14646
|
+
id: "elements",
|
|
14647
|
+
title: "Bausteine",
|
|
14648
|
+
description: "Figuren, Orte, Stile, Prompt-Bausteine und Prompt-Regeln pflegen."
|
|
14317
14649
|
},
|
|
14318
14650
|
{
|
|
14319
|
-
id: "
|
|
14320
|
-
title: "
|
|
14321
|
-
description: "
|
|
14651
|
+
id: "advanced",
|
|
14652
|
+
title: "Erweitert",
|
|
14653
|
+
description: "Optionale Pr\xE4zisierung: Bildaufbau, Shot, Kameras, Zielmodelle, Regeln, Sequenzen."
|
|
14322
14654
|
},
|
|
14323
14655
|
{
|
|
14324
14656
|
id: "media",
|
|
@@ -14328,16 +14660,12 @@ var ALLE_BEREICHE = [
|
|
|
14328
14660
|
];
|
|
14329
14661
|
function areasFor(port) {
|
|
14330
14662
|
const faehig = capabilitiesOf(port);
|
|
14331
|
-
return ALLE_BEREICHE.filter((bereich) =>
|
|
14332
|
-
if (bereich.id === "media") return faehig.media;
|
|
14333
|
-
if (bereich.id === "derive") return faehig.derivation;
|
|
14334
|
-
return true;
|
|
14335
|
-
});
|
|
14663
|
+
return ALLE_BEREICHE.filter((bereich) => bereich.id !== "media" || faehig.media);
|
|
14336
14664
|
}
|
|
14337
14665
|
function resolveArea(port, gewuenscht) {
|
|
14338
14666
|
const verfuegbar = areasFor(port);
|
|
14339
14667
|
if (gewuenscht && verfuegbar.some((b) => b.id === gewuenscht)) return gewuenscht;
|
|
14340
|
-
return verfuegbar.find((b) => b.id === "
|
|
14668
|
+
return verfuegbar.find((b) => b.id === "scene")?.id ?? verfuegbar[0].id;
|
|
14341
14669
|
}
|
|
14342
14670
|
function noticeFor(ergebnis, was) {
|
|
14343
14671
|
switch (ergebnis.kind) {
|
|
@@ -14378,7 +14706,7 @@ function noticeFor(ergebnis, was) {
|
|
|
14378
14706
|
}
|
|
14379
14707
|
|
|
14380
14708
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
14381
|
-
var
|
|
14709
|
+
var import_react13 = require("react");
|
|
14382
14710
|
|
|
14383
14711
|
// src/features/szenen/areas/usePortQuery.ts
|
|
14384
14712
|
var import_react = require("react");
|
|
@@ -14410,7 +14738,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
14410
14738
|
}
|
|
14411
14739
|
|
|
14412
14740
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
14413
|
-
var
|
|
14741
|
+
var import_react11 = require("react");
|
|
14414
14742
|
|
|
14415
14743
|
// src/features/szenen/elementLabels.ts
|
|
14416
14744
|
var LABELS = {
|
|
@@ -14786,8 +15114,8 @@ function feldLabel(type, pfad, name) {
|
|
|
14786
15114
|
|
|
14787
15115
|
// src/features/szenen/areas/SchemaFields.tsx
|
|
14788
15116
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
14789
|
-
var
|
|
14790
|
-
var istVersionRef = (v) =>
|
|
15117
|
+
var isObject14 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
15118
|
+
var istVersionRef = (v) => isObject14(v) && typeof v.element_id === "string" && typeof v.version_id === "string";
|
|
14791
15119
|
function leseJson(wert) {
|
|
14792
15120
|
if (!wert || wert === NULL_MARKER) return null;
|
|
14793
15121
|
try {
|
|
@@ -15015,13 +15343,13 @@ var VersionRefListeFeld = ({ port, kontextkette, feld, wert, onChange, readOnly,
|
|
|
15015
15343
|
}
|
|
15016
15344
|
const schreiben = (neu) => onChange(
|
|
15017
15345
|
feld.path,
|
|
15018
|
-
schreibListe(neu.map((eintrag, i) =>
|
|
15346
|
+
schreibListe(neu.map((eintrag, i) => isObject14(eintrag) && mitRolle ? { ...eintrag, rank: i } : eintrag))
|
|
15019
15347
|
);
|
|
15020
15348
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-feld__reflist", "data-testid": `reflist-${feld.path}`, children: [
|
|
15021
15349
|
liste.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { "data-testid": `reflist-${feld.path}-leer`, children: "Keine Eintr\xE4ge." }),
|
|
15022
15350
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { children: liste.map((eintrag, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { "data-testid": `reflist-${feld.path}-${index}`, children: [
|
|
15023
15351
|
istVersionRef(eintrag) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefAnzeige, { port, ref_: eintrag, testId: `reflist-${feld.path}-${index}-ref` }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: JSON.stringify(eintrag) }),
|
|
15024
|
-
mitRolle === "styleRole" &&
|
|
15352
|
+
mitRolle === "styleRole" && isObject14(eintrag) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
15025
15353
|
"select",
|
|
15026
15354
|
{
|
|
15027
15355
|
"data-testid": `reflist-${feld.path}-${index}-role`,
|
|
@@ -15034,7 +15362,7 @@ var VersionRefListeFeld = ({ port, kontextkette, feld, wert, onChange, readOnly,
|
|
|
15034
15362
|
]
|
|
15035
15363
|
}
|
|
15036
15364
|
),
|
|
15037
|
-
mitRolle === "frei" &&
|
|
15365
|
+
mitRolle === "frei" && isObject14(eintrag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
15038
15366
|
"input",
|
|
15039
15367
|
{
|
|
15040
15368
|
"data-testid": `reflist-${feld.path}-${index}-role`,
|
|
@@ -15044,7 +15372,7 @@ var VersionRefListeFeld = ({ port, kontextkette, feld, wert, onChange, readOnly,
|
|
|
15044
15372
|
onChange: (e) => schreiben(liste.map((x, i) => i === index ? { ...x, role: e.target.value } : x))
|
|
15045
15373
|
}
|
|
15046
15374
|
),
|
|
15047
|
-
mitGewicht &&
|
|
15375
|
+
mitGewicht && isObject14(eintrag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
15048
15376
|
"input",
|
|
15049
15377
|
{
|
|
15050
15378
|
"data-testid": `reflist-${feld.path}-${index}-weight`,
|
|
@@ -15275,7 +15603,7 @@ var KameraFeld = ({
|
|
|
15275
15603
|
if (phase.status !== "ready" || !phase.value) return [];
|
|
15276
15604
|
const cameras = valueAtPath(phase.value.payload, "camera_rig.cameras");
|
|
15277
15605
|
if (!Array.isArray(cameras)) return [];
|
|
15278
|
-
return cameras.filter(
|
|
15606
|
+
return cameras.filter(isObject14).map((c) => ({
|
|
15279
15607
|
id: typeof c.camera_id === "string" ? c.camera_id : null,
|
|
15280
15608
|
name: typeof c.name === "string" ? c.name : null
|
|
15281
15609
|
})).filter((c) => c.id !== null);
|
|
@@ -15420,11 +15748,11 @@ var MediaRefListeFeld = ({ feld, wert, onChange, readOnly }) => {
|
|
|
15420
15748
|
}
|
|
15421
15749
|
const schreiben = (neu) => onChange(
|
|
15422
15750
|
feld.path,
|
|
15423
|
-
schreibListe(neu.map((e, i) =>
|
|
15751
|
+
schreibListe(neu.map((e, i) => isObject14(e) ? { ...e, position: i } : e))
|
|
15424
15752
|
);
|
|
15425
15753
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-feld__liste", "data-testid": `feld-${feld.path}`, children: [
|
|
15426
15754
|
liste.map((eintrag, index) => {
|
|
15427
|
-
const objekt =
|
|
15755
|
+
const objekt = isObject14(eintrag) ? eintrag : {};
|
|
15428
15756
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-feld__liste-zeile", children: [
|
|
15429
15757
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
15430
15758
|
"input",
|
|
@@ -15433,7 +15761,7 @@ var MediaRefListeFeld = ({ feld, wert, onChange, readOnly }) => {
|
|
|
15433
15761
|
value: typeof objekt.asset_id === "string" ? objekt.asset_id : "",
|
|
15434
15762
|
readOnly,
|
|
15435
15763
|
placeholder: "asset_id (UUID)",
|
|
15436
|
-
onChange: (e) => schreiben(liste.map((x, i) => i === index ? { ...
|
|
15764
|
+
onChange: (e) => schreiben(liste.map((x, i) => i === index ? { ...isObject14(x) ? x : {}, asset_id: e.target.value } : x))
|
|
15437
15765
|
}
|
|
15438
15766
|
),
|
|
15439
15767
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -15442,7 +15770,7 @@ var MediaRefListeFeld = ({ feld, wert, onChange, readOnly }) => {
|
|
|
15442
15770
|
"data-testid": `feld-${feld.path}-${index}-rolle`,
|
|
15443
15771
|
value: typeof objekt.role === "string" ? objekt.role : "",
|
|
15444
15772
|
disabled: readOnly,
|
|
15445
|
-
onChange: (e) => schreiben(liste.map((x, i) => i === index ? { ...
|
|
15773
|
+
onChange: (e) => schreiben(liste.map((x, i) => i === index ? { ...isObject14(x) ? x : {}, role: e.target.value } : x)),
|
|
15446
15774
|
children: [
|
|
15447
15775
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "", children: "(Rolle w\xE4hlen)" }),
|
|
15448
15776
|
rollen.map((r) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: r, children: r }, r))
|
|
@@ -15485,7 +15813,7 @@ var LEERES_PROFIL = {
|
|
|
15485
15813
|
var listeAus = (text) => text.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
15486
15814
|
var AusfuehrungsprofileFeld = ({ feld, wert, onChange, readOnly }) => {
|
|
15487
15815
|
const gelesen = leseListe(wert);
|
|
15488
|
-
const profile = (gelesen ?? []).filter(
|
|
15816
|
+
const profile = (gelesen ?? []).filter(isObject14);
|
|
15489
15817
|
const unlesbar = gelesen === null;
|
|
15490
15818
|
const schreibe = (neu) => onChange(feld.path, schreibListe(neu));
|
|
15491
15819
|
const alleBefunde = checkImageExecutionProfiles(profile);
|
|
@@ -16502,13 +16830,57 @@ var VersionNavigator = ({
|
|
|
16502
16830
|
};
|
|
16503
16831
|
|
|
16504
16832
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
16505
|
-
var
|
|
16833
|
+
var import_react10 = require("react");
|
|
16834
|
+
|
|
16835
|
+
// src/features/szenen/areas/useLaufTitel.ts
|
|
16836
|
+
var import_react7 = require("react");
|
|
16837
|
+
function useLaufTitel(port, laeufe) {
|
|
16838
|
+
const [titelJeElement, setTitelJeElement] = (0, import_react7.useState)(
|
|
16839
|
+
() => /* @__PURE__ */ new Map()
|
|
16840
|
+
);
|
|
16841
|
+
const gebraucht = [...new Set(
|
|
16842
|
+
laeufe.map(namingElementOf).filter((id) => id !== null)
|
|
16843
|
+
)].sort();
|
|
16844
|
+
const schluessel = gebraucht.join(",");
|
|
16845
|
+
(0, import_react7.useEffect)(() => {
|
|
16846
|
+
let abgemeldet = false;
|
|
16847
|
+
const offen = gebraucht.filter((id) => !titelJeElement.has(id));
|
|
16848
|
+
if (offen.length === 0) return void 0;
|
|
16849
|
+
void (async () => {
|
|
16850
|
+
const gelesen = /* @__PURE__ */ new Map();
|
|
16851
|
+
for (const id of offen) {
|
|
16852
|
+
try {
|
|
16853
|
+
const ergebnis = await port.elements.getElement(id);
|
|
16854
|
+
gelesen.set(
|
|
16855
|
+
id,
|
|
16856
|
+
ergebnis.kind === "ok" && ergebnis.value ? ergebnis.value.metadata?.title ?? null : null
|
|
16857
|
+
);
|
|
16858
|
+
} catch {
|
|
16859
|
+
gelesen.set(id, null);
|
|
16860
|
+
}
|
|
16861
|
+
}
|
|
16862
|
+
if (abgemeldet) return;
|
|
16863
|
+
setTitelJeElement((bisher) => new Map([...bisher, ...gelesen]));
|
|
16864
|
+
})();
|
|
16865
|
+
return () => {
|
|
16866
|
+
abgemeldet = true;
|
|
16867
|
+
};
|
|
16868
|
+
}, [port, schluessel]);
|
|
16869
|
+
const jeLauf = /* @__PURE__ */ new Map();
|
|
16870
|
+
for (const lauf of laeufe) {
|
|
16871
|
+
const elementId = namingElementOf(lauf);
|
|
16872
|
+
if (!elementId) continue;
|
|
16873
|
+
const titel = titelJeElement.get(elementId);
|
|
16874
|
+
if (titel) jeLauf.set(lauf.run_id, titel);
|
|
16875
|
+
}
|
|
16876
|
+
return jeLauf;
|
|
16877
|
+
}
|
|
16506
16878
|
|
|
16507
16879
|
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
16508
|
-
var
|
|
16880
|
+
var import_react9 = __toESM(require("react"));
|
|
16509
16881
|
|
|
16510
16882
|
// src/features/szenen/areas/Bildbausteine.tsx
|
|
16511
|
-
var
|
|
16883
|
+
var import_react8 = require("react");
|
|
16512
16884
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
16513
16885
|
var Kachel = ({
|
|
16514
16886
|
quelle,
|
|
@@ -16525,11 +16897,11 @@ var BildViewer = ({
|
|
|
16525
16897
|
}) => {
|
|
16526
16898
|
const anzahl = bilder.length;
|
|
16527
16899
|
const bild = bilder[position];
|
|
16528
|
-
const blaettern = (0,
|
|
16900
|
+
const blaettern = (0, import_react8.useCallback)((schritt) => {
|
|
16529
16901
|
if (anzahl === 0) return;
|
|
16530
16902
|
onWechseln((position + schritt + anzahl) % anzahl);
|
|
16531
16903
|
}, [anzahl, position, onWechseln]);
|
|
16532
|
-
(0,
|
|
16904
|
+
(0, import_react8.useEffect)(() => {
|
|
16533
16905
|
const taste = (e) => {
|
|
16534
16906
|
if (e.key === "Escape") onSchliessen();
|
|
16535
16907
|
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
@@ -16612,8 +16984,8 @@ var BildViewer = ({
|
|
|
16612
16984
|
);
|
|
16613
16985
|
};
|
|
16614
16986
|
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
16615
|
-
const [offen, setOffen] = (0,
|
|
16616
|
-
(0,
|
|
16987
|
+
const [offen, setOffen] = (0, import_react8.useState)(null);
|
|
16988
|
+
(0, import_react8.useEffect)(() => {
|
|
16617
16989
|
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
16618
16990
|
}, [bilder.length]);
|
|
16619
16991
|
if (bilder.length === 0) return null;
|
|
@@ -16669,11 +17041,11 @@ var AUFTRAG_TEXT = {
|
|
|
16669
17041
|
};
|
|
16670
17042
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
16671
17043
|
const faehig = capabilitiesOf(port);
|
|
16672
|
-
const [nachladen, setNachladen] = (0,
|
|
17044
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16673
17045
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
16674
|
-
const [erzeugenOffen, setErzeugenOffen] = (0,
|
|
16675
|
-
const [zuordnenOffen, setZuordnenOffen] = (0,
|
|
16676
|
-
const [chatAuftraegeOffen, setChatAuftraegeOffen] = (0,
|
|
17046
|
+
const [erzeugenOffen, setErzeugenOffen] = (0, import_react9.useState)(null);
|
|
17047
|
+
const [zuordnenOffen, setZuordnenOffen] = (0, import_react9.useState)(null);
|
|
17048
|
+
const [chatAuftraegeOffen, setChatAuftraegeOffen] = (0, import_react9.useState)(null);
|
|
16677
17049
|
const quelle = sourceOf(lauf);
|
|
16678
17050
|
const [wahlPhase] = usePortQuery(
|
|
16679
17051
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -16987,12 +17359,12 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
16987
17359
|
] });
|
|
16988
17360
|
};
|
|
16989
17361
|
function useBildQuellen(port, bilder) {
|
|
16990
|
-
const [stand, setStand] = (0,
|
|
16991
|
-
const gehalten = (0,
|
|
16992
|
-
const gescheitert = (0,
|
|
16993
|
-
const [versuch, setVersuch] = (0,
|
|
17362
|
+
const [stand, setStand] = (0, import_react9.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
17363
|
+
const gehalten = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
|
|
17364
|
+
const gescheitert = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
|
|
17365
|
+
const [versuch, setVersuch] = (0, import_react9.useState)(0);
|
|
16994
17366
|
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
16995
|
-
(0,
|
|
17367
|
+
(0, import_react9.useEffect)(() => {
|
|
16996
17368
|
const bestand = port.imageLibrary;
|
|
16997
17369
|
if (!bestand) return void 0;
|
|
16998
17370
|
let abgebrochen = false;
|
|
@@ -17128,7 +17500,7 @@ var BatchKachel = ({ port, batch }) => {
|
|
|
17128
17500
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
17129
17501
|
"Batches",
|
|
17130
17502
|
" ",
|
|
17131
|
-
batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
17503
|
+
batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react9.default.Fragment, { children: [
|
|
17132
17504
|
i > 0 ? ", " : "",
|
|
17133
17505
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: h.generation_batch_id }),
|
|
17134
17506
|
` (${HERKUNFT_KURZ[h.source_kind]})`
|
|
@@ -17157,11 +17529,11 @@ var ProfilBefunde = ({ wahl, runId }) => {
|
|
|
17157
17529
|
] });
|
|
17158
17530
|
};
|
|
17159
17531
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
17160
|
-
const [modellWahl, setModellWahl] = (0,
|
|
17161
|
-
const [anzahlText, setAnzahlText] = (0,
|
|
17162
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0,
|
|
17163
|
-
const [laeuft, setLaeuft] = (0,
|
|
17164
|
-
const [notiz, setNotiz] = (0,
|
|
17532
|
+
const [modellWahl, setModellWahl] = (0, import_react9.useState)(null);
|
|
17533
|
+
const [anzahlText, setAnzahlText] = (0, import_react9.useState)("1");
|
|
17534
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react9.useState)("");
|
|
17535
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17536
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17165
17537
|
if (!port.imageGeneration) {
|
|
17166
17538
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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." });
|
|
17167
17539
|
}
|
|
@@ -17338,23 +17710,23 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
17338
17710
|
};
|
|
17339
17711
|
var DEFAULT_VORLAGE_KEY = "__default__";
|
|
17340
17712
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
17341
|
-
const [dateien, setDateien] = (0,
|
|
17342
|
-
const [seeds, setSeeds] = (0,
|
|
17343
|
-
const [zip, setZip] = (0,
|
|
17344
|
-
const [zipLaedt, setZipLaedt] = (0,
|
|
17345
|
-
const [seedListe, setSeedListe] = (0,
|
|
17346
|
-
const [vorlagen, setVorlagen] = (0,
|
|
17347
|
-
const [vorlageKey, setVorlageKey] = (0,
|
|
17348
|
-
const [vorlagenStand, setVorlagenStand] = (0,
|
|
17349
|
-
const [vorlageBenennen, setVorlageBenennen] = (0,
|
|
17350
|
-
const [vorlageName, setVorlageName] = (0,
|
|
17351
|
-
const [modell, setModell] = (0,
|
|
17352
|
-
const [itemId, setItemId] = (0,
|
|
17353
|
-
const [laeuft, setLaeuft] = (0,
|
|
17354
|
-
const [notiz, setNotiz] = (0,
|
|
17355
|
-
const auswahlMarke = (0,
|
|
17713
|
+
const [dateien, setDateien] = (0, import_react9.useState)([]);
|
|
17714
|
+
const [seeds, setSeeds] = (0, import_react9.useState)({});
|
|
17715
|
+
const [zip, setZip] = (0, import_react9.useState)(null);
|
|
17716
|
+
const [zipLaedt, setZipLaedt] = (0, import_react9.useState)(false);
|
|
17717
|
+
const [seedListe, setSeedListe] = (0, import_react9.useState)("");
|
|
17718
|
+
const [vorlagen, setVorlagen] = (0, import_react9.useState)([DEFAULT_SEED_VORLAGE]);
|
|
17719
|
+
const [vorlageKey, setVorlageKey] = (0, import_react9.useState)(DEFAULT_VORLAGE_KEY);
|
|
17720
|
+
const [vorlagenStand, setVorlagenStand] = (0, import_react9.useState)(0);
|
|
17721
|
+
const [vorlageBenennen, setVorlageBenennen] = (0, import_react9.useState)(false);
|
|
17722
|
+
const [vorlageName, setVorlageName] = (0, import_react9.useState)("");
|
|
17723
|
+
const [modell, setModell] = (0, import_react9.useState)("");
|
|
17724
|
+
const [itemId, setItemId] = (0, import_react9.useState)("");
|
|
17725
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17726
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17727
|
+
const auswahlMarke = (0, import_react9.useRef)(0);
|
|
17356
17728
|
const zipAktiv = zip !== null;
|
|
17357
|
-
(0,
|
|
17729
|
+
(0, import_react9.useEffect)(() => {
|
|
17358
17730
|
if (!zipAktiv) return;
|
|
17359
17731
|
let abgebrochen = false;
|
|
17360
17732
|
void (async () => {
|
|
@@ -17814,8 +18186,8 @@ var ChatAuftraegeAktion = ({
|
|
|
17814
18186
|
laedt,
|
|
17815
18187
|
onFertig
|
|
17816
18188
|
}) => {
|
|
17817
|
-
const [laufend, setLaufend] = (0,
|
|
17818
|
-
const [notiz, setNotiz] = (0,
|
|
18189
|
+
const [laufend, setLaufend] = (0, import_react9.useState)(null);
|
|
18190
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17819
18191
|
async function uebernehmen(jobId) {
|
|
17820
18192
|
if (!port.imageJobs) return;
|
|
17821
18193
|
setLaufend(jobId);
|
|
@@ -17894,13 +18266,13 @@ var ChatAuftraegeAktion = ({
|
|
|
17894
18266
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
17895
18267
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
17896
18268
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
17897
|
-
const [anweisung, setAnweisung] = (0,
|
|
17898
|
-
const [laeuft, setLaeuft] = (0,
|
|
17899
|
-
const [notiz, setNotiz] = (0,
|
|
17900
|
-
const [nachladen, setNachladen] = (0,
|
|
18269
|
+
const [anweisung, setAnweisung] = (0, import_react10.useState)("");
|
|
18270
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
18271
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
18272
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
17901
18273
|
const faehig = capabilitiesOf(port);
|
|
17902
18274
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
17903
|
-
const aktuelleQuelle = (0,
|
|
18275
|
+
const aktuelleQuelle = (0, import_react10.useRef)({ kind: source.kind, id: quellSchluessel });
|
|
17904
18276
|
aktuelleQuelle.current = { kind: source.kind, id: quellSchluessel };
|
|
17905
18277
|
const [phase, neuLaden] = usePortQuery(
|
|
17906
18278
|
() => {
|
|
@@ -17928,10 +18300,11 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
17928
18300
|
neuLaden();
|
|
17929
18301
|
};
|
|
17930
18302
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
17931
|
-
const
|
|
18303
|
+
const titel = useLaufTitel(port, laeufe);
|
|
18304
|
+
const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react10.useState)(void 0);
|
|
17932
18305
|
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
17933
18306
|
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
17934
|
-
(0,
|
|
18307
|
+
(0, import_react10.useEffect)(() => {
|
|
17935
18308
|
setGewaehlteRunde(void 0);
|
|
17936
18309
|
setAnweisung("");
|
|
17937
18310
|
setNotiz(null);
|
|
@@ -17966,6 +18339,7 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
17966
18339
|
port,
|
|
17967
18340
|
lauf,
|
|
17968
18341
|
runde: roundOfRun(lauf, laeufe),
|
|
18342
|
+
titel: titel.get(lauf.run_id) ?? null,
|
|
17969
18343
|
offen: lauf.run_id === offeneRunde,
|
|
17970
18344
|
onUmschalten: () => setGewaehlteRunde(
|
|
17971
18345
|
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
@@ -17990,7 +18364,7 @@ var STATUS_TEXT = {
|
|
|
17990
18364
|
};
|
|
17991
18365
|
var LANGER_TEXT = 240;
|
|
17992
18366
|
var Sekundaertext = ({ titel, text, testId }) => {
|
|
17993
|
-
const [ganz, setGanz] = (0,
|
|
18367
|
+
const [ganz, setGanz] = (0, import_react10.useState)(false);
|
|
17994
18368
|
const lang = text.length > LANGER_TEXT;
|
|
17995
18369
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
17996
18370
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
|
|
@@ -18009,7 +18383,7 @@ var Sekundaertext = ({ titel, text, testId }) => {
|
|
|
18009
18383
|
};
|
|
18010
18384
|
var LISTE_ANFANG = 3;
|
|
18011
18385
|
var SekundaerListe = ({ titel, eintraege, testId, className }) => {
|
|
18012
|
-
const [alle, setAlle] = (0,
|
|
18386
|
+
const [alle, setAlle] = (0, import_react10.useState)(false);
|
|
18013
18387
|
const lang = eintraege.length > LISTE_ANFANG;
|
|
18014
18388
|
const gezeigt = lang && !alle ? eintraege.slice(0, LISTE_ANFANG) : eintraege;
|
|
18015
18389
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
@@ -18027,10 +18401,10 @@ var SekundaerListe = ({ titel, eintraege, testId, className }) => {
|
|
|
18027
18401
|
)
|
|
18028
18402
|
] });
|
|
18029
18403
|
};
|
|
18030
|
-
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
18031
|
-
const [notiz, setNotiz] = (0,
|
|
18032
|
-
const [laeuft, setLaeuft] = (0,
|
|
18033
|
-
const [nachladen, setNachladen] = (0,
|
|
18404
|
+
var RundenEintrag = ({ port, lauf, runde, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
18405
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
18406
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
18407
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
18034
18408
|
const [itemPhase] = usePortQuery(
|
|
18035
18409
|
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
18036
18410
|
[port, lauf.run_id, nachladen, offen]
|
|
@@ -18058,10 +18432,7 @@ var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onI
|
|
|
18058
18432
|
"aria-expanded": offen,
|
|
18059
18433
|
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
18060
18434
|
children: [
|
|
18061
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
18062
|
-
"Runde ",
|
|
18063
|
-
runde
|
|
18064
|
-
] }),
|
|
18435
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "szenen-runs__marke", "data-testid": `titel-${lauf.run_id}`, children: titel ? `${titel} \xB7 Runde ${runde}` : `Runde ${runde}` }),
|
|
18065
18436
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
18066
18437
|
"span",
|
|
18067
18438
|
{
|
|
@@ -18185,43 +18556,43 @@ var ElementDetail = ({
|
|
|
18185
18556
|
author,
|
|
18186
18557
|
onChanged
|
|
18187
18558
|
}) => {
|
|
18188
|
-
const [nachladen, setNachladen] = (0,
|
|
18559
|
+
const [nachladen, setNachladen] = (0, import_react11.useState)(0);
|
|
18189
18560
|
const [phase] = usePortQuery(
|
|
18190
18561
|
() => port.elements.getElement(elementId),
|
|
18191
18562
|
[port, elementId, nachladen]
|
|
18192
18563
|
);
|
|
18193
|
-
const [entwurf, setEntwurf] = (0,
|
|
18194
|
-
const [notiz, setNotiz] = (0,
|
|
18195
|
-
const [laeuft, setLaeuft] = (0,
|
|
18196
|
-
const [wahl, setWahl] = (0,
|
|
18197
|
-
const [basiswechsel, setBasiswechsel] = (0,
|
|
18564
|
+
const [entwurf, setEntwurf] = (0, import_react11.useState)({});
|
|
18565
|
+
const [notiz, setNotiz] = (0, import_react11.useState)(null);
|
|
18566
|
+
const [laeuft, setLaeuft] = (0, import_react11.useState)(false);
|
|
18567
|
+
const [wahl, setWahl] = (0, import_react11.useState)(null);
|
|
18568
|
+
const [basiswechsel, setBasiswechsel] = (0, import_react11.useState)(null);
|
|
18198
18569
|
const [kettenPhase] = usePortQuery(
|
|
18199
18570
|
() => port.context.chainFor(contextId),
|
|
18200
18571
|
[port, contextId]
|
|
18201
18572
|
);
|
|
18202
|
-
const kontextkette = (0,
|
|
18573
|
+
const kontextkette = (0, import_react11.useMemo)(() => {
|
|
18203
18574
|
if (kettenPhase.status === "ready") return { status: "ready", chain: kettenPhase.value };
|
|
18204
18575
|
if (kettenPhase.status === "error") return { status: "error", message: kettenPhase.message };
|
|
18205
18576
|
return { status: "loading" };
|
|
18206
18577
|
}, [kettenPhase]);
|
|
18207
18578
|
const kette = kontextkette.status === "ready" ? kontextkette.chain : null;
|
|
18208
18579
|
const schnappschuss = phase.status === "ready" ? phase.value : null;
|
|
18209
|
-
const kopfErgebnis = (0,
|
|
18580
|
+
const kopfErgebnis = (0, import_react11.useMemo)(
|
|
18210
18581
|
() => schnappschuss && kette ? effectivePreferredHeadSafe(schnappschuss, kette) : null,
|
|
18211
18582
|
[schnappschuss, kette]
|
|
18212
18583
|
);
|
|
18213
18584
|
const kopfAufloesung = resolutionOf(kopfErgebnis);
|
|
18214
18585
|
const bevorzugteVersion = selectedHeadVersionId(kopfAufloesung);
|
|
18215
|
-
const felder = (0,
|
|
18586
|
+
const felder = (0, import_react11.useMemo)(
|
|
18216
18587
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
18217
18588
|
[schnappschuss?.element.type]
|
|
18218
18589
|
);
|
|
18219
|
-
(0,
|
|
18590
|
+
(0, import_react11.useEffect)(() => {
|
|
18220
18591
|
setWahl(null);
|
|
18221
18592
|
setBasiswechsel(null);
|
|
18222
18593
|
setNotiz(null);
|
|
18223
18594
|
}, [elementId]);
|
|
18224
|
-
const automatisch = (0,
|
|
18595
|
+
const automatisch = (0, import_react11.useMemo)(() => {
|
|
18225
18596
|
if (!schnappschuss) return { kind: "keiner" };
|
|
18226
18597
|
if (schnappschuss.draft) return { kind: "draft" };
|
|
18227
18598
|
if (bevorzugteVersion) return { kind: "version", versionId: bevorzugteVersion };
|
|
@@ -18231,14 +18602,14 @@ var ElementDetail = ({
|
|
|
18231
18602
|
if (schnappschuss.versions.length === 0) return { kind: "draft" };
|
|
18232
18603
|
return { kind: "keiner" };
|
|
18233
18604
|
}, [schnappschuss, bevorzugteVersion]);
|
|
18234
|
-
const angezeigt = (0,
|
|
18605
|
+
const angezeigt = (0, import_react11.useMemo)(() => {
|
|
18235
18606
|
if (!wahl) return automatisch;
|
|
18236
18607
|
if (wahl.kind === "version" && !schnappschuss?.versions.some((v) => v.version_id === wahl.versionId)) {
|
|
18237
18608
|
return automatisch;
|
|
18238
18609
|
}
|
|
18239
18610
|
return wahl;
|
|
18240
18611
|
}, [wahl, automatisch, schnappschuss]);
|
|
18241
|
-
const angezeigtePayload = (0,
|
|
18612
|
+
const angezeigtePayload = (0, import_react11.useMemo)(() => {
|
|
18242
18613
|
if (!schnappschuss) return {};
|
|
18243
18614
|
if (angezeigt.kind === "draft") return schnappschuss.draft?.payload ?? {};
|
|
18244
18615
|
if (angezeigt.kind === "version") {
|
|
@@ -18247,7 +18618,7 @@ var ElementDetail = ({
|
|
|
18247
18618
|
return {};
|
|
18248
18619
|
}, [schnappschuss, angezeigt]);
|
|
18249
18620
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
18250
|
-
(0,
|
|
18621
|
+
(0, import_react11.useEffect)(() => {
|
|
18251
18622
|
if (!schnappschuss) return;
|
|
18252
18623
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
18253
18624
|
}, [
|
|
@@ -18260,7 +18631,7 @@ var ElementDetail = ({
|
|
|
18260
18631
|
const bearbeitbar = angezeigt.kind === "draft";
|
|
18261
18632
|
const setzeFeld = (pfad, wert) => setEntwurf((vorher) => ({ ...vorher, [pfad]: wert }));
|
|
18262
18633
|
const payloadAusFormular = () => payloadFromForm(felder, entwurf);
|
|
18263
|
-
const strukturPayload = (0,
|
|
18634
|
+
const strukturPayload = (0, import_react11.useMemo)(() => {
|
|
18264
18635
|
const lies = (name) => {
|
|
18265
18636
|
try {
|
|
18266
18637
|
const roh = JSON.parse(entwurf[name] || "[]");
|
|
@@ -18271,19 +18642,19 @@ var ElementDetail = ({
|
|
|
18271
18642
|
};
|
|
18272
18643
|
return { nodes: lies("nodes"), relations: lies("relations") };
|
|
18273
18644
|
}, [entwurf.nodes, entwurf.relations]);
|
|
18274
|
-
const kettenfeld = (0,
|
|
18645
|
+
const kettenfeld = (0, import_react11.useMemo)(() => {
|
|
18275
18646
|
const kette2 = schnappschuss?.draft?.chain;
|
|
18276
18647
|
if (!kette2) return null;
|
|
18277
18648
|
return kette2.links[0]?.field ?? null;
|
|
18278
18649
|
}, [schnappschuss?.draft?.chain]);
|
|
18279
|
-
const laufStand = (0,
|
|
18650
|
+
const laufStand = (0, import_react11.useMemo)(() => {
|
|
18280
18651
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
18281
18652
|
if (schnappschuss.draft) return schnappschuss.draft.payload;
|
|
18282
18653
|
const kopf = usableHeadVersionId(kopfAufloesung);
|
|
18283
18654
|
if (!kopf) return null;
|
|
18284
18655
|
return schnappschuss.versions.find((v) => v.version_id === kopf)?.payload ?? null;
|
|
18285
18656
|
}, [schnappschuss, kopfAufloesung]);
|
|
18286
|
-
const szenenBlocker = (0,
|
|
18657
|
+
const szenenBlocker = (0, import_react11.useMemo)(() => {
|
|
18287
18658
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
18288
18659
|
if (laufStand === null) {
|
|
18289
18660
|
return schnappschuss.versions.length > 0 ? "Diese Szene hat keinen Entwurf und in diesem Kontext keinen bevorzugten Kopf. Welcher Stand gilt, entscheidet keine Reihenfolge (D-36) \u2014 bitte oben eine Version als bevorzugt setzen." : "Diese Szene hat noch keinen gespeicherten Stand. Ein Lauf friert ein, was gespeichert ist \u2014 bitte zuerst den Entwurf speichern.";
|
|
@@ -18293,7 +18664,7 @@ var ElementDetail = ({
|
|
|
18293
18664
|
const grund = flag.reasons[0];
|
|
18294
18665
|
return grund && "message" in grund ? grund.message : "Kein Lauf moeglich.";
|
|
18295
18666
|
}, [schnappschuss, laufStand]);
|
|
18296
|
-
const vorschau = (0,
|
|
18667
|
+
const vorschau = (0, import_react11.useMemo)(() => {
|
|
18297
18668
|
if (!schnappschuss) return null;
|
|
18298
18669
|
try {
|
|
18299
18670
|
const roh = validatePayload(schnappschuss.element.type, payloadAusFormular());
|
|
@@ -18679,15 +19050,15 @@ var ElementDetail = ({
|
|
|
18679
19050
|
};
|
|
18680
19051
|
|
|
18681
19052
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
18682
|
-
var
|
|
19053
|
+
var import_react12 = require("react");
|
|
18683
19054
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
18684
19055
|
function messen(abfrage) {
|
|
18685
19056
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
18686
19057
|
return window.matchMedia(abfrage).matches;
|
|
18687
19058
|
}
|
|
18688
19059
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
18689
|
-
const [schmal, setSchmal] = (0,
|
|
18690
|
-
(0,
|
|
19060
|
+
const [schmal, setSchmal] = (0, import_react12.useState)(() => messen(abfrage));
|
|
19061
|
+
(0, import_react12.useEffect)(() => {
|
|
18691
19062
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
18692
19063
|
const liste = window.matchMedia(abfrage);
|
|
18693
19064
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -18714,16 +19085,16 @@ var ElementsArea = ({
|
|
|
18714
19085
|
const gemischt = auswahlTypen.length > 1;
|
|
18715
19086
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
18716
19087
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
18717
|
-
const [typ, setTyp] = (0,
|
|
18718
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] = (0,
|
|
18719
|
-
const [gewaehlt, setGewaehlt] = (0,
|
|
18720
|
-
const [neuerTitel, setNeuerTitel] = (0,
|
|
18721
|
-
const [neuerTyp, setNeuerTyp] = (0,
|
|
18722
|
-
const [notiz, setNotiz] = (0,
|
|
18723
|
-
const [anlegend, setAnlegend] = (0,
|
|
18724
|
-
const [anlageOffen, setAnlageOffen] = (0,
|
|
19088
|
+
const [typ, setTyp] = (0, import_react13.useState)(einzelTyp ?? "");
|
|
19089
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react13.useState)(false);
|
|
19090
|
+
const [gewaehlt, setGewaehlt] = (0, import_react13.useState)(null);
|
|
19091
|
+
const [neuerTitel, setNeuerTitel] = (0, import_react13.useState)("");
|
|
19092
|
+
const [neuerTyp, setNeuerTyp] = (0, import_react13.useState)(auswahlTypen[0]);
|
|
19093
|
+
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
19094
|
+
const [anlegend, setAnlegend] = (0, import_react13.useState)(false);
|
|
19095
|
+
const [anlageOffen, setAnlageOffen] = (0, import_react13.useState)(false);
|
|
18725
19096
|
const schmal = useSchmalesDisplay();
|
|
18726
|
-
const [ansicht, setAnsicht] = (0,
|
|
19097
|
+
const [ansicht, setAnsicht] = (0, import_react13.useState)("liste");
|
|
18727
19098
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
18728
19099
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
18729
19100
|
const waehle = (elementId) => {
|
|
@@ -18935,235 +19306,59 @@ var ElementsArea = ({
|
|
|
18935
19306
|
};
|
|
18936
19307
|
|
|
18937
19308
|
// src/features/szenen/areas/SceneArea.tsx
|
|
18938
|
-
var
|
|
18939
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
18940
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
18941
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
18942
|
-
] });
|
|
18943
|
-
|
|
18944
|
-
// src/features/szenen/areas/SetupArea.tsx
|
|
18945
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
18946
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
18947
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
18948
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18949
|
-
ElementsArea,
|
|
18950
|
-
{
|
|
18951
|
-
port,
|
|
18952
|
-
contextId,
|
|
18953
|
-
restrictToTypes: ["scene_setup", "camera_preset", "camera_pattern", "style"],
|
|
18954
|
-
allTypesLabel: "alle Bildaufbau-Typen",
|
|
18955
|
-
listTitle: "Bildaufbau"
|
|
18956
|
-
}
|
|
18957
|
-
)
|
|
18958
|
-
] });
|
|
18959
|
-
|
|
18960
|
-
// src/features/szenen/areas/ShotArea.tsx
|
|
18961
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
18962
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
18963
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
18964
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18965
|
-
ElementsArea,
|
|
18966
|
-
{
|
|
18967
|
-
port,
|
|
18968
|
-
contextId,
|
|
18969
|
-
restrictToTypes: ["shot", "shot_concept", "target_model"],
|
|
18970
|
-
allTypesLabel: "alle Prompt-Typen",
|
|
18971
|
-
listTitle: "Prompts"
|
|
18972
|
-
}
|
|
18973
|
-
)
|
|
18974
|
-
] });
|
|
18975
|
-
|
|
18976
|
-
// src/features/szenen/areas/MediaArea.tsx
|
|
18977
|
-
var import_react13 = require("react");
|
|
18978
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
18979
|
-
var leer = async () => ({ kind: "ok", value: [] });
|
|
18980
|
-
var MediaArea = ({ port }) => {
|
|
18981
|
-
const media = port.media;
|
|
18982
|
-
const [versionInput, setVersionInput] = (0, import_react13.useState)("");
|
|
18983
|
-
const [versionId, setVersionId] = (0, import_react13.useState)("");
|
|
18984
|
-
const [itemInput, setItemInput] = (0, import_react13.useState)("");
|
|
18985
|
-
const [itemId, setItemId] = (0, import_react13.useState)("");
|
|
18986
|
-
const [assetId, setAssetId] = (0, import_react13.useState)("");
|
|
18987
|
-
const [role, setRole] = (0, import_react13.useState)("reference");
|
|
18988
|
-
const [position, setPosition] = (0, import_react13.useState)("0");
|
|
18989
|
-
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
18990
|
-
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
18991
|
-
const [refresh, setRefresh] = (0, import_react13.useState)(0);
|
|
18992
|
-
const [versionPhase] = usePortQuery(
|
|
18993
|
-
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
18994
|
-
[media, versionId, refresh]
|
|
18995
|
-
);
|
|
18996
|
-
const [itemPhase] = usePortQuery(
|
|
18997
|
-
() => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
|
|
18998
|
-
[media, itemId, refresh]
|
|
18999
|
-
);
|
|
19000
|
-
const zuordnen = async () => {
|
|
19001
|
-
if (!versionInput.trim() || !assetId.trim()) {
|
|
19002
|
-
setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
|
|
19003
|
-
return;
|
|
19004
|
-
}
|
|
19005
|
-
const parsedPosition = Number(position);
|
|
19006
|
-
if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
|
|
19007
|
-
setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
|
|
19008
|
-
return;
|
|
19009
|
-
}
|
|
19010
|
-
setBusy(true);
|
|
19011
|
-
const result = await media.attachVersionMedium({
|
|
19012
|
-
versionId: versionInput.trim(),
|
|
19013
|
-
assetId: assetId.trim(),
|
|
19014
|
-
role,
|
|
19015
|
-
position: parsedPosition
|
|
19016
|
-
});
|
|
19017
|
-
setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
|
|
19018
|
-
if (result.kind === "ok") {
|
|
19019
|
-
setVersionId(versionInput.trim());
|
|
19020
|
-
setRefresh((value) => value + 1);
|
|
19021
|
-
}
|
|
19022
|
-
setBusy(false);
|
|
19023
|
-
};
|
|
19024
|
-
const entfernen = async (medium) => {
|
|
19025
|
-
setBusy(true);
|
|
19026
|
-
const result = await media.detachVersionMedium({
|
|
19027
|
-
versionId,
|
|
19028
|
-
assetId: medium.assetId,
|
|
19029
|
-
role: medium.role
|
|
19030
|
-
});
|
|
19031
|
-
setNotiz(noticeFor(result, "Referenzmedium entfernen"));
|
|
19032
|
-
if (result.kind === "ok") setRefresh((value) => value + 1);
|
|
19033
|
-
setBusy(false);
|
|
19034
|
-
};
|
|
19035
|
-
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
19036
|
-
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
19037
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
19038
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("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." }),
|
|
19039
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
19040
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Version" }),
|
|
19041
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
19042
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
19043
|
-
"Version-ID",
|
|
19044
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
19045
|
-
] }),
|
|
19046
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
19047
|
-
] }),
|
|
19048
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
19049
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
19050
|
-
"Asset-ID",
|
|
19051
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
19052
|
-
] }),
|
|
19053
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
19054
|
-
"Rolle",
|
|
19055
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
19056
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "reference", children: "reference" }),
|
|
19057
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "mask", children: "mask" }),
|
|
19058
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "palette", children: "palette" }),
|
|
19059
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "example", children: "example" })
|
|
19060
|
-
] })
|
|
19061
|
-
] }),
|
|
19062
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
19063
|
-
"Position",
|
|
19064
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
19065
|
-
] }),
|
|
19066
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
19067
|
-
] }),
|
|
19068
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
19069
|
-
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
19070
|
-
"Versionsmedien konnten nicht geladen werden: ",
|
|
19071
|
-
versionPhase.message
|
|
19072
|
-
] }),
|
|
19073
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
19074
|
-
"Version ",
|
|
19075
|
-
versionId,
|
|
19076
|
-
" hat keine Medien."
|
|
19077
|
-
] }),
|
|
19078
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
19079
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
19080
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
19081
|
-
medium.role,
|
|
19082
|
-
" \xB7 Position ",
|
|
19083
|
-
medium.position
|
|
19084
|
-
] }),
|
|
19085
|
-
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
19086
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
19087
|
-
] }, `${medium.assetId}:${medium.role}`)) })
|
|
19088
|
-
] }),
|
|
19089
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
19090
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Item-Medien" }),
|
|
19091
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
19092
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
19093
|
-
"Item-ID",
|
|
19094
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
19095
|
-
] }),
|
|
19096
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
19097
|
-
] }),
|
|
19098
|
-
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
19099
|
-
"Item-Medien konnten nicht geladen werden: ",
|
|
19100
|
-
itemPhase.message
|
|
19101
|
-
] }),
|
|
19102
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
19103
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
19104
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
19105
|
-
medium.role,
|
|
19106
|
-
" \xB7 Position ",
|
|
19107
|
-
medium.position
|
|
19108
|
-
] }),
|
|
19109
|
-
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
19110
|
-
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
19111
|
-
] }),
|
|
19112
|
-
notiz && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
19113
|
-
] });
|
|
19114
|
-
};
|
|
19309
|
+
var import_react17 = require("react");
|
|
19115
19310
|
|
|
19116
19311
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
19117
19312
|
var import_react16 = require("react");
|
|
19118
19313
|
|
|
19119
19314
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
19120
19315
|
var import_react14 = require("react");
|
|
19121
|
-
var
|
|
19316
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
19122
19317
|
var Diagnosen = ({ befunde, testId }) => {
|
|
19123
19318
|
if (befunde.length === 0) return null;
|
|
19124
|
-
return /* @__PURE__ */ (0,
|
|
19125
|
-
/* @__PURE__ */ (0,
|
|
19126
|
-
d.proposal_type && /* @__PURE__ */ (0,
|
|
19319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-severity": d.severity, children: [
|
|
19320
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.code }),
|
|
19321
|
+
d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19127
19322
|
" \xB7 ",
|
|
19128
|
-
/* @__PURE__ */ (0,
|
|
19323
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: d.proposal_type })
|
|
19129
19324
|
] }),
|
|
19130
|
-
d.pointer && /* @__PURE__ */ (0,
|
|
19325
|
+
d.pointer && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19131
19326
|
" \xB7 ",
|
|
19132
|
-
/* @__PURE__ */ (0,
|
|
19327
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.pointer })
|
|
19133
19328
|
] }),
|
|
19134
|
-
typeof d.line === "number" && /* @__PURE__ */ (0,
|
|
19329
|
+
typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19135
19330
|
" \xB7 Zeile ",
|
|
19136
19331
|
d.line,
|
|
19137
19332
|
", Spalte ",
|
|
19138
19333
|
d.column
|
|
19139
19334
|
] }),
|
|
19140
|
-
/* @__PURE__ */ (0,
|
|
19335
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: d.message })
|
|
19141
19336
|
] }, i)) });
|
|
19142
19337
|
};
|
|
19143
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0,
|
|
19144
|
-
/* @__PURE__ */ (0,
|
|
19338
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
19339
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-status", children: [
|
|
19145
19340
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
19146
19341
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
19147
19342
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
19148
19343
|
] }),
|
|
19149
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */ (0,
|
|
19150
|
-
/* @__PURE__ */ (0,
|
|
19151
|
-
/* @__PURE__ */ (0,
|
|
19152
|
-
/* @__PURE__ */ (0,
|
|
19344
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19345
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Verwertbar" }),
|
|
19346
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
|
|
19347
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: p.type }),
|
|
19153
19348
|
" \u2014 ",
|
|
19154
19349
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
19155
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0,
|
|
19156
|
-
/* @__PURE__ */ (0,
|
|
19350
|
+
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
|
|
19351
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: l.pointer }),
|
|
19157
19352
|
": ",
|
|
19158
19353
|
l.reason
|
|
19159
19354
|
] }, i)) })
|
|
19160
19355
|
] }, p.type)) })
|
|
19161
19356
|
] }),
|
|
19162
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */ (0,
|
|
19163
|
-
/* @__PURE__ */ (0,
|
|
19164
|
-
/* @__PURE__ */ (0,
|
|
19165
|
-
/* @__PURE__ */ (0,
|
|
19166
|
-
/* @__PURE__ */ (0,
|
|
19357
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19358
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Nicht verwertbar" }),
|
|
19359
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
|
|
19360
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: r.type }),
|
|
19361
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
19167
19362
|
] }, r.type)) })
|
|
19168
19363
|
] })
|
|
19169
19364
|
] });
|
|
@@ -19208,16 +19403,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19208
19403
|
setLaeuft(false);
|
|
19209
19404
|
}
|
|
19210
19405
|
}
|
|
19211
|
-
return /* @__PURE__ */ (0,
|
|
19212
|
-
/* @__PURE__ */ (0,
|
|
19213
|
-
/* @__PURE__ */ (0,
|
|
19406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
19407
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h4", { children: "Antwort retten" }),
|
|
19408
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
19214
19409
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
19215
|
-
/* @__PURE__ */ (0,
|
|
19410
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "ohne" }),
|
|
19216
19411
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
19217
19412
|
] }),
|
|
19218
|
-
/* @__PURE__ */ (0,
|
|
19219
|
-
/* @__PURE__ */ (0,
|
|
19220
|
-
/* @__PURE__ */ (0,
|
|
19413
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
|
|
19414
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
19415
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19221
19416
|
"textarea",
|
|
19222
19417
|
{
|
|
19223
19418
|
readOnly: true,
|
|
@@ -19228,12 +19423,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19228
19423
|
}
|
|
19229
19424
|
)
|
|
19230
19425
|
] }),
|
|
19231
|
-
/* @__PURE__ */ (0,
|
|
19232
|
-
/* @__PURE__ */ (0,
|
|
19426
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
|
|
19427
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
19233
19428
|
"Arbeitskopie",
|
|
19234
19429
|
bearbeitet ? " (bearbeitet)" : ""
|
|
19235
19430
|
] }),
|
|
19236
|
-
/* @__PURE__ */ (0,
|
|
19431
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19237
19432
|
"textarea",
|
|
19238
19433
|
{
|
|
19239
19434
|
rows: 8,
|
|
@@ -19243,8 +19438,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19243
19438
|
}
|
|
19244
19439
|
)
|
|
19245
19440
|
] }),
|
|
19246
|
-
/* @__PURE__ */ (0,
|
|
19247
|
-
/* @__PURE__ */ (0,
|
|
19441
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
|
|
19442
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19248
19443
|
"button",
|
|
19249
19444
|
{
|
|
19250
19445
|
type: "button",
|
|
@@ -19254,7 +19449,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19254
19449
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
19255
19450
|
}
|
|
19256
19451
|
),
|
|
19257
|
-
/* @__PURE__ */ (0,
|
|
19452
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19258
19453
|
"button",
|
|
19259
19454
|
{
|
|
19260
19455
|
type: "button",
|
|
@@ -19264,7 +19459,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19264
19459
|
children: "Arbeitsfassung speichern"
|
|
19265
19460
|
}
|
|
19266
19461
|
),
|
|
19267
|
-
arbeitskopie !== null && /* @__PURE__ */ (0,
|
|
19462
|
+
arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19268
19463
|
"button",
|
|
19269
19464
|
{
|
|
19270
19465
|
type: "button",
|
|
@@ -19279,15 +19474,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19279
19474
|
}
|
|
19280
19475
|
)
|
|
19281
19476
|
] }),
|
|
19282
|
-
meldung && /* @__PURE__ */ (0,
|
|
19283
|
-
bewertung && /* @__PURE__ */ (0,
|
|
19284
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
19285
|
-
/* @__PURE__ */ (0,
|
|
19286
|
-
/* @__PURE__ */ (0,
|
|
19477
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
19478
|
+
bewertung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ausbeute, { bewertung }),
|
|
19479
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", children: [
|
|
19480
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Befunde an dieser Fassung" }),
|
|
19481
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
19287
19482
|
] }),
|
|
19288
|
-
gesichert && /* @__PURE__ */ (0,
|
|
19483
|
+
gesichert && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
|
|
19289
19484
|
"Gespeichert als Arbeitsfassung ",
|
|
19290
|
-
/* @__PURE__ */ (0,
|
|
19485
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: gesichert.recovery_id }),
|
|
19291
19486
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
19292
19487
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
19293
19488
|
] })
|
|
@@ -19296,7 +19491,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
19296
19491
|
|
|
19297
19492
|
// src/features/szenen/areas/ChainActions.tsx
|
|
19298
19493
|
var import_react15 = require("react");
|
|
19299
|
-
var
|
|
19494
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
19300
19495
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
19301
19496
|
const [graph, setGraph] = (0, import_react15.useState)(null);
|
|
19302
19497
|
const [meldung, setMeldung] = (0, import_react15.useState)(null);
|
|
@@ -19322,14 +19517,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
19322
19517
|
setLaeuft(false);
|
|
19323
19518
|
}
|
|
19324
19519
|
}
|
|
19325
|
-
return /* @__PURE__ */ (0,
|
|
19326
|
-
/* @__PURE__ */ (0,
|
|
19327
|
-
/* @__PURE__ */ (0,
|
|
19520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
19521
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { children: "Draft-Kette" }),
|
|
19522
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
19328
19523
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
19329
|
-
/* @__PURE__ */ (0,
|
|
19524
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "ohne" }),
|
|
19330
19525
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
19331
19526
|
] }),
|
|
19332
|
-
!graph && /* @__PURE__ */ (0,
|
|
19527
|
+
!graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19333
19528
|
"button",
|
|
19334
19529
|
{
|
|
19335
19530
|
type: "button",
|
|
@@ -19339,34 +19534,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
19339
19534
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
19340
19535
|
}
|
|
19341
19536
|
),
|
|
19342
|
-
graph && /* @__PURE__ */ (0,
|
|
19343
|
-
/* @__PURE__ */ (0,
|
|
19537
|
+
graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
|
|
19538
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { children: [
|
|
19344
19539
|
"Kette ",
|
|
19345
|
-
/* @__PURE__ */ (0,
|
|
19540
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: graph.chainId }),
|
|
19346
19541
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
19347
19542
|
] }),
|
|
19348
|
-
/* @__PURE__ */ (0,
|
|
19349
|
-
/* @__PURE__ */ (0,
|
|
19543
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { "data-testid": `kette-knoten-${k.type}`, children: [
|
|
19544
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: k.type }),
|
|
19350
19545
|
" \u2014 Element ",
|
|
19351
|
-
/* @__PURE__ */ (0,
|
|
19546
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.elementId }),
|
|
19352
19547
|
", Entwurf ",
|
|
19353
|
-
/* @__PURE__ */ (0,
|
|
19548
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.draftId }),
|
|
19354
19549
|
" (Revision ",
|
|
19355
19550
|
k.revision,
|
|
19356
19551
|
")"
|
|
19357
19552
|
] }, k.type)) }),
|
|
19358
|
-
graph.missing.length > 0 && /* @__PURE__ */ (0,
|
|
19359
|
-
/* @__PURE__ */ (0,
|
|
19360
|
-
/* @__PURE__ */ (0,
|
|
19361
|
-
/* @__PURE__ */ (0,
|
|
19553
|
+
graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
19554
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
19555
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { children: [
|
|
19556
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: m.type }),
|
|
19362
19557
|
": ",
|
|
19363
19558
|
m.reason
|
|
19364
19559
|
] }, m.type)) })
|
|
19365
19560
|
] })
|
|
19366
19561
|
] }),
|
|
19367
|
-
shotKnoten && /* @__PURE__ */ (0,
|
|
19368
|
-
/* @__PURE__ */ (0,
|
|
19369
|
-
/* @__PURE__ */ (0,
|
|
19562
|
+
shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
19563
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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".' }),
|
|
19564
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19370
19565
|
PromptStartAction,
|
|
19371
19566
|
{
|
|
19372
19567
|
port,
|
|
@@ -19374,12 +19569,12 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
19374
19569
|
}
|
|
19375
19570
|
)
|
|
19376
19571
|
] }),
|
|
19377
|
-
meldung && /* @__PURE__ */ (0,
|
|
19572
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
19378
19573
|
] });
|
|
19379
19574
|
};
|
|
19380
19575
|
|
|
19381
19576
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
19382
|
-
var
|
|
19577
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
19383
19578
|
var MODUS_TEXT = {
|
|
19384
19579
|
prompt: "Nur Prompt",
|
|
19385
19580
|
image: "Nur Bild",
|
|
@@ -19397,15 +19592,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
19397
19592
|
setKopiert(false);
|
|
19398
19593
|
}
|
|
19399
19594
|
}
|
|
19400
|
-
return /* @__PURE__ */ (0,
|
|
19401
|
-
/* @__PURE__ */ (0,
|
|
19595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
19596
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("summary", { children: [
|
|
19402
19597
|
titel,
|
|
19403
19598
|
" (",
|
|
19404
19599
|
text.length,
|
|
19405
19600
|
" Zeichen)"
|
|
19406
19601
|
] }),
|
|
19407
|
-
/* @__PURE__ */ (0,
|
|
19408
|
-
/* @__PURE__ */ (0,
|
|
19602
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-beleg__kopf", children: [
|
|
19603
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19409
19604
|
"button",
|
|
19410
19605
|
{
|
|
19411
19606
|
type: "button",
|
|
@@ -19414,9 +19609,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
19414
19609
|
children: "Kopieren"
|
|
19415
19610
|
}
|
|
19416
19611
|
),
|
|
19417
|
-
kopiert && /* @__PURE__ */ (0,
|
|
19612
|
+
kopiert && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
19418
19613
|
] }),
|
|
19419
|
-
/* @__PURE__ */ (0,
|
|
19614
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19420
19615
|
"textarea",
|
|
19421
19616
|
{
|
|
19422
19617
|
ref: feld,
|
|
@@ -19430,8 +19625,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
19430
19625
|
)
|
|
19431
19626
|
] });
|
|
19432
19627
|
};
|
|
19433
|
-
var Belege = ({ lauf }) => /* @__PURE__ */ (0,
|
|
19434
|
-
lauf.raw_output ? /* @__PURE__ */ (0,
|
|
19628
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
19629
|
+
lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19435
19630
|
BelegFeld,
|
|
19436
19631
|
{
|
|
19437
19632
|
titel: "Rohantwort des Modells",
|
|
@@ -19442,9 +19637,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
|
|
|
19442
19637
|
) : (
|
|
19443
19638
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
19444
19639
|
das Modell hat also nicht „falsch geantwortet". */
|
|
19445
|
-
/* @__PURE__ */ (0,
|
|
19640
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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)." })
|
|
19446
19641
|
),
|
|
19447
|
-
/* @__PURE__ */ (0,
|
|
19642
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19448
19643
|
BelegFeld,
|
|
19449
19644
|
{
|
|
19450
19645
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -19456,18 +19651,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
|
|
|
19456
19651
|
] });
|
|
19457
19652
|
var Herkunft = ({ lauf }) => {
|
|
19458
19653
|
if (!lauf.follows) return null;
|
|
19459
|
-
return /* @__PURE__ */ (0,
|
|
19654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
19460
19655
|
"Folgt auf Lauf ",
|
|
19461
|
-
/* @__PURE__ */ (0,
|
|
19656
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: lauf.follows.run_id }),
|
|
19462
19657
|
".",
|
|
19463
19658
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
19464
19659
|
] });
|
|
19465
19660
|
};
|
|
19466
19661
|
var Widerspruch = ({ lauf }) => {
|
|
19467
19662
|
if (!lauf.reply) return null;
|
|
19468
|
-
return /* @__PURE__ */ (0,
|
|
19469
|
-
/* @__PURE__ */ (0,
|
|
19470
|
-
/* @__PURE__ */ (0,
|
|
19663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
19664
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
19665
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: lauf.reply })
|
|
19471
19666
|
] });
|
|
19472
19667
|
};
|
|
19473
19668
|
function readAsBase642(datei) {
|
|
@@ -19574,10 +19769,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19574
19769
|
if (item.images.length === 1) onWaehlen(deckbild);
|
|
19575
19770
|
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
19576
19771
|
}
|
|
19577
|
-
return /* @__PURE__ */ (0,
|
|
19578
|
-
/* @__PURE__ */ (0,
|
|
19579
|
-
/* @__PURE__ */ (0,
|
|
19580
|
-
/* @__PURE__ */ (0,
|
|
19772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
19773
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19774
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Bild aus dem Bestand" }),
|
|
19775
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19581
19776
|
"input",
|
|
19582
19777
|
{
|
|
19583
19778
|
type: "search",
|
|
@@ -19591,23 +19786,23 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19591
19786
|
}
|
|
19592
19787
|
)
|
|
19593
19788
|
] }),
|
|
19594
|
-
items.status === "loading" && /* @__PURE__ */ (0,
|
|
19595
|
-
items.status === "error" && /* @__PURE__ */ (0,
|
|
19789
|
+
items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Bilder werden geladen \u2026" }),
|
|
19790
|
+
items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
19596
19791
|
"Der Bildbestand ist nicht lesbar: ",
|
|
19597
19792
|
items.message
|
|
19598
19793
|
] }),
|
|
19599
|
-
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0,
|
|
19600
|
-
werke.length > 0 && /* @__PURE__ */ (0,
|
|
19794
|
+
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
|
|
19795
|
+
werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19601
19796
|
"div",
|
|
19602
19797
|
{
|
|
19603
19798
|
className: "szenen-bildwahl__browser",
|
|
19604
19799
|
ref: browser,
|
|
19605
19800
|
"data-testid": "bildwahl-werke",
|
|
19606
|
-
children: /* @__PURE__ */ (0,
|
|
19801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
19607
19802
|
const deckbild = item.images[0];
|
|
19608
19803
|
if (!deckbild) return null;
|
|
19609
19804
|
const fokussiert = item.itemRef === fokus;
|
|
19610
|
-
return /* @__PURE__ */ (0,
|
|
19805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19611
19806
|
"button",
|
|
19612
19807
|
{
|
|
19613
19808
|
type: "button",
|
|
@@ -19617,7 +19812,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19617
19812
|
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
19618
19813
|
title: item.title,
|
|
19619
19814
|
children: [
|
|
19620
|
-
/* @__PURE__ */ (0,
|
|
19815
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19621
19816
|
Kachel,
|
|
19622
19817
|
{
|
|
19623
19818
|
quelle: quelleVon(deckbild),
|
|
@@ -19625,7 +19820,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19625
19820
|
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
19626
19821
|
}
|
|
19627
19822
|
),
|
|
19628
|
-
item.images.length > 1 && /* @__PURE__ */ (0,
|
|
19823
|
+
item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19629
19824
|
"span",
|
|
19630
19825
|
{
|
|
19631
19826
|
className: "szenen-bildwahl__anzahl",
|
|
@@ -19636,22 +19831,22 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19636
19831
|
]
|
|
19637
19832
|
}
|
|
19638
19833
|
),
|
|
19639
|
-
/* @__PURE__ */ (0,
|
|
19834
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
19640
19835
|
]
|
|
19641
19836
|
}
|
|
19642
19837
|
) }, item.itemRef);
|
|
19643
19838
|
}) })
|
|
19644
19839
|
}
|
|
19645
19840
|
),
|
|
19646
|
-
werk && /* @__PURE__ */ (0,
|
|
19647
|
-
/* @__PURE__ */ (0,
|
|
19648
|
-
/* @__PURE__ */ (0,
|
|
19841
|
+
werk && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
19842
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
19843
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
19649
19844
|
werk.title,
|
|
19650
19845
|
" \xB7 ",
|
|
19651
19846
|
werk.images.length,
|
|
19652
19847
|
" Bilder"
|
|
19653
19848
|
] }),
|
|
19654
|
-
/* @__PURE__ */ (0,
|
|
19849
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19655
19850
|
"button",
|
|
19656
19851
|
{
|
|
19657
19852
|
type: "button",
|
|
@@ -19662,7 +19857,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19662
19857
|
}
|
|
19663
19858
|
)
|
|
19664
19859
|
] }),
|
|
19665
|
-
/* @__PURE__ */ (0,
|
|
19860
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19666
19861
|
"button",
|
|
19667
19862
|
{
|
|
19668
19863
|
type: "button",
|
|
@@ -19672,7 +19867,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19672
19867
|
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
19673
19868
|
title: bild.title,
|
|
19674
19869
|
children: [
|
|
19675
|
-
/* @__PURE__ */ (0,
|
|
19870
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19676
19871
|
Kachel,
|
|
19677
19872
|
{
|
|
19678
19873
|
quelle: quelleVon(bild),
|
|
@@ -19680,7 +19875,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19680
19875
|
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
19681
19876
|
}
|
|
19682
19877
|
),
|
|
19683
|
-
/* @__PURE__ */ (0,
|
|
19878
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
|
|
19684
19879
|
"#",
|
|
19685
19880
|
position + 1
|
|
19686
19881
|
] })
|
|
@@ -19688,10 +19883,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19688
19883
|
}
|
|
19689
19884
|
) }, bild.mediaRef)) })
|
|
19690
19885
|
] }),
|
|
19691
|
-
gewaehlt.length > 0 && /* @__PURE__ */ (0,
|
|
19692
|
-
/* @__PURE__ */ (0,
|
|
19693
|
-
/* @__PURE__ */ (0,
|
|
19694
|
-
/* @__PURE__ */ (0,
|
|
19886
|
+
gewaehlt.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
|
|
19887
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
19888
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
19889
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19695
19890
|
"button",
|
|
19696
19891
|
{
|
|
19697
19892
|
type: "button",
|
|
@@ -19727,6 +19922,15 @@ var DeriveArea = ({ port, contextId }) => {
|
|
|
19727
19922
|
() => port.derivation.listPolicies(contextId),
|
|
19728
19923
|
[port, contextId]
|
|
19729
19924
|
);
|
|
19925
|
+
const sortiert = (0, import_react16.useMemo)(() => regeln.status === "ready" ? [...regeln.value].sort((a, b) => {
|
|
19926
|
+
const szeneZuerst = Number(b.produces.includes("scene")) - Number(a.produces.includes("scene"));
|
|
19927
|
+
return szeneZuerst !== 0 ? szeneZuerst : a.title.localeCompare(b.title, "de");
|
|
19928
|
+
}) : [], [regeln]);
|
|
19929
|
+
(0, import_react16.useEffect)(() => {
|
|
19930
|
+
if (policyVersionId) return;
|
|
19931
|
+
const fuerSzene = sortiert.find((r) => r.produces.includes("scene"));
|
|
19932
|
+
if (fuerSzene) setPolicyVersionId(fuerSzene.versionId);
|
|
19933
|
+
}, [sortiert, policyVersionId]);
|
|
19730
19934
|
const gewaehlt = regeln.status === "ready" ? regeln.value.find((r) => r.versionId === policyVersionId) ?? null : null;
|
|
19731
19935
|
async function starten(folgt) {
|
|
19732
19936
|
if (!gewaehlt) {
|
|
@@ -19801,12 +20005,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19801
20005
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
19802
20006
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
19803
20007
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
19804
|
-
return /* @__PURE__ */ (0,
|
|
19805
|
-
/* @__PURE__ */ (0,
|
|
19806
|
-
/* @__PURE__ */ (0,
|
|
19807
|
-
/* @__PURE__ */ (0,
|
|
19808
|
-
/* @__PURE__ */ (0,
|
|
19809
|
-
/* @__PURE__ */ (0,
|
|
20008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
20009
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
20010
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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." }),
|
|
20011
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Beanstandung" }),
|
|
20013
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19810
20014
|
"textarea",
|
|
19811
20015
|
{
|
|
19812
20016
|
rows: 4,
|
|
@@ -19816,9 +20020,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19816
20020
|
}
|
|
19817
20021
|
)
|
|
19818
20022
|
] }),
|
|
19819
|
-
/* @__PURE__ */ (0,
|
|
19820
|
-
/* @__PURE__ */ (0,
|
|
19821
|
-
/* @__PURE__ */ (0,
|
|
20023
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20024
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
20025
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19822
20026
|
"textarea",
|
|
19823
20027
|
{
|
|
19824
20028
|
rows: 2,
|
|
@@ -19829,8 +20033,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19829
20033
|
}
|
|
19830
20034
|
)
|
|
19831
20035
|
] }),
|
|
19832
|
-
bilderFehlen && /* @__PURE__ */ (0,
|
|
19833
|
-
/* @__PURE__ */ (0,
|
|
20036
|
+
bilderFehlen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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." }),
|
|
20037
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19834
20038
|
"button",
|
|
19835
20039
|
{
|
|
19836
20040
|
type: "button",
|
|
@@ -19870,19 +20074,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19870
20074
|
setMeldung(ergebnis.message);
|
|
19871
20075
|
}
|
|
19872
20076
|
}
|
|
19873
|
-
return /* @__PURE__ */ (0,
|
|
19874
|
-
/* @__PURE__ */ (0,
|
|
19875
|
-
regeln.status === "loading" && /* @__PURE__ */ (0,
|
|
19876
|
-
regeln.status === "error" && /* @__PURE__ */ (0,
|
|
20077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
20078
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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." }),
|
|
20079
|
+
regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Regeln werden geladen \u2026" }),
|
|
20080
|
+
regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
19877
20081
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
19878
20082
|
regeln.message
|
|
19879
20083
|
] }),
|
|
19880
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0,
|
|
20084
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-empty", children: [
|
|
19881
20085
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
19882
|
-
/* @__PURE__ */ (0,
|
|
19883
|
-
') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie
|
|
20086
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "scene_derivation_policy" }),
|
|
20087
|
+
') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie eine unter \u201EErweitert" an, oder wechseln Sie in den Kontext, in dem Ihre Regel liegt. Regeln aus anderen Kontexten stehen hier bewusst nicht zur Auswahl.'
|
|
19884
20088
|
] }),
|
|
19885
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0,
|
|
20089
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19886
20090
|
"form",
|
|
19887
20091
|
{
|
|
19888
20092
|
className: "szenen-form",
|
|
@@ -19891,17 +20095,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19891
20095
|
void starten();
|
|
19892
20096
|
},
|
|
19893
20097
|
children: [
|
|
19894
|
-
/* @__PURE__ */ (0,
|
|
19895
|
-
/* @__PURE__ */ (0,
|
|
19896
|
-
/* @__PURE__ */ (0,
|
|
20098
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20099
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Regel" }),
|
|
20100
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19897
20101
|
"select",
|
|
19898
20102
|
{
|
|
19899
20103
|
value: policyVersionId,
|
|
19900
20104
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
19901
20105
|
"data-testid": "regel-auswahl",
|
|
19902
20106
|
children: [
|
|
19903
|
-
/* @__PURE__ */ (0,
|
|
19904
|
-
|
|
20107
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
20108
|
+
sortiert.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("option", { value: regel.versionId, children: [
|
|
19905
20109
|
regel.title,
|
|
19906
20110
|
" (",
|
|
19907
20111
|
regel.produces.join(", "),
|
|
@@ -19911,21 +20115,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19911
20115
|
}
|
|
19912
20116
|
)
|
|
19913
20117
|
] }),
|
|
19914
|
-
/* @__PURE__ */ (0,
|
|
19915
|
-
/* @__PURE__ */ (0,
|
|
19916
|
-
/* @__PURE__ */ (0,
|
|
20118
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20119
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Eingang" }),
|
|
20120
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19917
20121
|
"select",
|
|
19918
20122
|
{
|
|
19919
20123
|
value: modus,
|
|
19920
20124
|
onChange: (e) => setModus(e.target.value),
|
|
19921
20125
|
"data-testid": "modus-auswahl",
|
|
19922
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0,
|
|
20126
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
19923
20127
|
}
|
|
19924
20128
|
)
|
|
19925
20129
|
] }),
|
|
19926
|
-
modus !== "image" && /* @__PURE__ */ (0,
|
|
19927
|
-
/* @__PURE__ */ (0,
|
|
19928
|
-
/* @__PURE__ */ (0,
|
|
20130
|
+
modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20131
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Referenzprompt" }),
|
|
20132
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19929
20133
|
"textarea",
|
|
19930
20134
|
{
|
|
19931
20135
|
value: promptText,
|
|
@@ -19935,8 +20139,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19935
20139
|
}
|
|
19936
20140
|
)
|
|
19937
20141
|
] }),
|
|
19938
|
-
modus !== "prompt" && /* @__PURE__ */ (0,
|
|
19939
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
20142
|
+
modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
20143
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19940
20144
|
BildWaehler,
|
|
19941
20145
|
{
|
|
19942
20146
|
port,
|
|
@@ -19945,9 +20149,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19945
20149
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
19946
20150
|
}
|
|
19947
20151
|
),
|
|
19948
|
-
/* @__PURE__ */ (0,
|
|
19949
|
-
/* @__PURE__ */ (0,
|
|
19950
|
-
/* @__PURE__ */ (0,
|
|
20152
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20153
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
20154
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19951
20155
|
"input",
|
|
19952
20156
|
{
|
|
19953
20157
|
type: "file",
|
|
@@ -19957,40 +20161,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19957
20161
|
"data-testid": "bild-eingabe"
|
|
19958
20162
|
}
|
|
19959
20163
|
),
|
|
19960
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
20164
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
|
|
19961
20165
|
] })
|
|
19962
20166
|
] }),
|
|
19963
|
-
/* @__PURE__ */ (0,
|
|
20167
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
19964
20168
|
]
|
|
19965
20169
|
}
|
|
19966
20170
|
),
|
|
19967
|
-
meldung && /* @__PURE__ */ (0,
|
|
19968
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */ (0,
|
|
19969
|
-
/* @__PURE__ */ (0,
|
|
19970
|
-
/* @__PURE__ */ (0,
|
|
19971
|
-
/* @__PURE__ */ (0,
|
|
20171
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
20172
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
20173
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
|
|
20174
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
|
|
20175
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: lauf.failure?.class }),
|
|
19972
20176
|
" \u2014 ",
|
|
19973
20177
|
lauf.failure?.message
|
|
19974
20178
|
] }),
|
|
19975
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
19976
|
-
/* @__PURE__ */ (0,
|
|
19977
|
-
/* @__PURE__ */ (0,
|
|
20179
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
20180
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Befunde" }),
|
|
20181
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
19978
20182
|
] }),
|
|
19979
|
-
/* @__PURE__ */ (0,
|
|
19980
|
-
/* @__PURE__ */ (0,
|
|
19981
|
-
/* @__PURE__ */ (0,
|
|
19982
|
-
/* @__PURE__ */ (0,
|
|
20183
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
|
|
20184
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
|
|
20185
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
|
|
20186
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RecoveryPanel, { port, lauf }),
|
|
19983
20187
|
folgeblock(lauf)
|
|
19984
20188
|
] }),
|
|
19985
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0,
|
|
19986
|
-
/* @__PURE__ */ (0,
|
|
19987
|
-
/* @__PURE__ */ (0,
|
|
19988
|
-
/* @__PURE__ */ (0,
|
|
19989
|
-
/* @__PURE__ */ (0,
|
|
19990
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */ (0,
|
|
19991
|
-
/* @__PURE__ */ (0,
|
|
19992
|
-
/* @__PURE__ */ (0,
|
|
19993
|
-
/* @__PURE__ */ (0,
|
|
20189
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
20190
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Vorschlag" }),
|
|
20191
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
|
|
20192
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
|
|
20193
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
20194
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
20195
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
20196
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
|
|
20197
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: k.field }),
|
|
19994
20198
|
": Bild sagt \u201E",
|
|
19995
20199
|
k.from_image,
|
|
19996
20200
|
'", Prompt sagt \u201E',
|
|
@@ -19998,31 +20202,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19998
20202
|
'". Nichts davon wurde \xFCbernommen.'
|
|
19999
20203
|
] }, i)) })
|
|
20000
20204
|
] }),
|
|
20001
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0,
|
|
20002
|
-
/* @__PURE__ */ (0,
|
|
20003
|
-
/* @__PURE__ */ (0,
|
|
20004
|
-
/* @__PURE__ */ (0,
|
|
20205
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
20206
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Nicht ableitbar" }),
|
|
20207
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
|
|
20208
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: n.field }),
|
|
20005
20209
|
": ",
|
|
20006
20210
|
n.reason
|
|
20007
20211
|
] }, i)) })
|
|
20008
20212
|
] }),
|
|
20009
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */ (0,
|
|
20010
|
-
/* @__PURE__ */ (0,
|
|
20011
|
-
/* @__PURE__ */ (0,
|
|
20213
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
20214
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
|
|
20215
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: a }, i)) })
|
|
20012
20216
|
] }),
|
|
20013
20217
|
lauf.proposals.map((vorschlag) => {
|
|
20014
20218
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
20015
20219
|
const fertig = uebernommen[vorschlag.type];
|
|
20016
|
-
return /* @__PURE__ */ (0,
|
|
20220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
20017
20221
|
"article",
|
|
20018
20222
|
{
|
|
20019
20223
|
className: "szenen-proposal",
|
|
20020
20224
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
20021
20225
|
children: [
|
|
20022
|
-
/* @__PURE__ */ (0,
|
|
20023
|
-
!fertig && /* @__PURE__ */ (0,
|
|
20024
|
-
/* @__PURE__ */ (0,
|
|
20025
|
-
/* @__PURE__ */ (0,
|
|
20226
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: vorschlag.type }),
|
|
20227
|
+
!fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20228
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Titel" }),
|
|
20229
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
20026
20230
|
"input",
|
|
20027
20231
|
{
|
|
20028
20232
|
type: "text",
|
|
@@ -20036,9 +20240,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
20036
20240
|
}
|
|
20037
20241
|
)
|
|
20038
20242
|
] }),
|
|
20039
|
-
/* @__PURE__ */ (0,
|
|
20040
|
-
bezug && !fertig && /* @__PURE__ */ (0,
|
|
20041
|
-
/* @__PURE__ */ (0,
|
|
20243
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
20244
|
+
bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
20245
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
20042
20246
|
ReferencePicker,
|
|
20043
20247
|
{
|
|
20044
20248
|
port,
|
|
@@ -20052,30 +20256,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
20052
20256
|
}))
|
|
20053
20257
|
}
|
|
20054
20258
|
),
|
|
20055
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */ (0,
|
|
20259
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
20056
20260
|
"Zeigt auf Version ",
|
|
20057
|
-
/* @__PURE__ */ (0,
|
|
20261
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: referenzen[vorschlag.type] }),
|
|
20058
20262
|
"."
|
|
20059
20263
|
] }) : (
|
|
20060
20264
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
20061
20265
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
20062
20266
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
20063
|
-
/* @__PURE__ */ (0,
|
|
20267
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
20064
20268
|
"Diese ",
|
|
20065
|
-
/* @__PURE__ */ (0,
|
|
20269
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Einzel\xFCbernahme" }),
|
|
20066
20270
|
" braucht eine ver\xF6ffentlichte ",
|
|
20067
20271
|
bezug.refersTo,
|
|
20068
20272
|
"-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 ",
|
|
20069
|
-
/* @__PURE__ */ (0,
|
|
20273
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Draft-Kette" }),
|
|
20070
20274
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
20071
20275
|
] })
|
|
20072
20276
|
)
|
|
20073
20277
|
] }),
|
|
20074
|
-
fertig ? /* @__PURE__ */ (0,
|
|
20278
|
+
fertig ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-proposal__done", children: [
|
|
20075
20279
|
"Als Entwurf \xFCbernommen: ",
|
|
20076
|
-
/* @__PURE__ */ (0,
|
|
20280
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: fertig }),
|
|
20077
20281
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
20078
|
-
] }) : /* @__PURE__ */ (0,
|
|
20282
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
20079
20283
|
"button",
|
|
20080
20284
|
{
|
|
20081
20285
|
type: "button",
|
|
@@ -20090,13 +20294,337 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
20090
20294
|
vorschlag.type
|
|
20091
20295
|
);
|
|
20092
20296
|
}),
|
|
20093
|
-
/* @__PURE__ */ (0,
|
|
20094
|
-
/* @__PURE__ */ (0,
|
|
20297
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChainActions, { port, runId: lauf.run_id }),
|
|
20298
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
|
|
20095
20299
|
folgeblock(lauf)
|
|
20096
20300
|
] })
|
|
20097
20301
|
] });
|
|
20098
20302
|
};
|
|
20099
20303
|
|
|
20304
|
+
// src/features/szenen/areas/SceneArea.tsx
|
|
20305
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
20306
|
+
var SceneArea = ({ port, contextId }) => {
|
|
20307
|
+
const kannAbleiten = capabilitiesOf(port).derivation;
|
|
20308
|
+
const [ableiten, setAbleiten] = (0, import_react17.useState)(false);
|
|
20309
|
+
const zeigeDerive = kannAbleiten && ableiten;
|
|
20310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
20311
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-elements__toolbar", children: [
|
|
20312
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen und startet Prompt-L\xE4ufe." }),
|
|
20313
|
+
kannAbleiten && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20314
|
+
"button",
|
|
20315
|
+
{
|
|
20316
|
+
type: "button",
|
|
20317
|
+
className: "szenen-elements__new",
|
|
20318
|
+
"data-testid": "neu-aus-bild-text",
|
|
20319
|
+
"aria-expanded": ableiten,
|
|
20320
|
+
onClick: () => setAbleiten((offen) => !offen),
|
|
20321
|
+
children: ableiten ? "Zur\xFCck zu den Szenen" : "+ Neu aus Bild/Text"
|
|
20322
|
+
}
|
|
20323
|
+
)
|
|
20324
|
+
] }),
|
|
20325
|
+
!kannAbleiten && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-keine-rekonstruktion", children: "Aus Bild oder Text l\xE4sst sich in diesem Host keine Szene ableiten." }),
|
|
20326
|
+
zeigeDerive ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DeriveArea, { port, contextId }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
20327
|
+
] });
|
|
20328
|
+
};
|
|
20329
|
+
|
|
20330
|
+
// src/features/szenen/areas/AdvancedArea.tsx
|
|
20331
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
20332
|
+
var AdvancedArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-erweitert", "data-testid": "bereich-erweitert", children: [
|
|
20333
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "szenen-area__lead", children: "Optionale Pr\xE4zisierung: Bildaufbau und Shot, Kameras und Stile der Aufnahme, Zielmodelle, Rekonstruktionsregeln und Sequenzen. F\xFCr den normalen Weg von der Szene zum Bild wird hier nichts gebraucht." }),
|
|
20334
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20335
|
+
ElementsArea,
|
|
20336
|
+
{
|
|
20337
|
+
port,
|
|
20338
|
+
contextId,
|
|
20339
|
+
restrictToTypes: ERWEITERT_TYPES,
|
|
20340
|
+
allTypesLabel: "alle erweiterten Typen",
|
|
20341
|
+
listTitle: "Erweitert"
|
|
20342
|
+
}
|
|
20343
|
+
)
|
|
20344
|
+
] });
|
|
20345
|
+
|
|
20346
|
+
// src/features/szenen/areas/PromptsArea.tsx
|
|
20347
|
+
var import_react18 = require("react");
|
|
20348
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
20349
|
+
var HERKUNFT_TEXT2 = {
|
|
20350
|
+
published: "aus ver\xF6ffentlichtem Shot",
|
|
20351
|
+
draft_chain: "aus Draft-Kette",
|
|
20352
|
+
scene_direct: "direkt aus Szene",
|
|
20353
|
+
unresolved: "Herkunft unvollst\xE4ndig"
|
|
20354
|
+
};
|
|
20355
|
+
var PromptsArea = ({ port, contextId }) => {
|
|
20356
|
+
const faehig = capabilitiesOf(port);
|
|
20357
|
+
const [nachladen, setNachladen] = (0, import_react18.useState)(0);
|
|
20358
|
+
const [offen, setOffen] = (0, import_react18.useState)(null);
|
|
20359
|
+
const [alleKontexte, setAlleKontexte] = (0, import_react18.useState)(false);
|
|
20360
|
+
const [mitFehllaeufen, setMitFehllaeufen] = (0, import_react18.useState)(false);
|
|
20361
|
+
const [herkunft, setHerkunft] = (0, import_react18.useState)("alle");
|
|
20362
|
+
const [phase] = usePortQuery(
|
|
20363
|
+
() => port.runs.listAllRuns ? port.runs.listAllRuns({ status: "all" }) : Promise.resolve({
|
|
20364
|
+
kind: "ok",
|
|
20365
|
+
value: { runs: [], hiddenByStatus: 0, hiddenByContext: 0, withoutContext: 0 }
|
|
20366
|
+
}),
|
|
20367
|
+
[port, nachladen]
|
|
20368
|
+
);
|
|
20369
|
+
const alle = phase.status === "ready" ? phase.value.runs : [];
|
|
20370
|
+
const sicht = (0, import_react18.useMemo)(() => selectPromptRuns(alle, {
|
|
20371
|
+
status: mitFehllaeufen ? "all" : "succeeded",
|
|
20372
|
+
...alleKontexte ? {} : { contextId }
|
|
20373
|
+
}), [alle, mitFehllaeufen, alleKontexte, contextId]);
|
|
20374
|
+
const titel = useLaufTitel(port, alle);
|
|
20375
|
+
const gezeigt = (0, import_react18.useMemo)(
|
|
20376
|
+
() => herkunft === "alle" ? sicht.runs : sicht.runs.filter((lauf) => groupOf(lauf).kind === herkunft),
|
|
20377
|
+
[sicht.runs, herkunft]
|
|
20378
|
+
);
|
|
20379
|
+
if (!faehig.promptOverview) {
|
|
20380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "szenen-prompts", "data-testid": "prompts-bereich", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "hinweis-keine-promptsicht", children: "Dieser Host bietet keine herkunfts\xFCbergreifende Prompt-Liste an. Prompt-L\xE4ufe bleiben im Detail ihrer Szene bzw. ihres Shots erreichbar \u2014 es ist kein Fehler und kein vor\xFCbergehender Zustand." }) });
|
|
20381
|
+
}
|
|
20382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts", "data-testid": "prompts-bereich", children: [
|
|
20383
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts__toolbar", children: [
|
|
20384
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "szenen-prompts__heading", children: "Prompts" }),
|
|
20385
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20386
|
+
"Herkunft",
|
|
20387
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20388
|
+
"select",
|
|
20389
|
+
{
|
|
20390
|
+
"data-testid": "prompts-herkunft",
|
|
20391
|
+
value: herkunft,
|
|
20392
|
+
onChange: (e) => setHerkunft(e.target.value),
|
|
20393
|
+
children: [
|
|
20394
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "alle", children: "alle" }),
|
|
20395
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "published", children: HERKUNFT_TEXT2.published }),
|
|
20396
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "draft_chain", children: HERKUNFT_TEXT2.draft_chain }),
|
|
20397
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "scene_direct", children: HERKUNFT_TEXT2.scene_direct }),
|
|
20398
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "unresolved", children: HERKUNFT_TEXT2.unresolved })
|
|
20399
|
+
]
|
|
20400
|
+
}
|
|
20401
|
+
)
|
|
20402
|
+
] }),
|
|
20403
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20404
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20405
|
+
"input",
|
|
20406
|
+
{
|
|
20407
|
+
type: "checkbox",
|
|
20408
|
+
"data-testid": "prompts-alle-kontexte",
|
|
20409
|
+
checked: alleKontexte,
|
|
20410
|
+
onChange: (e) => setAlleKontexte(e.target.checked)
|
|
20411
|
+
}
|
|
20412
|
+
),
|
|
20413
|
+
"Alle Kontexte"
|
|
20414
|
+
] }),
|
|
20415
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20416
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20417
|
+
"input",
|
|
20418
|
+
{
|
|
20419
|
+
type: "checkbox",
|
|
20420
|
+
"data-testid": "prompts-mit-fehllaeufen",
|
|
20421
|
+
checked: mitFehllaeufen,
|
|
20422
|
+
onChange: (e) => setMitFehllaeufen(e.target.checked)
|
|
20423
|
+
}
|
|
20424
|
+
),
|
|
20425
|
+
"Fehll\xE4ufe zeigen"
|
|
20426
|
+
] })
|
|
20427
|
+
] }),
|
|
20428
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "prompts-laden", children: "Prompts werden geladen \u2026" }),
|
|
20429
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { "data-testid": "prompts-fehler", role: "alert", children: [
|
|
20430
|
+
"Prompts konnten nicht geladen werden: ",
|
|
20431
|
+
phase.message
|
|
20432
|
+
] }),
|
|
20433
|
+
phase.status === "ready" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
20434
|
+
gezeigt.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "keine-prompts", children: alle.length === 0 ? "Es gibt noch keinen Prompt-Lauf." : `Kein Prompt passt zu dieser Auswahl \u2014 von ${alle.length} vorhandenen L\xE4ufen bleibt keiner \xFCbrig.` }),
|
|
20435
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { "data-testid": "prompts-liste", children: gezeigt.map((lauf) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20436
|
+
PromptEintrag,
|
|
20437
|
+
{
|
|
20438
|
+
port,
|
|
20439
|
+
lauf,
|
|
20440
|
+
alle,
|
|
20441
|
+
titel: titel.get(lauf.run_id) ?? null,
|
|
20442
|
+
offen: lauf.run_id === offen,
|
|
20443
|
+
onUmschalten: () => setOffen(
|
|
20444
|
+
lauf.run_id === offen ? null : lauf.run_id
|
|
20445
|
+
),
|
|
20446
|
+
itemMoeglich: faehig.saveRunAsItem,
|
|
20447
|
+
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
20448
|
+
},
|
|
20449
|
+
lauf.run_id
|
|
20450
|
+
)) }),
|
|
20451
|
+
(sicht.hiddenByContext > 0 || sicht.withoutContext > 0 || sicht.hiddenByStatus > 0) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-prompts__ausgeblendet", "data-testid": "prompts-ausgeblendet", children: [
|
|
20452
|
+
sicht.hiddenByStatus > 0 && `${sicht.hiddenByStatus} Fehllauf/-l\xE4ufe ausgeblendet. `,
|
|
20453
|
+
sicht.hiddenByContext > 0 && `${sicht.hiddenByContext} Lauf/L\xE4ufe geh\xF6ren zu einem anderen Kontext. `,
|
|
20454
|
+
sicht.withoutContext > 0 && `${sicht.withoutContext} Lauf/L\xE4ufe nennen keinen Kontext und werden keinem zugeordnet \u2014 \u201EAlle Kontexte" zeigt sie. `
|
|
20455
|
+
] })
|
|
20456
|
+
] })
|
|
20457
|
+
] });
|
|
20458
|
+
};
|
|
20459
|
+
var PromptEintrag = ({ port, lauf, alle, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
20460
|
+
const gruppe = groupOf(lauf);
|
|
20461
|
+
const runde = roundOfRun(lauf, siblingsOf(lauf, alle));
|
|
20462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "szenen-prompts__eintrag", "data-testid": `prompt-${lauf.run_id}`, children: [
|
|
20463
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-prompts__herkunft", "data-testid": `herkunft-${lauf.run_id}`, children: [
|
|
20464
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "data-herkunft": gruppe.kind, children: HERKUNFT_TEXT2[gruppe.kind] }),
|
|
20465
|
+
gruppe.kind === "unresolved" && // D-75: Was nicht belegbar ist, wird benannt und nicht
|
|
20466
|
+
// durch eine plausible Kennung ersetzt.
|
|
20467
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "szenen-prompts__hinweis", children: [
|
|
20468
|
+
" \u2014 ",
|
|
20469
|
+
gruppe.reason
|
|
20470
|
+
] })
|
|
20471
|
+
] }),
|
|
20472
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: "szenen-prompts__lauf", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20473
|
+
RundenEintrag,
|
|
20474
|
+
{
|
|
20475
|
+
port,
|
|
20476
|
+
lauf,
|
|
20477
|
+
runde,
|
|
20478
|
+
titel,
|
|
20479
|
+
offen,
|
|
20480
|
+
onUmschalten,
|
|
20481
|
+
itemMoeglich,
|
|
20482
|
+
onItemGespeichert
|
|
20483
|
+
}
|
|
20484
|
+
) })
|
|
20485
|
+
] });
|
|
20486
|
+
};
|
|
20487
|
+
|
|
20488
|
+
// src/features/szenen/areas/MediaArea.tsx
|
|
20489
|
+
var import_react19 = require("react");
|
|
20490
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
20491
|
+
var leer = async () => ({ kind: "ok", value: [] });
|
|
20492
|
+
var MediaArea = ({ port }) => {
|
|
20493
|
+
const media = port.media;
|
|
20494
|
+
const [versionInput, setVersionInput] = (0, import_react19.useState)("");
|
|
20495
|
+
const [versionId, setVersionId] = (0, import_react19.useState)("");
|
|
20496
|
+
const [itemInput, setItemInput] = (0, import_react19.useState)("");
|
|
20497
|
+
const [itemId, setItemId] = (0, import_react19.useState)("");
|
|
20498
|
+
const [assetId, setAssetId] = (0, import_react19.useState)("");
|
|
20499
|
+
const [role, setRole] = (0, import_react19.useState)("reference");
|
|
20500
|
+
const [position, setPosition] = (0, import_react19.useState)("0");
|
|
20501
|
+
const [notiz, setNotiz] = (0, import_react19.useState)(null);
|
|
20502
|
+
const [busy, setBusy] = (0, import_react19.useState)(false);
|
|
20503
|
+
const [refresh, setRefresh] = (0, import_react19.useState)(0);
|
|
20504
|
+
const [versionPhase] = usePortQuery(
|
|
20505
|
+
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
20506
|
+
[media, versionId, refresh]
|
|
20507
|
+
);
|
|
20508
|
+
const [itemPhase] = usePortQuery(
|
|
20509
|
+
() => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
|
|
20510
|
+
[media, itemId, refresh]
|
|
20511
|
+
);
|
|
20512
|
+
const zuordnen = async () => {
|
|
20513
|
+
if (!versionInput.trim() || !assetId.trim()) {
|
|
20514
|
+
setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
|
|
20515
|
+
return;
|
|
20516
|
+
}
|
|
20517
|
+
const parsedPosition = Number(position);
|
|
20518
|
+
if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
|
|
20519
|
+
setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
|
|
20520
|
+
return;
|
|
20521
|
+
}
|
|
20522
|
+
setBusy(true);
|
|
20523
|
+
const result = await media.attachVersionMedium({
|
|
20524
|
+
versionId: versionInput.trim(),
|
|
20525
|
+
assetId: assetId.trim(),
|
|
20526
|
+
role,
|
|
20527
|
+
position: parsedPosition
|
|
20528
|
+
});
|
|
20529
|
+
setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
|
|
20530
|
+
if (result.kind === "ok") {
|
|
20531
|
+
setVersionId(versionInput.trim());
|
|
20532
|
+
setRefresh((value) => value + 1);
|
|
20533
|
+
}
|
|
20534
|
+
setBusy(false);
|
|
20535
|
+
};
|
|
20536
|
+
const entfernen = async (medium) => {
|
|
20537
|
+
setBusy(true);
|
|
20538
|
+
const result = await media.detachVersionMedium({
|
|
20539
|
+
versionId,
|
|
20540
|
+
assetId: medium.assetId,
|
|
20541
|
+
role: medium.role
|
|
20542
|
+
});
|
|
20543
|
+
setNotiz(noticeFor(result, "Referenzmedium entfernen"));
|
|
20544
|
+
if (result.kind === "ok") setRefresh((value) => value + 1);
|
|
20545
|
+
setBusy(false);
|
|
20546
|
+
};
|
|
20547
|
+
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
20548
|
+
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
20549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
20550
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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." }),
|
|
20551
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
|
|
20552
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Version" }),
|
|
20553
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
20554
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20555
|
+
"Version-ID",
|
|
20556
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
20557
|
+
] }),
|
|
20558
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
20559
|
+
] }),
|
|
20560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
20561
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20562
|
+
"Asset-ID",
|
|
20563
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
20564
|
+
] }),
|
|
20565
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20566
|
+
"Rolle",
|
|
20567
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
20568
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "reference", children: "reference" }),
|
|
20569
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "mask", children: "mask" }),
|
|
20570
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "palette", children: "palette" }),
|
|
20571
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "example", children: "example" })
|
|
20572
|
+
] })
|
|
20573
|
+
] }),
|
|
20574
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20575
|
+
"Position",
|
|
20576
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
20577
|
+
] }),
|
|
20578
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
20579
|
+
] }),
|
|
20580
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
20581
|
+
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
|
|
20582
|
+
"Versionsmedien konnten nicht geladen werden: ",
|
|
20583
|
+
versionPhase.message
|
|
20584
|
+
] }),
|
|
20585
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
20586
|
+
"Version ",
|
|
20587
|
+
versionId,
|
|
20588
|
+
" hat keine Medien."
|
|
20589
|
+
] }),
|
|
20590
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
20591
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
|
|
20592
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
20593
|
+
medium.role,
|
|
20594
|
+
" \xB7 Position ",
|
|
20595
|
+
medium.position
|
|
20596
|
+
] }),
|
|
20597
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
20598
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
20599
|
+
] }, `${medium.assetId}:${medium.role}`)) })
|
|
20600
|
+
] }),
|
|
20601
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
|
|
20602
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Item-Medien" }),
|
|
20603
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
20604
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20605
|
+
"Item-ID",
|
|
20606
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
20607
|
+
] }),
|
|
20608
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
20609
|
+
] }),
|
|
20610
|
+
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
|
|
20611
|
+
"Item-Medien konnten nicht geladen werden: ",
|
|
20612
|
+
itemPhase.message
|
|
20613
|
+
] }),
|
|
20614
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
20615
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
|
|
20616
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
20617
|
+
medium.role,
|
|
20618
|
+
" \xB7 Position ",
|
|
20619
|
+
medium.position
|
|
20620
|
+
] }),
|
|
20621
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
20622
|
+
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
20623
|
+
] }),
|
|
20624
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
20625
|
+
] });
|
|
20626
|
+
};
|
|
20627
|
+
|
|
20100
20628
|
// src/features/szenen/SzenenView.tsx
|
|
20101
20629
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
20102
20630
|
var SzenenView = ({
|
|
@@ -20105,9 +20633,9 @@ var SzenenView = ({
|
|
|
20105
20633
|
initialArea,
|
|
20106
20634
|
onAreaChange
|
|
20107
20635
|
}) => {
|
|
20108
|
-
const bereiche = (0,
|
|
20109
|
-
const faehig = (0,
|
|
20110
|
-
const [aktiv, setAktiv] = (0,
|
|
20636
|
+
const bereiche = (0, import_react20.useMemo)(() => areasFor(port), [port]);
|
|
20637
|
+
const faehig = (0, import_react20.useMemo)(() => capabilitiesOf(port), [port]);
|
|
20638
|
+
const [aktiv, setAktiv] = (0, import_react20.useState)(() => resolveArea(port, initialArea));
|
|
20111
20639
|
const wechsle = (id) => {
|
|
20112
20640
|
setAktiv(id);
|
|
20113
20641
|
onAreaChange?.(id);
|
|
@@ -20118,7 +20646,7 @@ var SzenenView = ({
|
|
|
20118
20646
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
20119
20647
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
20120
20648
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: "Bildprompt aus einer Szene" }),
|
|
20121
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children:
|
|
20649
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: 'Eine Szene anlegen oder aus Bild bzw. Text ableiten und daraus einen Prompt starten. Alle so entstandenen Prompts stehen mit ihren Bildern unter \u201EPrompts". Bausteine und Erweitertes pr\xE4zisieren den Weg, wenn er pr\xE4ziser werden soll.' })
|
|
20122
20650
|
] }),
|
|
20123
20651
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
20124
20652
|
] }),
|
|
@@ -20137,7 +20665,8 @@ var SzenenView = ({
|
|
|
20137
20665
|
bereich.id
|
|
20138
20666
|
)) }),
|
|
20139
20667
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
20140
|
-
aktiv === "
|
|
20668
|
+
aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
|
|
20669
|
+
aktiv === "prompts" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PromptsArea, { port, contextId }),
|
|
20141
20670
|
aktiv === "elements" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
20142
20671
|
ElementsArea,
|
|
20143
20672
|
{
|
|
@@ -20148,9 +20677,7 @@ var SzenenView = ({
|
|
|
20148
20677
|
listTitle: "Bausteine"
|
|
20149
20678
|
}
|
|
20150
20679
|
),
|
|
20151
|
-
aktiv === "
|
|
20152
|
-
aktiv === "setup" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SetupArea, { port, contextId }),
|
|
20153
|
-
aktiv === "shot" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShotArea, { port, contextId }),
|
|
20680
|
+
aktiv === "advanced" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AdvancedArea, { port, contextId }),
|
|
20154
20681
|
aktiv === "media" && port.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MediaArea, { port, contextId })
|
|
20155
20682
|
] }),
|
|
20156
20683
|
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "szenen-view__host-notes", children: [
|
|
@@ -20172,6 +20699,7 @@ var SzenenView = ({
|
|
|
20172
20699
|
DERIVABLE_TYPES,
|
|
20173
20700
|
ELEMENT_VERSION_SCHEMA_FILE,
|
|
20174
20701
|
FLOW_EXECUTION_PATH,
|
|
20702
|
+
GENERAL_POLICY_SUBTYPE,
|
|
20175
20703
|
MCP_CLIENT_PROVIDER,
|
|
20176
20704
|
PROBE_VERSION_ID,
|
|
20177
20705
|
PROMPT_RULE_EFFECT,
|
|
@@ -20246,6 +20774,7 @@ var SzenenView = ({
|
|
|
20246
20774
|
collectVersionRefs,
|
|
20247
20775
|
compileSchemas,
|
|
20248
20776
|
completePromptOperation,
|
|
20777
|
+
contextOfRun,
|
|
20249
20778
|
createBrowserTextGenerationPort,
|
|
20250
20779
|
createClientDerivationPort,
|
|
20251
20780
|
createClientRunPort,
|
|
@@ -20296,6 +20825,8 @@ var SzenenView = ({
|
|
|
20296
20825
|
generationBatchIdOf,
|
|
20297
20826
|
gesamtHerkunft,
|
|
20298
20827
|
getSzenenSchemas,
|
|
20828
|
+
groupKeyOf,
|
|
20829
|
+
groupOf,
|
|
20299
20830
|
gruppiereZuItems,
|
|
20300
20831
|
hasPlacementCapability,
|
|
20301
20832
|
isKnownElementType,
|
|
@@ -20317,6 +20848,7 @@ var SzenenView = ({
|
|
|
20317
20848
|
mergeSzenenBatchOrigin,
|
|
20318
20849
|
mimeTypAus,
|
|
20319
20850
|
mitDefaultVorlage,
|
|
20851
|
+
namingElementOf,
|
|
20320
20852
|
noticeFor,
|
|
20321
20853
|
ordersForPromptRun,
|
|
20322
20854
|
ordneSeedsZu,
|
|
@@ -20333,6 +20865,7 @@ var SzenenView = ({
|
|
|
20333
20865
|
recoveryStatusOf,
|
|
20334
20866
|
reduceElementEvents,
|
|
20335
20867
|
resolveArea,
|
|
20868
|
+
resolveGeneralScenePolicies,
|
|
20336
20869
|
resolvePreferredHead,
|
|
20337
20870
|
resolveScenePayload,
|
|
20338
20871
|
resolveShot,
|
|
@@ -20350,11 +20883,16 @@ var SzenenView = ({
|
|
|
20350
20883
|
runStoreDifferential,
|
|
20351
20884
|
sameResponseAs,
|
|
20352
20885
|
sceneOnlyCapabilities,
|
|
20886
|
+
scenePolicyFingerprint,
|
|
20353
20887
|
scopeOfPath,
|
|
20354
20888
|
seedFehlerText,
|
|
20889
|
+
selectPromptRuns,
|
|
20355
20890
|
selectableTargetModels,
|
|
20356
20891
|
showChain,
|
|
20892
|
+
siblingsOf,
|
|
20357
20893
|
simulatedAnswerFor,
|
|
20894
|
+
sortScenePolicies,
|
|
20895
|
+
sourceOf,
|
|
20358
20896
|
szenenSnapshotFilename,
|
|
20359
20897
|
totalModelCalls,
|
|
20360
20898
|
typAusBytes,
|