maoda-commander-tt 0.0.45 → 0.0.46
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/main.js +24 -12
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -3513,19 +3513,26 @@ var XyqSession = class {
|
|
|
3513
3513
|
const normalizedInput = normalizedInputResult.value;
|
|
3514
3514
|
const threadId = randomUUID3();
|
|
3515
3515
|
const clientRunId = `canvas_run_${randomUUID3()}`;
|
|
3516
|
+
const messageId = randomUUID3();
|
|
3516
3517
|
const requestId = randomUUID3();
|
|
3517
3518
|
const submittedAt = this._now();
|
|
3519
|
+
const runExtra = buildVideoPartRunExtra(clientRunId, messageId);
|
|
3518
3520
|
const body = buildSubmitVideoPartBody({
|
|
3519
3521
|
...normalizedInput,
|
|
3520
3522
|
threadId,
|
|
3521
3523
|
clientRunId,
|
|
3524
|
+
messageId,
|
|
3522
3525
|
requestId,
|
|
3523
3526
|
submittedAt,
|
|
3524
|
-
context: this.context
|
|
3527
|
+
context: this.context,
|
|
3528
|
+
runExtra
|
|
3525
3529
|
});
|
|
3530
|
+
const submitUrl = new URL(`${XYQ_ORIGIN}/api/biz/v1/agent/submit_run`);
|
|
3531
|
+
const { generate_id: _generateId, ...queryBabiParam } = runExtra.babi_param;
|
|
3532
|
+
submitUrl.searchParams.set("babi_param", JSON.stringify(queryBabiParam));
|
|
3526
3533
|
const responseResult = await requestXyqJson(
|
|
3527
3534
|
this._fetcher,
|
|
3528
|
-
|
|
3535
|
+
submitUrl.toString(),
|
|
3529
3536
|
{
|
|
3530
3537
|
method: "POST",
|
|
3531
3538
|
headers: {
|
|
@@ -3958,27 +3965,32 @@ function normalizeVideoAssetReferences(assets, label) {
|
|
|
3958
3965
|
}
|
|
3959
3966
|
return ok19(normalized);
|
|
3960
3967
|
}
|
|
3961
|
-
function
|
|
3962
|
-
|
|
3968
|
+
function buildVideoPartRunExtra(clientRunId, messageId) {
|
|
3969
|
+
return {
|
|
3963
3970
|
babi_param: {
|
|
3964
|
-
generate_id:
|
|
3965
|
-
|
|
3971
|
+
generate_id: clientRunId,
|
|
3972
|
+
user_message_id: messageId,
|
|
3973
|
+
section_id: clientRunId,
|
|
3966
3974
|
scene_lv1: "ai_agent",
|
|
3967
3975
|
scene_lv2: "front_tool",
|
|
3968
|
-
tool_id: "
|
|
3976
|
+
tool_id: "novel_canvas",
|
|
3969
3977
|
tab_name: "canvas",
|
|
3970
|
-
edit_type: "
|
|
3978
|
+
edit_type: "novel",
|
|
3971
3979
|
enter_from: "web"
|
|
3972
3980
|
},
|
|
3973
3981
|
client_extra: {
|
|
3974
|
-
edit_type: "
|
|
3982
|
+
edit_type: "novel",
|
|
3983
|
+
canvas_type: "novel",
|
|
3975
3984
|
position: "canvas",
|
|
3976
3985
|
entrance_from: "web",
|
|
3977
3986
|
tab_name: "canvas",
|
|
3978
3987
|
target: "video",
|
|
3979
|
-
run_source: "video_part"
|
|
3988
|
+
run_source: "video_part",
|
|
3989
|
+
placement_name: "canvas"
|
|
3980
3990
|
}
|
|
3981
3991
|
};
|
|
3992
|
+
}
|
|
3993
|
+
function buildSubmitVideoPartBody(input) {
|
|
3982
3994
|
const contentDataParam = {
|
|
3983
3995
|
prompt: input.prompt,
|
|
3984
3996
|
images: input.images,
|
|
@@ -4008,7 +4020,7 @@ function buildSubmitVideoPartBody(input) {
|
|
|
4008
4020
|
thread_id: input.threadId,
|
|
4009
4021
|
run_id: input.clientRunId,
|
|
4010
4022
|
created_at: input.submittedAt,
|
|
4011
|
-
message_id:
|
|
4023
|
+
message_id: input.messageId
|
|
4012
4024
|
},
|
|
4013
4025
|
user_info: {
|
|
4014
4026
|
consumer_uid: input.context.uid,
|
|
@@ -4018,7 +4030,7 @@ function buildSubmitVideoPartBody(input) {
|
|
|
4018
4030
|
},
|
|
4019
4031
|
agent_name: "pippit_novel_video_part_agent",
|
|
4020
4032
|
entrance_from: "web",
|
|
4021
|
-
run_extra: JSON.stringify(
|
|
4033
|
+
run_extra: JSON.stringify(input.runExtra),
|
|
4022
4034
|
request_id: input.requestId
|
|
4023
4035
|
};
|
|
4024
4036
|
}
|