democut 1.0.155 → 1.0.156
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/cli.js +32 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6916,7 +6916,7 @@ import { realpathSync } from "fs";
|
|
|
6916
6916
|
import { fileURLToPath } from "url";
|
|
6917
6917
|
|
|
6918
6918
|
// src/version.ts
|
|
6919
|
-
var VERSION = "1.0.
|
|
6919
|
+
var VERSION = "1.0.156";
|
|
6920
6920
|
|
|
6921
6921
|
// src/device-flow.ts
|
|
6922
6922
|
var DeviceFlowError = class extends Error {
|
|
@@ -8243,6 +8243,11 @@ var GENERATED_TOOLS = [
|
|
|
8243
8243
|
"cut_id": {
|
|
8244
8244
|
"type": "string",
|
|
8245
8245
|
"description": "\uCEF7 id(cut_\u2026)"
|
|
8246
|
+
},
|
|
8247
|
+
"words": {
|
|
8248
|
+
"default": false,
|
|
8249
|
+
"description": "true \uBA74 \uC120\uD0DD\uB41C \uBC84\uC804\uC758 \uB0B1\uB9D0 \uC2DC\uAC01\uC744 \uD568\uAED8 \uC900\uB2E4(edit.layers \uC2DC\uAC01\uC6A9)",
|
|
8250
|
+
"type": "boolean"
|
|
8246
8251
|
}
|
|
8247
8252
|
},
|
|
8248
8253
|
"required": [
|
|
@@ -15481,6 +15486,23 @@ function waitJobs(a = {}, deps = {}) {
|
|
|
15481
15486
|
return { text: lines.join("\n"), structured: callableStructured({ jobs, all_done: allDone }) };
|
|
15482
15487
|
});
|
|
15483
15488
|
}
|
|
15489
|
+
function spokenLines(cut) {
|
|
15490
|
+
const none = "\uC120\uD0DD\uB41C \uBC84\uC804\uC5D0 \uB0B1\uB9D0\xB7\uB300\uC0AC \uC2DC\uAC01\uC774 \uC5C6\uB2E4.";
|
|
15491
|
+
const timing = cut.versions?.find((v) => v.version === cut.current_version)?.timing;
|
|
15492
|
+
if (timing?.words?.length) {
|
|
15493
|
+
return [
|
|
15494
|
+
"\uB0B1\uB9D0 \uC2DC\uAC01(\uC120\uD0DD\uB41C \uBC84\uC804, \uC2DC\uC791-\uB05D ms) \u2014 edit.layers \uC758 at_ms\xB7end_ms \uC5D0 \uADF8\uB300\uB85C \uC4F4\uB2E4:",
|
|
15495
|
+
timing.words.map((w) => `${w.start_ms}-${w.end_ms}:${w.text}`).join(" ")
|
|
15496
|
+
];
|
|
15497
|
+
}
|
|
15498
|
+
if (timing?.dialogue?.length) {
|
|
15499
|
+
return [
|
|
15500
|
+
"\uC774 \uBC84\uC804\uC5D0\uB294 \uB0B1\uB9D0 \uC2DC\uAC01\uC774 \uC5C6\uB2E4. \uB300\uC0AC \uC904 \uC2DC\uAC01(\uC904 id: \uC2DC\uC791-\uB05D ms)\uC744 \uC4F4\uB2E4:",
|
|
15501
|
+
timing.dialogue.map((d) => `${d.id}:${d.start_ms}-${d.end_ms}`).join(" ")
|
|
15502
|
+
];
|
|
15503
|
+
}
|
|
15504
|
+
return [none];
|
|
15505
|
+
}
|
|
15484
15506
|
function getCut(a = {}, deps = {}) {
|
|
15485
15507
|
return guarded(READ_ONLY, async () => {
|
|
15486
15508
|
const slug = needSlug(a);
|
|
@@ -15488,7 +15510,8 @@ function getCut(a = {}, deps = {}) {
|
|
|
15488
15510
|
const cutId = (a.cut_id ?? "").trim();
|
|
15489
15511
|
if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
|
|
15490
15512
|
const base = resolveBaseUrl(deps.baseUrl);
|
|
15491
|
-
const
|
|
15513
|
+
const q = a.words ? "?words=true" : "";
|
|
15514
|
+
const cut = await apiRequest(base, projectPath(slug, `/cuts/${encodeURIComponent(cutId)}${q}`), {}, deps);
|
|
15492
15515
|
const versions = [...cut.versions ?? []].sort((x, y) => y.version - x.version);
|
|
15493
15516
|
const lines = [cutLine(cut)];
|
|
15494
15517
|
lines.push(
|
|
@@ -15512,6 +15535,13 @@ function getCut(a = {}, deps = {}) {
|
|
|
15512
15535
|
);
|
|
15513
15536
|
lines.push(JSON.stringify(cut.draft_spec));
|
|
15514
15537
|
}
|
|
15538
|
+
lines.push(
|
|
15539
|
+
callableToolNames(
|
|
15540
|
+
"\uD3B8\uC9D1(edit) \u2014 set_cut_edit \uC5D0 \uADF8\uB300\uB85C \uB123\uC744 \uC218 \uC788\uB294 \uC804\uCCB4 \uAC12\uC774\uB2E4. \uACE0\uCE60 \uCE78\uB9CC \uBC14\uAFD4 \uD1B5\uC9F8\uB85C \uBCF4\uB0B4\uB77C(\uC548 \uADF8\uB7EC\uBA74 \uB098\uBA38\uC9C0 \uCE78\uC774 \uC0AC\uB77C\uC9C4\uB2E4):"
|
|
15541
|
+
)
|
|
15542
|
+
);
|
|
15543
|
+
lines.push(JSON.stringify(cut.edit ?? {}));
|
|
15544
|
+
if (a.words) lines.push(...spokenLines(cut));
|
|
15515
15545
|
if (cut.next_calls?.length)
|
|
15516
15546
|
lines.push(callableToolNames(`\uB2E4\uC74C \uD638\uCD9C: ${cut.next_calls.join(", ")}`));
|
|
15517
15547
|
return { text: lines.join("\n"), structured: callableStructured(cut) };
|