openxgen 1.6.0 → 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 +34 -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;
|
|
@@ -3237,18 +3257,24 @@ async function agentRepl() {
|
|
|
3237
3257
|
continue;
|
|
3238
3258
|
}
|
|
3239
3259
|
if (input === "/connect") {
|
|
3260
|
+
rl.pause();
|
|
3240
3261
|
await connectServer();
|
|
3262
|
+
rl.resume();
|
|
3241
3263
|
messages[0] = { role: "system", content: buildSystemPrompt() };
|
|
3242
3264
|
continue;
|
|
3243
3265
|
}
|
|
3244
3266
|
if (input === "/env") {
|
|
3267
|
+
rl.pause();
|
|
3245
3268
|
await switchEnv();
|
|
3269
|
+
rl.resume();
|
|
3246
3270
|
messages[0] = { role: "system", content: buildSystemPrompt() };
|
|
3247
3271
|
continue;
|
|
3248
3272
|
}
|
|
3249
3273
|
if (input === "/provider") {
|
|
3274
|
+
rl.pause();
|
|
3250
3275
|
const { guidedProviderSetup: setup } = await Promise.resolve().then(() => (init_provider(), provider_exports));
|
|
3251
3276
|
await setup();
|
|
3277
|
+
rl.resume();
|
|
3252
3278
|
console.log(chalk12.gray(" \uD504\uB85C\uBC14\uC774\uB354 \uBCC0\uACBD\uB428. /exit \uD6C4 \uC7AC\uC2DC\uC791\uD558\uC138\uC694.\n"));
|
|
3253
3279
|
continue;
|
|
3254
3280
|
}
|
|
@@ -3332,7 +3358,7 @@ async function runLoop(client2, model, messages, tools2) {
|
|
|
3332
3358
|
} else {
|
|
3333
3359
|
toolResult2 = await executeTool(tc.name, args);
|
|
3334
3360
|
}
|
|
3335
|
-
const truncated = toolResult2.length >
|
|
3361
|
+
const truncated = toolResult2.length > 8e3 ? toolResult2.slice(0, 8e3) + "\n\u2026(truncated)" : toolResult2;
|
|
3336
3362
|
const preview = toolResult2.split("\n")[0].slice(0, 60);
|
|
3337
3363
|
console.log(chalk12.dim(` \u2514 ${preview}${toolResult2.length > 60 ? "\u2026" : ""}`));
|
|
3338
3364
|
messages.push({ role: "tool", tool_call_id: tc.id, content: truncated });
|