@rslsp1/fa-app-tools 7.2.0 → 8.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-5QA6DTJ6.mjs → chunk-VVGASAYT.mjs} +1620 -733
- package/dist/index.d.mts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +1487 -660
- package/dist/index.mjs +3 -3
- package/dist/szenen.d.mts +661 -9
- package/dist/szenen.d.ts +661 -9
- package/dist/szenen.js +1619 -578
- package/dist/szenen.mjs +163 -2
- package/package.json +6 -2
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
|
+
MCP_CLIENT_PROVIDER: () => MCP_CLIENT_PROVIDER,
|
|
43
44
|
PROBE_VERSION_ID: () => PROBE_VERSION_ID,
|
|
44
45
|
PROMPT_RULE_EFFECT: () => PROMPT_RULE_EFFECT,
|
|
45
46
|
REFERENCE_FIELD: () => REFERENCE_FIELD,
|
|
@@ -59,6 +60,7 @@ __export(szenen_exports, {
|
|
|
59
60
|
SZENEN_SNAPSHOT_SCHEMA_VERSION: () => SZENEN_SNAPSHOT_SCHEMA_VERSION,
|
|
60
61
|
SzenenView: () => SzenenView,
|
|
61
62
|
UNCHECKED_PUBLISH_RULES: () => UNCHECKED_PUBLISH_RULES,
|
|
63
|
+
UNVERIFIED_MODEL_ID: () => UNVERIFIED_MODEL_ID,
|
|
62
64
|
UPLOAD_MAX_BYTES: () => UPLOAD_MAX_BYTES,
|
|
63
65
|
UnsupportedSchemaError: () => UnsupportedSchemaError,
|
|
64
66
|
VersionDagError: () => VersionDagError,
|
|
@@ -100,14 +102,19 @@ __export(szenen_exports, {
|
|
|
100
102
|
checkSzenenBatchOrigin: () => checkSzenenBatchOrigin,
|
|
101
103
|
checkTitle: () => checkTitle,
|
|
102
104
|
checkWriteDraftInput: () => checkWriteDraftInput,
|
|
105
|
+
claimWon: () => claimWon,
|
|
103
106
|
collectImageBatches: () => collectImageBatches,
|
|
104
107
|
collectImageGenerationOrders: () => collectImageGenerationOrders,
|
|
108
|
+
collectImageJobs: () => collectImageJobs,
|
|
109
|
+
collectPromptOperations: () => collectPromptOperations,
|
|
105
110
|
collectPromptRuns: () => collectPromptRuns,
|
|
106
111
|
collectProviderChecks: () => collectProviderChecks,
|
|
107
112
|
collectSceneDerivationRecoveries: () => collectSceneDerivationRecoveries,
|
|
108
113
|
collectSceneDerivations: () => collectSceneDerivations,
|
|
109
114
|
collectVersionRefs: () => collectVersionRefs2,
|
|
110
115
|
compileSchemas: () => compileSchemas,
|
|
116
|
+
completePromptOperation: () => completePromptOperation,
|
|
117
|
+
contextOfRun: () => contextOfRun,
|
|
111
118
|
createBrowserTextGenerationPort: () => createBrowserTextGenerationPort,
|
|
112
119
|
createClientDerivationPort: () => createClientDerivationPort,
|
|
113
120
|
createClientRunPort: () => createClientRunPort,
|
|
@@ -125,6 +132,7 @@ __export(szenen_exports, {
|
|
|
125
132
|
createHfImageLibrary: () => createHfImageLibrary,
|
|
126
133
|
createHfImageStore: () => createHfImageStore,
|
|
127
134
|
createImageGenerationPort: () => createImageGenerationPort,
|
|
135
|
+
createImageJobPort: () => createImageJobPort,
|
|
128
136
|
createInMemoryEventChannel: () => createInMemoryEventChannel,
|
|
129
137
|
createMemoryViewPort: () => createMemoryViewPort,
|
|
130
138
|
createSimulationSceneDerivationPort: () => createSimulationSceneDerivationPort,
|
|
@@ -143,6 +151,8 @@ __export(szenen_exports, {
|
|
|
143
151
|
findExecutableImageModel: () => findExecutableImageModel,
|
|
144
152
|
findImageBatch: () => findImageBatch,
|
|
145
153
|
findImageGenerationOrder: () => findImageGenerationOrder,
|
|
154
|
+
findImageJob: () => findImageJob,
|
|
155
|
+
findPromptOperation: () => findPromptOperation,
|
|
146
156
|
findPromptRun: () => findPromptRun,
|
|
147
157
|
findProviderCheck: () => findProviderCheck,
|
|
148
158
|
findSceneDerivation: () => findSceneDerivation,
|
|
@@ -152,8 +162,11 @@ __export(szenen_exports, {
|
|
|
152
162
|
formatSeedListe: () => formatSeedListe,
|
|
153
163
|
freezeDraftChain: () => freezeDraftChain,
|
|
154
164
|
freezeSceneWorkingState: () => freezeSceneWorkingState,
|
|
165
|
+
generationBatchIdOf: () => generationBatchIdOf,
|
|
155
166
|
gesamtHerkunft: () => gesamtHerkunft,
|
|
156
167
|
getSzenenSchemas: () => getSzenenSchemas,
|
|
168
|
+
groupKeyOf: () => groupKeyOf,
|
|
169
|
+
groupOf: () => groupOf,
|
|
157
170
|
gruppiereZuItems: () => gruppiereZuItems,
|
|
158
171
|
hasPlacementCapability: () => hasPlacementCapability,
|
|
159
172
|
isKnownElementType: () => isKnownElementType,
|
|
@@ -163,14 +176,19 @@ __export(szenen_exports, {
|
|
|
163
176
|
istSzenenSnapshotDatei: () => istSzenenSnapshotDatei,
|
|
164
177
|
istZipDatei: () => istZipDatei,
|
|
165
178
|
itemIdForRun: () => itemIdForRun,
|
|
179
|
+
itemsAusBestand: () => itemsAusBestand,
|
|
180
|
+
jobsForPromptRun: () => jobsForPromptRun,
|
|
166
181
|
ladeVorschauen: () => ladeVorschauen,
|
|
167
182
|
leseBilderAusZip: () => leseBilderAusZip,
|
|
168
183
|
linkFor: () => linkFor,
|
|
184
|
+
locatorAus: () => locatorAus,
|
|
169
185
|
locatorTeile: () => locatorTeile,
|
|
170
186
|
logRevisionOf: () => logRevisionOf,
|
|
171
187
|
mergeSnapshotAndPending: () => mergeSnapshotAndPending,
|
|
172
188
|
mergeSzenenBatchOrigin: () => mergeSzenenBatchOrigin,
|
|
189
|
+
mimeTypAus: () => mimeTypAus,
|
|
173
190
|
mitDefaultVorlage: () => mitDefaultVorlage,
|
|
191
|
+
namingElementOf: () => namingElementOf,
|
|
174
192
|
noticeFor: () => noticeFor,
|
|
175
193
|
ordersForPromptRun: () => ordersForPromptRun,
|
|
176
194
|
ordneSeedsZu: () => ordneSeedsZu,
|
|
@@ -180,6 +198,7 @@ __export(szenen_exports, {
|
|
|
180
198
|
parseSzenenSnapshot: () => parseSzenenSnapshot,
|
|
181
199
|
preferredHeadRevisionOf: () => preferredHeadRevisionOf,
|
|
182
200
|
preferredVersionId: () => preferredVersionId,
|
|
201
|
+
preparePromptOperation: () => preparePromptOperation,
|
|
183
202
|
promptDiagnosticsOf: () => promptDiagnosticsOf,
|
|
184
203
|
publishedHeadsOf: () => publishedHeadsOf,
|
|
185
204
|
recoveriesForRun: () => recoveriesForRun,
|
|
@@ -192,19 +211,25 @@ __export(szenen_exports, {
|
|
|
192
211
|
resolveShotPayload: () => resolveShotPayload,
|
|
193
212
|
resolveTargetModelOver: () => resolveTargetModelOver,
|
|
194
213
|
resolverFromQueries: () => resolverFromQueries,
|
|
214
|
+
responseContractOf: () => responseContractOf,
|
|
195
215
|
roundOfRun: () => roundOfRun,
|
|
196
216
|
rulesWithoutPromptEffect: () => rulesWithoutPromptEffect,
|
|
197
217
|
runElementStoreContract: () => runElementStoreContract,
|
|
218
|
+
runOfOperation: () => runOfOperation,
|
|
198
219
|
runPromptDerivation: () => runPromptDerivation,
|
|
199
220
|
runPublishChecks: () => runPublishChecks,
|
|
200
221
|
runSceneDerivation: () => runSceneDerivation,
|
|
201
222
|
runStoreDifferential: () => runStoreDifferential,
|
|
223
|
+
sameResponseAs: () => sameResponseAs,
|
|
202
224
|
sceneOnlyCapabilities: () => sceneOnlyCapabilities,
|
|
203
225
|
scopeOfPath: () => scopeOfPath,
|
|
204
226
|
seedFehlerText: () => seedFehlerText,
|
|
227
|
+
selectPromptRuns: () => selectPromptRuns,
|
|
205
228
|
selectableTargetModels: () => selectableTargetModels,
|
|
206
229
|
showChain: () => showChain,
|
|
230
|
+
siblingsOf: () => siblingsOf,
|
|
207
231
|
simulatedAnswerFor: () => simulatedAnswerFor,
|
|
232
|
+
sourceOf: () => sourceOf,
|
|
208
233
|
szenenSnapshotFilename: () => szenenSnapshotFilename,
|
|
209
234
|
totalModelCalls: () => totalModelCalls,
|
|
210
235
|
typAusBytes: () => typAusBytes,
|
|
@@ -4806,11 +4831,11 @@ async function resolveShotPayload(input) {
|
|
|
4806
4831
|
};
|
|
4807
4832
|
}
|
|
4808
4833
|
const shot = shotPayload;
|
|
4809
|
-
for (const
|
|
4834
|
+
for (const fehler5 of ohneKettenReferenz(
|
|
4810
4835
|
validatePayload("shot", shotPayload).errors,
|
|
4811
4836
|
chain ? "scene_setup_ref" : null
|
|
4812
4837
|
)) {
|
|
4813
|
-
diagnostics.push(diagnosticOfSchemaError(
|
|
4838
|
+
diagnostics.push(diagnosticOfSchemaError(fehler5, `Shot ${shotElementId}`));
|
|
4814
4839
|
}
|
|
4815
4840
|
let setup = null;
|
|
4816
4841
|
let report = null;
|
|
@@ -4922,8 +4947,8 @@ async function resolveScenePayload(input) {
|
|
|
4922
4947
|
"Kein Scene Setup, kein Shot: Der Lauf entsteht aus der Szene allein. Bildaufbau, Kamera und Zielmodell wurden nicht ergaenzt, sondern sind nicht vorhanden (D-135)."
|
|
4923
4948
|
];
|
|
4924
4949
|
const diagnostics = [];
|
|
4925
|
-
for (const
|
|
4926
|
-
diagnostics.push(diagnosticOfSchemaError(
|
|
4950
|
+
for (const fehler5 of validatePayload("scene", scenePayload).errors) {
|
|
4951
|
+
diagnostics.push(diagnosticOfSchemaError(fehler5, `Szene ${sceneElementId}`));
|
|
4927
4952
|
}
|
|
4928
4953
|
const faehig = sceneOnlyCapabilities(scenePayload);
|
|
4929
4954
|
return komponiere({
|
|
@@ -5813,7 +5838,60 @@ var SZENEN_EVENT_TYPES = {
|
|
|
5813
5838
|
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig); gelesen
|
|
5814
5839
|
* wird mit `collectImageBatches` (`imageBatchStore.ts`).
|
|
5815
5840
|
*/
|
|
5816
|
-
imageBatchPersisted: "szenen.image_batch_persisted"
|
|
5841
|
+
imageBatchPersisted: "szenen.image_batch_persisted",
|
|
5842
|
+
/**
|
|
5843
|
+
* Ein vorbereiteter Promptvorgang — der Durchstich „Szene → ChatGPT → Lauf".
|
|
5844
|
+
*
|
|
5845
|
+
* Der bestehende Promptpfad ruft das Modell selbst
|
|
5846
|
+
* (`runPromptDerivation()`); ein aufrufendes Chatmodell formuliert dagegen
|
|
5847
|
+
* **zwischen** zwei Werkzeugaufrufen. Damit zerfaellt der eine Vorgang in
|
|
5848
|
+
* zwei, und der zweite braucht genau den Stand, den der erste eingefroren
|
|
5849
|
+
* hat — sonst loeste der Abschluss die inzwischen geaenderte Szene neu auf
|
|
5850
|
+
* und der Lauf behauptete eine Herkunft, die er nicht hat (D-22).
|
|
5851
|
+
*
|
|
5852
|
+
* Deshalb ein eigenes Ereignis und **kein** fluechtiger Prozesszustand: Der
|
|
5853
|
+
* Snapshot ueberlebt Neustart, Hostwechsel und Sitzungsende, weil er im
|
|
5854
|
+
* selben autoritativen Log liegt wie der Lauf, der daraus entsteht.
|
|
5855
|
+
*
|
|
5856
|
+
* Der Elementreducer ignoriert diesen Typ (`default:`-Zweig); gelesen wird
|
|
5857
|
+
* mit `collectPromptOperations` (`scenePromptOperation.ts`).
|
|
5858
|
+
*/
|
|
5859
|
+
promptOperationPrepared: "szenen.prompt_operation_prepared",
|
|
5860
|
+
/**
|
|
5861
|
+
* Ein Bildauftrag wartet auf einen ausfuehrenden Flow-Host.
|
|
5862
|
+
*
|
|
5863
|
+
* Die vorhandene Auftragshistorie (`imageGenerationStarted`) beginnt
|
|
5864
|
+
* **unmittelbar vor** dem Provideraufruf und kennt deshalb keinen wartenden
|
|
5865
|
+
* Auftrag. Genau der entsteht hier: Ein Chatmodell beauftragt ueber MCP ein
|
|
5866
|
+
* Bild, der Auftrag wird dauerhaft abgelegt, und der Werkzeugaufruf endet
|
|
5867
|
+
* sofort mit seiner Kennung — er haelt keine Antwort minutenlang offen.
|
|
5868
|
+
*
|
|
5869
|
+
* Traegt **keinen** Prompt: Der steht im referenzierten Lauf, und ihn hier
|
|
5870
|
+
* zu kopieren waere eine zweite Wahrheit ueber denselben eingefrorenen Text
|
|
5871
|
+
* (D-103).
|
|
5872
|
+
*/
|
|
5873
|
+
imageJobRequested: "szenen.image_job_requested",
|
|
5874
|
+
/**
|
|
5875
|
+
* Ein Flow-Host beansprucht einen wartenden Bildauftrag.
|
|
5876
|
+
*
|
|
5877
|
+
* Ein append-only Log kennt kein Lock: Zwei Tabs koennen beide anhaengen.
|
|
5878
|
+
* Deshalb ist die Uebernahme **nicht** der Append, sondern das Ergebnis
|
|
5879
|
+
* einer deterministischen Schiedsregel darueber (`winningClaimOf`) — der
|
|
5880
|
+
* erste Anspruch in Logreihenfolge gewinnt, und jeder Host liest nach
|
|
5881
|
+
* seinem Append erneut, bevor er einen bezahlten Provideraufruf startet.
|
|
5882
|
+
* Ein unterlegener Anspruch bleibt sichtbar stehen; er wird nicht geloescht,
|
|
5883
|
+
* weil das Log das nicht kann und weil der Versuch ein Beleg ist.
|
|
5884
|
+
*/
|
|
5885
|
+
imageJobClaimed: "szenen.image_job_claimed",
|
|
5886
|
+
/**
|
|
5887
|
+
* Der Bildauftrag ist erledigt — mit dem Ausgang, den der Host gesehen hat.
|
|
5888
|
+
*
|
|
5889
|
+
* Getrennt von `imageGenerationFinished`: Jenes gehoert zum bezahlten
|
|
5890
|
+
* Provideraufruf, dieses zur Zustellung. Ein Auftrag kann fehlschlagen,
|
|
5891
|
+
* **bevor** ein Provider gerufen wurde (abgelehntes Profil), und dann gibt
|
|
5892
|
+
* es kein `imageGenerationFinished`, das den Wartenden erloesen wuerde.
|
|
5893
|
+
*/
|
|
5894
|
+
imageJobSettled: "szenen.image_job_settled"
|
|
5817
5895
|
};
|
|
5818
5896
|
function sortForReplay(events) {
|
|
5819
5897
|
return [...events].sort((a, b) => {
|
|
@@ -6081,6 +6159,88 @@ function collectPromptRuns(events) {
|
|
|
6081
6159
|
function findPromptRun(events, runId) {
|
|
6082
6160
|
return collectPromptRuns(events).find((run) => run.run_id === runId) ?? null;
|
|
6083
6161
|
}
|
|
6162
|
+
var istKennung = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
6163
|
+
function groupOf(run) {
|
|
6164
|
+
const quelle = sourceOf(run);
|
|
6165
|
+
if (quelle.kind === "published") {
|
|
6166
|
+
return istKennung(quelle.shot_version_id) ? {
|
|
6167
|
+
kind: "published",
|
|
6168
|
+
key: `published:${quelle.shot_version_id}`,
|
|
6169
|
+
shot_version_id: quelle.shot_version_id
|
|
6170
|
+
} : {
|
|
6171
|
+
kind: "unresolved",
|
|
6172
|
+
key: `run:${run.run_id}`,
|
|
6173
|
+
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.`
|
|
6174
|
+
};
|
|
6175
|
+
}
|
|
6176
|
+
if (quelle.kind === "draft_chain") {
|
|
6177
|
+
return istKennung(quelle.chain_id) ? { kind: "draft_chain", key: `chain:${quelle.chain_id}`, chain_id: quelle.chain_id } : {
|
|
6178
|
+
kind: "unresolved",
|
|
6179
|
+
key: `run:${run.run_id}`,
|
|
6180
|
+
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.`
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
const elementId = quelle.scene?.element_id;
|
|
6184
|
+
return istKennung(elementId) ? { kind: "scene_direct", key: `scene:${elementId}`, scene_element_id: elementId } : {
|
|
6185
|
+
kind: "unresolved",
|
|
6186
|
+
key: `run:${run.run_id}`,
|
|
6187
|
+
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.`
|
|
6188
|
+
};
|
|
6189
|
+
}
|
|
6190
|
+
function groupKeyOf(run) {
|
|
6191
|
+
return groupOf(run).key;
|
|
6192
|
+
}
|
|
6193
|
+
function siblingsOf(run, alle) {
|
|
6194
|
+
const schluessel = groupKeyOf(run);
|
|
6195
|
+
return alle.filter((kandidat) => groupKeyOf(kandidat) === schluessel);
|
|
6196
|
+
}
|
|
6197
|
+
function namingElementOf(run) {
|
|
6198
|
+
const quelle = sourceOf(run);
|
|
6199
|
+
if (quelle.kind === "scene_direct") {
|
|
6200
|
+
return istKennung(quelle.scene?.element_id) ? quelle.scene.element_id : null;
|
|
6201
|
+
}
|
|
6202
|
+
if (quelle.kind === "draft_chain") {
|
|
6203
|
+
const szene = (quelle.nodes ?? []).find((knoten) => knoten?.type === "scene");
|
|
6204
|
+
if (szene && istKennung(szene.element_id)) return szene.element_id;
|
|
6205
|
+
const shot = (quelle.nodes ?? []).find((knoten) => knoten?.type === "shot");
|
|
6206
|
+
if (shot && istKennung(shot.element_id)) return shot.element_id;
|
|
6207
|
+
}
|
|
6208
|
+
return istKennung(run.shot_element_id) ? run.shot_element_id : null;
|
|
6209
|
+
}
|
|
6210
|
+
function contextOfRun(run) {
|
|
6211
|
+
const kette = run.input_payload?.context_chain;
|
|
6212
|
+
if (!Array.isArray(kette) || kette.length === 0) return void 0;
|
|
6213
|
+
const erstes = kette[0];
|
|
6214
|
+
if (erstes === null) return null;
|
|
6215
|
+
return istKennung(erstes) ? erstes : void 0;
|
|
6216
|
+
}
|
|
6217
|
+
function selectPromptRuns(alle, filter = {}) {
|
|
6218
|
+
const status = filter.status ?? "succeeded";
|
|
6219
|
+
const nachKontext = filter.contextId !== void 0;
|
|
6220
|
+
const runs = [];
|
|
6221
|
+
let hiddenByStatus = 0;
|
|
6222
|
+
let hiddenByContext = 0;
|
|
6223
|
+
let withoutContext = 0;
|
|
6224
|
+
for (const run of alle) {
|
|
6225
|
+
if (status !== "all" && run.status !== status) {
|
|
6226
|
+
hiddenByStatus += 1;
|
|
6227
|
+
continue;
|
|
6228
|
+
}
|
|
6229
|
+
if (nachKontext) {
|
|
6230
|
+
const kontext = contextOfRun(run);
|
|
6231
|
+
if (kontext === void 0) {
|
|
6232
|
+
withoutContext += 1;
|
|
6233
|
+
continue;
|
|
6234
|
+
}
|
|
6235
|
+
if (kontext !== filter.contextId) {
|
|
6236
|
+
hiddenByContext += 1;
|
|
6237
|
+
continue;
|
|
6238
|
+
}
|
|
6239
|
+
}
|
|
6240
|
+
runs.push(run);
|
|
6241
|
+
}
|
|
6242
|
+
return { runs, hiddenByStatus, hiddenByContext, withoutContext };
|
|
6243
|
+
}
|
|
6084
6244
|
|
|
6085
6245
|
// src/lib/szenen/derivationExamples.ts
|
|
6086
6246
|
var PROPOSAL_EXAMPLE = {
|
|
@@ -7648,7 +7808,10 @@ function deriveItemFromRun(input) {
|
|
|
7648
7808
|
kind: "rejected",
|
|
7649
7809
|
failure: {
|
|
7650
7810
|
class: "run_not_among_siblings",
|
|
7651
|
-
|
|
7811
|
+
// Regel 11: Die Meldung nennt die **Bezugsgruppe**, nicht ein Feld,
|
|
7812
|
+
// das bei einem shotlosen Lauf leer ist. „des Shots ''" war keine
|
|
7813
|
+
// Auskunft (P1-B).
|
|
7814
|
+
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.`
|
|
7652
7815
|
}
|
|
7653
7816
|
};
|
|
7654
7817
|
}
|
|
@@ -8379,9 +8542,9 @@ function mergeSnapshotAndPending(snapshot, pending, bereitsImSnapshot = 0) {
|
|
|
8379
8542
|
}
|
|
8380
8543
|
|
|
8381
8544
|
// src/lib/hfEventLog.ts
|
|
8382
|
-
function treeUrl(namespace, subdir = "") {
|
|
8545
|
+
function treeUrl(namespace, subdir = "", revision = "main") {
|
|
8383
8546
|
const parts = [namespace.replace(/\/$/, ""), subdir].filter(Boolean).join("/");
|
|
8384
|
-
return `${HF_BASE}/api/datasets/${HF_REPO}/tree
|
|
8547
|
+
return `${HF_BASE}/api/datasets/${HF_REPO}/tree/${encodeURIComponent(revision)}${parts ? "/" + parts : ""}`;
|
|
8385
8548
|
}
|
|
8386
8549
|
var DROSSEL_VERSUCHE = 4;
|
|
8387
8550
|
var DROSSEL_BASIS_MS = 400;
|
|
@@ -8414,8 +8577,8 @@ async function mitGeduld(anfrage) {
|
|
|
8414
8577
|
}
|
|
8415
8578
|
return letzte;
|
|
8416
8579
|
}
|
|
8417
|
-
async function hfListDir(namespace, subdir, token) {
|
|
8418
|
-
const res = await mitGeduld(() => holeMitZeitlimit(treeUrl(namespace, subdir), {
|
|
8580
|
+
async function hfListDir(namespace, subdir, token, revision = "main") {
|
|
8581
|
+
const res = await mitGeduld(() => holeMitZeitlimit(treeUrl(namespace, subdir, revision), {
|
|
8419
8582
|
headers: { Authorization: `Bearer ${token}` }
|
|
8420
8583
|
}));
|
|
8421
8584
|
if (res.status === 404) return [];
|
|
@@ -8444,17 +8607,46 @@ function toBase64(text) {
|
|
|
8444
8607
|
bytes.forEach((b) => binary += String.fromCharCode(b));
|
|
8445
8608
|
return btoa(binary);
|
|
8446
8609
|
}
|
|
8447
|
-
|
|
8610
|
+
var HfPreconditionFailedError = class extends Error {
|
|
8611
|
+
constructor(message) {
|
|
8612
|
+
super(message);
|
|
8613
|
+
this.name = "HfPreconditionFailed";
|
|
8614
|
+
}
|
|
8615
|
+
};
|
|
8616
|
+
async function hfRepoHead(token, revision = "main") {
|
|
8617
|
+
const res = await mitGeduld(() => holeMitZeitlimit(
|
|
8618
|
+
`${HF_BASE}/api/datasets/${HF_REPO}/revision/${encodeURIComponent(revision)}`,
|
|
8619
|
+
{ headers: { Authorization: `Bearer ${token}` } }
|
|
8620
|
+
));
|
|
8621
|
+
if (!res.ok) {
|
|
8622
|
+
throw new Error(`HF revision failed: ${res.status} ${res.statusText} (${revision})`);
|
|
8623
|
+
}
|
|
8624
|
+
const daten = await res.json();
|
|
8625
|
+
if (typeof daten.sha !== "string" || daten.sha.length === 0) {
|
|
8626
|
+
throw new Error(
|
|
8627
|
+
`HF revision ${revision}: die Antwort traegt kein "sha". Erhaltene Felder: ${Object.keys(daten || {}).join(", ") || "(keine)"}.`
|
|
8628
|
+
);
|
|
8629
|
+
}
|
|
8630
|
+
return daten.sha;
|
|
8631
|
+
}
|
|
8632
|
+
async function hfUploadSmallFile(repoPath, content, token, summary = `Update ${repoPath}`, options) {
|
|
8633
|
+
const kopf = { summary, description: "" };
|
|
8634
|
+
if (options?.parentCommit) kopf.parentCommit = options.parentCommit;
|
|
8448
8635
|
const res = await fetch(`${HF_BASE}/api/datasets/${HF_REPO}/commit/main`, {
|
|
8449
8636
|
method: "POST",
|
|
8450
8637
|
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/x-ndjson" },
|
|
8451
8638
|
body: [
|
|
8452
|
-
JSON.stringify({ key: "header", value:
|
|
8639
|
+
JSON.stringify({ key: "header", value: kopf }),
|
|
8453
8640
|
JSON.stringify({ key: "file", value: { path: repoPath, encoding: "base64", content: toBase64(content) } })
|
|
8454
8641
|
].join("\n")
|
|
8455
8642
|
});
|
|
8456
8643
|
if (!res.ok) {
|
|
8457
8644
|
const err = await res.text().catch(() => "");
|
|
8645
|
+
if (options?.parentCommit && (res.status === 412 || res.status === 409)) {
|
|
8646
|
+
throw new HfPreconditionFailedError(
|
|
8647
|
+
`HF commit abgelehnt: Der Branch hat sich seit ${options.parentCommit} bewegt (${res.status}). Es wurde nichts geschrieben.`
|
|
8648
|
+
);
|
|
8649
|
+
}
|
|
8458
8650
|
throw new Error(`HF upload failed: ${res.status} \u2014 ${err.slice(0, 200)}`);
|
|
8459
8651
|
}
|
|
8460
8652
|
}
|
|
@@ -8486,8 +8678,8 @@ async function mitBegrenzterParallelitaet(count, limit, task) {
|
|
|
8486
8678
|
await Promise.all(Array.from({ length: Math.min(limit, count) }, worker));
|
|
8487
8679
|
if (fehlerAufgetreten) throw ersterFehler;
|
|
8488
8680
|
}
|
|
8489
|
-
async function loadPendingEvents(namespace, token, sinceTs, knownPaths) {
|
|
8490
|
-
const files = await hfListDir(namespace, "events", token);
|
|
8681
|
+
async function loadPendingEvents(namespace, token, sinceTs, knownPaths, revision = "main") {
|
|
8682
|
+
const files = await hfListDir(namespace, "events", token, revision);
|
|
8491
8683
|
const pending = files.filter((f) => f.type === "file" && tsFromEventPath(f.path) > sinceTs && !knownPaths?.has(f.path)).sort((a, b) => a.path.localeCompare(b.path));
|
|
8492
8684
|
if (!pending.length) return [];
|
|
8493
8685
|
const raw = new Array(pending.length);
|
|
@@ -8529,7 +8721,13 @@ async function writeHFEvent(namespace, token, type, payload, prevTs, options) {
|
|
|
8529
8721
|
const suffix = options?.ordered ? `${String(++writeSeq % 1e6).padStart(6, "0")}${uuid}` : uuid;
|
|
8530
8722
|
const filename = `${tsToFilename(ts)}_${suffix}.json`;
|
|
8531
8723
|
const repoPath = `${namespace}events/${filename}`;
|
|
8532
|
-
await hfUploadSmallFile(
|
|
8724
|
+
await hfUploadSmallFile(
|
|
8725
|
+
repoPath,
|
|
8726
|
+
JSON.stringify(event, null, 2),
|
|
8727
|
+
token,
|
|
8728
|
+
`Event: ${type}`,
|
|
8729
|
+
options?.parentCommit ? { parentCommit: options.parentCommit } : void 0
|
|
8730
|
+
);
|
|
8533
8731
|
return event;
|
|
8534
8732
|
}
|
|
8535
8733
|
|
|
@@ -8541,7 +8739,7 @@ function createHfEventChannel(options) {
|
|
|
8541
8739
|
let syncInFlight = null;
|
|
8542
8740
|
let snapshot = null;
|
|
8543
8741
|
let snapshotGeladen = ohneSnapshot;
|
|
8544
|
-
const refresh = async () => {
|
|
8742
|
+
const refresh = async (revision = "main") => {
|
|
8545
8743
|
if (!snapshotGeladen) {
|
|
8546
8744
|
snapshot = await loadLatestSzenenSnapshot(namespace, token);
|
|
8547
8745
|
snapshotGeladen = true;
|
|
@@ -8549,7 +8747,7 @@ function createHfEventChannel(options) {
|
|
|
8549
8747
|
knownPaths.add(`${namespace}events/${name}`);
|
|
8550
8748
|
}
|
|
8551
8749
|
}
|
|
8552
|
-
const neue = await loadPendingEvents(namespace, token, sinceTs, knownPaths);
|
|
8750
|
+
const neue = await loadPendingEvents(namespace, token, sinceTs, knownPaths, revision);
|
|
8553
8751
|
if (neue.length) cachedRawEvents = [...cachedRawEvents, ...neue];
|
|
8554
8752
|
};
|
|
8555
8753
|
const sync = () => {
|
|
@@ -8560,16 +8758,34 @@ function createHfEventChannel(options) {
|
|
|
8560
8758
|
}
|
|
8561
8759
|
return syncInFlight;
|
|
8562
8760
|
};
|
|
8761
|
+
const sicht = () => {
|
|
8762
|
+
const pending = cachedRawEvents.filter((event) => typeof event.type === "string" && event.type.startsWith(SZENEN_EVENT_PREFIX)).map((event) => ({
|
|
8763
|
+
type: event.type,
|
|
8764
|
+
payload: event.payload,
|
|
8765
|
+
clientId: event.clientId,
|
|
8766
|
+
ts: event.ts
|
|
8767
|
+
}));
|
|
8768
|
+
return mergeSnapshotAndPending(snapshot, pending).events;
|
|
8769
|
+
};
|
|
8563
8770
|
return {
|
|
8564
8771
|
async readEvents() {
|
|
8565
8772
|
await sync();
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8773
|
+
return sicht();
|
|
8774
|
+
},
|
|
8775
|
+
async readHead() {
|
|
8776
|
+
return hfRepoHead(token);
|
|
8777
|
+
},
|
|
8778
|
+
async readEventsAt(revision) {
|
|
8779
|
+
await refresh(revision);
|
|
8780
|
+
return sicht();
|
|
8781
|
+
},
|
|
8782
|
+
async appendEventAt(type, payload, parentCommit) {
|
|
8783
|
+
if (!type.startsWith(SZENEN_EVENT_PREFIX)) {
|
|
8784
|
+
throw new Error(
|
|
8785
|
+
`Event-Typ "${type}" gehoert nicht zur Domain szenen. Der geteilte Kanal wird ueber das Praefix "${SZENEN_EVENT_PREFIX}" getrennt.`
|
|
8786
|
+
);
|
|
8787
|
+
}
|
|
8788
|
+
await writeHFEvent(namespace, token, type, payload, [], { ordered: true, parentCommit });
|
|
8573
8789
|
},
|
|
8574
8790
|
async appendEvent(type, payload) {
|
|
8575
8791
|
if (!type.startsWith(SZENEN_EVENT_PREFIX)) {
|
|
@@ -10142,7 +10358,11 @@ function capabilitiesOf(port) {
|
|
|
10142
10358
|
imageBatchHistory: typeof port.imageBatchHistory?.listBatchesForPromptRun === "function",
|
|
10143
10359
|
imageOrderHistory: typeof port.imageBatchHistory?.listOrdersForPromptRun === "function",
|
|
10144
10360
|
imageBatchWrite: typeof port.imageBatchWrite?.importBatch === "function",
|
|
10145
|
-
imageGeneration: typeof port.imageGeneration?.startFromPromptRun === "function"
|
|
10361
|
+
imageGeneration: typeof port.imageGeneration?.startFromPromptRun === "function",
|
|
10362
|
+
imageJobs: typeof port.imageJobs?.claimAndRun === "function",
|
|
10363
|
+
// P1-A: die herkunftsuebergreifende Prompt-Sicht. Ein Host ohne sie
|
|
10364
|
+
// verliert nur diesen Bereich — nicht die drei bestehenden Einstiege.
|
|
10365
|
+
promptOverview: typeof port.runs.listAllRuns === "function"
|
|
10146
10366
|
};
|
|
10147
10367
|
}
|
|
10148
10368
|
function unsupportedReason(capability) {
|
|
@@ -10476,6 +10696,44 @@ function gruppiereZuItems(bilder) {
|
|
|
10476
10696
|
items.sort((a, b) => b.juengstes - a.juengstes);
|
|
10477
10697
|
return items.map((e) => e.item);
|
|
10478
10698
|
}
|
|
10699
|
+
function locatorAus(itemId, position, anzahl) {
|
|
10700
|
+
return anzahl === 1 ? itemId : `${itemId}-${position}`;
|
|
10701
|
+
}
|
|
10702
|
+
function mimeTypAus(dateiname) {
|
|
10703
|
+
const n = dateiname.toLowerCase();
|
|
10704
|
+
if (n.endsWith(".png")) return "image/png";
|
|
10705
|
+
if (n.endsWith(".webp")) return "image/webp";
|
|
10706
|
+
return "image/jpeg";
|
|
10707
|
+
}
|
|
10708
|
+
function passt(item, suche) {
|
|
10709
|
+
const f = suche.trim().toLowerCase();
|
|
10710
|
+
if (!f) return true;
|
|
10711
|
+
return (item.title ?? "").toLowerCase().includes(f) || item.id.toLowerCase().includes(f);
|
|
10712
|
+
}
|
|
10713
|
+
function itemsAusBestand(items, options = {}) {
|
|
10714
|
+
const suche = options.search ?? "";
|
|
10715
|
+
const werke = [];
|
|
10716
|
+
const passende = items.filter((i) => i && typeof i.id === "string" && i.id.length > 0 && passt(i, suche)).sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0) || (a.id < b.id ? 1 : a.id > b.id ? -1 : 0));
|
|
10717
|
+
for (const item of passende) {
|
|
10718
|
+
const galerie = Array.isArray(item.gallery) ? item.gallery : [];
|
|
10719
|
+
const titel = item.title || item.id;
|
|
10720
|
+
const bilder = [];
|
|
10721
|
+
galerie.forEach((eintrag, position) => {
|
|
10722
|
+
const datei = eintrag?.file;
|
|
10723
|
+
if (!datei) return;
|
|
10724
|
+
bilder.push({
|
|
10725
|
+
mediaRef: locatorAus(item.id, position, galerie.length),
|
|
10726
|
+
title: galerie.length === 1 ? titel : `${titel} \xB7 Bild ${position + 1}`,
|
|
10727
|
+
mimeType: mimeTypAus(String(datei)),
|
|
10728
|
+
thumbUrl: options.thumbUrl ? options.thumbUrl(String(datei)) : null
|
|
10729
|
+
});
|
|
10730
|
+
});
|
|
10731
|
+
if (bilder.length === 0) continue;
|
|
10732
|
+
werke.push({ itemRef: item.id, title: titel, images: bilder });
|
|
10733
|
+
if (options.limit && werke.length >= options.limit) break;
|
|
10734
|
+
}
|
|
10735
|
+
return werke;
|
|
10736
|
+
}
|
|
10479
10737
|
|
|
10480
10738
|
// src/lib/szenen/hfImageLibrary.ts
|
|
10481
10739
|
function fehler(nachricht, retryable = false) {
|
|
@@ -11078,7 +11336,7 @@ function createMemoryViewPort(options = {}) {
|
|
|
11078
11336
|
const itemMedien = /* @__PURE__ */ new Map();
|
|
11079
11337
|
const runs = {
|
|
11080
11338
|
async listRunsForShot(shotVersionId) {
|
|
11081
|
-
return ok2(laeufe.filter((l) => l
|
|
11339
|
+
return ok2(laeufe.filter((l) => groupKeyOf(l) === `published:${shotVersionId}`));
|
|
11082
11340
|
},
|
|
11083
11341
|
async getRun(runId) {
|
|
11084
11342
|
return ok2(laeufe.find((l) => l.run_id === runId) ?? null);
|
|
@@ -11162,6 +11420,12 @@ function createMemoryViewPort(options = {}) {
|
|
|
11162
11420
|
return ok2(laeufe.filter(
|
|
11163
11421
|
(r) => r.source?.kind === "scene_direct" && r.source.scene.element_id === sceneElementId
|
|
11164
11422
|
));
|
|
11423
|
+
},
|
|
11424
|
+
// P1-A: die gemeinsame Sicht. Auch hier nur die **Form** — gefiltert wird
|
|
11425
|
+
// mit `selectPromptRuns()`, derselben Funktion wie im Client und im
|
|
11426
|
+
// Server. Ein eigener Filter waere eine zweite Wahrheit.
|
|
11427
|
+
async listAllRuns(filter) {
|
|
11428
|
+
return ok2(selectPromptRuns(laeufe, filter));
|
|
11165
11429
|
}
|
|
11166
11430
|
};
|
|
11167
11431
|
const itemPort = {
|
|
@@ -12276,8 +12540,13 @@ function createEventLogRunPersistence(channel) {
|
|
|
12276
12540
|
// Nur veroeffentlichte Laeufe. Ein Draft-Lauf hat eine **leere**
|
|
12277
12541
|
// shot_version_id (D-98) und wuerde bei der Suche nach '' sonst
|
|
12278
12542
|
// faelschlich mitkommen — eine stille Vermischung zweier Herkuenfte.
|
|
12543
|
+
//
|
|
12544
|
+
// Seit P1-B faellt die Entscheidung nicht mehr hier, sondern in
|
|
12545
|
+
// `groupKeyOf()`: dieselbe Regel, aus der auch die Geschwister und
|
|
12546
|
+
// damit die Rundennummer entstehen. Vorher stand sie hier **und**
|
|
12547
|
+
// — anders — in `domainService.getPromptRunWithSiblings()`.
|
|
12279
12548
|
value: collectPromptRuns(events).filter(
|
|
12280
|
-
(run) =>
|
|
12549
|
+
(run) => groupKeyOf(run) === `published:${shotVersionId}`
|
|
12281
12550
|
)
|
|
12282
12551
|
};
|
|
12283
12552
|
} catch (error) {
|
|
@@ -12299,10 +12568,9 @@ function createEventLogRunPersistence(channel) {
|
|
|
12299
12568
|
const events = await channel.readEvents();
|
|
12300
12569
|
return {
|
|
12301
12570
|
kind: "ok",
|
|
12302
|
-
value: collectPromptRuns(events).filter(
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
})
|
|
12571
|
+
value: collectPromptRuns(events).filter(
|
|
12572
|
+
(run) => groupKeyOf(run) === `chain:${chainId}`
|
|
12573
|
+
)
|
|
12306
12574
|
};
|
|
12307
12575
|
} catch (error) {
|
|
12308
12576
|
return queryError2(error, `Laeufe der Kette ${chainId} konnten nicht gelesen werden`);
|
|
@@ -12313,10 +12581,9 @@ function createEventLogRunPersistence(channel) {
|
|
|
12313
12581
|
const events = await channel.readEvents();
|
|
12314
12582
|
return {
|
|
12315
12583
|
kind: "ok",
|
|
12316
|
-
value: collectPromptRuns(events).filter(
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
})
|
|
12584
|
+
value: collectPromptRuns(events).filter(
|
|
12585
|
+
(run) => groupKeyOf(run) === `scene:${sceneElementId}`
|
|
12586
|
+
)
|
|
12320
12587
|
};
|
|
12321
12588
|
} catch (error) {
|
|
12322
12589
|
return queryError2(
|
|
@@ -12325,6 +12592,16 @@ function createEventLogRunPersistence(channel) {
|
|
|
12325
12592
|
);
|
|
12326
12593
|
}
|
|
12327
12594
|
},
|
|
12595
|
+
// P1-A: dieselbe Faltung, nur ohne Herkunftsfilter. Sie las schon bisher
|
|
12596
|
+
// in jedem der drei Fälle den **vollen** Log — hier fällt lediglich das
|
|
12597
|
+
// Aussieben weg.
|
|
12598
|
+
async listAll() {
|
|
12599
|
+
try {
|
|
12600
|
+
return { kind: "ok", value: collectPromptRuns(await channel.readEvents()) };
|
|
12601
|
+
} catch (error) {
|
|
12602
|
+
return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
|
|
12603
|
+
}
|
|
12604
|
+
},
|
|
12328
12605
|
async record(record) {
|
|
12329
12606
|
try {
|
|
12330
12607
|
await channel.appendEvent(SZENEN_EVENT_TYPES.promptRunRecorded, record);
|
|
@@ -12621,7 +12898,25 @@ function createClientRunPort(options) {
|
|
|
12621
12898
|
`Laeufe der Szene ${sceneElementId} konnten nicht gelesen werden`
|
|
12622
12899
|
);
|
|
12623
12900
|
}
|
|
12624
|
-
}
|
|
12901
|
+
},
|
|
12902
|
+
// ── Die gemeinsame Prompt-Sicht (P1-A) ────────────────────────────────
|
|
12903
|
+
//
|
|
12904
|
+
// Sie wird nur angeboten, wenn die **Persistenz** aufzählen kann. Ein
|
|
12905
|
+
// Host, dessen Speicher das nicht hergibt, bekommt hier keine Operation —
|
|
12906
|
+
// und die Ansicht nennt den Grund, statt eine leere Liste zu zeigen (§8).
|
|
12907
|
+
// Der Filter läuft über `selectPromptRuns()`, dieselbe Funktion, die auch
|
|
12908
|
+
// der Server benutzt; zwei Bezugsrahmen wären zwei Wahrheiten.
|
|
12909
|
+
...typeof runs.listAll === "function" ? {
|
|
12910
|
+
async listAllRuns(filter) {
|
|
12911
|
+
try {
|
|
12912
|
+
const alle = await runs.listAll();
|
|
12913
|
+
if (alle.kind !== "ok") return alle;
|
|
12914
|
+
return { kind: "ok", value: selectPromptRuns(alle.value, filter) };
|
|
12915
|
+
} catch (error) {
|
|
12916
|
+
return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
|
|
12917
|
+
}
|
|
12918
|
+
}
|
|
12919
|
+
} : {}
|
|
12625
12920
|
};
|
|
12626
12921
|
}
|
|
12627
12922
|
|
|
@@ -12669,8 +12964,8 @@ function createFlowImageProvider(generateImage) {
|
|
|
12669
12964
|
// Kein Seed: weder als Eingabe dokumentiert noch als Ausgabe
|
|
12670
12965
|
// geliefert — nichts wird erfunden (D-107).
|
|
12671
12966
|
});
|
|
12672
|
-
} catch (
|
|
12673
|
-
ersterFehler =
|
|
12967
|
+
} catch (fehler5) {
|
|
12968
|
+
ersterFehler = fehler5 instanceof Error ? fehler5.message : String(fehler5);
|
|
12674
12969
|
break;
|
|
12675
12970
|
}
|
|
12676
12971
|
}
|
|
@@ -12880,6 +13175,252 @@ function createHfImageBatchWrite(options) {
|
|
|
12880
13175
|
};
|
|
12881
13176
|
}
|
|
12882
13177
|
|
|
13178
|
+
// src/lib/szenen/imageJobStore.ts
|
|
13179
|
+
var istText7 = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
13180
|
+
var SETTLED_STATUS = ["succeeded", "partial", "failed", "rejected"];
|
|
13181
|
+
function collectImageJobs(events) {
|
|
13182
|
+
const nachId = /* @__PURE__ */ new Map();
|
|
13183
|
+
for (const event of events) {
|
|
13184
|
+
if (event.type !== SZENEN_EVENT_TYPES.imageJobRequested) continue;
|
|
13185
|
+
const payload = event.payload;
|
|
13186
|
+
if (!payload || !istText7(payload.job_id) || !istText7(payload.prompt_run_id)) continue;
|
|
13187
|
+
if (nachId.has(payload.job_id)) continue;
|
|
13188
|
+
nachId.set(payload.job_id, {
|
|
13189
|
+
job_id: payload.job_id,
|
|
13190
|
+
prompt_run_id: payload.prompt_run_id,
|
|
13191
|
+
execution_target_model_key: payload.execution_target_model_key ?? "",
|
|
13192
|
+
execution_profile_id: payload.execution_profile_id ?? "",
|
|
13193
|
+
image_count: typeof payload.image_count === "number" ? payload.image_count : 0,
|
|
13194
|
+
...payload.aspect_ratio ? { aspect_ratio: payload.aspect_ratio } : {},
|
|
13195
|
+
requested_by: payload.requested_by ?? "",
|
|
13196
|
+
store_id: payload.store_id ?? "",
|
|
13197
|
+
created_at: payload.created_at ?? "",
|
|
13198
|
+
status: "pending",
|
|
13199
|
+
claim_attempts: []
|
|
13200
|
+
});
|
|
13201
|
+
}
|
|
13202
|
+
for (const event of events) {
|
|
13203
|
+
if (event.type !== SZENEN_EVENT_TYPES.imageJobClaimed) continue;
|
|
13204
|
+
const payload = event.payload;
|
|
13205
|
+
if (!payload || !istText7(payload.job_id) || !istText7(payload.claim_id)) continue;
|
|
13206
|
+
const auftrag = nachId.get(payload.job_id);
|
|
13207
|
+
if (!auftrag) continue;
|
|
13208
|
+
const anspruch = {
|
|
13209
|
+
job_id: payload.job_id,
|
|
13210
|
+
claim_id: payload.claim_id,
|
|
13211
|
+
client_id: payload.client_id ?? "",
|
|
13212
|
+
claimed_at: payload.claimed_at ?? ""
|
|
13213
|
+
};
|
|
13214
|
+
nachId.set(payload.job_id, {
|
|
13215
|
+
...auftrag,
|
|
13216
|
+
claim: auftrag.claim ?? anspruch,
|
|
13217
|
+
claim_attempts: [...auftrag.claim_attempts, anspruch],
|
|
13218
|
+
status: auftrag.status === "pending" ? "claimed" : auftrag.status
|
|
13219
|
+
});
|
|
13220
|
+
}
|
|
13221
|
+
for (const event of events) {
|
|
13222
|
+
if (event.type !== SZENEN_EVENT_TYPES.imageJobSettled) continue;
|
|
13223
|
+
const payload = event.payload;
|
|
13224
|
+
if (!payload || !istText7(payload.job_id)) continue;
|
|
13225
|
+
const auftrag = nachId.get(payload.job_id);
|
|
13226
|
+
if (!auftrag) continue;
|
|
13227
|
+
if (!auftrag.claim || auftrag.claim.claim_id !== payload.claim_id) continue;
|
|
13228
|
+
if (auftrag.status !== "claimed") continue;
|
|
13229
|
+
if (!SETTLED_STATUS.includes(payload.status)) continue;
|
|
13230
|
+
nachId.set(payload.job_id, {
|
|
13231
|
+
...auftrag,
|
|
13232
|
+
status: payload.status,
|
|
13233
|
+
...payload.generation_batch_id ? { generation_batch_id: payload.generation_batch_id } : {},
|
|
13234
|
+
...payload.item_id ? { item_id: payload.item_id } : {},
|
|
13235
|
+
...typeof payload.produced_count === "number" ? { produced_count: payload.produced_count } : {},
|
|
13236
|
+
...payload.diagnostic ? { diagnostic: payload.diagnostic } : {},
|
|
13237
|
+
settled_at: payload.settled_at ?? ""
|
|
13238
|
+
});
|
|
13239
|
+
}
|
|
13240
|
+
return [...nachId.values()];
|
|
13241
|
+
}
|
|
13242
|
+
function jobsForPromptRun(events, runId) {
|
|
13243
|
+
return collectImageJobs(events).filter((j) => j.prompt_run_id === runId);
|
|
13244
|
+
}
|
|
13245
|
+
function findImageJob(events, jobId) {
|
|
13246
|
+
return collectImageJobs(events).find((j) => j.job_id === jobId) ?? null;
|
|
13247
|
+
}
|
|
13248
|
+
function claimWon(job, claimId) {
|
|
13249
|
+
return Boolean(job && job.claim && job.claim.claim_id === claimId);
|
|
13250
|
+
}
|
|
13251
|
+
function generationBatchIdOf(jobId) {
|
|
13252
|
+
return `job-${jobId}`;
|
|
13253
|
+
}
|
|
13254
|
+
|
|
13255
|
+
// src/lib/szenen/imageJobPort.ts
|
|
13256
|
+
var ANSPRUCH_VERSUCHE = 4;
|
|
13257
|
+
function fehler4(error, aktion) {
|
|
13258
|
+
return {
|
|
13259
|
+
message: `${aktion}: ${error instanceof Error ? error.message : String(error)}`
|
|
13260
|
+
};
|
|
13261
|
+
}
|
|
13262
|
+
function createImageJobPort(options) {
|
|
13263
|
+
const { channel, imageGeneration, storeId, clientId } = options;
|
|
13264
|
+
const newClaimId = options.newClaimId ?? (() => crypto.randomUUID());
|
|
13265
|
+
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
13266
|
+
return {
|
|
13267
|
+
async listJobs(runId) {
|
|
13268
|
+
try {
|
|
13269
|
+
return { kind: "ok", value: jobsForPromptRun(await channel.readEvents(), runId) };
|
|
13270
|
+
} catch (error) {
|
|
13271
|
+
return {
|
|
13272
|
+
kind: "error",
|
|
13273
|
+
...fehler4(error, `Die Bildauftraege des Laufs ${runId} konnten nicht gelesen werden`),
|
|
13274
|
+
retryable: true
|
|
13275
|
+
};
|
|
13276
|
+
}
|
|
13277
|
+
},
|
|
13278
|
+
async claimAndRun(jobId) {
|
|
13279
|
+
let letzterGrund = "";
|
|
13280
|
+
for (let versuch = 1; versuch <= ANSPRUCH_VERSUCHE; versuch += 1) {
|
|
13281
|
+
let kopf;
|
|
13282
|
+
try {
|
|
13283
|
+
kopf = await channel.readHead();
|
|
13284
|
+
} catch (error) {
|
|
13285
|
+
return {
|
|
13286
|
+
kind: "error",
|
|
13287
|
+
...fehler4(error, `Der Kopf-Commit des Bestands war nicht lesbar; Bildauftrag ${jobId} wurde nicht uebernommen`),
|
|
13288
|
+
retryable: true
|
|
13289
|
+
};
|
|
13290
|
+
}
|
|
13291
|
+
let auftrag;
|
|
13292
|
+
try {
|
|
13293
|
+
auftrag = findImageJob(await channel.readEventsAt(kopf), jobId);
|
|
13294
|
+
} catch (error) {
|
|
13295
|
+
return {
|
|
13296
|
+
kind: "error",
|
|
13297
|
+
...fehler4(error, `Der Bildauftrag ${jobId} konnte nicht gelesen werden`),
|
|
13298
|
+
retryable: true
|
|
13299
|
+
};
|
|
13300
|
+
}
|
|
13301
|
+
if (!auftrag) {
|
|
13302
|
+
return {
|
|
13303
|
+
kind: "rejected",
|
|
13304
|
+
message: `Der Bildauftrag ${jobId} steht nicht im autoritativen Log dieses Bestands.`
|
|
13305
|
+
};
|
|
13306
|
+
}
|
|
13307
|
+
if (auftrag.store_id !== storeId) {
|
|
13308
|
+
return {
|
|
13309
|
+
kind: "rejected",
|
|
13310
|
+
message: `Der Bildauftrag ${jobId} gilt fuer den Bestand "${auftrag.store_id}", dieser Host arbeitet auf "${storeId}". Nutzer, Umgebung und Bestand muessen zusammenpassen.`
|
|
13311
|
+
};
|
|
13312
|
+
}
|
|
13313
|
+
if (auftrag.status !== "pending") {
|
|
13314
|
+
return {
|
|
13315
|
+
kind: "lost",
|
|
13316
|
+
job: auftrag,
|
|
13317
|
+
message: `Der Bildauftrag ${jobId} ist bereits "${auftrag.status}"` + (auftrag.claim ? ` (Client ${auftrag.claim.client_id})` : "") + ". Er wird nicht erneut ausgefuehrt \u2014 ein zweiter Lauf waere ein zweites Mal bezahlte Rechenzeit."
|
|
13318
|
+
};
|
|
13319
|
+
}
|
|
13320
|
+
const anspruch = {
|
|
13321
|
+
job_id: jobId,
|
|
13322
|
+
claim_id: newClaimId(),
|
|
13323
|
+
client_id: clientId,
|
|
13324
|
+
claimed_at: now().toISOString()
|
|
13325
|
+
};
|
|
13326
|
+
try {
|
|
13327
|
+
await channel.appendEventAt(
|
|
13328
|
+
SZENEN_EVENT_TYPES.imageJobClaimed,
|
|
13329
|
+
anspruch,
|
|
13330
|
+
kopf
|
|
13331
|
+
);
|
|
13332
|
+
} catch (error) {
|
|
13333
|
+
if (istPreconditionFehler(error)) {
|
|
13334
|
+
letzterGrund = error instanceof Error ? error.message : String(error);
|
|
13335
|
+
continue;
|
|
13336
|
+
}
|
|
13337
|
+
return {
|
|
13338
|
+
kind: "error",
|
|
13339
|
+
...fehler4(error, `Der Anspruch auf Bildauftrag ${jobId} konnte nicht angehaengt werden`),
|
|
13340
|
+
retryable: true
|
|
13341
|
+
};
|
|
13342
|
+
}
|
|
13343
|
+
const gewonnen = {
|
|
13344
|
+
...auftrag,
|
|
13345
|
+
status: "claimed",
|
|
13346
|
+
claim: anspruch,
|
|
13347
|
+
claim_attempts: [...auftrag.claim_attempts, anspruch]
|
|
13348
|
+
};
|
|
13349
|
+
return await fuehreAus(gewonnen, anspruch, jobId);
|
|
13350
|
+
}
|
|
13351
|
+
return {
|
|
13352
|
+
kind: "error",
|
|
13353
|
+
message: `Der Bildauftrag ${jobId} liess sich in ${ANSPRUCH_VERSUCHE} Versuchen nicht exklusiv uebernehmen \u2014 der Bestand wird gerade von anderer Seite beschrieben (${letzterGrund}). Es wurde nichts ausgefuehrt und nichts bezahlt; ein neuer Versuch ist gefahrlos.`,
|
|
13354
|
+
retryable: true
|
|
13355
|
+
};
|
|
13356
|
+
}
|
|
13357
|
+
};
|
|
13358
|
+
async function fuehreAus(gewonnen, anspruch, jobId) {
|
|
13359
|
+
const ergebnis = await imageGeneration.startFromPromptRun({
|
|
13360
|
+
runId: gewonnen.prompt_run_id,
|
|
13361
|
+
generationBatchId: generationBatchIdOf(jobId),
|
|
13362
|
+
executionTargetModelKey: gewonnen.execution_target_model_key,
|
|
13363
|
+
executionProfileId: gewonnen.execution_profile_id,
|
|
13364
|
+
imageCount: gewonnen.image_count,
|
|
13365
|
+
...gewonnen.aspect_ratio ? { aspectRatio: gewonnen.aspect_ratio } : {}
|
|
13366
|
+
});
|
|
13367
|
+
const abschluss = {
|
|
13368
|
+
job_id: jobId,
|
|
13369
|
+
claim_id: anspruch.claim_id,
|
|
13370
|
+
...abschlussFelder(ergebnis, jobId),
|
|
13371
|
+
settled_at: now().toISOString()
|
|
13372
|
+
};
|
|
13373
|
+
try {
|
|
13374
|
+
await channel.appendEvent(SZENEN_EVENT_TYPES.imageJobSettled, abschluss);
|
|
13375
|
+
} catch {
|
|
13376
|
+
}
|
|
13377
|
+
const gelesen = await channel.readEvents().catch(() => null);
|
|
13378
|
+
return {
|
|
13379
|
+
kind: "ok",
|
|
13380
|
+
job: (gelesen && findImageJob(gelesen, jobId)) ?? {
|
|
13381
|
+
...gewonnen,
|
|
13382
|
+
status: abschluss.status,
|
|
13383
|
+
...abschluss.generation_batch_id ? { generation_batch_id: abschluss.generation_batch_id } : {},
|
|
13384
|
+
...abschluss.diagnostic ? { diagnostic: abschluss.diagnostic } : {},
|
|
13385
|
+
settled_at: abschluss.settled_at
|
|
13386
|
+
}
|
|
13387
|
+
};
|
|
13388
|
+
}
|
|
13389
|
+
}
|
|
13390
|
+
function istPreconditionFehler(error) {
|
|
13391
|
+
return Boolean(error && typeof error === "object" && error.name === "HfPreconditionFailed");
|
|
13392
|
+
}
|
|
13393
|
+
function abschlussFelder(ergebnis, jobId) {
|
|
13394
|
+
const batchId = generationBatchIdOf(jobId);
|
|
13395
|
+
switch (ergebnis.kind) {
|
|
13396
|
+
case "succeeded":
|
|
13397
|
+
return {
|
|
13398
|
+
status: "succeeded",
|
|
13399
|
+
generation_batch_id: batchId,
|
|
13400
|
+
item_id: ergebnis.batch.item_id,
|
|
13401
|
+
produced_count: ergebnis.batch.images.length
|
|
13402
|
+
};
|
|
13403
|
+
case "partial":
|
|
13404
|
+
return {
|
|
13405
|
+
status: "partial",
|
|
13406
|
+
generation_batch_id: batchId,
|
|
13407
|
+
item_id: ergebnis.batch.item_id,
|
|
13408
|
+
produced_count: ergebnis.produced,
|
|
13409
|
+
diagnostic: `Angefordert ${ergebnis.requested}, geliefert ${ergebnis.produced}.`
|
|
13410
|
+
};
|
|
13411
|
+
case "failed":
|
|
13412
|
+
return { status: "failed", produced_count: 0, diagnostic: ergebnis.message };
|
|
13413
|
+
case "unsupported":
|
|
13414
|
+
return {
|
|
13415
|
+
status: "rejected",
|
|
13416
|
+
produced_count: 0,
|
|
13417
|
+
diagnostic: `Zielmodell "${ergebnis.targetModelKey}" ist in dieser Umgebung nicht ausfuehrbar: ${ergebnis.reason}`
|
|
13418
|
+
};
|
|
13419
|
+
default:
|
|
13420
|
+
return { status: "rejected", produced_count: 0, diagnostic: ergebnis.message };
|
|
13421
|
+
}
|
|
13422
|
+
}
|
|
13423
|
+
|
|
12883
13424
|
// src/lib/szenen/flowViewPort.ts
|
|
12884
13425
|
var defaultContext = {
|
|
12885
13426
|
async chainFor(contextId) {
|
|
@@ -12978,10 +13519,21 @@ function createFlowSzenenViewPort(options) {
|
|
|
12978
13519
|
},
|
|
12979
13520
|
...options.now ? { now: options.now } : {}
|
|
12980
13521
|
}) : void 0;
|
|
13522
|
+
const kanalMitRevision = typeof channel.readHead === "function" && typeof channel.readEventsAt === "function" && typeof channel.appendEventAt === "function";
|
|
13523
|
+
const imageJobs = imageGeneration && hatHfZugangsdaten && kanalMitRevision ? createImageJobPort({
|
|
13524
|
+
channel,
|
|
13525
|
+
imageGeneration,
|
|
13526
|
+
// Dieselbe Form, in der der Server seinen Bestand kennt (`storeId`).
|
|
13527
|
+
storeId: `hf:${options.namespace}`,
|
|
13528
|
+
clientId: options.imageJobClientId ?? crypto.randomUUID(),
|
|
13529
|
+
...options.newImageJobClaimId ? { newClaimId: options.newImageJobClaimId } : {},
|
|
13530
|
+
...options.now ? { now: options.now } : {}
|
|
13531
|
+
}) : void 0;
|
|
12981
13532
|
const port = { elements, context, runs, derivation, imageBatchHistory };
|
|
12982
13533
|
if (imageLibrary) port.imageLibrary = imageLibrary;
|
|
12983
13534
|
if (imageBatchWrite) port.imageBatchWrite = imageBatchWrite;
|
|
12984
13535
|
if (imageGeneration) port.imageGeneration = imageGeneration;
|
|
13536
|
+
if (imageJobs) port.imageJobs = imageJobs;
|
|
12985
13537
|
return port;
|
|
12986
13538
|
}
|
|
12987
13539
|
|
|
@@ -13121,7 +13673,7 @@ var VERBOTEN_JE_HERKUNFT = {
|
|
|
13121
13673
|
draft_chain: ["shot_version_id", "scene_setup_version_id"],
|
|
13122
13674
|
scene_direct: ["shot_version_id", "shot_element_id", "scene_setup_version_id", "camera_id"]
|
|
13123
13675
|
};
|
|
13124
|
-
function
|
|
13676
|
+
function istText8(wert) {
|
|
13125
13677
|
return typeof wert === "string" && wert.trim().length > 0;
|
|
13126
13678
|
}
|
|
13127
13679
|
function isObject12(wert) {
|
|
@@ -13141,7 +13693,7 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13141
13693
|
}
|
|
13142
13694
|
if (quelle.kind === "published") {
|
|
13143
13695
|
for (const feld of ["shot_version_id", "scene_setup_version_id"]) {
|
|
13144
|
-
if (!
|
|
13696
|
+
if (!istText8(quelle[feld])) {
|
|
13145
13697
|
return { ok: false, message: `"source.${feld}" fehlt oder ist leer.` };
|
|
13146
13698
|
}
|
|
13147
13699
|
}
|
|
@@ -13152,11 +13704,11 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13152
13704
|
if (!isObject12(szene)) {
|
|
13153
13705
|
return { ok: false, message: '"source.scene" muss ein Objekt sein.' };
|
|
13154
13706
|
}
|
|
13155
|
-
if (!
|
|
13707
|
+
if (!istText8(szene.element_id)) {
|
|
13156
13708
|
return { ok: false, message: '"source.scene.element_id" fehlt oder ist leer.' };
|
|
13157
13709
|
}
|
|
13158
|
-
const ausEntwurf =
|
|
13159
|
-
const ausVersion =
|
|
13710
|
+
const ausEntwurf = istText8(szene.draft_id);
|
|
13711
|
+
const ausVersion = istText8(szene.version_id);
|
|
13160
13712
|
if (ausEntwurf === ausVersion) {
|
|
13161
13713
|
return {
|
|
13162
13714
|
ok: false,
|
|
@@ -13177,7 +13729,7 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13177
13729
|
}
|
|
13178
13730
|
return { ok: true };
|
|
13179
13731
|
}
|
|
13180
|
-
if (!
|
|
13732
|
+
if (!istText8(quelle.chain_id)) {
|
|
13181
13733
|
return { ok: false, message: '"source.chain_id" fehlt oder ist leer.' };
|
|
13182
13734
|
}
|
|
13183
13735
|
if (!Array.isArray(quelle.nodes) || quelle.nodes.length === 0) {
|
|
@@ -13196,7 +13748,7 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13196
13748
|
message: `"source.nodes[${index}].type" ist unbekannt: ${JSON.stringify(knoten.type)}.`
|
|
13197
13749
|
};
|
|
13198
13750
|
}
|
|
13199
|
-
if (!
|
|
13751
|
+
if (!istText8(knoten.element_id) || !istText8(knoten.draft_id)) {
|
|
13200
13752
|
return {
|
|
13201
13753
|
ok: false,
|
|
13202
13754
|
message: `"source.nodes[${index}]" braucht element_id und draft_id.`
|
|
@@ -13209,10 +13761,10 @@ function pruefeLaufherkunft(quelle) {
|
|
|
13209
13761
|
};
|
|
13210
13762
|
}
|
|
13211
13763
|
}
|
|
13212
|
-
if (quelle.derivation_run_id !== void 0 && !
|
|
13764
|
+
if (quelle.derivation_run_id !== void 0 && !istText8(quelle.derivation_run_id)) {
|
|
13213
13765
|
return { ok: false, message: '"source.derivation_run_id" ist gesetzt, aber leer.' };
|
|
13214
13766
|
}
|
|
13215
|
-
if (quelle.derivation_recovery_id !== void 0 && !
|
|
13767
|
+
if (quelle.derivation_recovery_id !== void 0 && !istText8(quelle.derivation_recovery_id)) {
|
|
13216
13768
|
return { ok: false, message: '"source.derivation_recovery_id" ist gesetzt, aber leer.' };
|
|
13217
13769
|
}
|
|
13218
13770
|
return { ok: true };
|
|
@@ -13232,7 +13784,7 @@ function checkPromptRunRecord(candidate) {
|
|
|
13232
13784
|
}
|
|
13233
13785
|
const herkunft = isObject12(quelle) && typeof quelle.kind === "string" ? quelle.kind : "published";
|
|
13234
13786
|
for (const feld of PFLICHTFELDER) {
|
|
13235
|
-
if (!
|
|
13787
|
+
if (!istText8(record[feld])) {
|
|
13236
13788
|
return { ok: false, message: `"${feld}" fehlt oder ist leer.` };
|
|
13237
13789
|
}
|
|
13238
13790
|
}
|
|
@@ -13245,7 +13797,7 @@ function checkPromptRunRecord(candidate) {
|
|
|
13245
13797
|
}
|
|
13246
13798
|
}
|
|
13247
13799
|
for (const feld of PFLICHT_JE_HERKUNFT[herkunft] ?? []) {
|
|
13248
|
-
if (!
|
|
13800
|
+
if (!istText8(record[feld])) {
|
|
13249
13801
|
return {
|
|
13250
13802
|
ok: false,
|
|
13251
13803
|
message: `"${feld}" fehlt oder ist leer, wird bei Herkunft "${herkunft}" aber gebraucht.`
|
|
@@ -13253,7 +13805,7 @@ function checkPromptRunRecord(candidate) {
|
|
|
13253
13805
|
}
|
|
13254
13806
|
}
|
|
13255
13807
|
for (const feld of VERBOTEN_JE_HERKUNFT[herkunft] ?? []) {
|
|
13256
|
-
if (
|
|
13808
|
+
if (istText8(record[feld])) {
|
|
13257
13809
|
return {
|
|
13258
13810
|
ok: false,
|
|
13259
13811
|
message: `"${feld}" ist bei einem Lauf der Herkunft "${herkunft}" gesetzt. Dort gibt es diesen Wert nicht, und erfundene sind unzulaessig (D-98/D-135).`
|
|
@@ -13290,7 +13842,7 @@ function checkPromptRunRecord(candidate) {
|
|
|
13290
13842
|
message: `"failure.class" ist unbekannt: ${JSON.stringify(failure.class)}. Erlaubt sind ${FAILURE_CLASSES.join(", ")}.`
|
|
13291
13843
|
};
|
|
13292
13844
|
}
|
|
13293
|
-
if (!
|
|
13845
|
+
if (!istText8(failure.message)) {
|
|
13294
13846
|
return { ok: false, message: '"failure.message" fehlt oder ist leer.' };
|
|
13295
13847
|
}
|
|
13296
13848
|
return { ok: true };
|
|
@@ -13332,7 +13884,7 @@ function checkSceneDerivationRecord(candidate) {
|
|
|
13332
13884
|
}
|
|
13333
13885
|
const record = candidate;
|
|
13334
13886
|
for (const feld of DERIVATION_PFLICHTFELDER) {
|
|
13335
|
-
if (!
|
|
13887
|
+
if (!istText8(record[feld])) {
|
|
13336
13888
|
return { ok: false, message: `"${feld}" fehlt oder ist leer.` };
|
|
13337
13889
|
}
|
|
13338
13890
|
}
|
|
@@ -13387,13 +13939,13 @@ function checkSceneDerivationRecord(candidate) {
|
|
|
13387
13939
|
return { ok: false, message: '"follows" muss ein Objekt sein.' };
|
|
13388
13940
|
}
|
|
13389
13941
|
const f = folgt;
|
|
13390
|
-
if (!
|
|
13942
|
+
if (!istText8(f.run_id)) {
|
|
13391
13943
|
return { ok: false, message: '"follows.run_id" fehlt oder ist leer.' };
|
|
13392
13944
|
}
|
|
13393
13945
|
if (f.run_id === record.run_id) {
|
|
13394
13946
|
return { ok: false, message: '"follows.run_id" zeigt auf den Lauf selbst.' };
|
|
13395
13947
|
}
|
|
13396
|
-
if (!
|
|
13948
|
+
if (!istText8(f.note)) {
|
|
13397
13949
|
return {
|
|
13398
13950
|
ok: false,
|
|
13399
13951
|
message: '"follows.note" fehlt oder ist leer \u2014 ohne Beanstandung ist ein Folgelauf nicht nachvollziehbar (D-89).'
|
|
@@ -13407,7 +13959,7 @@ function checkSceneDerivationRecord(candidate) {
|
|
|
13407
13959
|
}
|
|
13408
13960
|
}
|
|
13409
13961
|
const reply = record.reply;
|
|
13410
|
-
if (reply !== void 0 && !
|
|
13962
|
+
if (reply !== void 0 && !istText8(reply)) {
|
|
13411
13963
|
return {
|
|
13412
13964
|
ok: false,
|
|
13413
13965
|
message: `"reply" ist unbrauchbar: erwartet wird eine nicht leere Zeichenkette, angekommen ist ${JSON.stringify(reply)}. Ohne "reply" einreichen ist zulaessig.`
|
|
@@ -13427,7 +13979,7 @@ function checkSceneDerivationRecord(candidate) {
|
|
|
13427
13979
|
message: `"failure.class" ist unbekannt: ${JSON.stringify(failure.class)}. Erlaubt sind ${FAILURE_CLASSES.join(", ")}.`
|
|
13428
13980
|
};
|
|
13429
13981
|
}
|
|
13430
|
-
if (!
|
|
13982
|
+
if (!istText8(failure.message)) {
|
|
13431
13983
|
return { ok: false, message: '"failure.message" fehlt oder ist leer.' };
|
|
13432
13984
|
}
|
|
13433
13985
|
if (Array.isArray(record.proposals) && record.proposals.length > 0) {
|
|
@@ -13482,7 +14034,7 @@ function checkSceneDerivationRecord(candidate) {
|
|
|
13482
14034
|
};
|
|
13483
14035
|
}
|
|
13484
14036
|
for (const [gapIndex, luecke] of gaps.entries()) {
|
|
13485
|
-
if (!luecke || typeof luecke !== "object" || !
|
|
14037
|
+
if (!luecke || typeof luecke !== "object" || !istText8(luecke.pointer) || !istText8(luecke.reason)) {
|
|
13486
14038
|
return {
|
|
13487
14039
|
ok: false,
|
|
13488
14040
|
message: `"proposals[${index}].gaps[${gapIndex}]" braucht pointer und reason.`
|
|
@@ -13508,7 +14060,7 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13508
14060
|
}
|
|
13509
14061
|
const record = candidate;
|
|
13510
14062
|
for (const feld of ["recovery_id", "run_id", "created_at"]) {
|
|
13511
|
-
if (!
|
|
14063
|
+
if (!istText8(record[feld])) {
|
|
13512
14064
|
return { ok: false, message: `"${feld}" fehlt oder ist leer.` };
|
|
13513
14065
|
}
|
|
13514
14066
|
}
|
|
@@ -13535,7 +14087,7 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13535
14087
|
return { ok: false, message: '"diagnostics" muss ein Array sein (auch ein leeres).' };
|
|
13536
14088
|
}
|
|
13537
14089
|
for (const [index, befund] of record.diagnostics.entries()) {
|
|
13538
|
-
if (!befund || typeof befund !== "object" || !
|
|
14090
|
+
if (!befund || typeof befund !== "object" || !istText8(befund.code) || !istText8(befund.message)) {
|
|
13539
14091
|
return {
|
|
13540
14092
|
ok: false,
|
|
13541
14093
|
message: `"diagnostics[${index}]" braucht code und message.`
|
|
@@ -13587,7 +14139,7 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13587
14139
|
}
|
|
13588
14140
|
if (Array.isArray(gaps)) {
|
|
13589
14141
|
for (const [gapIndex, luecke] of gaps.entries()) {
|
|
13590
|
-
if (!luecke || typeof luecke !== "object" || !
|
|
14142
|
+
if (!luecke || typeof luecke !== "object" || !istText8(luecke.pointer) || !istText8(luecke.reason)) {
|
|
13591
14143
|
return {
|
|
13592
14144
|
ok: false,
|
|
13593
14145
|
message: `"proposals[${index}].gaps[${gapIndex}]" braucht pointer und reason.`
|
|
@@ -13623,6 +14175,120 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13623
14175
|
return { ok: true };
|
|
13624
14176
|
}
|
|
13625
14177
|
|
|
14178
|
+
// src/lib/szenen/scenePromptOperation.ts
|
|
14179
|
+
var MCP_CLIENT_PROVIDER = "mcp_client";
|
|
14180
|
+
var UNVERIFIED_MODEL_ID = "mcp-client-unspecified";
|
|
14181
|
+
var istText9 = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
14182
|
+
function collectPromptOperations(events) {
|
|
14183
|
+
const nachId = /* @__PURE__ */ new Map();
|
|
14184
|
+
for (const event of events) {
|
|
14185
|
+
if (event.type !== SZENEN_EVENT_TYPES.promptOperationPrepared) continue;
|
|
14186
|
+
const payload = event.payload;
|
|
14187
|
+
if (!payload || !istText9(payload.operation_id)) continue;
|
|
14188
|
+
if (nachId.has(payload.operation_id)) continue;
|
|
14189
|
+
nachId.set(payload.operation_id, payload);
|
|
14190
|
+
}
|
|
14191
|
+
return [...nachId.values()];
|
|
14192
|
+
}
|
|
14193
|
+
function findPromptOperation(events, operationId) {
|
|
14194
|
+
return collectPromptOperations(events).find((v) => v.operation_id === operationId) ?? null;
|
|
14195
|
+
}
|
|
14196
|
+
async function preparePromptOperation(input) {
|
|
14197
|
+
const now = input.now ?? (() => /* @__PURE__ */ new Date());
|
|
14198
|
+
const eingefroren = await freezeSceneWorkingState({
|
|
14199
|
+
sceneElementId: input.sceneElementId,
|
|
14200
|
+
store: input.store,
|
|
14201
|
+
resolver: input.resolver,
|
|
14202
|
+
contextChain: input.contextChain,
|
|
14203
|
+
userInstruction: input.userInstruction ?? null
|
|
14204
|
+
});
|
|
14205
|
+
if (eingefroren.kind !== "ok") return eingefroren;
|
|
14206
|
+
const rendererInput = eingefroren.input;
|
|
14207
|
+
return {
|
|
14208
|
+
kind: "ok",
|
|
14209
|
+
operation: {
|
|
14210
|
+
operation_id: input.operationId,
|
|
14211
|
+
scene: eingefroren.scene,
|
|
14212
|
+
context_id: input.contextId,
|
|
14213
|
+
user_instruction: input.userInstruction ?? null,
|
|
14214
|
+
renderer_input: rendererInput,
|
|
14215
|
+
renderer_instruction: buildSystemInstruction(rendererInput),
|
|
14216
|
+
renderer_payload: buildUserPrompt(rendererInput),
|
|
14217
|
+
response_contract: responseContractOf(rendererInput),
|
|
14218
|
+
prepared_by: input.preparedBy,
|
|
14219
|
+
created_at: now().toISOString()
|
|
14220
|
+
}
|
|
14221
|
+
};
|
|
14222
|
+
}
|
|
14223
|
+
function responseContractOf(input) {
|
|
14224
|
+
const model = input.target_model ?? {};
|
|
14225
|
+
return {
|
|
14226
|
+
format: "json",
|
|
14227
|
+
required_fields: ["positive", "negative", "feedback", "visibility", "notes"],
|
|
14228
|
+
negative_prompt_allowed: model.supports_negative_prompt === true,
|
|
14229
|
+
node_ids: input.scene.nodes.map((node) => node.node_id),
|
|
14230
|
+
prompt_language: typeof model.prompt_language === "string" ? model.prompt_language : "en"
|
|
14231
|
+
};
|
|
14232
|
+
}
|
|
14233
|
+
function completePromptOperation(input) {
|
|
14234
|
+
const now = input.now ?? (() => /* @__PURE__ */ new Date());
|
|
14235
|
+
const { operation } = input;
|
|
14236
|
+
const geparst = parseRunResponse(input.response);
|
|
14237
|
+
if (!geparst.ok) {
|
|
14238
|
+
return {
|
|
14239
|
+
kind: "rejected",
|
|
14240
|
+
message: `Die Antwort zu Vorgang ${operation.operation_id} ist nicht verwertbar: ${geparst.message}`
|
|
14241
|
+
};
|
|
14242
|
+
}
|
|
14243
|
+
const geprueft = checkRunResponse(geparst.value, operation.renderer_input);
|
|
14244
|
+
if (!geprueft.ok) {
|
|
14245
|
+
return {
|
|
14246
|
+
kind: "rejected",
|
|
14247
|
+
message: `Die Antwort zu Vorgang ${operation.operation_id} passt nicht zur eingefrorenen Eingabe: ${geprueft.message}`
|
|
14248
|
+
};
|
|
14249
|
+
}
|
|
14250
|
+
const origin = {
|
|
14251
|
+
host: "mcp",
|
|
14252
|
+
...istText9(input.declaredModelId) ? { declared_model_id: input.declaredModelId } : {},
|
|
14253
|
+
renderer_instruction_was_system_prompt: false
|
|
14254
|
+
};
|
|
14255
|
+
return {
|
|
14256
|
+
kind: "ok",
|
|
14257
|
+
record: {
|
|
14258
|
+
run_id: input.runId,
|
|
14259
|
+
// Keine fingierten Kennungen (D-98/D-75) — genau wie beim
|
|
14260
|
+
// Szene-Direktlauf des bestehenden Pfads.
|
|
14261
|
+
shot_version_id: "",
|
|
14262
|
+
shot_element_id: "",
|
|
14263
|
+
scene_setup_version_id: "",
|
|
14264
|
+
camera_id: "",
|
|
14265
|
+
target_model_version_id: operation.renderer_input.target_model_resolution?.version_id ?? "",
|
|
14266
|
+
provider: MCP_CLIENT_PROVIDER,
|
|
14267
|
+
model_id: UNVERIFIED_MODEL_ID,
|
|
14268
|
+
// Die Renderer-Anweisung, wie sie der Vorgang eingefroren hat — nicht
|
|
14269
|
+
// eine zweite, jetzt neu gebaute Fassung.
|
|
14270
|
+
system_prompt: operation.renderer_instruction,
|
|
14271
|
+
input_payload: operation.renderer_input,
|
|
14272
|
+
status: "succeeded",
|
|
14273
|
+
failure: null,
|
|
14274
|
+
output: geprueft.output,
|
|
14275
|
+
raw_output: input.response,
|
|
14276
|
+
source: { kind: "scene_direct", scene: operation.scene },
|
|
14277
|
+
operation_id: operation.operation_id,
|
|
14278
|
+
execution_origin: origin,
|
|
14279
|
+
created_at: now().toISOString()
|
|
14280
|
+
}
|
|
14281
|
+
};
|
|
14282
|
+
}
|
|
14283
|
+
function runOfOperation(runs, operationId) {
|
|
14284
|
+
return runs.find(
|
|
14285
|
+
(run) => run.operation_id === operationId
|
|
14286
|
+
) ?? null;
|
|
14287
|
+
}
|
|
14288
|
+
function sameResponseAs(run, response) {
|
|
14289
|
+
return (run.raw_output ?? "") === response;
|
|
14290
|
+
}
|
|
14291
|
+
|
|
13626
14292
|
// src/lib/szenen/seedListe.ts
|
|
13627
14293
|
var DEFAULT_SEED_VORLAGE = {
|
|
13628
14294
|
name: "Default",
|
|
@@ -13717,9 +14383,9 @@ async function leseBilderAusZip(datei) {
|
|
|
13717
14383
|
);
|
|
13718
14384
|
}
|
|
13719
14385
|
const { default: JSZip2 } = await import("jszip");
|
|
13720
|
-
const archiv = await JSZip2.loadAsync(datei).catch((
|
|
14386
|
+
const archiv = await JSZip2.loadAsync(datei).catch((fehler5) => {
|
|
13721
14387
|
throw new Error(
|
|
13722
|
-
`${name} konnte nicht als ZIP gelesen werden: ${
|
|
14388
|
+
`${name} konnte nicht als ZIP gelesen werden: ${fehler5 instanceof Error ? fehler5.message : String(fehler5)}`
|
|
13723
14389
|
);
|
|
13724
14390
|
});
|
|
13725
14391
|
const pfade = [];
|
|
@@ -13751,40 +14417,55 @@ async function leseBilderAusZip(datei) {
|
|
|
13751
14417
|
}
|
|
13752
14418
|
|
|
13753
14419
|
// src/features/szenen/SzenenView.tsx
|
|
13754
|
-
var
|
|
14420
|
+
var import_react20 = require("react");
|
|
13755
14421
|
|
|
13756
14422
|
// src/features/szenen/szenenViewModel.ts
|
|
13757
|
-
var
|
|
13758
|
-
"
|
|
14423
|
+
var BAUSTEIN_TYPES = [
|
|
14424
|
+
"scene_component",
|
|
14425
|
+
"style",
|
|
14426
|
+
"shot_concept",
|
|
14427
|
+
"prompt_fragment",
|
|
14428
|
+
"prompt_policy"
|
|
14429
|
+
];
|
|
14430
|
+
var ERWEITERT_REIHENFOLGE = [
|
|
13759
14431
|
"scene_setup",
|
|
13760
|
-
"shot"
|
|
14432
|
+
"shot",
|
|
14433
|
+
"camera_preset",
|
|
14434
|
+
"camera_pattern",
|
|
14435
|
+
"target_model",
|
|
14436
|
+
"scene_derivation_policy",
|
|
14437
|
+
"sequence"
|
|
13761
14438
|
];
|
|
13762
|
-
var
|
|
14439
|
+
var ERWEITERT_TYPES = (() => {
|
|
14440
|
+
const gehoertHierher = (typ) => typ !== "scene" && !BAUSTEIN_TYPES.includes(typ);
|
|
14441
|
+
const bekannt = ERWEITERT_REIHENFOLGE.filter(
|
|
14442
|
+
(typ) => SZENEN_ELEMENT_TYPES.includes(typ) && gehoertHierher(typ)
|
|
14443
|
+
);
|
|
14444
|
+
const rest = SZENEN_ELEMENT_TYPES.filter(
|
|
14445
|
+
(typ) => gehoertHierher(typ) && !bekannt.includes(typ)
|
|
14446
|
+
);
|
|
14447
|
+
return [...bekannt, ...rest];
|
|
14448
|
+
})();
|
|
13763
14449
|
var ALLE_BEREICHE = [
|
|
13764
14450
|
{
|
|
13765
|
-
id: "
|
|
13766
|
-
title: "
|
|
13767
|
-
description: "
|
|
13768
|
-
},
|
|
13769
|
-
{
|
|
13770
|
-
id: "elements",
|
|
13771
|
-
title: "1 \xB7 Bausteine",
|
|
13772
|
-
description: "Figuren, Orte, Stile und Regeln f\xFCr sp\xE4tere Bildprompts pflegen."
|
|
14451
|
+
id: "scene",
|
|
14452
|
+
title: "Szenen",
|
|
14453
|
+
description: "Szenen anlegen, aus Bild oder Text ableiten und daraus Prompts starten."
|
|
13773
14454
|
},
|
|
13774
14455
|
{
|
|
13775
|
-
id: "
|
|
13776
|
-
title: "
|
|
13777
|
-
description: "
|
|
14456
|
+
id: "prompts",
|
|
14457
|
+
title: "Prompts",
|
|
14458
|
+
description: "Alle erzeugten Prompts mit ihren Bildern \u2014 unabhaengig davon, ueber welchen Weg sie entstanden sind."
|
|
13778
14459
|
},
|
|
13779
14460
|
{
|
|
13780
|
-
id: "
|
|
13781
|
-
title: "
|
|
13782
|
-
description: "
|
|
14461
|
+
id: "elements",
|
|
14462
|
+
title: "Bausteine",
|
|
14463
|
+
description: "Figuren, Orte, Stile, Prompt-Bausteine und Prompt-Regeln pflegen."
|
|
13783
14464
|
},
|
|
13784
14465
|
{
|
|
13785
|
-
id: "
|
|
13786
|
-
title: "
|
|
13787
|
-
description: "
|
|
14466
|
+
id: "advanced",
|
|
14467
|
+
title: "Erweitert",
|
|
14468
|
+
description: "Optionale Pr\xE4zisierung: Bildaufbau, Shot, Kameras, Zielmodelle, Regeln, Sequenzen."
|
|
13788
14469
|
},
|
|
13789
14470
|
{
|
|
13790
14471
|
id: "media",
|
|
@@ -13794,16 +14475,12 @@ var ALLE_BEREICHE = [
|
|
|
13794
14475
|
];
|
|
13795
14476
|
function areasFor(port) {
|
|
13796
14477
|
const faehig = capabilitiesOf(port);
|
|
13797
|
-
return ALLE_BEREICHE.filter((bereich) =>
|
|
13798
|
-
if (bereich.id === "media") return faehig.media;
|
|
13799
|
-
if (bereich.id === "derive") return faehig.derivation;
|
|
13800
|
-
return true;
|
|
13801
|
-
});
|
|
14478
|
+
return ALLE_BEREICHE.filter((bereich) => bereich.id !== "media" || faehig.media);
|
|
13802
14479
|
}
|
|
13803
14480
|
function resolveArea(port, gewuenscht) {
|
|
13804
14481
|
const verfuegbar = areasFor(port);
|
|
13805
14482
|
if (gewuenscht && verfuegbar.some((b) => b.id === gewuenscht)) return gewuenscht;
|
|
13806
|
-
return verfuegbar.find((b) => b.id === "
|
|
14483
|
+
return verfuegbar.find((b) => b.id === "scene")?.id ?? verfuegbar[0].id;
|
|
13807
14484
|
}
|
|
13808
14485
|
function noticeFor(ergebnis, was) {
|
|
13809
14486
|
switch (ergebnis.kind) {
|
|
@@ -13817,13 +14494,13 @@ function noticeFor(ergebnis, was) {
|
|
|
13817
14494
|
};
|
|
13818
14495
|
}
|
|
13819
14496
|
case "rejected": {
|
|
13820
|
-
const
|
|
14497
|
+
const fehler5 = ergebnis.errors ?? [];
|
|
13821
14498
|
const ungeprueft = ergebnis.unchecked ?? [];
|
|
13822
14499
|
return {
|
|
13823
14500
|
tone: "rejected",
|
|
13824
|
-
text: `${was}: abgelehnt \u2014 ${
|
|
14501
|
+
text: `${was}: abgelehnt \u2014 ${fehler5.length} Befund${fehler5.length === 1 ? "" : "e"}.`,
|
|
13825
14502
|
details: [
|
|
13826
|
-
...
|
|
14503
|
+
...fehler5.map((f) => `${f.path ?? "(ohne Pfad)"}: ${f.message ?? "ohne Meldung"}`),
|
|
13827
14504
|
// Nicht verschweigen: was nicht geprüft wurde, ist nicht in Ordnung,
|
|
13828
14505
|
// sondern ungeprüft.
|
|
13829
14506
|
...ungeprueft.map((u) => `ungepr\xFCft: ${u}`)
|
|
@@ -13844,7 +14521,7 @@ function noticeFor(ergebnis, was) {
|
|
|
13844
14521
|
}
|
|
13845
14522
|
|
|
13846
14523
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
13847
|
-
var
|
|
14524
|
+
var import_react13 = require("react");
|
|
13848
14525
|
|
|
13849
14526
|
// src/features/szenen/areas/usePortQuery.ts
|
|
13850
14527
|
var import_react = require("react");
|
|
@@ -13876,7 +14553,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
13876
14553
|
}
|
|
13877
14554
|
|
|
13878
14555
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
13879
|
-
var
|
|
14556
|
+
var import_react11 = require("react");
|
|
13880
14557
|
|
|
13881
14558
|
// src/features/szenen/elementLabels.ts
|
|
13882
14559
|
var LABELS = {
|
|
@@ -15707,7 +16384,7 @@ var ERKLAERUNG = {
|
|
|
15707
16384
|
};
|
|
15708
16385
|
var CapabilityPanel = ({ port, elementId, setupPayload }) => {
|
|
15709
16386
|
const [bericht, setBericht] = (0, import_react5.useState)(null);
|
|
15710
|
-
const [
|
|
16387
|
+
const [fehler5, setFehler] = (0, import_react5.useState)(null);
|
|
15711
16388
|
(0, import_react5.useEffect)(() => {
|
|
15712
16389
|
let abgemeldet = false;
|
|
15713
16390
|
setBericht(null);
|
|
@@ -15729,10 +16406,10 @@ var CapabilityPanel = ({ port, elementId, setupPayload }) => {
|
|
|
15729
16406
|
abgemeldet = true;
|
|
15730
16407
|
};
|
|
15731
16408
|
}, [port, elementId, setupPayload]);
|
|
15732
|
-
if (
|
|
16409
|
+
if (fehler5) {
|
|
15733
16410
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { "data-testid": "capability-fehler", role: "alert", children: [
|
|
15734
16411
|
"F\xE4higkeitsbericht nicht erstellbar: ",
|
|
15735
|
-
|
|
16412
|
+
fehler5
|
|
15736
16413
|
] });
|
|
15737
16414
|
}
|
|
15738
16415
|
if (!bericht) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { "data-testid": "capability-laden", children: "F\xE4higkeitsbericht wird erstellt \u2026" });
|
|
@@ -15968,21 +16645,65 @@ var VersionNavigator = ({
|
|
|
15968
16645
|
};
|
|
15969
16646
|
|
|
15970
16647
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
15971
|
-
var
|
|
15972
|
-
|
|
15973
|
-
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
15974
|
-
var import_react8 = __toESM(require("react"));
|
|
16648
|
+
var import_react10 = require("react");
|
|
15975
16649
|
|
|
15976
|
-
// src/features/szenen/areas/
|
|
16650
|
+
// src/features/szenen/areas/useLaufTitel.ts
|
|
15977
16651
|
var import_react7 = require("react");
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
-
|
|
16652
|
+
function useLaufTitel(port, laeufe) {
|
|
16653
|
+
const [titelJeElement, setTitelJeElement] = (0, import_react7.useState)(
|
|
16654
|
+
() => /* @__PURE__ */ new Map()
|
|
16655
|
+
);
|
|
16656
|
+
const gebraucht = [...new Set(
|
|
16657
|
+
laeufe.map(namingElementOf).filter((id) => id !== null)
|
|
16658
|
+
)].sort();
|
|
16659
|
+
const schluessel = gebraucht.join(",");
|
|
16660
|
+
(0, import_react7.useEffect)(() => {
|
|
16661
|
+
let abgemeldet = false;
|
|
16662
|
+
const offen = gebraucht.filter((id) => !titelJeElement.has(id));
|
|
16663
|
+
if (offen.length === 0) return void 0;
|
|
16664
|
+
void (async () => {
|
|
16665
|
+
const gelesen = /* @__PURE__ */ new Map();
|
|
16666
|
+
for (const id of offen) {
|
|
16667
|
+
try {
|
|
16668
|
+
const ergebnis = await port.elements.getElement(id);
|
|
16669
|
+
gelesen.set(
|
|
16670
|
+
id,
|
|
16671
|
+
ergebnis.kind === "ok" && ergebnis.value ? ergebnis.value.metadata?.title ?? null : null
|
|
16672
|
+
);
|
|
16673
|
+
} catch {
|
|
16674
|
+
gelesen.set(id, null);
|
|
16675
|
+
}
|
|
16676
|
+
}
|
|
16677
|
+
if (abgemeldet) return;
|
|
16678
|
+
setTitelJeElement((bisher) => new Map([...bisher, ...gelesen]));
|
|
16679
|
+
})();
|
|
16680
|
+
return () => {
|
|
16681
|
+
abgemeldet = true;
|
|
16682
|
+
};
|
|
16683
|
+
}, [port, schluessel]);
|
|
16684
|
+
const jeLauf = /* @__PURE__ */ new Map();
|
|
16685
|
+
for (const lauf of laeufe) {
|
|
16686
|
+
const elementId = namingElementOf(lauf);
|
|
16687
|
+
if (!elementId) continue;
|
|
16688
|
+
const titel = titelJeElement.get(elementId);
|
|
16689
|
+
if (titel) jeLauf.set(lauf.run_id, titel);
|
|
16690
|
+
}
|
|
16691
|
+
return jeLauf;
|
|
16692
|
+
}
|
|
16693
|
+
|
|
16694
|
+
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
16695
|
+
var import_react9 = __toESM(require("react"));
|
|
16696
|
+
|
|
16697
|
+
// src/features/szenen/areas/Bildbausteine.tsx
|
|
16698
|
+
var import_react8 = require("react");
|
|
16699
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
16700
|
+
var Kachel = ({
|
|
16701
|
+
quelle,
|
|
16702
|
+
alt,
|
|
16703
|
+
leerText
|
|
16704
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel__leer", title: leerText ?? alt, children: leerText ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel__zeichen", children: "?" }) : null }) });
|
|
16705
|
+
var BildViewer = ({
|
|
16706
|
+
bilder,
|
|
15986
16707
|
position,
|
|
15987
16708
|
onWechseln,
|
|
15988
16709
|
onSchliessen,
|
|
@@ -15991,11 +16712,11 @@ var BildViewer = ({
|
|
|
15991
16712
|
}) => {
|
|
15992
16713
|
const anzahl = bilder.length;
|
|
15993
16714
|
const bild = bilder[position];
|
|
15994
|
-
const blaettern = (0,
|
|
16715
|
+
const blaettern = (0, import_react8.useCallback)((schritt) => {
|
|
15995
16716
|
if (anzahl === 0) return;
|
|
15996
16717
|
onWechseln((position + schritt + anzahl) % anzahl);
|
|
15997
16718
|
}, [anzahl, position, onWechseln]);
|
|
15998
|
-
(0,
|
|
16719
|
+
(0, import_react8.useEffect)(() => {
|
|
15999
16720
|
const taste = (e) => {
|
|
16000
16721
|
if (e.key === "Escape") onSchliessen();
|
|
16001
16722
|
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
@@ -16078,8 +16799,8 @@ var BildViewer = ({
|
|
|
16078
16799
|
);
|
|
16079
16800
|
};
|
|
16080
16801
|
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
16081
|
-
const [offen, setOffen] = (0,
|
|
16082
|
-
(0,
|
|
16802
|
+
const [offen, setOffen] = (0, import_react8.useState)(null);
|
|
16803
|
+
(0, import_react8.useEffect)(() => {
|
|
16083
16804
|
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
16084
16805
|
}, [bilder.length]);
|
|
16085
16806
|
if (bilder.length === 0) return null;
|
|
@@ -16135,10 +16856,11 @@ var AUFTRAG_TEXT = {
|
|
|
16135
16856
|
};
|
|
16136
16857
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
16137
16858
|
const faehig = capabilitiesOf(port);
|
|
16138
|
-
const [nachladen, setNachladen] = (0,
|
|
16859
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16139
16860
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
16140
|
-
const [erzeugenOffen, setErzeugenOffen] = (0,
|
|
16141
|
-
const [zuordnenOffen, setZuordnenOffen] = (0,
|
|
16861
|
+
const [erzeugenOffen, setErzeugenOffen] = (0, import_react9.useState)(null);
|
|
16862
|
+
const [zuordnenOffen, setZuordnenOffen] = (0, import_react9.useState)(null);
|
|
16863
|
+
const [chatAuftraegeOffen, setChatAuftraegeOffen] = (0, import_react9.useState)(null);
|
|
16142
16864
|
const quelle = sourceOf(lauf);
|
|
16143
16865
|
const [wahlPhase] = usePortQuery(
|
|
16144
16866
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -16153,10 +16875,17 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
16153
16875
|
() => port.imageBatchHistory ? port.imageBatchHistory.listBatchesForPromptRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: [] }),
|
|
16154
16876
|
[port, lauf.run_id, nachladen]
|
|
16155
16877
|
);
|
|
16878
|
+
const [chatAuftraegePhase] = usePortQuery(
|
|
16879
|
+
() => port.imageJobs ? port.imageJobs.listJobs(lauf.run_id) : Promise.resolve({ kind: "ok", value: [] }),
|
|
16880
|
+
[port, lauf.run_id, nachladen]
|
|
16881
|
+
);
|
|
16156
16882
|
const auftraege = auftraegePhase.status === "ready" ? auftraegePhase.value : [];
|
|
16157
16883
|
const batches = batchesPhase.status === "ready" ? batchesPhase.value : [];
|
|
16884
|
+
const chatAuftraege = chatAuftraegePhase.status === "ready" ? chatAuftraegePhase.value : [];
|
|
16885
|
+
const offeneChatAuftraege = chatAuftraege.filter((a) => a.status === "pending").length;
|
|
16158
16886
|
const auffaellige = auftraege.filter((a) => a.status !== "succeeded");
|
|
16159
16887
|
const erzeugenAuf = erzeugenOffen ?? batches.length === 0;
|
|
16888
|
+
const chatAuftraegeAuf = chatAuftraegeOffen ?? offeneChatAuftraege > 0;
|
|
16160
16889
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder", "data-testid": `bilder-${lauf.run_id}`, children: [
|
|
16161
16890
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "szenen-bilder__eingang", "data-testid": `eingang-${lauf.run_id}`, children: [
|
|
16162
16891
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { children: "Eingang \u2014 woraus dieser Prompt entstand" }),
|
|
@@ -16277,6 +17006,43 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
16277
17006
|
}
|
|
16278
17007
|
)
|
|
16279
17008
|
] }),
|
|
17009
|
+
faehig.imageJobs && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
17010
|
+
"details",
|
|
17011
|
+
{
|
|
17012
|
+
className: "szenen-bilder__aktion",
|
|
17013
|
+
"data-testid": `auftraege-chat-bereich-${lauf.run_id}`,
|
|
17014
|
+
open: chatAuftraegeAuf,
|
|
17015
|
+
children: [
|
|
17016
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
17017
|
+
"summary",
|
|
17018
|
+
{
|
|
17019
|
+
onClick: (e) => {
|
|
17020
|
+
e.preventDefault();
|
|
17021
|
+
setChatAuftraegeOffen(!chatAuftraegeAuf);
|
|
17022
|
+
},
|
|
17023
|
+
children: [
|
|
17024
|
+
"Bildauftraege aus dem Chat",
|
|
17025
|
+
offeneChatAuftraege > 0 ? ` (${offeneChatAuftraege} wartend)` : ""
|
|
17026
|
+
]
|
|
17027
|
+
}
|
|
17028
|
+
),
|
|
17029
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
17030
|
+
ChatAuftraegeAktion,
|
|
17031
|
+
{
|
|
17032
|
+
port,
|
|
17033
|
+
lauf,
|
|
17034
|
+
auftraege: chatAuftraege,
|
|
17035
|
+
fehler: chatAuftraegePhase.status === "error" ? chatAuftraegePhase.message : null,
|
|
17036
|
+
laedt: chatAuftraegePhase.status === "loading",
|
|
17037
|
+
onFertig: () => {
|
|
17038
|
+
setChatAuftraegeOffen(true);
|
|
17039
|
+
neuLesen();
|
|
17040
|
+
}
|
|
17041
|
+
}
|
|
17042
|
+
)
|
|
17043
|
+
]
|
|
17044
|
+
}
|
|
17045
|
+
),
|
|
16280
17046
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16281
17047
|
"details",
|
|
16282
17048
|
{
|
|
@@ -16408,12 +17174,12 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
16408
17174
|
] });
|
|
16409
17175
|
};
|
|
16410
17176
|
function useBildQuellen(port, bilder) {
|
|
16411
|
-
const [stand, setStand] = (0,
|
|
16412
|
-
const gehalten = (0,
|
|
16413
|
-
const gescheitert = (0,
|
|
16414
|
-
const [versuch, setVersuch] = (0,
|
|
17177
|
+
const [stand, setStand] = (0, import_react9.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
17178
|
+
const gehalten = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
|
|
17179
|
+
const gescheitert = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
|
|
17180
|
+
const [versuch, setVersuch] = (0, import_react9.useState)(0);
|
|
16415
17181
|
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
16416
|
-
(0,
|
|
17182
|
+
(0, import_react9.useEffect)(() => {
|
|
16417
17183
|
const bestand = port.imageLibrary;
|
|
16418
17184
|
if (!bestand) return void 0;
|
|
16419
17185
|
let abgebrochen = false;
|
|
@@ -16460,7 +17226,7 @@ function useBildQuellen(port, bilder) {
|
|
|
16460
17226
|
erneutVersuchen: () => setVersuch((n) => n + 1)
|
|
16461
17227
|
};
|
|
16462
17228
|
}
|
|
16463
|
-
var BildDetails = ({ bild, fehler:
|
|
17229
|
+
var BildDetails = ({ bild, fehler: fehler5, aufloesbar }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "szenen-bilder__meta", "data-testid": `batchbild-${bild.media_ref}`, children: [
|
|
16464
17230
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: bild.media_ref }),
|
|
16465
17231
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16466
17232
|
"Position ",
|
|
@@ -16473,7 +17239,7 @@ var BildDetails = ({ bild, fehler: fehler4, aufloesbar }) => /* @__PURE__ */ (0,
|
|
|
16473
17239
|
"\xD7",
|
|
16474
17240
|
bild.height
|
|
16475
17241
|
] }) : null,
|
|
16476
|
-
|
|
17242
|
+
fehler5 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `batchbild-fehler-${bild.media_ref}`, children: fehler5 }),
|
|
16477
17243
|
!aufloesbar && // Capability-Grenze, kein Fehler: Dieser Host kann Batches lesen,
|
|
16478
17244
|
// aber keine Bilder auflösen (E). Kein erfundener Fallback auf eine
|
|
16479
17245
|
// Serverroute (A6).
|
|
@@ -16489,18 +17255,18 @@ var HERKUNFT_KURZ = {
|
|
|
16489
17255
|
external_import: "extern importiert"
|
|
16490
17256
|
};
|
|
16491
17257
|
var BatchKachel = ({ port, batch }) => {
|
|
16492
|
-
const { quellen, fehler:
|
|
17258
|
+
const { quellen, fehler: fehler5, wiederholbar, erneutVersuchen } = useBildQuellen(port, batch.images);
|
|
16493
17259
|
const aufloesbar = Boolean(port.imageLibrary);
|
|
16494
17260
|
const bilder = batch.images.map((bild) => ({
|
|
16495
17261
|
id: bild.media_ref,
|
|
16496
17262
|
quelle: quellen.get(bild.media_ref) ?? null,
|
|
16497
17263
|
titel: `Bild ${bild.position + 1}`,
|
|
16498
|
-
...
|
|
17264
|
+
...fehler5.get(bild.media_ref) ? { leerText: "Nicht ladbar" } : {},
|
|
16499
17265
|
details: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16500
17266
|
BildDetails,
|
|
16501
17267
|
{
|
|
16502
17268
|
bild,
|
|
16503
|
-
fehler:
|
|
17269
|
+
fehler: fehler5.get(bild.media_ref) ?? null,
|
|
16504
17270
|
aufloesbar
|
|
16505
17271
|
}
|
|
16506
17272
|
)
|
|
@@ -16549,7 +17315,7 @@ var BatchKachel = ({ port, batch }) => {
|
|
|
16549
17315
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16550
17316
|
"Batches",
|
|
16551
17317
|
" ",
|
|
16552
|
-
batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
17318
|
+
batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react9.default.Fragment, { children: [
|
|
16553
17319
|
i > 0 ? ", " : "",
|
|
16554
17320
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: h.generation_batch_id }),
|
|
16555
17321
|
` (${HERKUNFT_KURZ[h.source_kind]})`
|
|
@@ -16560,7 +17326,7 @@ var BatchKachel = ({ port, batch }) => {
|
|
|
16560
17326
|
BildDetails,
|
|
16561
17327
|
{
|
|
16562
17328
|
bild,
|
|
16563
|
-
fehler:
|
|
17329
|
+
fehler: fehler5.get(bild.media_ref) ?? null,
|
|
16564
17330
|
aufloesbar
|
|
16565
17331
|
}
|
|
16566
17332
|
) }, bild.media_ref)) })
|
|
@@ -16578,11 +17344,11 @@ var ProfilBefunde = ({ wahl, runId }) => {
|
|
|
16578
17344
|
] });
|
|
16579
17345
|
};
|
|
16580
17346
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
16581
|
-
const [modellWahl, setModellWahl] = (0,
|
|
16582
|
-
const [anzahlText, setAnzahlText] = (0,
|
|
16583
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0,
|
|
16584
|
-
const [laeuft, setLaeuft] = (0,
|
|
16585
|
-
const [notiz, setNotiz] = (0,
|
|
17347
|
+
const [modellWahl, setModellWahl] = (0, import_react9.useState)(null);
|
|
17348
|
+
const [anzahlText, setAnzahlText] = (0, import_react9.useState)("1");
|
|
17349
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react9.useState)("");
|
|
17350
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17351
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
16586
17352
|
if (!port.imageGeneration) {
|
|
16587
17353
|
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." });
|
|
16588
17354
|
}
|
|
@@ -16759,23 +17525,23 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
16759
17525
|
};
|
|
16760
17526
|
var DEFAULT_VORLAGE_KEY = "__default__";
|
|
16761
17527
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
16762
|
-
const [dateien, setDateien] = (0,
|
|
16763
|
-
const [seeds, setSeeds] = (0,
|
|
16764
|
-
const [zip, setZip] = (0,
|
|
16765
|
-
const [zipLaedt, setZipLaedt] = (0,
|
|
16766
|
-
const [seedListe, setSeedListe] = (0,
|
|
16767
|
-
const [vorlagen, setVorlagen] = (0,
|
|
16768
|
-
const [vorlageKey, setVorlageKey] = (0,
|
|
16769
|
-
const [vorlagenStand, setVorlagenStand] = (0,
|
|
16770
|
-
const [vorlageBenennen, setVorlageBenennen] = (0,
|
|
16771
|
-
const [vorlageName, setVorlageName] = (0,
|
|
16772
|
-
const [modell, setModell] = (0,
|
|
16773
|
-
const [itemId, setItemId] = (0,
|
|
16774
|
-
const [laeuft, setLaeuft] = (0,
|
|
16775
|
-
const [notiz, setNotiz] = (0,
|
|
16776
|
-
const auswahlMarke = (0,
|
|
17528
|
+
const [dateien, setDateien] = (0, import_react9.useState)([]);
|
|
17529
|
+
const [seeds, setSeeds] = (0, import_react9.useState)({});
|
|
17530
|
+
const [zip, setZip] = (0, import_react9.useState)(null);
|
|
17531
|
+
const [zipLaedt, setZipLaedt] = (0, import_react9.useState)(false);
|
|
17532
|
+
const [seedListe, setSeedListe] = (0, import_react9.useState)("");
|
|
17533
|
+
const [vorlagen, setVorlagen] = (0, import_react9.useState)([DEFAULT_SEED_VORLAGE]);
|
|
17534
|
+
const [vorlageKey, setVorlageKey] = (0, import_react9.useState)(DEFAULT_VORLAGE_KEY);
|
|
17535
|
+
const [vorlagenStand, setVorlagenStand] = (0, import_react9.useState)(0);
|
|
17536
|
+
const [vorlageBenennen, setVorlageBenennen] = (0, import_react9.useState)(false);
|
|
17537
|
+
const [vorlageName, setVorlageName] = (0, import_react9.useState)("");
|
|
17538
|
+
const [modell, setModell] = (0, import_react9.useState)("");
|
|
17539
|
+
const [itemId, setItemId] = (0, import_react9.useState)("");
|
|
17540
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17541
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17542
|
+
const auswahlMarke = (0, import_react9.useRef)(0);
|
|
16777
17543
|
const zipAktiv = zip !== null;
|
|
16778
|
-
(0,
|
|
17544
|
+
(0, import_react9.useEffect)(() => {
|
|
16779
17545
|
if (!zipAktiv) return;
|
|
16780
17546
|
let abgebrochen = false;
|
|
16781
17547
|
void (async () => {
|
|
@@ -16829,11 +17595,11 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16829
17595
|
setSeedListe(DEFAULT_SEED_VORLAGE.seeds);
|
|
16830
17596
|
setVorlageKey(DEFAULT_VORLAGE_KEY);
|
|
16831
17597
|
}
|
|
16832
|
-
} catch (
|
|
17598
|
+
} catch (fehler5) {
|
|
16833
17599
|
if (veraltet()) return;
|
|
16834
17600
|
setNotiz({
|
|
16835
17601
|
tone: "error",
|
|
16836
|
-
text:
|
|
17602
|
+
text: fehler5 instanceof Error ? fehler5.message : String(fehler5)
|
|
16837
17603
|
});
|
|
16838
17604
|
}
|
|
16839
17605
|
if (veraltet()) return;
|
|
@@ -16852,10 +17618,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16852
17618
|
setNotiz(
|
|
16853
17619
|
ergebnis.kind === "ok" ? { tone: "ok", text: `Importiert als Item ${ergebnis.value.item_id} mit ${bilder.length} Bild(ern).` } : noticeFor(ergebnis, "Externe Bilder importieren")
|
|
16854
17620
|
);
|
|
16855
|
-
} catch (
|
|
17621
|
+
} catch (fehler5) {
|
|
16856
17622
|
setNotiz({
|
|
16857
17623
|
tone: "error",
|
|
16858
|
-
text: `Externe Bilder importieren: ${
|
|
17624
|
+
text: `Externe Bilder importieren: ${fehler5 instanceof Error ? fehler5.message : String(fehler5)}`
|
|
16859
17625
|
});
|
|
16860
17626
|
}
|
|
16861
17627
|
setLaeuft(false);
|
|
@@ -16877,10 +17643,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16877
17643
|
...seed !== void 0 ? { seed } : {}
|
|
16878
17644
|
});
|
|
16879
17645
|
}
|
|
16880
|
-
} catch (
|
|
17646
|
+
} catch (fehler5) {
|
|
16881
17647
|
setNotiz({
|
|
16882
17648
|
tone: "error",
|
|
16883
|
-
text: `Externe Bilder importieren: ${
|
|
17649
|
+
text: `Externe Bilder importieren: ${fehler5 instanceof Error ? fehler5.message : String(fehler5)}`
|
|
16884
17650
|
});
|
|
16885
17651
|
return;
|
|
16886
17652
|
}
|
|
@@ -17216,17 +17982,112 @@ function readAsBase64(datei) {
|
|
|
17216
17982
|
leser.readAsDataURL(datei);
|
|
17217
17983
|
});
|
|
17218
17984
|
}
|
|
17985
|
+
var CHAT_AUFTRAG_TEXT = {
|
|
17986
|
+
pending: "wartet auf \xDCbernahme",
|
|
17987
|
+
// Wie bei `started` (D-119): laufend und abgebrochen sind aus dem Log
|
|
17988
|
+
// nicht unterscheidbar, und es gibt keinen automatischen Retry, der die
|
|
17989
|
+
// Unterscheidung bräuchte.
|
|
17990
|
+
claimed: "\xFCbernommen (l\xE4uft oder unterbrochen)",
|
|
17991
|
+
succeeded: "erfolgreich",
|
|
17992
|
+
partial: "teilweise",
|
|
17993
|
+
failed: "fehlgeschlagen",
|
|
17994
|
+
rejected: "abgelehnt \u2014 es wurde nichts ausgef\xFChrt"
|
|
17995
|
+
};
|
|
17996
|
+
var ChatAuftraegeAktion = ({
|
|
17997
|
+
port,
|
|
17998
|
+
lauf,
|
|
17999
|
+
auftraege,
|
|
18000
|
+
fehler: fehler5,
|
|
18001
|
+
laedt,
|
|
18002
|
+
onFertig
|
|
18003
|
+
}) => {
|
|
18004
|
+
const [laufend, setLaufend] = (0, import_react9.useState)(null);
|
|
18005
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
18006
|
+
async function uebernehmen(jobId) {
|
|
18007
|
+
if (!port.imageJobs) return;
|
|
18008
|
+
setLaufend(jobId);
|
|
18009
|
+
setNotiz(null);
|
|
18010
|
+
try {
|
|
18011
|
+
const ergebnis = await port.imageJobs.claimAndRun(jobId);
|
|
18012
|
+
if (ergebnis.kind === "ok") {
|
|
18013
|
+
setNotiz({
|
|
18014
|
+
tone: ergebnis.job.status === "succeeded" ? "ok" : "rejected",
|
|
18015
|
+
text: `Auftrag ${jobId}: ${CHAT_AUFTRAG_TEXT[ergebnis.job.status]}.` + (ergebnis.job.diagnostic ? ` ${ergebnis.job.diagnostic}` : "")
|
|
18016
|
+
});
|
|
18017
|
+
} else if (ergebnis.kind === "lost") {
|
|
18018
|
+
setNotiz({ tone: "rejected", text: ergebnis.message });
|
|
18019
|
+
} else {
|
|
18020
|
+
setNotiz({ tone: "error", text: ergebnis.message });
|
|
18021
|
+
}
|
|
18022
|
+
} catch (e) {
|
|
18023
|
+
setNotiz({
|
|
18024
|
+
tone: "error",
|
|
18025
|
+
text: `Die \xDCbernahme von Auftrag ${jobId} ist technisch gescheitert: ` + (e instanceof Error ? e.message : String(e))
|
|
18026
|
+
});
|
|
18027
|
+
} finally {
|
|
18028
|
+
setLaufend(null);
|
|
18029
|
+
onFertig();
|
|
18030
|
+
}
|
|
18031
|
+
}
|
|
18032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `chat-auftraege-${lauf.run_id}`, children: [
|
|
18033
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "szenen-area__lead", children: "Auftr\xE4ge, die \xFCber den MCP aus dem Chat kamen. Der Prompt wird nicht kopiert \u2014 ausgef\xFChrt wird der eingefrorene Prompt dieses Laufs." }),
|
|
18034
|
+
fehler5 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { role: "alert", "data-testid": `chat-auftraege-fehler-${lauf.run_id}`, children: [
|
|
18035
|
+
"Bildauftr\xE4ge aus dem Chat konnten nicht gelesen werden: ",
|
|
18036
|
+
fehler5
|
|
18037
|
+
] }),
|
|
18038
|
+
!fehler5 && !laedt && auftraege.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `chat-auftraege-leer-${lauf.run_id}`, children: "F\xFCr diesen Lauf liegt kein Auftrag aus dem Chat vor." }),
|
|
18039
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
18040
|
+
"p",
|
|
18041
|
+
{
|
|
18042
|
+
role: notiz.tone === "error" ? "alert" : void 0,
|
|
18043
|
+
"data-testid": `chat-auftraege-notiz-${lauf.run_id}`,
|
|
18044
|
+
children: notiz.text
|
|
18045
|
+
}
|
|
18046
|
+
),
|
|
18047
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "szenen-bilder__auftraege", children: auftraege.map((auftrag) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { "data-testid": `chat-auftrag-${auftrag.job_id}`, children: [
|
|
18048
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: CHAT_AUFTRAG_TEXT[auftrag.status] }),
|
|
18049
|
+
" \u2014 ",
|
|
18050
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
18051
|
+
auftrag.image_count,
|
|
18052
|
+
" ",
|
|
18053
|
+
auftrag.image_count === 1 ? "Bild" : "Bilder",
|
|
18054
|
+
" mit",
|
|
18055
|
+
" ",
|
|
18056
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.execution_target_model_key }),
|
|
18057
|
+
" / ",
|
|
18058
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.execution_profile_id }),
|
|
18059
|
+
auftrag.aspect_ratio ? ` im Format ${auftrag.aspect_ratio}` : ""
|
|
18060
|
+
] }),
|
|
18061
|
+
auftrag.diagnostic && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
18062
|
+
" ",
|
|
18063
|
+
auftrag.diagnostic
|
|
18064
|
+
] }),
|
|
18065
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
|
|
18066
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { className: "szenen-bilder__auftragskennung", children: auftrag.job_id }),
|
|
18067
|
+
auftrag.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
18068
|
+
"button",
|
|
18069
|
+
{
|
|
18070
|
+
type: "button",
|
|
18071
|
+
disabled: laufend !== null,
|
|
18072
|
+
onClick: () => void uebernehmen(auftrag.job_id),
|
|
18073
|
+
"data-testid": `chat-auftrag-uebernehmen-${auftrag.job_id}`,
|
|
18074
|
+
children: laufend === auftrag.job_id ? "\xDCbernahme l\xE4uft\u2026" : "\xDCbernehmen und ausf\xFChren (kostet einen Bildaufruf)"
|
|
18075
|
+
}
|
|
18076
|
+
)
|
|
18077
|
+
] }, auftrag.job_id)) })
|
|
18078
|
+
] });
|
|
18079
|
+
};
|
|
17219
18080
|
|
|
17220
18081
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
17221
18082
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
17222
18083
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
17223
|
-
const [anweisung, setAnweisung] = (0,
|
|
17224
|
-
const [laeuft, setLaeuft] = (0,
|
|
17225
|
-
const [notiz, setNotiz] = (0,
|
|
17226
|
-
const [nachladen, setNachladen] = (0,
|
|
18084
|
+
const [anweisung, setAnweisung] = (0, import_react10.useState)("");
|
|
18085
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
18086
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
18087
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
17227
18088
|
const faehig = capabilitiesOf(port);
|
|
17228
18089
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
17229
|
-
const aktuelleQuelle = (0,
|
|
18090
|
+
const aktuelleQuelle = (0, import_react10.useRef)({ kind: source.kind, id: quellSchluessel });
|
|
17230
18091
|
aktuelleQuelle.current = { kind: source.kind, id: quellSchluessel };
|
|
17231
18092
|
const [phase, neuLaden] = usePortQuery(
|
|
17232
18093
|
() => {
|
|
@@ -17254,10 +18115,11 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
17254
18115
|
neuLaden();
|
|
17255
18116
|
};
|
|
17256
18117
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
17257
|
-
const
|
|
18118
|
+
const titel = useLaufTitel(port, laeufe);
|
|
18119
|
+
const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react10.useState)(void 0);
|
|
17258
18120
|
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
17259
18121
|
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
17260
|
-
(0,
|
|
18122
|
+
(0, import_react10.useEffect)(() => {
|
|
17261
18123
|
setGewaehlteRunde(void 0);
|
|
17262
18124
|
setAnweisung("");
|
|
17263
18125
|
setNotiz(null);
|
|
@@ -17292,6 +18154,7 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
17292
18154
|
port,
|
|
17293
18155
|
lauf,
|
|
17294
18156
|
runde: roundOfRun(lauf, laeufe),
|
|
18157
|
+
titel: titel.get(lauf.run_id) ?? null,
|
|
17295
18158
|
offen: lauf.run_id === offeneRunde,
|
|
17296
18159
|
onUmschalten: () => setGewaehlteRunde(
|
|
17297
18160
|
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
@@ -17316,7 +18179,7 @@ var STATUS_TEXT = {
|
|
|
17316
18179
|
};
|
|
17317
18180
|
var LANGER_TEXT = 240;
|
|
17318
18181
|
var Sekundaertext = ({ titel, text, testId }) => {
|
|
17319
|
-
const [ganz, setGanz] = (0,
|
|
18182
|
+
const [ganz, setGanz] = (0, import_react10.useState)(false);
|
|
17320
18183
|
const lang = text.length > LANGER_TEXT;
|
|
17321
18184
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
17322
18185
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
|
|
@@ -17335,7 +18198,7 @@ var Sekundaertext = ({ titel, text, testId }) => {
|
|
|
17335
18198
|
};
|
|
17336
18199
|
var LISTE_ANFANG = 3;
|
|
17337
18200
|
var SekundaerListe = ({ titel, eintraege, testId, className }) => {
|
|
17338
|
-
const [alle, setAlle] = (0,
|
|
18201
|
+
const [alle, setAlle] = (0, import_react10.useState)(false);
|
|
17339
18202
|
const lang = eintraege.length > LISTE_ANFANG;
|
|
17340
18203
|
const gezeigt = lang && !alle ? eintraege.slice(0, LISTE_ANFANG) : eintraege;
|
|
17341
18204
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
@@ -17353,10 +18216,10 @@ var SekundaerListe = ({ titel, eintraege, testId, className }) => {
|
|
|
17353
18216
|
)
|
|
17354
18217
|
] });
|
|
17355
18218
|
};
|
|
17356
|
-
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
17357
|
-
const [notiz, setNotiz] = (0,
|
|
17358
|
-
const [laeuft, setLaeuft] = (0,
|
|
17359
|
-
const [nachladen, setNachladen] = (0,
|
|
18219
|
+
var RundenEintrag = ({ port, lauf, runde, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
18220
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
18221
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
18222
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
17360
18223
|
const [itemPhase] = usePortQuery(
|
|
17361
18224
|
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
17362
18225
|
[port, lauf.run_id, nachladen, offen]
|
|
@@ -17384,10 +18247,7 @@ var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onI
|
|
|
17384
18247
|
"aria-expanded": offen,
|
|
17385
18248
|
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
17386
18249
|
children: [
|
|
17387
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
17388
|
-
"Runde ",
|
|
17389
|
-
runde
|
|
17390
|
-
] }),
|
|
18250
|
+
/* @__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}` }),
|
|
17391
18251
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17392
18252
|
"span",
|
|
17393
18253
|
{
|
|
@@ -17511,43 +18371,43 @@ var ElementDetail = ({
|
|
|
17511
18371
|
author,
|
|
17512
18372
|
onChanged
|
|
17513
18373
|
}) => {
|
|
17514
|
-
const [nachladen, setNachladen] = (0,
|
|
18374
|
+
const [nachladen, setNachladen] = (0, import_react11.useState)(0);
|
|
17515
18375
|
const [phase] = usePortQuery(
|
|
17516
18376
|
() => port.elements.getElement(elementId),
|
|
17517
18377
|
[port, elementId, nachladen]
|
|
17518
18378
|
);
|
|
17519
|
-
const [entwurf, setEntwurf] = (0,
|
|
17520
|
-
const [notiz, setNotiz] = (0,
|
|
17521
|
-
const [laeuft, setLaeuft] = (0,
|
|
17522
|
-
const [wahl, setWahl] = (0,
|
|
17523
|
-
const [basiswechsel, setBasiswechsel] = (0,
|
|
18379
|
+
const [entwurf, setEntwurf] = (0, import_react11.useState)({});
|
|
18380
|
+
const [notiz, setNotiz] = (0, import_react11.useState)(null);
|
|
18381
|
+
const [laeuft, setLaeuft] = (0, import_react11.useState)(false);
|
|
18382
|
+
const [wahl, setWahl] = (0, import_react11.useState)(null);
|
|
18383
|
+
const [basiswechsel, setBasiswechsel] = (0, import_react11.useState)(null);
|
|
17524
18384
|
const [kettenPhase] = usePortQuery(
|
|
17525
18385
|
() => port.context.chainFor(contextId),
|
|
17526
18386
|
[port, contextId]
|
|
17527
18387
|
);
|
|
17528
|
-
const kontextkette = (0,
|
|
18388
|
+
const kontextkette = (0, import_react11.useMemo)(() => {
|
|
17529
18389
|
if (kettenPhase.status === "ready") return { status: "ready", chain: kettenPhase.value };
|
|
17530
18390
|
if (kettenPhase.status === "error") return { status: "error", message: kettenPhase.message };
|
|
17531
18391
|
return { status: "loading" };
|
|
17532
18392
|
}, [kettenPhase]);
|
|
17533
18393
|
const kette = kontextkette.status === "ready" ? kontextkette.chain : null;
|
|
17534
18394
|
const schnappschuss = phase.status === "ready" ? phase.value : null;
|
|
17535
|
-
const kopfErgebnis = (0,
|
|
18395
|
+
const kopfErgebnis = (0, import_react11.useMemo)(
|
|
17536
18396
|
() => schnappschuss && kette ? effectivePreferredHeadSafe(schnappschuss, kette) : null,
|
|
17537
18397
|
[schnappschuss, kette]
|
|
17538
18398
|
);
|
|
17539
18399
|
const kopfAufloesung = resolutionOf(kopfErgebnis);
|
|
17540
18400
|
const bevorzugteVersion = selectedHeadVersionId(kopfAufloesung);
|
|
17541
|
-
const felder = (0,
|
|
18401
|
+
const felder = (0, import_react11.useMemo)(
|
|
17542
18402
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
17543
18403
|
[schnappschuss?.element.type]
|
|
17544
18404
|
);
|
|
17545
|
-
(0,
|
|
18405
|
+
(0, import_react11.useEffect)(() => {
|
|
17546
18406
|
setWahl(null);
|
|
17547
18407
|
setBasiswechsel(null);
|
|
17548
18408
|
setNotiz(null);
|
|
17549
18409
|
}, [elementId]);
|
|
17550
|
-
const automatisch = (0,
|
|
18410
|
+
const automatisch = (0, import_react11.useMemo)(() => {
|
|
17551
18411
|
if (!schnappschuss) return { kind: "keiner" };
|
|
17552
18412
|
if (schnappschuss.draft) return { kind: "draft" };
|
|
17553
18413
|
if (bevorzugteVersion) return { kind: "version", versionId: bevorzugteVersion };
|
|
@@ -17557,14 +18417,14 @@ var ElementDetail = ({
|
|
|
17557
18417
|
if (schnappschuss.versions.length === 0) return { kind: "draft" };
|
|
17558
18418
|
return { kind: "keiner" };
|
|
17559
18419
|
}, [schnappschuss, bevorzugteVersion]);
|
|
17560
|
-
const angezeigt = (0,
|
|
18420
|
+
const angezeigt = (0, import_react11.useMemo)(() => {
|
|
17561
18421
|
if (!wahl) return automatisch;
|
|
17562
18422
|
if (wahl.kind === "version" && !schnappschuss?.versions.some((v) => v.version_id === wahl.versionId)) {
|
|
17563
18423
|
return automatisch;
|
|
17564
18424
|
}
|
|
17565
18425
|
return wahl;
|
|
17566
18426
|
}, [wahl, automatisch, schnappschuss]);
|
|
17567
|
-
const angezeigtePayload = (0,
|
|
18427
|
+
const angezeigtePayload = (0, import_react11.useMemo)(() => {
|
|
17568
18428
|
if (!schnappschuss) return {};
|
|
17569
18429
|
if (angezeigt.kind === "draft") return schnappschuss.draft?.payload ?? {};
|
|
17570
18430
|
if (angezeigt.kind === "version") {
|
|
@@ -17573,7 +18433,7 @@ var ElementDetail = ({
|
|
|
17573
18433
|
return {};
|
|
17574
18434
|
}, [schnappschuss, angezeigt]);
|
|
17575
18435
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
17576
|
-
(0,
|
|
18436
|
+
(0, import_react11.useEffect)(() => {
|
|
17577
18437
|
if (!schnappschuss) return;
|
|
17578
18438
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
17579
18439
|
}, [
|
|
@@ -17586,7 +18446,7 @@ var ElementDetail = ({
|
|
|
17586
18446
|
const bearbeitbar = angezeigt.kind === "draft";
|
|
17587
18447
|
const setzeFeld = (pfad, wert) => setEntwurf((vorher) => ({ ...vorher, [pfad]: wert }));
|
|
17588
18448
|
const payloadAusFormular = () => payloadFromForm(felder, entwurf);
|
|
17589
|
-
const strukturPayload = (0,
|
|
18449
|
+
const strukturPayload = (0, import_react11.useMemo)(() => {
|
|
17590
18450
|
const lies = (name) => {
|
|
17591
18451
|
try {
|
|
17592
18452
|
const roh = JSON.parse(entwurf[name] || "[]");
|
|
@@ -17597,19 +18457,19 @@ var ElementDetail = ({
|
|
|
17597
18457
|
};
|
|
17598
18458
|
return { nodes: lies("nodes"), relations: lies("relations") };
|
|
17599
18459
|
}, [entwurf.nodes, entwurf.relations]);
|
|
17600
|
-
const kettenfeld = (0,
|
|
18460
|
+
const kettenfeld = (0, import_react11.useMemo)(() => {
|
|
17601
18461
|
const kette2 = schnappschuss?.draft?.chain;
|
|
17602
18462
|
if (!kette2) return null;
|
|
17603
18463
|
return kette2.links[0]?.field ?? null;
|
|
17604
18464
|
}, [schnappschuss?.draft?.chain]);
|
|
17605
|
-
const laufStand = (0,
|
|
18465
|
+
const laufStand = (0, import_react11.useMemo)(() => {
|
|
17606
18466
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
17607
18467
|
if (schnappschuss.draft) return schnappschuss.draft.payload;
|
|
17608
18468
|
const kopf = usableHeadVersionId(kopfAufloesung);
|
|
17609
18469
|
if (!kopf) return null;
|
|
17610
18470
|
return schnappschuss.versions.find((v) => v.version_id === kopf)?.payload ?? null;
|
|
17611
18471
|
}, [schnappschuss, kopfAufloesung]);
|
|
17612
|
-
const szenenBlocker = (0,
|
|
18472
|
+
const szenenBlocker = (0, import_react11.useMemo)(() => {
|
|
17613
18473
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
17614
18474
|
if (laufStand === null) {
|
|
17615
18475
|
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.";
|
|
@@ -17619,7 +18479,7 @@ var ElementDetail = ({
|
|
|
17619
18479
|
const grund = flag.reasons[0];
|
|
17620
18480
|
return grund && "message" in grund ? grund.message : "Kein Lauf moeglich.";
|
|
17621
18481
|
}, [schnappschuss, laufStand]);
|
|
17622
|
-
const vorschau = (0,
|
|
18482
|
+
const vorschau = (0, import_react11.useMemo)(() => {
|
|
17623
18483
|
if (!schnappschuss) return null;
|
|
17624
18484
|
try {
|
|
17625
18485
|
const roh = validatePayload(schnappschuss.element.type, payloadAusFormular());
|
|
@@ -18005,15 +18865,15 @@ var ElementDetail = ({
|
|
|
18005
18865
|
};
|
|
18006
18866
|
|
|
18007
18867
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
18008
|
-
var
|
|
18868
|
+
var import_react12 = require("react");
|
|
18009
18869
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
18010
18870
|
function messen(abfrage) {
|
|
18011
18871
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
18012
18872
|
return window.matchMedia(abfrage).matches;
|
|
18013
18873
|
}
|
|
18014
18874
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
18015
|
-
const [schmal, setSchmal] = (0,
|
|
18016
|
-
(0,
|
|
18875
|
+
const [schmal, setSchmal] = (0, import_react12.useState)(() => messen(abfrage));
|
|
18876
|
+
(0, import_react12.useEffect)(() => {
|
|
18017
18877
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
18018
18878
|
const liste = window.matchMedia(abfrage);
|
|
18019
18879
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -18040,16 +18900,16 @@ var ElementsArea = ({
|
|
|
18040
18900
|
const gemischt = auswahlTypen.length > 1;
|
|
18041
18901
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
18042
18902
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
18043
|
-
const [typ, setTyp] = (0,
|
|
18044
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] = (0,
|
|
18045
|
-
const [gewaehlt, setGewaehlt] = (0,
|
|
18046
|
-
const [neuerTitel, setNeuerTitel] = (0,
|
|
18047
|
-
const [neuerTyp, setNeuerTyp] = (0,
|
|
18048
|
-
const [notiz, setNotiz] = (0,
|
|
18049
|
-
const [anlegend, setAnlegend] = (0,
|
|
18050
|
-
const [anlageOffen, setAnlageOffen] = (0,
|
|
18903
|
+
const [typ, setTyp] = (0, import_react13.useState)(einzelTyp ?? "");
|
|
18904
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react13.useState)(false);
|
|
18905
|
+
const [gewaehlt, setGewaehlt] = (0, import_react13.useState)(null);
|
|
18906
|
+
const [neuerTitel, setNeuerTitel] = (0, import_react13.useState)("");
|
|
18907
|
+
const [neuerTyp, setNeuerTyp] = (0, import_react13.useState)(auswahlTypen[0]);
|
|
18908
|
+
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
18909
|
+
const [anlegend, setAnlegend] = (0, import_react13.useState)(false);
|
|
18910
|
+
const [anlageOffen, setAnlageOffen] = (0, import_react13.useState)(false);
|
|
18051
18911
|
const schmal = useSchmalesDisplay();
|
|
18052
|
-
const [ansicht, setAnsicht] = (0,
|
|
18912
|
+
const [ansicht, setAnsicht] = (0, import_react13.useState)("liste");
|
|
18053
18913
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
18054
18914
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
18055
18915
|
const waehle = (elementId) => {
|
|
@@ -18261,235 +19121,59 @@ var ElementsArea = ({
|
|
|
18261
19121
|
};
|
|
18262
19122
|
|
|
18263
19123
|
// src/features/szenen/areas/SceneArea.tsx
|
|
18264
|
-
var
|
|
18265
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
18266
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
18267
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
18268
|
-
] });
|
|
18269
|
-
|
|
18270
|
-
// src/features/szenen/areas/SetupArea.tsx
|
|
18271
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
18272
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
18273
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
18274
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18275
|
-
ElementsArea,
|
|
18276
|
-
{
|
|
18277
|
-
port,
|
|
18278
|
-
contextId,
|
|
18279
|
-
restrictToTypes: ["scene_setup", "camera_preset", "camera_pattern", "style"],
|
|
18280
|
-
allTypesLabel: "alle Bildaufbau-Typen",
|
|
18281
|
-
listTitle: "Bildaufbau"
|
|
18282
|
-
}
|
|
18283
|
-
)
|
|
18284
|
-
] });
|
|
18285
|
-
|
|
18286
|
-
// src/features/szenen/areas/ShotArea.tsx
|
|
18287
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
18288
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
18289
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
18290
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18291
|
-
ElementsArea,
|
|
18292
|
-
{
|
|
18293
|
-
port,
|
|
18294
|
-
contextId,
|
|
18295
|
-
restrictToTypes: ["shot", "shot_concept", "target_model"],
|
|
18296
|
-
allTypesLabel: "alle Prompt-Typen",
|
|
18297
|
-
listTitle: "Prompts"
|
|
18298
|
-
}
|
|
18299
|
-
)
|
|
18300
|
-
] });
|
|
18301
|
-
|
|
18302
|
-
// src/features/szenen/areas/MediaArea.tsx
|
|
18303
|
-
var import_react13 = require("react");
|
|
18304
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
18305
|
-
var leer = async () => ({ kind: "ok", value: [] });
|
|
18306
|
-
var MediaArea = ({ port }) => {
|
|
18307
|
-
const media = port.media;
|
|
18308
|
-
const [versionInput, setVersionInput] = (0, import_react13.useState)("");
|
|
18309
|
-
const [versionId, setVersionId] = (0, import_react13.useState)("");
|
|
18310
|
-
const [itemInput, setItemInput] = (0, import_react13.useState)("");
|
|
18311
|
-
const [itemId, setItemId] = (0, import_react13.useState)("");
|
|
18312
|
-
const [assetId, setAssetId] = (0, import_react13.useState)("");
|
|
18313
|
-
const [role, setRole] = (0, import_react13.useState)("reference");
|
|
18314
|
-
const [position, setPosition] = (0, import_react13.useState)("0");
|
|
18315
|
-
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
18316
|
-
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
18317
|
-
const [refresh, setRefresh] = (0, import_react13.useState)(0);
|
|
18318
|
-
const [versionPhase] = usePortQuery(
|
|
18319
|
-
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
18320
|
-
[media, versionId, refresh]
|
|
18321
|
-
);
|
|
18322
|
-
const [itemPhase] = usePortQuery(
|
|
18323
|
-
() => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
|
|
18324
|
-
[media, itemId, refresh]
|
|
18325
|
-
);
|
|
18326
|
-
const zuordnen = async () => {
|
|
18327
|
-
if (!versionInput.trim() || !assetId.trim()) {
|
|
18328
|
-
setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
|
|
18329
|
-
return;
|
|
18330
|
-
}
|
|
18331
|
-
const parsedPosition = Number(position);
|
|
18332
|
-
if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
|
|
18333
|
-
setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
|
|
18334
|
-
return;
|
|
18335
|
-
}
|
|
18336
|
-
setBusy(true);
|
|
18337
|
-
const result = await media.attachVersionMedium({
|
|
18338
|
-
versionId: versionInput.trim(),
|
|
18339
|
-
assetId: assetId.trim(),
|
|
18340
|
-
role,
|
|
18341
|
-
position: parsedPosition
|
|
18342
|
-
});
|
|
18343
|
-
setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
|
|
18344
|
-
if (result.kind === "ok") {
|
|
18345
|
-
setVersionId(versionInput.trim());
|
|
18346
|
-
setRefresh((value) => value + 1);
|
|
18347
|
-
}
|
|
18348
|
-
setBusy(false);
|
|
18349
|
-
};
|
|
18350
|
-
const entfernen = async (medium) => {
|
|
18351
|
-
setBusy(true);
|
|
18352
|
-
const result = await media.detachVersionMedium({
|
|
18353
|
-
versionId,
|
|
18354
|
-
assetId: medium.assetId,
|
|
18355
|
-
role: medium.role
|
|
18356
|
-
});
|
|
18357
|
-
setNotiz(noticeFor(result, "Referenzmedium entfernen"));
|
|
18358
|
-
if (result.kind === "ok") setRefresh((value) => value + 1);
|
|
18359
|
-
setBusy(false);
|
|
18360
|
-
};
|
|
18361
|
-
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
18362
|
-
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
18363
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
18364
|
-
/* @__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." }),
|
|
18365
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
18366
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Version" }),
|
|
18367
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
18368
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
18369
|
-
"Version-ID",
|
|
18370
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
18371
|
-
] }),
|
|
18372
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
18373
|
-
] }),
|
|
18374
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
18375
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
18376
|
-
"Asset-ID",
|
|
18377
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
18378
|
-
] }),
|
|
18379
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
18380
|
-
"Rolle",
|
|
18381
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
18382
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "reference", children: "reference" }),
|
|
18383
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "mask", children: "mask" }),
|
|
18384
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "palette", children: "palette" }),
|
|
18385
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "example", children: "example" })
|
|
18386
|
-
] })
|
|
18387
|
-
] }),
|
|
18388
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
18389
|
-
"Position",
|
|
18390
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
18391
|
-
] }),
|
|
18392
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
18393
|
-
] }),
|
|
18394
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
18395
|
-
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
18396
|
-
"Versionsmedien konnten nicht geladen werden: ",
|
|
18397
|
-
versionPhase.message
|
|
18398
|
-
] }),
|
|
18399
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
18400
|
-
"Version ",
|
|
18401
|
-
versionId,
|
|
18402
|
-
" hat keine Medien."
|
|
18403
|
-
] }),
|
|
18404
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
18405
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
18406
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
18407
|
-
medium.role,
|
|
18408
|
-
" \xB7 Position ",
|
|
18409
|
-
medium.position
|
|
18410
|
-
] }),
|
|
18411
|
-
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
18412
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
18413
|
-
] }, `${medium.assetId}:${medium.role}`)) })
|
|
18414
|
-
] }),
|
|
18415
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
18416
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Item-Medien" }),
|
|
18417
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
18418
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
18419
|
-
"Item-ID",
|
|
18420
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
18421
|
-
] }),
|
|
18422
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
18423
|
-
] }),
|
|
18424
|
-
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
18425
|
-
"Item-Medien konnten nicht geladen werden: ",
|
|
18426
|
-
itemPhase.message
|
|
18427
|
-
] }),
|
|
18428
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
18429
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
18430
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
18431
|
-
medium.role,
|
|
18432
|
-
" \xB7 Position ",
|
|
18433
|
-
medium.position
|
|
18434
|
-
] }),
|
|
18435
|
-
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
18436
|
-
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
18437
|
-
] }),
|
|
18438
|
-
notiz && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
18439
|
-
] });
|
|
18440
|
-
};
|
|
19124
|
+
var import_react17 = require("react");
|
|
18441
19125
|
|
|
18442
19126
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
18443
19127
|
var import_react16 = require("react");
|
|
18444
19128
|
|
|
18445
19129
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
18446
19130
|
var import_react14 = require("react");
|
|
18447
|
-
var
|
|
19131
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
18448
19132
|
var Diagnosen = ({ befunde, testId }) => {
|
|
18449
19133
|
if (befunde.length === 0) return null;
|
|
18450
|
-
return /* @__PURE__ */ (0,
|
|
18451
|
-
/* @__PURE__ */ (0,
|
|
18452
|
-
d.proposal_type && /* @__PURE__ */ (0,
|
|
19134
|
+
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: [
|
|
19135
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.code }),
|
|
19136
|
+
d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
18453
19137
|
" \xB7 ",
|
|
18454
|
-
/* @__PURE__ */ (0,
|
|
19138
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: d.proposal_type })
|
|
18455
19139
|
] }),
|
|
18456
|
-
d.pointer && /* @__PURE__ */ (0,
|
|
19140
|
+
d.pointer && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
18457
19141
|
" \xB7 ",
|
|
18458
|
-
/* @__PURE__ */ (0,
|
|
19142
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.pointer })
|
|
18459
19143
|
] }),
|
|
18460
|
-
typeof d.line === "number" && /* @__PURE__ */ (0,
|
|
19144
|
+
typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
18461
19145
|
" \xB7 Zeile ",
|
|
18462
19146
|
d.line,
|
|
18463
19147
|
", Spalte ",
|
|
18464
19148
|
d.column
|
|
18465
19149
|
] }),
|
|
18466
|
-
/* @__PURE__ */ (0,
|
|
19150
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: d.message })
|
|
18467
19151
|
] }, i)) });
|
|
18468
19152
|
};
|
|
18469
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0,
|
|
18470
|
-
/* @__PURE__ */ (0,
|
|
19153
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
19154
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-status", children: [
|
|
18471
19155
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
18472
19156
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
18473
19157
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
18474
19158
|
] }),
|
|
18475
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */ (0,
|
|
18476
|
-
/* @__PURE__ */ (0,
|
|
18477
|
-
/* @__PURE__ */ (0,
|
|
18478
|
-
/* @__PURE__ */ (0,
|
|
19159
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19160
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Verwertbar" }),
|
|
19161
|
+
/* @__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: [
|
|
19162
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: p.type }),
|
|
18479
19163
|
" \u2014 ",
|
|
18480
19164
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
18481
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0,
|
|
18482
|
-
/* @__PURE__ */ (0,
|
|
19165
|
+
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: [
|
|
19166
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: l.pointer }),
|
|
18483
19167
|
": ",
|
|
18484
19168
|
l.reason
|
|
18485
19169
|
] }, i)) })
|
|
18486
19170
|
] }, p.type)) })
|
|
18487
19171
|
] }),
|
|
18488
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */ (0,
|
|
18489
|
-
/* @__PURE__ */ (0,
|
|
18490
|
-
/* @__PURE__ */ (0,
|
|
18491
|
-
/* @__PURE__ */ (0,
|
|
18492
|
-
/* @__PURE__ */ (0,
|
|
19172
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
19173
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Nicht verwertbar" }),
|
|
19174
|
+
/* @__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: [
|
|
19175
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: r.type }),
|
|
19176
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
18493
19177
|
] }, r.type)) })
|
|
18494
19178
|
] })
|
|
18495
19179
|
] });
|
|
@@ -18534,16 +19218,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18534
19218
|
setLaeuft(false);
|
|
18535
19219
|
}
|
|
18536
19220
|
}
|
|
18537
|
-
return /* @__PURE__ */ (0,
|
|
18538
|
-
/* @__PURE__ */ (0,
|
|
18539
|
-
/* @__PURE__ */ (0,
|
|
19221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
19222
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h4", { children: "Antwort retten" }),
|
|
19223
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
18540
19224
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
18541
|
-
/* @__PURE__ */ (0,
|
|
19225
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "ohne" }),
|
|
18542
19226
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
18543
19227
|
] }),
|
|
18544
|
-
/* @__PURE__ */ (0,
|
|
18545
|
-
/* @__PURE__ */ (0,
|
|
18546
|
-
/* @__PURE__ */ (0,
|
|
19228
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
|
|
19229
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
19230
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18547
19231
|
"textarea",
|
|
18548
19232
|
{
|
|
18549
19233
|
readOnly: true,
|
|
@@ -18554,12 +19238,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18554
19238
|
}
|
|
18555
19239
|
)
|
|
18556
19240
|
] }),
|
|
18557
|
-
/* @__PURE__ */ (0,
|
|
18558
|
-
/* @__PURE__ */ (0,
|
|
19241
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
|
|
19242
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
18559
19243
|
"Arbeitskopie",
|
|
18560
19244
|
bearbeitet ? " (bearbeitet)" : ""
|
|
18561
19245
|
] }),
|
|
18562
|
-
/* @__PURE__ */ (0,
|
|
19246
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18563
19247
|
"textarea",
|
|
18564
19248
|
{
|
|
18565
19249
|
rows: 8,
|
|
@@ -18569,8 +19253,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18569
19253
|
}
|
|
18570
19254
|
)
|
|
18571
19255
|
] }),
|
|
18572
|
-
/* @__PURE__ */ (0,
|
|
18573
|
-
/* @__PURE__ */ (0,
|
|
19256
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
|
|
19257
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18574
19258
|
"button",
|
|
18575
19259
|
{
|
|
18576
19260
|
type: "button",
|
|
@@ -18580,7 +19264,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18580
19264
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
18581
19265
|
}
|
|
18582
19266
|
),
|
|
18583
|
-
/* @__PURE__ */ (0,
|
|
19267
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18584
19268
|
"button",
|
|
18585
19269
|
{
|
|
18586
19270
|
type: "button",
|
|
@@ -18590,7 +19274,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18590
19274
|
children: "Arbeitsfassung speichern"
|
|
18591
19275
|
}
|
|
18592
19276
|
),
|
|
18593
|
-
arbeitskopie !== null && /* @__PURE__ */ (0,
|
|
19277
|
+
arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18594
19278
|
"button",
|
|
18595
19279
|
{
|
|
18596
19280
|
type: "button",
|
|
@@ -18605,15 +19289,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18605
19289
|
}
|
|
18606
19290
|
)
|
|
18607
19291
|
] }),
|
|
18608
|
-
meldung && /* @__PURE__ */ (0,
|
|
18609
|
-
bewertung && /* @__PURE__ */ (0,
|
|
18610
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
18611
|
-
/* @__PURE__ */ (0,
|
|
18612
|
-
/* @__PURE__ */ (0,
|
|
19292
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
19293
|
+
bewertung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ausbeute, { bewertung }),
|
|
19294
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", children: [
|
|
19295
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Befunde an dieser Fassung" }),
|
|
19296
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
18613
19297
|
] }),
|
|
18614
|
-
gesichert && /* @__PURE__ */ (0,
|
|
19298
|
+
gesichert && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
|
|
18615
19299
|
"Gespeichert als Arbeitsfassung ",
|
|
18616
|
-
/* @__PURE__ */ (0,
|
|
19300
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: gesichert.recovery_id }),
|
|
18617
19301
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
18618
19302
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
18619
19303
|
] })
|
|
@@ -18622,7 +19306,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
18622
19306
|
|
|
18623
19307
|
// src/features/szenen/areas/ChainActions.tsx
|
|
18624
19308
|
var import_react15 = require("react");
|
|
18625
|
-
var
|
|
19309
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
18626
19310
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
18627
19311
|
const [graph, setGraph] = (0, import_react15.useState)(null);
|
|
18628
19312
|
const [meldung, setMeldung] = (0, import_react15.useState)(null);
|
|
@@ -18648,14 +19332,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
18648
19332
|
setLaeuft(false);
|
|
18649
19333
|
}
|
|
18650
19334
|
}
|
|
18651
|
-
return /* @__PURE__ */ (0,
|
|
18652
|
-
/* @__PURE__ */ (0,
|
|
18653
|
-
/* @__PURE__ */ (0,
|
|
19335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
19336
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { children: "Draft-Kette" }),
|
|
19337
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
18654
19338
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
18655
|
-
/* @__PURE__ */ (0,
|
|
19339
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "ohne" }),
|
|
18656
19340
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
18657
19341
|
] }),
|
|
18658
|
-
!graph && /* @__PURE__ */ (0,
|
|
19342
|
+
!graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18659
19343
|
"button",
|
|
18660
19344
|
{
|
|
18661
19345
|
type: "button",
|
|
@@ -18665,34 +19349,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
18665
19349
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
18666
19350
|
}
|
|
18667
19351
|
),
|
|
18668
|
-
graph && /* @__PURE__ */ (0,
|
|
18669
|
-
/* @__PURE__ */ (0,
|
|
19352
|
+
graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
|
|
19353
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { children: [
|
|
18670
19354
|
"Kette ",
|
|
18671
|
-
/* @__PURE__ */ (0,
|
|
19355
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: graph.chainId }),
|
|
18672
19356
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
18673
19357
|
] }),
|
|
18674
|
-
/* @__PURE__ */ (0,
|
|
18675
|
-
/* @__PURE__ */ (0,
|
|
19358
|
+
/* @__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: [
|
|
19359
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: k.type }),
|
|
18676
19360
|
" \u2014 Element ",
|
|
18677
|
-
/* @__PURE__ */ (0,
|
|
19361
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.elementId }),
|
|
18678
19362
|
", Entwurf ",
|
|
18679
|
-
/* @__PURE__ */ (0,
|
|
19363
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.draftId }),
|
|
18680
19364
|
" (Revision ",
|
|
18681
19365
|
k.revision,
|
|
18682
19366
|
")"
|
|
18683
19367
|
] }, k.type)) }),
|
|
18684
|
-
graph.missing.length > 0 && /* @__PURE__ */ (0,
|
|
18685
|
-
/* @__PURE__ */ (0,
|
|
18686
|
-
/* @__PURE__ */ (0,
|
|
18687
|
-
/* @__PURE__ */ (0,
|
|
19368
|
+
graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
19369
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
19370
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { children: [
|
|
19371
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: m.type }),
|
|
18688
19372
|
": ",
|
|
18689
19373
|
m.reason
|
|
18690
19374
|
] }, m.type)) })
|
|
18691
19375
|
] })
|
|
18692
19376
|
] }),
|
|
18693
|
-
shotKnoten && /* @__PURE__ */ (0,
|
|
18694
|
-
/* @__PURE__ */ (0,
|
|
18695
|
-
/* @__PURE__ */ (0,
|
|
19377
|
+
shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
19378
|
+
/* @__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".' }),
|
|
19379
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18696
19380
|
PromptStartAction,
|
|
18697
19381
|
{
|
|
18698
19382
|
port,
|
|
@@ -18700,12 +19384,12 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
18700
19384
|
}
|
|
18701
19385
|
)
|
|
18702
19386
|
] }),
|
|
18703
|
-
meldung && /* @__PURE__ */ (0,
|
|
19387
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
18704
19388
|
] });
|
|
18705
19389
|
};
|
|
18706
19390
|
|
|
18707
19391
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
18708
|
-
var
|
|
19392
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
18709
19393
|
var MODUS_TEXT = {
|
|
18710
19394
|
prompt: "Nur Prompt",
|
|
18711
19395
|
image: "Nur Bild",
|
|
@@ -18723,15 +19407,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
18723
19407
|
setKopiert(false);
|
|
18724
19408
|
}
|
|
18725
19409
|
}
|
|
18726
|
-
return /* @__PURE__ */ (0,
|
|
18727
|
-
/* @__PURE__ */ (0,
|
|
19410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
19411
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("summary", { children: [
|
|
18728
19412
|
titel,
|
|
18729
19413
|
" (",
|
|
18730
19414
|
text.length,
|
|
18731
19415
|
" Zeichen)"
|
|
18732
19416
|
] }),
|
|
18733
|
-
/* @__PURE__ */ (0,
|
|
18734
|
-
/* @__PURE__ */ (0,
|
|
19417
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-beleg__kopf", children: [
|
|
19418
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18735
19419
|
"button",
|
|
18736
19420
|
{
|
|
18737
19421
|
type: "button",
|
|
@@ -18740,9 +19424,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
18740
19424
|
children: "Kopieren"
|
|
18741
19425
|
}
|
|
18742
19426
|
),
|
|
18743
|
-
kopiert && /* @__PURE__ */ (0,
|
|
19427
|
+
kopiert && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
18744
19428
|
] }),
|
|
18745
|
-
/* @__PURE__ */ (0,
|
|
19429
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18746
19430
|
"textarea",
|
|
18747
19431
|
{
|
|
18748
19432
|
ref: feld,
|
|
@@ -18756,8 +19440,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
18756
19440
|
)
|
|
18757
19441
|
] });
|
|
18758
19442
|
};
|
|
18759
|
-
var Belege = ({ lauf }) => /* @__PURE__ */ (0,
|
|
18760
|
-
lauf.raw_output ? /* @__PURE__ */ (0,
|
|
19443
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
19444
|
+
lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18761
19445
|
BelegFeld,
|
|
18762
19446
|
{
|
|
18763
19447
|
titel: "Rohantwort des Modells",
|
|
@@ -18768,9 +19452,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
|
|
|
18768
19452
|
) : (
|
|
18769
19453
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
18770
19454
|
das Modell hat also nicht „falsch geantwortet". */
|
|
18771
|
-
/* @__PURE__ */ (0,
|
|
19455
|
+
/* @__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)." })
|
|
18772
19456
|
),
|
|
18773
|
-
/* @__PURE__ */ (0,
|
|
19457
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18774
19458
|
BelegFeld,
|
|
18775
19459
|
{
|
|
18776
19460
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -18782,18 +19466,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
|
|
|
18782
19466
|
] });
|
|
18783
19467
|
var Herkunft = ({ lauf }) => {
|
|
18784
19468
|
if (!lauf.follows) return null;
|
|
18785
|
-
return /* @__PURE__ */ (0,
|
|
19469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
18786
19470
|
"Folgt auf Lauf ",
|
|
18787
|
-
/* @__PURE__ */ (0,
|
|
19471
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: lauf.follows.run_id }),
|
|
18788
19472
|
".",
|
|
18789
19473
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
18790
19474
|
] });
|
|
18791
19475
|
};
|
|
18792
19476
|
var Widerspruch = ({ lauf }) => {
|
|
18793
19477
|
if (!lauf.reply) return null;
|
|
18794
|
-
return /* @__PURE__ */ (0,
|
|
18795
|
-
/* @__PURE__ */ (0,
|
|
18796
|
-
/* @__PURE__ */ (0,
|
|
19478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
19479
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
19480
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: lauf.reply })
|
|
18797
19481
|
] });
|
|
18798
19482
|
};
|
|
18799
19483
|
function readAsBase642(datei) {
|
|
@@ -18900,10 +19584,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18900
19584
|
if (item.images.length === 1) onWaehlen(deckbild);
|
|
18901
19585
|
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
18902
19586
|
}
|
|
18903
|
-
return /* @__PURE__ */ (0,
|
|
18904
|
-
/* @__PURE__ */ (0,
|
|
18905
|
-
/* @__PURE__ */ (0,
|
|
18906
|
-
/* @__PURE__ */ (0,
|
|
19587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
19588
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19589
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Bild aus dem Bestand" }),
|
|
19590
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18907
19591
|
"input",
|
|
18908
19592
|
{
|
|
18909
19593
|
type: "search",
|
|
@@ -18917,23 +19601,23 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18917
19601
|
}
|
|
18918
19602
|
)
|
|
18919
19603
|
] }),
|
|
18920
|
-
items.status === "loading" && /* @__PURE__ */ (0,
|
|
18921
|
-
items.status === "error" && /* @__PURE__ */ (0,
|
|
19604
|
+
items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Bilder werden geladen \u2026" }),
|
|
19605
|
+
items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
18922
19606
|
"Der Bildbestand ist nicht lesbar: ",
|
|
18923
19607
|
items.message
|
|
18924
19608
|
] }),
|
|
18925
|
-
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0,
|
|
18926
|
-
werke.length > 0 && /* @__PURE__ */ (0,
|
|
19609
|
+
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." }),
|
|
19610
|
+
werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18927
19611
|
"div",
|
|
18928
19612
|
{
|
|
18929
19613
|
className: "szenen-bildwahl__browser",
|
|
18930
19614
|
ref: browser,
|
|
18931
19615
|
"data-testid": "bildwahl-werke",
|
|
18932
|
-
children: /* @__PURE__ */ (0,
|
|
19616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
18933
19617
|
const deckbild = item.images[0];
|
|
18934
19618
|
if (!deckbild) return null;
|
|
18935
19619
|
const fokussiert = item.itemRef === fokus;
|
|
18936
|
-
return /* @__PURE__ */ (0,
|
|
19620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
18937
19621
|
"button",
|
|
18938
19622
|
{
|
|
18939
19623
|
type: "button",
|
|
@@ -18943,7 +19627,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18943
19627
|
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
18944
19628
|
title: item.title,
|
|
18945
19629
|
children: [
|
|
18946
|
-
/* @__PURE__ */ (0,
|
|
19630
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18947
19631
|
Kachel,
|
|
18948
19632
|
{
|
|
18949
19633
|
quelle: quelleVon(deckbild),
|
|
@@ -18951,7 +19635,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18951
19635
|
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
18952
19636
|
}
|
|
18953
19637
|
),
|
|
18954
|
-
item.images.length > 1 && /* @__PURE__ */ (0,
|
|
19638
|
+
item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
18955
19639
|
"span",
|
|
18956
19640
|
{
|
|
18957
19641
|
className: "szenen-bildwahl__anzahl",
|
|
@@ -18962,22 +19646,22 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18962
19646
|
]
|
|
18963
19647
|
}
|
|
18964
19648
|
),
|
|
18965
|
-
/* @__PURE__ */ (0,
|
|
19649
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
18966
19650
|
]
|
|
18967
19651
|
}
|
|
18968
19652
|
) }, item.itemRef);
|
|
18969
19653
|
}) })
|
|
18970
19654
|
}
|
|
18971
19655
|
),
|
|
18972
|
-
werk && /* @__PURE__ */ (0,
|
|
18973
|
-
/* @__PURE__ */ (0,
|
|
18974
|
-
/* @__PURE__ */ (0,
|
|
19656
|
+
werk && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
19657
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
19658
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
18975
19659
|
werk.title,
|
|
18976
19660
|
" \xB7 ",
|
|
18977
19661
|
werk.images.length,
|
|
18978
19662
|
" Bilder"
|
|
18979
19663
|
] }),
|
|
18980
|
-
/* @__PURE__ */ (0,
|
|
19664
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
18981
19665
|
"button",
|
|
18982
19666
|
{
|
|
18983
19667
|
type: "button",
|
|
@@ -18988,7 +19672,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18988
19672
|
}
|
|
18989
19673
|
)
|
|
18990
19674
|
] }),
|
|
18991
|
-
/* @__PURE__ */ (0,
|
|
19675
|
+
/* @__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)(
|
|
18992
19676
|
"button",
|
|
18993
19677
|
{
|
|
18994
19678
|
type: "button",
|
|
@@ -18998,7 +19682,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
18998
19682
|
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
18999
19683
|
title: bild.title,
|
|
19000
19684
|
children: [
|
|
19001
|
-
/* @__PURE__ */ (0,
|
|
19685
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19002
19686
|
Kachel,
|
|
19003
19687
|
{
|
|
19004
19688
|
quelle: quelleVon(bild),
|
|
@@ -19006,7 +19690,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19006
19690
|
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
19007
19691
|
}
|
|
19008
19692
|
),
|
|
19009
|
-
/* @__PURE__ */ (0,
|
|
19693
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
|
|
19010
19694
|
"#",
|
|
19011
19695
|
position + 1
|
|
19012
19696
|
] })
|
|
@@ -19014,10 +19698,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
19014
19698
|
}
|
|
19015
19699
|
) }, bild.mediaRef)) })
|
|
19016
19700
|
] }),
|
|
19017
|
-
gewaehlt.length > 0 && /* @__PURE__ */ (0,
|
|
19018
|
-
/* @__PURE__ */ (0,
|
|
19019
|
-
/* @__PURE__ */ (0,
|
|
19020
|
-
/* @__PURE__ */ (0,
|
|
19701
|
+
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: [
|
|
19702
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
19703
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
19704
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19021
19705
|
"button",
|
|
19022
19706
|
{
|
|
19023
19707
|
type: "button",
|
|
@@ -19053,6 +19737,15 @@ var DeriveArea = ({ port, contextId }) => {
|
|
|
19053
19737
|
() => port.derivation.listPolicies(contextId),
|
|
19054
19738
|
[port, contextId]
|
|
19055
19739
|
);
|
|
19740
|
+
const sortiert = (0, import_react16.useMemo)(() => regeln.status === "ready" ? [...regeln.value].sort((a, b) => {
|
|
19741
|
+
const szeneZuerst = Number(b.produces.includes("scene")) - Number(a.produces.includes("scene"));
|
|
19742
|
+
return szeneZuerst !== 0 ? szeneZuerst : a.title.localeCompare(b.title, "de");
|
|
19743
|
+
}) : [], [regeln]);
|
|
19744
|
+
(0, import_react16.useEffect)(() => {
|
|
19745
|
+
if (policyVersionId) return;
|
|
19746
|
+
const fuerSzene = sortiert.find((r) => r.produces.includes("scene"));
|
|
19747
|
+
if (fuerSzene) setPolicyVersionId(fuerSzene.versionId);
|
|
19748
|
+
}, [sortiert, policyVersionId]);
|
|
19056
19749
|
const gewaehlt = regeln.status === "ready" ? regeln.value.find((r) => r.versionId === policyVersionId) ?? null : null;
|
|
19057
19750
|
async function starten(folgt) {
|
|
19058
19751
|
if (!gewaehlt) {
|
|
@@ -19127,12 +19820,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19127
19820
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
19128
19821
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
19129
19822
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
19130
|
-
return /* @__PURE__ */ (0,
|
|
19131
|
-
/* @__PURE__ */ (0,
|
|
19132
|
-
/* @__PURE__ */ (0,
|
|
19133
|
-
/* @__PURE__ */ (0,
|
|
19134
|
-
/* @__PURE__ */ (0,
|
|
19135
|
-
/* @__PURE__ */ (0,
|
|
19823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
19824
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
19825
|
+
/* @__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." }),
|
|
19826
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19827
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Beanstandung" }),
|
|
19828
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19136
19829
|
"textarea",
|
|
19137
19830
|
{
|
|
19138
19831
|
rows: 4,
|
|
@@ -19142,9 +19835,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19142
19835
|
}
|
|
19143
19836
|
)
|
|
19144
19837
|
] }),
|
|
19145
|
-
/* @__PURE__ */ (0,
|
|
19146
|
-
/* @__PURE__ */ (0,
|
|
19147
|
-
/* @__PURE__ */ (0,
|
|
19838
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19839
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
19840
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19148
19841
|
"textarea",
|
|
19149
19842
|
{
|
|
19150
19843
|
rows: 2,
|
|
@@ -19155,8 +19848,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19155
19848
|
}
|
|
19156
19849
|
)
|
|
19157
19850
|
] }),
|
|
19158
|
-
bilderFehlen && /* @__PURE__ */ (0,
|
|
19159
|
-
/* @__PURE__ */ (0,
|
|
19851
|
+
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." }),
|
|
19852
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19160
19853
|
"button",
|
|
19161
19854
|
{
|
|
19162
19855
|
type: "button",
|
|
@@ -19196,19 +19889,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19196
19889
|
setMeldung(ergebnis.message);
|
|
19197
19890
|
}
|
|
19198
19891
|
}
|
|
19199
|
-
return /* @__PURE__ */ (0,
|
|
19200
|
-
/* @__PURE__ */ (0,
|
|
19201
|
-
regeln.status === "loading" && /* @__PURE__ */ (0,
|
|
19202
|
-
regeln.status === "error" && /* @__PURE__ */ (0,
|
|
19892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
19893
|
+
/* @__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." }),
|
|
19894
|
+
regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Regeln werden geladen \u2026" }),
|
|
19895
|
+
regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
19203
19896
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
19204
19897
|
regeln.message
|
|
19205
19898
|
] }),
|
|
19206
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0,
|
|
19899
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-empty", children: [
|
|
19207
19900
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
19208
|
-
/* @__PURE__ */ (0,
|
|
19209
|
-
') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie
|
|
19901
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "scene_derivation_policy" }),
|
|
19902
|
+
') 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.'
|
|
19210
19903
|
] }),
|
|
19211
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0,
|
|
19904
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19212
19905
|
"form",
|
|
19213
19906
|
{
|
|
19214
19907
|
className: "szenen-form",
|
|
@@ -19217,17 +19910,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19217
19910
|
void starten();
|
|
19218
19911
|
},
|
|
19219
19912
|
children: [
|
|
19220
|
-
/* @__PURE__ */ (0,
|
|
19221
|
-
/* @__PURE__ */ (0,
|
|
19222
|
-
/* @__PURE__ */ (0,
|
|
19913
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19914
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Regel" }),
|
|
19915
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19223
19916
|
"select",
|
|
19224
19917
|
{
|
|
19225
19918
|
value: policyVersionId,
|
|
19226
19919
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
19227
19920
|
"data-testid": "regel-auswahl",
|
|
19228
19921
|
children: [
|
|
19229
|
-
/* @__PURE__ */ (0,
|
|
19230
|
-
|
|
19922
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
19923
|
+
sortiert.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("option", { value: regel.versionId, children: [
|
|
19231
19924
|
regel.title,
|
|
19232
19925
|
" (",
|
|
19233
19926
|
regel.produces.join(", "),
|
|
@@ -19237,21 +19930,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19237
19930
|
}
|
|
19238
19931
|
)
|
|
19239
19932
|
] }),
|
|
19240
|
-
/* @__PURE__ */ (0,
|
|
19241
|
-
/* @__PURE__ */ (0,
|
|
19242
|
-
/* @__PURE__ */ (0,
|
|
19933
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19934
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Eingang" }),
|
|
19935
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19243
19936
|
"select",
|
|
19244
19937
|
{
|
|
19245
19938
|
value: modus,
|
|
19246
19939
|
onChange: (e) => setModus(e.target.value),
|
|
19247
19940
|
"data-testid": "modus-auswahl",
|
|
19248
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0,
|
|
19941
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
19249
19942
|
}
|
|
19250
19943
|
)
|
|
19251
19944
|
] }),
|
|
19252
|
-
modus !== "image" && /* @__PURE__ */ (0,
|
|
19253
|
-
/* @__PURE__ */ (0,
|
|
19254
|
-
/* @__PURE__ */ (0,
|
|
19945
|
+
modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19946
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Referenzprompt" }),
|
|
19947
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19255
19948
|
"textarea",
|
|
19256
19949
|
{
|
|
19257
19950
|
value: promptText,
|
|
@@ -19261,8 +19954,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19261
19954
|
}
|
|
19262
19955
|
)
|
|
19263
19956
|
] }),
|
|
19264
|
-
modus !== "prompt" && /* @__PURE__ */ (0,
|
|
19265
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
19957
|
+
modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
19958
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19266
19959
|
BildWaehler,
|
|
19267
19960
|
{
|
|
19268
19961
|
port,
|
|
@@ -19271,9 +19964,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19271
19964
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
19272
19965
|
}
|
|
19273
19966
|
),
|
|
19274
|
-
/* @__PURE__ */ (0,
|
|
19275
|
-
/* @__PURE__ */ (0,
|
|
19276
|
-
/* @__PURE__ */ (0,
|
|
19967
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
19968
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
19969
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19277
19970
|
"input",
|
|
19278
19971
|
{
|
|
19279
19972
|
type: "file",
|
|
@@ -19283,40 +19976,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19283
19976
|
"data-testid": "bild-eingabe"
|
|
19284
19977
|
}
|
|
19285
19978
|
),
|
|
19286
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
19979
|
+
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." })
|
|
19287
19980
|
] })
|
|
19288
19981
|
] }),
|
|
19289
|
-
/* @__PURE__ */ (0,
|
|
19982
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
19290
19983
|
]
|
|
19291
19984
|
}
|
|
19292
19985
|
),
|
|
19293
|
-
meldung && /* @__PURE__ */ (0,
|
|
19294
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */ (0,
|
|
19295
|
-
/* @__PURE__ */ (0,
|
|
19296
|
-
/* @__PURE__ */ (0,
|
|
19297
|
-
/* @__PURE__ */ (0,
|
|
19986
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
19987
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
19988
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
|
|
19989
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
|
|
19990
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: lauf.failure?.class }),
|
|
19298
19991
|
" \u2014 ",
|
|
19299
19992
|
lauf.failure?.message
|
|
19300
19993
|
] }),
|
|
19301
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
19302
|
-
/* @__PURE__ */ (0,
|
|
19303
|
-
/* @__PURE__ */ (0,
|
|
19994
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
19995
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Befunde" }),
|
|
19996
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
19304
19997
|
] }),
|
|
19305
|
-
/* @__PURE__ */ (0,
|
|
19306
|
-
/* @__PURE__ */ (0,
|
|
19307
|
-
/* @__PURE__ */ (0,
|
|
19308
|
-
/* @__PURE__ */ (0,
|
|
19998
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
|
|
19999
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
|
|
20000
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
|
|
20001
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RecoveryPanel, { port, lauf }),
|
|
19309
20002
|
folgeblock(lauf)
|
|
19310
20003
|
] }),
|
|
19311
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0,
|
|
19312
|
-
/* @__PURE__ */ (0,
|
|
19313
|
-
/* @__PURE__ */ (0,
|
|
19314
|
-
/* @__PURE__ */ (0,
|
|
19315
|
-
/* @__PURE__ */ (0,
|
|
19316
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */ (0,
|
|
19317
|
-
/* @__PURE__ */ (0,
|
|
19318
|
-
/* @__PURE__ */ (0,
|
|
19319
|
-
/* @__PURE__ */ (0,
|
|
20004
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
20005
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Vorschlag" }),
|
|
20006
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
|
|
20007
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
|
|
20008
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
20009
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
20010
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
20011
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
|
|
20012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: k.field }),
|
|
19320
20013
|
": Bild sagt \u201E",
|
|
19321
20014
|
k.from_image,
|
|
19322
20015
|
'", Prompt sagt \u201E',
|
|
@@ -19324,31 +20017,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19324
20017
|
'". Nichts davon wurde \xFCbernommen.'
|
|
19325
20018
|
] }, i)) })
|
|
19326
20019
|
] }),
|
|
19327
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0,
|
|
19328
|
-
/* @__PURE__ */ (0,
|
|
19329
|
-
/* @__PURE__ */ (0,
|
|
19330
|
-
/* @__PURE__ */ (0,
|
|
20020
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
20021
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Nicht ableitbar" }),
|
|
20022
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
|
|
20023
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: n.field }),
|
|
19331
20024
|
": ",
|
|
19332
20025
|
n.reason
|
|
19333
20026
|
] }, i)) })
|
|
19334
20027
|
] }),
|
|
19335
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */ (0,
|
|
19336
|
-
/* @__PURE__ */ (0,
|
|
19337
|
-
/* @__PURE__ */ (0,
|
|
20028
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
20029
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
|
|
20030
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: a }, i)) })
|
|
19338
20031
|
] }),
|
|
19339
20032
|
lauf.proposals.map((vorschlag) => {
|
|
19340
20033
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
19341
20034
|
const fertig = uebernommen[vorschlag.type];
|
|
19342
|
-
return /* @__PURE__ */ (0,
|
|
20035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
19343
20036
|
"article",
|
|
19344
20037
|
{
|
|
19345
20038
|
className: "szenen-proposal",
|
|
19346
20039
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
19347
20040
|
children: [
|
|
19348
|
-
/* @__PURE__ */ (0,
|
|
19349
|
-
!fertig && /* @__PURE__ */ (0,
|
|
19350
|
-
/* @__PURE__ */ (0,
|
|
19351
|
-
/* @__PURE__ */ (0,
|
|
20041
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: vorschlag.type }),
|
|
20042
|
+
!fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
|
|
20043
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Titel" }),
|
|
20044
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19352
20045
|
"input",
|
|
19353
20046
|
{
|
|
19354
20047
|
type: "text",
|
|
@@ -19362,9 +20055,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19362
20055
|
}
|
|
19363
20056
|
)
|
|
19364
20057
|
] }),
|
|
19365
|
-
/* @__PURE__ */ (0,
|
|
19366
|
-
bezug && !fertig && /* @__PURE__ */ (0,
|
|
19367
|
-
/* @__PURE__ */ (0,
|
|
20058
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
20059
|
+
bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
20060
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19368
20061
|
ReferencePicker,
|
|
19369
20062
|
{
|
|
19370
20063
|
port,
|
|
@@ -19378,30 +20071,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19378
20071
|
}))
|
|
19379
20072
|
}
|
|
19380
20073
|
),
|
|
19381
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */ (0,
|
|
20074
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
19382
20075
|
"Zeigt auf Version ",
|
|
19383
|
-
/* @__PURE__ */ (0,
|
|
20076
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: referenzen[vorschlag.type] }),
|
|
19384
20077
|
"."
|
|
19385
20078
|
] }) : (
|
|
19386
20079
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
19387
20080
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
19388
20081
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
19389
|
-
/* @__PURE__ */ (0,
|
|
20082
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
19390
20083
|
"Diese ",
|
|
19391
|
-
/* @__PURE__ */ (0,
|
|
20084
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Einzel\xFCbernahme" }),
|
|
19392
20085
|
" braucht eine ver\xF6ffentlichte ",
|
|
19393
20086
|
bezug.refersTo,
|
|
19394
20087
|
"-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 ",
|
|
19395
|
-
/* @__PURE__ */ (0,
|
|
20088
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Draft-Kette" }),
|
|
19396
20089
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
19397
20090
|
] })
|
|
19398
20091
|
)
|
|
19399
20092
|
] }),
|
|
19400
|
-
fertig ? /* @__PURE__ */ (0,
|
|
20093
|
+
fertig ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-proposal__done", children: [
|
|
19401
20094
|
"Als Entwurf \xFCbernommen: ",
|
|
19402
|
-
/* @__PURE__ */ (0,
|
|
20095
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: fertig }),
|
|
19403
20096
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
19404
|
-
] }) : /* @__PURE__ */ (0,
|
|
20097
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19405
20098
|
"button",
|
|
19406
20099
|
{
|
|
19407
20100
|
type: "button",
|
|
@@ -19416,13 +20109,337 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
19416
20109
|
vorschlag.type
|
|
19417
20110
|
);
|
|
19418
20111
|
}),
|
|
19419
|
-
/* @__PURE__ */ (0,
|
|
19420
|
-
/* @__PURE__ */ (0,
|
|
20112
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChainActions, { port, runId: lauf.run_id }),
|
|
20113
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
|
|
19421
20114
|
folgeblock(lauf)
|
|
19422
20115
|
] })
|
|
19423
20116
|
] });
|
|
19424
20117
|
};
|
|
19425
20118
|
|
|
20119
|
+
// src/features/szenen/areas/SceneArea.tsx
|
|
20120
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
20121
|
+
var SceneArea = ({ port, contextId }) => {
|
|
20122
|
+
const kannAbleiten = capabilitiesOf(port).derivation;
|
|
20123
|
+
const [ableiten, setAbleiten] = (0, import_react17.useState)(false);
|
|
20124
|
+
const zeigeDerive = kannAbleiten && ableiten;
|
|
20125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
20126
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-elements__toolbar", children: [
|
|
20127
|
+
/* @__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." }),
|
|
20128
|
+
kannAbleiten && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20129
|
+
"button",
|
|
20130
|
+
{
|
|
20131
|
+
type: "button",
|
|
20132
|
+
className: "szenen-elements__new",
|
|
20133
|
+
"data-testid": "neu-aus-bild-text",
|
|
20134
|
+
"aria-expanded": ableiten,
|
|
20135
|
+
onClick: () => setAbleiten((offen) => !offen),
|
|
20136
|
+
children: ableiten ? "Zur\xFCck zu den Szenen" : "+ Neu aus Bild/Text"
|
|
20137
|
+
}
|
|
20138
|
+
)
|
|
20139
|
+
] }),
|
|
20140
|
+
!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." }),
|
|
20141
|
+
zeigeDerive ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DeriveArea, { port, contextId }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
20142
|
+
] });
|
|
20143
|
+
};
|
|
20144
|
+
|
|
20145
|
+
// src/features/szenen/areas/AdvancedArea.tsx
|
|
20146
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
20147
|
+
var AdvancedArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-erweitert", "data-testid": "bereich-erweitert", children: [
|
|
20148
|
+
/* @__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." }),
|
|
20149
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20150
|
+
ElementsArea,
|
|
20151
|
+
{
|
|
20152
|
+
port,
|
|
20153
|
+
contextId,
|
|
20154
|
+
restrictToTypes: ERWEITERT_TYPES,
|
|
20155
|
+
allTypesLabel: "alle erweiterten Typen",
|
|
20156
|
+
listTitle: "Erweitert"
|
|
20157
|
+
}
|
|
20158
|
+
)
|
|
20159
|
+
] });
|
|
20160
|
+
|
|
20161
|
+
// src/features/szenen/areas/PromptsArea.tsx
|
|
20162
|
+
var import_react18 = require("react");
|
|
20163
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
20164
|
+
var HERKUNFT_TEXT2 = {
|
|
20165
|
+
published: "aus ver\xF6ffentlichtem Shot",
|
|
20166
|
+
draft_chain: "aus Draft-Kette",
|
|
20167
|
+
scene_direct: "direkt aus Szene",
|
|
20168
|
+
unresolved: "Herkunft unvollst\xE4ndig"
|
|
20169
|
+
};
|
|
20170
|
+
var PromptsArea = ({ port, contextId }) => {
|
|
20171
|
+
const faehig = capabilitiesOf(port);
|
|
20172
|
+
const [nachladen, setNachladen] = (0, import_react18.useState)(0);
|
|
20173
|
+
const [offen, setOffen] = (0, import_react18.useState)(null);
|
|
20174
|
+
const [alleKontexte, setAlleKontexte] = (0, import_react18.useState)(false);
|
|
20175
|
+
const [mitFehllaeufen, setMitFehllaeufen] = (0, import_react18.useState)(false);
|
|
20176
|
+
const [herkunft, setHerkunft] = (0, import_react18.useState)("alle");
|
|
20177
|
+
const [phase] = usePortQuery(
|
|
20178
|
+
() => port.runs.listAllRuns ? port.runs.listAllRuns({ status: "all" }) : Promise.resolve({
|
|
20179
|
+
kind: "ok",
|
|
20180
|
+
value: { runs: [], hiddenByStatus: 0, hiddenByContext: 0, withoutContext: 0 }
|
|
20181
|
+
}),
|
|
20182
|
+
[port, nachladen]
|
|
20183
|
+
);
|
|
20184
|
+
const alle = phase.status === "ready" ? phase.value.runs : [];
|
|
20185
|
+
const sicht = (0, import_react18.useMemo)(() => selectPromptRuns(alle, {
|
|
20186
|
+
status: mitFehllaeufen ? "all" : "succeeded",
|
|
20187
|
+
...alleKontexte ? {} : { contextId }
|
|
20188
|
+
}), [alle, mitFehllaeufen, alleKontexte, contextId]);
|
|
20189
|
+
const titel = useLaufTitel(port, alle);
|
|
20190
|
+
const gezeigt = (0, import_react18.useMemo)(
|
|
20191
|
+
() => herkunft === "alle" ? sicht.runs : sicht.runs.filter((lauf) => groupOf(lauf).kind === herkunft),
|
|
20192
|
+
[sicht.runs, herkunft]
|
|
20193
|
+
);
|
|
20194
|
+
if (!faehig.promptOverview) {
|
|
20195
|
+
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." }) });
|
|
20196
|
+
}
|
|
20197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts", "data-testid": "prompts-bereich", children: [
|
|
20198
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts__toolbar", children: [
|
|
20199
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "szenen-prompts__heading", children: "Prompts" }),
|
|
20200
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20201
|
+
"Herkunft",
|
|
20202
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20203
|
+
"select",
|
|
20204
|
+
{
|
|
20205
|
+
"data-testid": "prompts-herkunft",
|
|
20206
|
+
value: herkunft,
|
|
20207
|
+
onChange: (e) => setHerkunft(e.target.value),
|
|
20208
|
+
children: [
|
|
20209
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "alle", children: "alle" }),
|
|
20210
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "published", children: HERKUNFT_TEXT2.published }),
|
|
20211
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "draft_chain", children: HERKUNFT_TEXT2.draft_chain }),
|
|
20212
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "scene_direct", children: HERKUNFT_TEXT2.scene_direct }),
|
|
20213
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "unresolved", children: HERKUNFT_TEXT2.unresolved })
|
|
20214
|
+
]
|
|
20215
|
+
}
|
|
20216
|
+
)
|
|
20217
|
+
] }),
|
|
20218
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20219
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20220
|
+
"input",
|
|
20221
|
+
{
|
|
20222
|
+
type: "checkbox",
|
|
20223
|
+
"data-testid": "prompts-alle-kontexte",
|
|
20224
|
+
checked: alleKontexte,
|
|
20225
|
+
onChange: (e) => setAlleKontexte(e.target.checked)
|
|
20226
|
+
}
|
|
20227
|
+
),
|
|
20228
|
+
"Alle Kontexte"
|
|
20229
|
+
] }),
|
|
20230
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
|
|
20231
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20232
|
+
"input",
|
|
20233
|
+
{
|
|
20234
|
+
type: "checkbox",
|
|
20235
|
+
"data-testid": "prompts-mit-fehllaeufen",
|
|
20236
|
+
checked: mitFehllaeufen,
|
|
20237
|
+
onChange: (e) => setMitFehllaeufen(e.target.checked)
|
|
20238
|
+
}
|
|
20239
|
+
),
|
|
20240
|
+
"Fehll\xE4ufe zeigen"
|
|
20241
|
+
] })
|
|
20242
|
+
] }),
|
|
20243
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "prompts-laden", children: "Prompts werden geladen \u2026" }),
|
|
20244
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { "data-testid": "prompts-fehler", role: "alert", children: [
|
|
20245
|
+
"Prompts konnten nicht geladen werden: ",
|
|
20246
|
+
phase.message
|
|
20247
|
+
] }),
|
|
20248
|
+
phase.status === "ready" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
20249
|
+
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.` }),
|
|
20250
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { "data-testid": "prompts-liste", children: gezeigt.map((lauf) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20251
|
+
PromptEintrag,
|
|
20252
|
+
{
|
|
20253
|
+
port,
|
|
20254
|
+
lauf,
|
|
20255
|
+
alle,
|
|
20256
|
+
titel: titel.get(lauf.run_id) ?? null,
|
|
20257
|
+
offen: lauf.run_id === offen,
|
|
20258
|
+
onUmschalten: () => setOffen(
|
|
20259
|
+
lauf.run_id === offen ? null : lauf.run_id
|
|
20260
|
+
),
|
|
20261
|
+
itemMoeglich: faehig.saveRunAsItem,
|
|
20262
|
+
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
20263
|
+
},
|
|
20264
|
+
lauf.run_id
|
|
20265
|
+
)) }),
|
|
20266
|
+
(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: [
|
|
20267
|
+
sicht.hiddenByStatus > 0 && `${sicht.hiddenByStatus} Fehllauf/-l\xE4ufe ausgeblendet. `,
|
|
20268
|
+
sicht.hiddenByContext > 0 && `${sicht.hiddenByContext} Lauf/L\xE4ufe geh\xF6ren zu einem anderen Kontext. `,
|
|
20269
|
+
sicht.withoutContext > 0 && `${sicht.withoutContext} Lauf/L\xE4ufe nennen keinen Kontext und werden keinem zugeordnet \u2014 \u201EAlle Kontexte" zeigt sie. `
|
|
20270
|
+
] })
|
|
20271
|
+
] })
|
|
20272
|
+
] });
|
|
20273
|
+
};
|
|
20274
|
+
var PromptEintrag = ({ port, lauf, alle, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
20275
|
+
const gruppe = groupOf(lauf);
|
|
20276
|
+
const runde = roundOfRun(lauf, siblingsOf(lauf, alle));
|
|
20277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "szenen-prompts__eintrag", "data-testid": `prompt-${lauf.run_id}`, children: [
|
|
20278
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-prompts__herkunft", "data-testid": `herkunft-${lauf.run_id}`, children: [
|
|
20279
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "data-herkunft": gruppe.kind, children: HERKUNFT_TEXT2[gruppe.kind] }),
|
|
20280
|
+
gruppe.kind === "unresolved" && // D-75: Was nicht belegbar ist, wird benannt und nicht
|
|
20281
|
+
// durch eine plausible Kennung ersetzt.
|
|
20282
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "szenen-prompts__hinweis", children: [
|
|
20283
|
+
" \u2014 ",
|
|
20284
|
+
gruppe.reason
|
|
20285
|
+
] })
|
|
20286
|
+
] }),
|
|
20287
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: "szenen-prompts__lauf", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20288
|
+
RundenEintrag,
|
|
20289
|
+
{
|
|
20290
|
+
port,
|
|
20291
|
+
lauf,
|
|
20292
|
+
runde,
|
|
20293
|
+
titel,
|
|
20294
|
+
offen,
|
|
20295
|
+
onUmschalten,
|
|
20296
|
+
itemMoeglich,
|
|
20297
|
+
onItemGespeichert
|
|
20298
|
+
}
|
|
20299
|
+
) })
|
|
20300
|
+
] });
|
|
20301
|
+
};
|
|
20302
|
+
|
|
20303
|
+
// src/features/szenen/areas/MediaArea.tsx
|
|
20304
|
+
var import_react19 = require("react");
|
|
20305
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
20306
|
+
var leer = async () => ({ kind: "ok", value: [] });
|
|
20307
|
+
var MediaArea = ({ port }) => {
|
|
20308
|
+
const media = port.media;
|
|
20309
|
+
const [versionInput, setVersionInput] = (0, import_react19.useState)("");
|
|
20310
|
+
const [versionId, setVersionId] = (0, import_react19.useState)("");
|
|
20311
|
+
const [itemInput, setItemInput] = (0, import_react19.useState)("");
|
|
20312
|
+
const [itemId, setItemId] = (0, import_react19.useState)("");
|
|
20313
|
+
const [assetId, setAssetId] = (0, import_react19.useState)("");
|
|
20314
|
+
const [role, setRole] = (0, import_react19.useState)("reference");
|
|
20315
|
+
const [position, setPosition] = (0, import_react19.useState)("0");
|
|
20316
|
+
const [notiz, setNotiz] = (0, import_react19.useState)(null);
|
|
20317
|
+
const [busy, setBusy] = (0, import_react19.useState)(false);
|
|
20318
|
+
const [refresh, setRefresh] = (0, import_react19.useState)(0);
|
|
20319
|
+
const [versionPhase] = usePortQuery(
|
|
20320
|
+
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
20321
|
+
[media, versionId, refresh]
|
|
20322
|
+
);
|
|
20323
|
+
const [itemPhase] = usePortQuery(
|
|
20324
|
+
() => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
|
|
20325
|
+
[media, itemId, refresh]
|
|
20326
|
+
);
|
|
20327
|
+
const zuordnen = async () => {
|
|
20328
|
+
if (!versionInput.trim() || !assetId.trim()) {
|
|
20329
|
+
setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
|
|
20330
|
+
return;
|
|
20331
|
+
}
|
|
20332
|
+
const parsedPosition = Number(position);
|
|
20333
|
+
if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
|
|
20334
|
+
setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
|
|
20335
|
+
return;
|
|
20336
|
+
}
|
|
20337
|
+
setBusy(true);
|
|
20338
|
+
const result = await media.attachVersionMedium({
|
|
20339
|
+
versionId: versionInput.trim(),
|
|
20340
|
+
assetId: assetId.trim(),
|
|
20341
|
+
role,
|
|
20342
|
+
position: parsedPosition
|
|
20343
|
+
});
|
|
20344
|
+
setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
|
|
20345
|
+
if (result.kind === "ok") {
|
|
20346
|
+
setVersionId(versionInput.trim());
|
|
20347
|
+
setRefresh((value) => value + 1);
|
|
20348
|
+
}
|
|
20349
|
+
setBusy(false);
|
|
20350
|
+
};
|
|
20351
|
+
const entfernen = async (medium) => {
|
|
20352
|
+
setBusy(true);
|
|
20353
|
+
const result = await media.detachVersionMedium({
|
|
20354
|
+
versionId,
|
|
20355
|
+
assetId: medium.assetId,
|
|
20356
|
+
role: medium.role
|
|
20357
|
+
});
|
|
20358
|
+
setNotiz(noticeFor(result, "Referenzmedium entfernen"));
|
|
20359
|
+
if (result.kind === "ok") setRefresh((value) => value + 1);
|
|
20360
|
+
setBusy(false);
|
|
20361
|
+
};
|
|
20362
|
+
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
20363
|
+
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
20364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
20365
|
+
/* @__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." }),
|
|
20366
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
|
|
20367
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Version" }),
|
|
20368
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
20369
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20370
|
+
"Version-ID",
|
|
20371
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
20372
|
+
] }),
|
|
20373
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
20374
|
+
] }),
|
|
20375
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
20376
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20377
|
+
"Asset-ID",
|
|
20378
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
20379
|
+
] }),
|
|
20380
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20381
|
+
"Rolle",
|
|
20382
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
20383
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "reference", children: "reference" }),
|
|
20384
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "mask", children: "mask" }),
|
|
20385
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "palette", children: "palette" }),
|
|
20386
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "example", children: "example" })
|
|
20387
|
+
] })
|
|
20388
|
+
] }),
|
|
20389
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20390
|
+
"Position",
|
|
20391
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
20392
|
+
] }),
|
|
20393
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
20394
|
+
] }),
|
|
20395
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
20396
|
+
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
|
|
20397
|
+
"Versionsmedien konnten nicht geladen werden: ",
|
|
20398
|
+
versionPhase.message
|
|
20399
|
+
] }),
|
|
20400
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
20401
|
+
"Version ",
|
|
20402
|
+
versionId,
|
|
20403
|
+
" hat keine Medien."
|
|
20404
|
+
] }),
|
|
20405
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
20406
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
|
|
20407
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
20408
|
+
medium.role,
|
|
20409
|
+
" \xB7 Position ",
|
|
20410
|
+
medium.position
|
|
20411
|
+
] }),
|
|
20412
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
20413
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
20414
|
+
] }, `${medium.assetId}:${medium.role}`)) })
|
|
20415
|
+
] }),
|
|
20416
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
|
|
20417
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Item-Medien" }),
|
|
20418
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
20419
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
20420
|
+
"Item-ID",
|
|
20421
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
20422
|
+
] }),
|
|
20423
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
20424
|
+
] }),
|
|
20425
|
+
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
|
|
20426
|
+
"Item-Medien konnten nicht geladen werden: ",
|
|
20427
|
+
itemPhase.message
|
|
20428
|
+
] }),
|
|
20429
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
20430
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
|
|
20431
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
20432
|
+
medium.role,
|
|
20433
|
+
" \xB7 Position ",
|
|
20434
|
+
medium.position
|
|
20435
|
+
] }),
|
|
20436
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
20437
|
+
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
20438
|
+
] }),
|
|
20439
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
20440
|
+
] });
|
|
20441
|
+
};
|
|
20442
|
+
|
|
19426
20443
|
// src/features/szenen/SzenenView.tsx
|
|
19427
20444
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
19428
20445
|
var SzenenView = ({
|
|
@@ -19431,9 +20448,9 @@ var SzenenView = ({
|
|
|
19431
20448
|
initialArea,
|
|
19432
20449
|
onAreaChange
|
|
19433
20450
|
}) => {
|
|
19434
|
-
const bereiche = (0,
|
|
19435
|
-
const faehig = (0,
|
|
19436
|
-
const [aktiv, setAktiv] = (0,
|
|
20451
|
+
const bereiche = (0, import_react20.useMemo)(() => areasFor(port), [port]);
|
|
20452
|
+
const faehig = (0, import_react20.useMemo)(() => capabilitiesOf(port), [port]);
|
|
20453
|
+
const [aktiv, setAktiv] = (0, import_react20.useState)(() => resolveArea(port, initialArea));
|
|
19437
20454
|
const wechsle = (id) => {
|
|
19438
20455
|
setAktiv(id);
|
|
19439
20456
|
onAreaChange?.(id);
|
|
@@ -19444,7 +20461,7 @@ var SzenenView = ({
|
|
|
19444
20461
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
19445
20462
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
19446
20463
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: "Bildprompt aus einer Szene" }),
|
|
19447
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children:
|
|
20464
|
+
/* @__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.' })
|
|
19448
20465
|
] }),
|
|
19449
20466
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
19450
20467
|
] }),
|
|
@@ -19463,7 +20480,8 @@ var SzenenView = ({
|
|
|
19463
20480
|
bereich.id
|
|
19464
20481
|
)) }),
|
|
19465
20482
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
19466
|
-
aktiv === "
|
|
20483
|
+
aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
|
|
20484
|
+
aktiv === "prompts" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PromptsArea, { port, contextId }),
|
|
19467
20485
|
aktiv === "elements" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
19468
20486
|
ElementsArea,
|
|
19469
20487
|
{
|
|
@@ -19474,9 +20492,7 @@ var SzenenView = ({
|
|
|
19474
20492
|
listTitle: "Bausteine"
|
|
19475
20493
|
}
|
|
19476
20494
|
),
|
|
19477
|
-
aktiv === "
|
|
19478
|
-
aktiv === "setup" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SetupArea, { port, contextId }),
|
|
19479
|
-
aktiv === "shot" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShotArea, { port, contextId }),
|
|
20495
|
+
aktiv === "advanced" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AdvancedArea, { port, contextId }),
|
|
19480
20496
|
aktiv === "media" && port.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MediaArea, { port, contextId })
|
|
19481
20497
|
] }),
|
|
19482
20498
|
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "szenen-view__host-notes", children: [
|
|
@@ -19498,6 +20514,7 @@ var SzenenView = ({
|
|
|
19498
20514
|
DERIVABLE_TYPES,
|
|
19499
20515
|
ELEMENT_VERSION_SCHEMA_FILE,
|
|
19500
20516
|
FLOW_EXECUTION_PATH,
|
|
20517
|
+
MCP_CLIENT_PROVIDER,
|
|
19501
20518
|
PROBE_VERSION_ID,
|
|
19502
20519
|
PROMPT_RULE_EFFECT,
|
|
19503
20520
|
REFERENCE_FIELD,
|
|
@@ -19517,6 +20534,7 @@ var SzenenView = ({
|
|
|
19517
20534
|
SZENEN_SNAPSHOT_SCHEMA_VERSION,
|
|
19518
20535
|
SzenenView,
|
|
19519
20536
|
UNCHECKED_PUBLISH_RULES,
|
|
20537
|
+
UNVERIFIED_MODEL_ID,
|
|
19520
20538
|
UPLOAD_MAX_BYTES,
|
|
19521
20539
|
UnsupportedSchemaError,
|
|
19522
20540
|
VersionDagError,
|
|
@@ -19558,14 +20576,19 @@ var SzenenView = ({
|
|
|
19558
20576
|
checkSzenenBatchOrigin,
|
|
19559
20577
|
checkTitle,
|
|
19560
20578
|
checkWriteDraftInput,
|
|
20579
|
+
claimWon,
|
|
19561
20580
|
collectImageBatches,
|
|
19562
20581
|
collectImageGenerationOrders,
|
|
20582
|
+
collectImageJobs,
|
|
20583
|
+
collectPromptOperations,
|
|
19563
20584
|
collectPromptRuns,
|
|
19564
20585
|
collectProviderChecks,
|
|
19565
20586
|
collectSceneDerivationRecoveries,
|
|
19566
20587
|
collectSceneDerivations,
|
|
19567
20588
|
collectVersionRefs,
|
|
19568
20589
|
compileSchemas,
|
|
20590
|
+
completePromptOperation,
|
|
20591
|
+
contextOfRun,
|
|
19569
20592
|
createBrowserTextGenerationPort,
|
|
19570
20593
|
createClientDerivationPort,
|
|
19571
20594
|
createClientRunPort,
|
|
@@ -19583,6 +20606,7 @@ var SzenenView = ({
|
|
|
19583
20606
|
createHfImageLibrary,
|
|
19584
20607
|
createHfImageStore,
|
|
19585
20608
|
createImageGenerationPort,
|
|
20609
|
+
createImageJobPort,
|
|
19586
20610
|
createInMemoryEventChannel,
|
|
19587
20611
|
createMemoryViewPort,
|
|
19588
20612
|
createSimulationSceneDerivationPort,
|
|
@@ -19601,6 +20625,8 @@ var SzenenView = ({
|
|
|
19601
20625
|
findExecutableImageModel,
|
|
19602
20626
|
findImageBatch,
|
|
19603
20627
|
findImageGenerationOrder,
|
|
20628
|
+
findImageJob,
|
|
20629
|
+
findPromptOperation,
|
|
19604
20630
|
findPromptRun,
|
|
19605
20631
|
findProviderCheck,
|
|
19606
20632
|
findSceneDerivation,
|
|
@@ -19610,8 +20636,11 @@ var SzenenView = ({
|
|
|
19610
20636
|
formatSeedListe,
|
|
19611
20637
|
freezeDraftChain,
|
|
19612
20638
|
freezeSceneWorkingState,
|
|
20639
|
+
generationBatchIdOf,
|
|
19613
20640
|
gesamtHerkunft,
|
|
19614
20641
|
getSzenenSchemas,
|
|
20642
|
+
groupKeyOf,
|
|
20643
|
+
groupOf,
|
|
19615
20644
|
gruppiereZuItems,
|
|
19616
20645
|
hasPlacementCapability,
|
|
19617
20646
|
isKnownElementType,
|
|
@@ -19621,14 +20650,19 @@ var SzenenView = ({
|
|
|
19621
20650
|
istSzenenSnapshotDatei,
|
|
19622
20651
|
istZipDatei,
|
|
19623
20652
|
itemIdForRun,
|
|
20653
|
+
itemsAusBestand,
|
|
20654
|
+
jobsForPromptRun,
|
|
19624
20655
|
ladeVorschauen,
|
|
19625
20656
|
leseBilderAusZip,
|
|
19626
20657
|
linkFor,
|
|
20658
|
+
locatorAus,
|
|
19627
20659
|
locatorTeile,
|
|
19628
20660
|
logRevisionOf,
|
|
19629
20661
|
mergeSnapshotAndPending,
|
|
19630
20662
|
mergeSzenenBatchOrigin,
|
|
20663
|
+
mimeTypAus,
|
|
19631
20664
|
mitDefaultVorlage,
|
|
20665
|
+
namingElementOf,
|
|
19632
20666
|
noticeFor,
|
|
19633
20667
|
ordersForPromptRun,
|
|
19634
20668
|
ordneSeedsZu,
|
|
@@ -19638,6 +20672,7 @@ var SzenenView = ({
|
|
|
19638
20672
|
parseSzenenSnapshot,
|
|
19639
20673
|
preferredHeadRevisionOf,
|
|
19640
20674
|
preferredVersionId,
|
|
20675
|
+
preparePromptOperation,
|
|
19641
20676
|
promptDiagnosticsOf,
|
|
19642
20677
|
publishedHeadsOf,
|
|
19643
20678
|
recoveriesForRun,
|
|
@@ -19650,19 +20685,25 @@ var SzenenView = ({
|
|
|
19650
20685
|
resolveShotPayload,
|
|
19651
20686
|
resolveTargetModelOver,
|
|
19652
20687
|
resolverFromQueries,
|
|
20688
|
+
responseContractOf,
|
|
19653
20689
|
roundOfRun,
|
|
19654
20690
|
rulesWithoutPromptEffect,
|
|
19655
20691
|
runElementStoreContract,
|
|
20692
|
+
runOfOperation,
|
|
19656
20693
|
runPromptDerivation,
|
|
19657
20694
|
runPublishChecks,
|
|
19658
20695
|
runSceneDerivation,
|
|
19659
20696
|
runStoreDifferential,
|
|
20697
|
+
sameResponseAs,
|
|
19660
20698
|
sceneOnlyCapabilities,
|
|
19661
20699
|
scopeOfPath,
|
|
19662
20700
|
seedFehlerText,
|
|
20701
|
+
selectPromptRuns,
|
|
19663
20702
|
selectableTargetModels,
|
|
19664
20703
|
showChain,
|
|
20704
|
+
siblingsOf,
|
|
19665
20705
|
simulatedAnswerFor,
|
|
20706
|
+
sourceOf,
|
|
19666
20707
|
szenenSnapshotFilename,
|
|
19667
20708
|
totalModelCalls,
|
|
19668
20709
|
typAusBytes,
|