openxgen 1.6.1 → 1.7.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/index.js +28 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2653,14 +2653,14 @@ async function workflowList2() {
|
|
|
2653
2653
|
const { getWorkflowListDetail: getWorkflowListDetail2 } = await Promise.resolve().then(() => (init_workflow(), workflow_exports));
|
|
2654
2654
|
const wfs = await getWorkflowListDetail2();
|
|
2655
2655
|
if (!wfs.length) return "\uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC5C6\uC74C.";
|
|
2656
|
-
|
|
2656
|
+
const header = `\uCD1D ${wfs.length}\uAC1C \uC6CC\uD06C\uD50C\uB85C\uC6B0:
|
|
2657
|
+
`;
|
|
2658
|
+
const list = wfs.map((w, i) => {
|
|
2657
2659
|
const deployed = w.is_deployed;
|
|
2658
|
-
const
|
|
2659
|
-
|
|
2660
|
-
return `${i + 1}. ${w.workflow_name}${tag}
|
|
2661
|
-
ID: ${w.workflow_id ?? w.id}
|
|
2662
|
-
deploy_key: ${dk || "\uC5C6\uC74C"}`;
|
|
2660
|
+
const tag = deployed ? " \u25CF" : "";
|
|
2661
|
+
return `${i + 1}. ${w.workflow_name}${tag} | ${w.workflow_id ?? w.id}`;
|
|
2663
2662
|
}).join("\n");
|
|
2663
|
+
return header + list;
|
|
2664
2664
|
}
|
|
2665
2665
|
async function workflowRun2(args) {
|
|
2666
2666
|
const { executeWorkflow: executeWorkflow2 } = await Promise.resolve().then(() => (init_workflow(), workflow_exports));
|
|
@@ -3099,7 +3099,27 @@ async function agentRepl() {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
console.log(chalk12.gray(` cwd ${process.cwd()}`));
|
|
3101
3101
|
console.log();
|
|
3102
|
-
|
|
3102
|
+
if (server && auth) {
|
|
3103
|
+
try {
|
|
3104
|
+
const [wfRes, colRes] = await Promise.allSettled([
|
|
3105
|
+
Promise.resolve().then(() => (init_workflow(), workflow_exports)).then((m) => m.getWorkflowListDetail()),
|
|
3106
|
+
Promise.resolve().then(() => (init_document(), document_exports)).then((m) => m.listCollections())
|
|
3107
|
+
]);
|
|
3108
|
+
const wfCount = wfRes.status === "fulfilled" ? wfRes.value.length : 0;
|
|
3109
|
+
const colCount = colRes.status === "fulfilled" ? colRes.value.length : 0;
|
|
3110
|
+
const deployed = wfRes.status === "fulfilled" ? wfRes.value.filter((w) => w.is_deployed).length : 0;
|
|
3111
|
+
console.log(chalk12.gray(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`));
|
|
3112
|
+
console.log(chalk12.gray(` \uC6CC\uD06C\uD50C\uB85C\uC6B0 ${chalk12.white(String(wfCount))}\uAC1C (\uBC30\uD3EC ${deployed}) \xB7 \uCEEC\uB809\uC158 ${chalk12.white(String(colCount))}\uAC1C`));
|
|
3113
|
+
console.log(chalk12.gray(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`));
|
|
3114
|
+
console.log();
|
|
3115
|
+
console.log(chalk12.gray(` "\uC6CC\uD06C\uD50C\uB85C\uC6B0 \uBAA9\uB85D", "\uCEEC\uB809\uC158", "6\uBC88 \uC2E4\uD589" \uB4F1 \uC790\uC720\uB86D\uAC8C \uC785\uB825`));
|
|
3116
|
+
console.log(chalk12.gray(` /dashboard \uB85C TUI \uB300\uC2DC\uBCF4\uB4DC \xB7 /help \uC804\uCCB4 \uB3C4\uC6C0\uB9D0`));
|
|
3117
|
+
} catch {
|
|
3118
|
+
console.log(chalk12.gray(` \uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694. /help`));
|
|
3119
|
+
}
|
|
3120
|
+
} else {
|
|
3121
|
+
console.log(chalk12.gray(` \uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694. /help`));
|
|
3122
|
+
}
|
|
3103
3123
|
console.log();
|
|
3104
3124
|
const rl = createInterface5({ input: process.stdin, output: process.stdout });
|
|
3105
3125
|
let rlClosed = false;
|
|
@@ -3338,7 +3358,7 @@ async function runLoop(client2, model, messages, tools2) {
|
|
|
3338
3358
|
} else {
|
|
3339
3359
|
toolResult2 = await executeTool(tc.name, args);
|
|
3340
3360
|
}
|
|
3341
|
-
const truncated = toolResult2.length >
|
|
3361
|
+
const truncated = toolResult2.length > 8e3 ? toolResult2.slice(0, 8e3) + "\n\u2026(truncated)" : toolResult2;
|
|
3342
3362
|
const preview = toolResult2.split("\n")[0].slice(0, 60);
|
|
3343
3363
|
console.log(chalk12.dim(` \u2514 ${preview}${toolResult2.length > 60 ? "\u2026" : ""}`));
|
|
3344
3364
|
messages.push({ role: "tool", tool_call_id: tc.id, content: truncated });
|