Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

100 lines
2.8 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 1da3af88666fe4c8.e799ee1631.js
* Module id: 741747
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(777784),
r = e.i(184299),
o = e.i(562530),
n = e.i(10036);
let i = new Set(["ratio", "quality", "resolution", "aspectRatio"]);
async function a(e) {
let {
nodeId: a,
projectId: l,
command: s,
baseParams: c,
getModel: u,
updateNodeData: d,
updateTaskInfo: m,
promptOverride: f,
} = e,
{
matchModel: p,
matchProvider: g,
settingsPatch: _,
topLevelPatch: h,
} = (function (e) {
let { model: t, provider: r, ...o } = e ?? {},
n = {},
a = {};
for (let [e, t] of Object.entries(o))
i.has(e) ? (n[e] = t) : (a[e] = t);
return {
matchModel: t,
matchProvider: r,
settingsPatch: n,
topLevelPatch: a,
};
})(s.match),
{ cameraControl: v, ...y } = c,
b = (0, r.mergeSettingsForPanoramicSlashScene)(s.scene, {
...(c.settings ?? {}),
..._,
}),
T = {
...y,
scene: s.scene,
...(p ? { model: p } : {}),
settings: b,
...h,
...(void 0 !== f ? { prompt: f } : {}),
},
S = (0, n.buildRequestData)(T, "image", a, l, u);
p && (S.model = p),
g && (S.provider = g),
d(a, {
params: T,
selectedSlash: { label: s.label, scene: s.scene, match: s.match },
_retryMeta: {
provider: S.provider,
model: S.model,
taskType: S.taskType,
},
...((0, r.isPanoramicGenerationScene)(s.scene)
? { isPanoramicOutput: !0 }
: {}),
}),
m({ loading: !0, taskId: "" });
try {
let e = await (0, o.submitGenerationTask)(S);
if (e.success)
return (
m({ taskId: e.taskId, loading: !0 }), d(a, { name: s.label }), !0
);
return (
e.handledByCommercial || t.Notify.error(e.errorMsg ?? "生成失败"),
m({
loading: !1,
status: 3,
failedReason: e.errorMsg ?? "网络异常,请重试",
}),
!1
);
} catch (e) {
return (
console.error("[submitSlashImageCommand] error:", e),
t.Notify.error("网络异常,请重试"),
m({ loading: !1, status: 3, failedReason: "网络异常,请重试" }),
!1
);
}
}
e.s(["submitSlashImageCommand", () => a]);
};
export default moduleFactory;