@rslsp1/fa-app-tools 10.0.0 → 10.1.3

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.
@@ -14639,6 +14639,11 @@ var ImageJobsArea = ({
14639
14639
  const abbruchRef = useRef9(false);
14640
14640
  const [einzeln, setEinzeln] = useState27(null);
14641
14641
  const [notiz, setNotiz] = useState27(null);
14642
+ const [modellLauf, setModellLauf] = useState27(null);
14643
+ const wahl = useNachladbareAbfrage(
14644
+ () => port.imageGeneration && modellLauf ? port.imageGeneration.imageModelChoiceForRun(modellLauf) : Promise.resolve({ kind: "ok", value: null }),
14645
+ [port, modellLauf]
14646
+ );
14642
14647
  const liste = useNachladbareAbfrage(
14643
14648
  () => auftraege?.listAllJobs ? auftraege.listAllJobs({ status: filter }) : Promise.resolve({
14644
14649
  kind: "ok",
@@ -14657,8 +14662,13 @@ var ImageJobsArea = ({
14657
14662
  const seite = liste.wert;
14658
14663
  const eintraege = seite?.eintraege ?? [];
14659
14664
  const offen = seite?.offen ?? 0;
14665
+ const ersterLauf = eintraege[0]?.job.prompt_run_id ?? null;
14666
+ useEffect15(() => {
14667
+ if (modellLauf === null && ersterLauf !== null) setModellLauf(ersterLauf);
14668
+ }, [modellLauf, ersterLauf]);
14660
14669
  const queueLaeuft = lauf !== null && (lauf.zustand === "laeuft" || lauf.zustand === "pause");
14661
- async function einzelStart(jobId) {
14670
+ const eigeneLaufend = (einzeln !== null ? 1 : 0) + (queueLaeuft && lauf?.aktuell && lauf.aktuell !== einzeln ? 1 : 0);
14671
+ async function einzelStart(jobId, vorspann = "") {
14662
14672
  if (!auftraege || laeuftRef.current || einzeln !== null) return;
14663
14673
  setEinzeln(jobId);
14664
14674
  setNotiz(null);
@@ -14667,7 +14677,7 @@ var ImageJobsArea = ({
14667
14677
  if (ergebnis.kind === "ok") {
14668
14678
  setNotiz({
14669
14679
  tone: ergebnis.job.status === "succeeded" ? "ok" : "rejected",
14670
- text: `Auftrag ${jobId}: ${STATUS_TEXT2[ergebnis.job.status]}.` + (ergebnis.job.diagnostic ? ` ${ergebnis.job.diagnostic}` : "")
14680
+ text: `${vorspann}Auftrag ${jobId}: ${STATUS_TEXT2[ergebnis.job.status]}.` + (ergebnis.job.diagnostic ? ` ${ergebnis.job.diagnostic}` : "")
14671
14681
  });
14672
14682
  } else if (ergebnis.kind === "lost" || ergebnis.kind === "rejected") {
14673
14683
  setNotiz({ tone: "rejected", text: ergebnis.message });
@@ -14684,6 +14694,46 @@ var ImageJobsArea = ({
14684
14694
  neuLesen();
14685
14695
  }
14686
14696
  }
14697
+ async function erzeugenUndStarten(quelle, wieViele, modell) {
14698
+ const anfordern = auftraege?.requestMoreImages;
14699
+ if (!anfordern || laeuftRef.current || einzeln !== null) return;
14700
+ setNotiz(null);
14701
+ let neuer;
14702
+ try {
14703
+ const ergebnis = await anfordern({
14704
+ sourceJobId: quelle.job_id,
14705
+ imageCount: wieViele,
14706
+ // Nur mitgeben, wenn wirklich gewechselt wurde — sonst gilt der
14707
+ // Ausgangsauftrag, und das steht so im Port.
14708
+ ...modell && (modell.target_model_key !== quelle.execution_target_model_key || modell.profile_id !== quelle.execution_profile_id) ? {
14709
+ executionTargetModelKey: modell.target_model_key,
14710
+ executionProfileId: modell.profile_id
14711
+ // Ein Formatwechsel ist nicht gefragt; traegt das neue
14712
+ // Modell das alte Format nicht, lehnt der Port ab und
14713
+ // sagt warum, statt still zu ersetzen.
14714
+ } : {}
14715
+ });
14716
+ if (ergebnis.kind !== "ok") {
14717
+ setNotiz({
14718
+ tone: ergebnis.kind === "rejected" ? "rejected" : "error",
14719
+ text: ergebnis.message
14720
+ });
14721
+ return;
14722
+ }
14723
+ neuer = ergebnis.job;
14724
+ } catch (e) {
14725
+ setNotiz({
14726
+ tone: "error",
14727
+ text: `Der neue Bildauftrag zu ${quelle.job_id} konnte nicht angelegt werden: ${e instanceof Error ? e.message : String(e)}`
14728
+ });
14729
+ return;
14730
+ }
14731
+ neuLesen();
14732
+ await einzelStart(
14733
+ neuer.job_id,
14734
+ `Neuer Auftrag \xFCber ${neuer.image_count} ${neuer.image_count === 1 ? "Bild" : "Bilder"} mit ${neuer.execution_target_model_key}; `
14735
+ );
14736
+ }
14687
14737
  async function alleOffenenStarten() {
14688
14738
  if (!auftraege?.listAllJobs || laeuftRef.current) return;
14689
14739
  laeuftRef.current = true;
@@ -14736,7 +14786,26 @@ var ImageJobsArea = ({
14736
14786
  children: "\u27F3 Aktualisieren"
14737
14787
  }
14738
14788
  ),
14739
- /* @__PURE__ */ jsx24("span", { "data-testid": "bildauftraege-zuletzt", children: zuletzt ? `zuletzt aktualisiert ${zuletzt}` : "noch nicht aktualisiert" })
14789
+ /* @__PURE__ */ jsx24("span", { "data-testid": "bildauftraege-zuletzt", children: zuletzt ? `zuletzt aktualisiert ${zuletzt}` : "noch nicht aktualisiert" }),
14790
+ eigeneLaufend > 0 && /* @__PURE__ */ jsxs24(
14791
+ "span",
14792
+ {
14793
+ className: "szenen-bildauftraege__laufzaehler",
14794
+ "data-testid": "bildauftraege-laufzaehler",
14795
+ title: `${eigeneLaufend} Auftrag${eigeneLaufend === 1 ? "" : "e"} dieses Tabs l\xE4uft gerade`,
14796
+ children: [
14797
+ "\u27F3 ",
14798
+ eigeneLaufend,
14799
+ " l\xE4uft",
14800
+ eigeneLaufend === 1 ? "" : "en"
14801
+ ]
14802
+ }
14803
+ )
14804
+ ] }),
14805
+ (wahl.wert?.invalid_profiles.length ?? 0) > 0 && /* @__PURE__ */ jsxs24("p", { role: "alert", "data-testid": "bildauftraege-profilbefunde", children: [
14806
+ "Nicht angeboten, weil das Profil unvollst\xE4ndig ist:",
14807
+ " ",
14808
+ wahl.wert.invalid_profiles.join(" \xB7 ")
14740
14809
  ] }),
14741
14810
  /* @__PURE__ */ jsx24(
14742
14811
  Bildkontrolle,
@@ -14829,10 +14898,9 @@ var ImageJobsArea = ({
14829
14898
  gesperrt: queueLaeuft || einzeln !== null,
14830
14899
  laufend: einzeln === eintrag.job.job_id || lauf?.aktuell === eintrag.job.job_id,
14831
14900
  onStart: () => void einzelStart(eintrag.job.job_id),
14832
- onAngelegt: (text) => {
14833
- setNotiz({ tone: "ok", text });
14834
- neuLesen();
14835
- },
14901
+ onErzeugen: (anzahl, modell) => erzeugenUndStarten(eintrag.job, anzahl, modell),
14902
+ modelle: wahl.wert?.models ?? null,
14903
+ modelleLaden: wahl.wert === null && wahl.fehler === null,
14836
14904
  ...onPromptOeffnen ? { onPromptOeffnen } : {}
14837
14905
  },
14838
14906
  eintrag.job.job_id
@@ -14884,12 +14952,13 @@ var AuftragsZeile = ({
14884
14952
  gesperrt,
14885
14953
  laufend,
14886
14954
  onStart,
14887
- onAngelegt,
14888
- onPromptOeffnen
14955
+ onErzeugen,
14956
+ onPromptOeffnen,
14957
+ modelle,
14958
+ modelleLaden
14889
14959
  }) => {
14890
14960
  const { job, herkunft } = eintrag;
14891
14961
  const [ergebnisOffen, setErgebnisOffen] = useState27(false);
14892
- const [weitereOffen, setWeitereOffen] = useState27(false);
14893
14962
  const hatErgebnis = Boolean(job.generation_batch_id) && (job.status === "succeeded" || job.status === "partial");
14894
14963
  const kannWeitere = Boolean(port.imageJobs?.requestMoreImages) && istAbgeschlossen(job);
14895
14964
  return /* @__PURE__ */ jsxs24(
@@ -14901,6 +14970,12 @@ var AuftragsZeile = ({
14901
14970
  children: [
14902
14971
  /* @__PURE__ */ jsxs24("p", { className: "szenen-bildauftraege__kopf", children: [
14903
14972
  /* @__PURE__ */ jsx24("strong", { "data-testid": `bildauftrag-status-${job.job_id}`, children: STATUS_TEXT2[job.status] }),
14973
+ " \xB7 ",
14974
+ /* @__PURE__ */ jsxs24("strong", { "data-testid": `bildauftrag-anzahl-${job.job_id}`, children: [
14975
+ job.image_count,
14976
+ " ",
14977
+ job.image_count === 1 ? "Bild" : "Bilder"
14978
+ ] }),
14904
14979
  " \u2014 ",
14905
14980
  /* @__PURE__ */ jsx24("span", { children: herkunft.szene_titel ?? (herkunft.lauf_gefunden ? "Lauf ohne benennbares Element" : "Lauf nicht in diesem Bestand") })
14906
14981
  ] }),
@@ -14917,11 +14992,6 @@ var AuftragsZeile = ({
14917
14992
  "Profil ",
14918
14993
  /* @__PURE__ */ jsx24("code", { children: job.execution_profile_id })
14919
14994
  ] }),
14920
- /* @__PURE__ */ jsxs24("span", { children: [
14921
- job.image_count,
14922
- " ",
14923
- job.image_count === 1 ? "Bild" : "Bilder"
14924
- ] }),
14925
14995
  /* @__PURE__ */ jsxs24("span", { children: [
14926
14996
  "Format ",
14927
14997
  job.aspect_ratio ?? "\u2014"
@@ -14956,7 +15026,7 @@ var AuftragsZeile = ({
14956
15026
  "data-testid": `bildauftrag-start-${job.job_id}`,
14957
15027
  disabled: gesperrt,
14958
15028
  onClick: onStart,
14959
- children: laufend ? "L\xE4uft \u2026" : "Start (kostet einen Bildaufruf)"
15029
+ children: laufend ? "L\xE4uft \u2026" : "Start"
14960
15030
  }
14961
15031
  ),
14962
15032
  onPromptOeffnen && herkunft.lauf_gefunden && /* @__PURE__ */ jsx24(
@@ -14976,18 +15046,18 @@ var AuftragsZeile = ({
14976
15046
  onClick: () => setErgebnisOffen((o) => !o),
14977
15047
  children: ergebnisOffen ? "Ergebnisse ausblenden" : "Ergebnisse ansehen"
14978
15048
  }
14979
- ),
14980
- kannWeitere && /* @__PURE__ */ jsx24(
14981
- "button",
14982
- {
14983
- type: "button",
14984
- "data-testid": `bildauftrag-weitere-${job.job_id}`,
14985
- onClick: () => setWeitereOffen((o) => !o),
14986
- children: weitereOffen ? "Weitere Bilder schlie\xDFen" : "Weitere Bilder"
14987
- }
14988
15049
  )
14989
15050
  ] }),
14990
- kannWeitere && weitereOffen && /* @__PURE__ */ jsx24(WeitereBilder, { port, job, onAngelegt }),
15051
+ kannWeitere && /* @__PURE__ */ jsx24(
15052
+ WeitereBilder,
15053
+ {
15054
+ job,
15055
+ gesperrt,
15056
+ modelle,
15057
+ modelleLaden,
15058
+ onErzeugen
15059
+ }
15060
+ ),
14991
15061
  ergebnisOffen && job.generation_batch_id && /* @__PURE__ */ jsx24(
14992
15062
  AuftragsErgebnis,
14993
15063
  {
@@ -15000,123 +15070,106 @@ var AuftragsZeile = ({
15000
15070
  }
15001
15071
  );
15002
15072
  };
15003
- var WeitereBilder = ({ port, job, onAngelegt }) => {
15073
+ var WeitereBilder = ({ job, gesperrt, modelle, modelleLaden, onErzeugen }) => {
15004
15074
  const [anzahl, setAnzahl] = useState27(1);
15075
+ const [wahlId, setWahlId] = useState27(null);
15005
15076
  const [laeuft, setLaeuft] = useState27(false);
15006
15077
  const [notiz, setNotiz] = useState27(null);
15007
- const wahl = useNachladbareAbfrage(
15008
- () => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(job.prompt_run_id) : Promise.resolve({ kind: "ok", value: null }),
15009
- [port, job.prompt_run_id]
15010
- );
15011
- const gewaehlt = wahl.wert ? findExecutableImageModel(
15012
- wahl.wert,
15013
- job.execution_target_model_key,
15014
- job.execution_profile_id
15015
- ) : null;
15016
- const maxBilder = gewaehlt?.max_images ?? null;
15017
- const anlegen = async (wieViele) => {
15018
- const anfordern = port.imageJobs?.requestMoreImages;
15019
- if (!anfordern || laeuft) return;
15078
+ const uebernommen = modelle ? modelle.find((m) => m.target_model_key === job.execution_target_model_key && m.profile_id === job.execution_profile_id) ?? null : null;
15079
+ const aktiv = wahlId && modelle?.find((m) => m.selection_id === wahlId) || uebernommen;
15080
+ const maxBilder = aktiv?.max_images ?? 1;
15081
+ const starten = async (wieViele) => {
15082
+ if (laeuft || gesperrt || !aktiv) return;
15020
15083
  setLaeuft(true);
15021
15084
  setNotiz(null);
15022
15085
  try {
15023
- const ergebnis = await anfordern({
15024
- sourceJobId: job.job_id,
15025
- imageCount: wieViele
15026
- });
15027
- if (ergebnis.kind === "ok") {
15028
- onAngelegt(
15029
- `Neuer Bildauftrag ${ergebnis.job.job_id} f\xFCr Promptlauf ${ergebnis.job.prompt_run_id}: ${ergebnis.job.image_count} ${ergebnis.job.image_count === 1 ? "Bild" : "Bilder"} mit ${ergebnis.job.execution_target_model_key} (Profil ${ergebnis.job.execution_profile_id}). Auftrag ${job.job_id} bleibt unver\xE4ndert abgeschlossen.`
15030
- );
15031
- } else {
15032
- setNotiz({
15033
- tone: ergebnis.kind === "rejected" ? "rejected" : "error",
15034
- text: ergebnis.message
15035
- });
15036
- }
15086
+ await onErzeugen(wieViele, aktiv);
15037
15087
  } catch (e) {
15038
15088
  setNotiz({
15039
15089
  tone: "error",
15040
- text: `Der neue Bildauftrag zu ${job.job_id} konnte nicht angelegt werden: ` + (e instanceof Error ? e.message : String(e))
15090
+ text: `Weitere Bilder zu ${job.job_id} sind gescheitert: ` + (e instanceof Error ? e.message : String(e))
15041
15091
  });
15042
15092
  } finally {
15043
15093
  setLaeuft(false);
15044
15094
  }
15045
15095
  };
15096
+ if (modelleLaden && modelle === null) {
15097
+ return /* @__PURE__ */ jsx24(
15098
+ "p",
15099
+ {
15100
+ className: "szenen-bildauftraege__weitere",
15101
+ "data-testid": `bildauftrag-weitere-laden-${job.job_id}`,
15102
+ children: "Bildmodelle werden gepr\xFCft \u2026"
15103
+ }
15104
+ );
15105
+ }
15106
+ if (modelle !== null && modelle.length === 0) {
15107
+ return /* @__PURE__ */ jsx24(
15108
+ "p",
15109
+ {
15110
+ className: "szenen-bildauftraege__weitere",
15111
+ role: "alert",
15112
+ "data-testid": `bildauftrag-weitere-keine-${job.job_id}`,
15113
+ children: "Hier ist derzeit kein Bildmodell ausf\xFChrbar \u2014 weitere Bilder sind nicht m\xF6glich. Es wird kein Ersatz geraten."
15114
+ }
15115
+ );
15116
+ }
15046
15117
  return /* @__PURE__ */ jsxs24(
15047
- "section",
15118
+ "p",
15048
15119
  {
15049
15120
  className: "szenen-bildauftraege__weitere",
15050
15121
  "data-testid": `bildauftrag-weitere-panel-${job.job_id}`,
15051
- "aria-label": "Weitere Bilder",
15052
15122
  children: [
15053
- wahl.fehler && /* @__PURE__ */ jsxs24("p", { role: "alert", "data-testid": `bildauftrag-weitere-fehler-${job.job_id}`, children: [
15054
- "Die ausf\xFChrbaren Bildmodelle waren nicht lesbar: ",
15055
- wahl.fehler
15056
- ] }),
15057
- wahl.laedt && wahl.wert === null && !wahl.fehler && /* @__PURE__ */ jsx24("p", { "data-testid": `bildauftrag-weitere-laden-${job.job_id}`, children: "Profil wird gepr\xFCft \u2026" }),
15058
- wahl.wert !== null && !gewaehlt && /* @__PURE__ */ jsxs24("p", { role: "alert", "data-testid": `bildauftrag-weitere-ungueltig-${job.job_id}`, children: [
15059
- "Das Profil ",
15060
- /* @__PURE__ */ jsx24("code", { children: job.execution_profile_id }),
15061
- " von",
15062
- " ",
15063
- /* @__PURE__ */ jsx24("code", { children: job.execution_target_model_key }),
15064
- " ist hier nicht mehr ausf\xFChrbar. Es wird kein Ersatz geraten \u2014",
15065
- " ",
15066
- wahl.wert.models.length > 0 ? `ausf\xFChrbar w\xE4ren: ${wahl.wert.models.map((m) => m.selection_id).join(", ")}. Bitte den Promptlauf \xF6ffnen und dort ausdr\xFCcklich w\xE4hlen.` : `derzeit ist hier gar kein Bildmodell ausf\xFChrbar: ${wahl.wert.reason ?? "kein sichtbares Zielmodell tr\xE4gt ein passendes Profil."}`
15067
- ] }),
15068
- gewaehlt && /* @__PURE__ */ jsxs24(Fragment12, { children: [
15069
- /* @__PURE__ */ jsxs24("p", { "data-testid": `bildauftrag-weitere-profil-${job.job_id}`, children: [
15070
- gewaehlt.display_name,
15071
- " bei ",
15072
- gewaehlt.provider,
15073
- " \xB7 bis zu",
15074
- " ",
15075
- gewaehlt.max_images,
15076
- " Bilder je Auftrag \xB7 Format",
15077
- " ",
15078
- job.aspect_ratio ?? "\u2014"
15079
- ] }),
15080
- /* @__PURE__ */ jsxs24("p", { className: "szenen-bildauftraege__aktionen", children: [
15081
- /* @__PURE__ */ jsx24(
15082
- "button",
15083
- {
15084
- type: "button",
15085
- "data-testid": `bildauftrag-plus1-${job.job_id}`,
15086
- disabled: laeuft,
15087
- onClick: () => void anlegen(1),
15088
- children: "+1 Bild"
15089
- }
15090
- ),
15091
- /* @__PURE__ */ jsx24("label", { htmlFor: `bildauftrag-weitere-anzahl-${job.job_id}`, children: "Anzahl" }),
15092
- /* @__PURE__ */ jsx24(
15093
- "select",
15094
- {
15095
- id: `bildauftrag-weitere-anzahl-${job.job_id}`,
15096
- "data-testid": `bildauftrag-weitere-anzahl-${job.job_id}`,
15097
- value: anzahl,
15098
- disabled: laeuft,
15099
- onChange: (e) => setAnzahl(Number(e.target.value)),
15100
- children: Array.from(
15101
- { length: Math.max(1, maxBilder ?? 1) },
15102
- (_, i) => i + 1
15103
- ).map((n) => /* @__PURE__ */ jsx24("option", { value: n, children: n }, n))
15104
- }
15105
- ),
15106
- /* @__PURE__ */ jsx24(
15107
- "button",
15108
- {
15109
- type: "button",
15110
- "data-testid": `bildauftrag-weitere-start-${job.job_id}`,
15111
- disabled: laeuft,
15112
- onClick: () => void anlegen(anzahl),
15113
- children: laeuft ? "Wird angelegt \u2026" : "Erzeugen"
15114
- }
15115
- )
15116
- ] })
15117
- ] }),
15123
+ /* @__PURE__ */ jsx24("label", { htmlFor: `bildauftrag-modell-${job.job_id}`, children: "Weitere Bilder mit" }),
15124
+ /* @__PURE__ */ jsxs24(
15125
+ "select",
15126
+ {
15127
+ id: `bildauftrag-modell-${job.job_id}`,
15128
+ "data-testid": `bildauftrag-modell-${job.job_id}`,
15129
+ value: aktiv?.selection_id ?? "",
15130
+ disabled: laeuft || gesperrt,
15131
+ onChange: (e) => {
15132
+ setWahlId(e.target.value);
15133
+ setNotiz(null);
15134
+ },
15135
+ children: [
15136
+ !aktiv && /* @__PURE__ */ jsxs24("option", { value: "", children: [
15137
+ job.execution_profile_id,
15138
+ " von ",
15139
+ job.execution_target_model_key,
15140
+ " \u2014 nicht mehr ausf\xFChrbar, bitte w\xE4hlen"
15141
+ ] }),
15142
+ (modelle ?? []).map((m) => /* @__PURE__ */ jsxs24("option", { value: m.selection_id, children: [
15143
+ m.display_name,
15144
+ m.target_model_key === job.execution_target_model_key && m.profile_id === job.execution_profile_id ? " (wie gehabt)" : ""
15145
+ ] }, m.selection_id))
15146
+ ]
15147
+ }
15148
+ ),
15149
+ /* @__PURE__ */ jsx24("label", { htmlFor: `bildauftrag-weitere-anzahl-${job.job_id}`, children: "\xD7" }),
15150
+ /* @__PURE__ */ jsx24(
15151
+ "select",
15152
+ {
15153
+ id: `bildauftrag-weitere-anzahl-${job.job_id}`,
15154
+ "data-testid": `bildauftrag-weitere-anzahl-${job.job_id}`,
15155
+ value: Math.min(anzahl, maxBilder),
15156
+ disabled: laeuft || gesperrt || !aktiv,
15157
+ onChange: (e) => setAnzahl(Number(e.target.value)),
15158
+ children: Array.from({ length: Math.max(1, maxBilder) }, (_, i) => i + 1).map((n) => /* @__PURE__ */ jsx24("option", { value: n, children: n }, n))
15159
+ }
15160
+ ),
15161
+ /* @__PURE__ */ jsx24(
15162
+ "button",
15163
+ {
15164
+ type: "button",
15165
+ "data-testid": `bildauftrag-weitere-start-${job.job_id}`,
15166
+ disabled: laeuft || gesperrt || !aktiv,
15167
+ onClick: () => void starten(Math.min(anzahl, maxBilder)),
15168
+ children: laeuft ? "L\xE4uft \u2026" : "Erzeugen"
15169
+ }
15170
+ ),
15118
15171
  notiz && /* @__PURE__ */ jsx24(
15119
- "p",
15172
+ "span",
15120
15173
  {
15121
15174
  role: notiz.tone === "error" ? "alert" : void 0,
15122
15175
  "data-testid": `bildauftrag-weitere-notiz-${job.job_id}`,
@@ -20453,21 +20506,26 @@ function createImageJobPort(options) {
20453
20506
  retryable: wahl.kind === "error" ? wahl.retryable : true
20454
20507
  };
20455
20508
  }
20456
- const gewaehlt = findExecutableImageModel(
20457
- wahl.value,
20458
- quelle.execution_target_model_key,
20459
- quelle.execution_profile_id
20460
- );
20509
+ const zielModell = input.executionTargetModelKey ?? quelle.execution_target_model_key;
20510
+ const zielProfil = input.executionProfileId ?? quelle.execution_profile_id;
20511
+ if (input.executionTargetModelKey === void 0 !== (input.executionProfileId === void 0)) {
20512
+ return {
20513
+ kind: "rejected",
20514
+ message: `Zielmodell und Ausfuehrungsprofil gehoeren zusammen: Es wurde nur eines von beiden angegeben (Modell "${input.executionTargetModelKey ?? "\u2014"}", Profil "${input.executionProfileId ?? "\u2014"}"). Ein Zielmodell kann mehrere Profile tragen; welches gemeint ist, wird nicht geraten.`
20515
+ };
20516
+ }
20517
+ const gewaehlt = findExecutableImageModel(wahl.value, zielModell, zielProfil);
20461
20518
  if (!gewaehlt) {
20462
20519
  const auswahl = wahl.value.models.map((m) => m.selection_id);
20463
20520
  return {
20464
20521
  kind: "rejected",
20465
- message: `Das Profil "${quelle.execution_profile_id}" von "${quelle.execution_target_model_key}" ist in dieser Umgebung nicht (mehr) ausfuehrbar. Es wird kein Ersatz geraten. ` + (auswahl.length > 0 ? `Ausfuehrbar waeren: ${auswahl.join(", ")} \u2014 bitte den Lauf oeffnen und dort ausdruecklich waehlen.` : `Derzeit ist hier gar kein Bildmodell ausfuehrbar: ${wahl.value.reason ?? "kein sichtbares Zielmodell traegt ein passendes Profil."}`)
20522
+ message: `Das Profil "${zielProfil}" von "${zielModell}" ist in dieser Umgebung nicht (mehr) ausfuehrbar. Es wird kein Ersatz geraten. ` + (auswahl.length > 0 ? `Ausfuehrbar waeren: ${auswahl.join(", ")} \u2014 bitte den Lauf oeffnen und dort ausdruecklich waehlen.` : `Derzeit ist hier gar kein Bildmodell ausfuehrbar: ${wahl.value.reason ?? "kein sichtbares Zielmodell traegt ein passendes Profil."}`)
20466
20523
  };
20467
20524
  }
20525
+ const format = input.aspectRatio === void 0 ? quelle.aspect_ratio ?? null : input.aspectRatio;
20468
20526
  const befunde = checkImageModelParameters(gewaehlt, {
20469
20527
  imageCount,
20470
- ...quelle.aspect_ratio ? { aspectRatio: quelle.aspect_ratio } : {}
20528
+ ...format ? { aspectRatio: format } : {}
20471
20529
  });
20472
20530
  if (befunde.length > 0) {
20473
20531
  return {
@@ -20498,7 +20556,7 @@ function createImageJobPort(options) {
20498
20556
  execution_target_model_key: gewaehlt.target_model_key,
20499
20557
  execution_profile_id: gewaehlt.profile_id,
20500
20558
  image_count: imageCount,
20501
- ...quelle.aspect_ratio ? { aspect_ratio: quelle.aspect_ratio } : {},
20559
+ ...format ? { aspect_ratio: format } : {},
20502
20560
  // **Nicht geraten und nicht erfunden.** Dieser Host kennt keinen
20503
20561
  // Nutzerschluessel — der Flow-Client hat keine Identitaet, nur einen
20504
20562
  // Bestand. Der Fortsetzungsauftrag traegt deshalb den Auftraggeber des
package/dist/index.d.mts CHANGED
@@ -6,7 +6,7 @@ import { Node, Edge } from '@xyflow/react';
6
6
  import * as zustand_vanilla from 'zustand/vanilla';
7
7
  import { F as FeatureSliceId, b as SliceContract, a as PersistenceDescriptor, W as WorkspacePersistence, P as PersistedSlice, L as LoadResult, f as WriteResult, e as WorkspaceTabId, C as CommandResult, R as RequestContext, Q as QueryResult } from './contracts-DdYOMBl9.mjs';
8
8
 
9
- var version = "10.0.0";
9
+ var version = "10.1.3";
10
10
 
11
11
  declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler: (e: MouseEvent | TouchEvent) => void): void;
12
12
 
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { Node, Edge } from '@xyflow/react';
6
6
  import * as zustand_vanilla from 'zustand/vanilla';
7
7
  import { F as FeatureSliceId, b as SliceContract, a as PersistenceDescriptor, W as WorkspacePersistence, P as PersistedSlice, L as LoadResult, f as WriteResult, e as WorkspaceTabId, C as CommandResult, R as RequestContext, Q as QueryResult } from './contracts-DdYOMBl9.js';
8
8
 
9
- var version = "10.0.0";
9
+ var version = "10.1.3";
10
10
 
11
11
  declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler: (e: MouseEvent | TouchEvent) => void): void;
12
12