From fcf3d5912e943099545c8290e3ccd35e0bd5c218 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 9 Apr 2025 10:04:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=A7=86=E5=8C=96?= =?UTF-8?q?=E7=BC=96=E6=8E=92=E7=9A=84=E5=91=BD=E4=BB=A4=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=92=8C=E4=B8=BB=E6=90=9C=E7=B4=A2=E6=A1=86?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=A4=B1=E6=95=88=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index ff00477..aea84fd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,6 +16,8 @@ import programmings from "./js/options/programs.js"; import defaultProfile from "./js/options/defaultProfile.js"; import Cron from "croner"; import QuickCommand from "components/quickcommandUI/QuickCommand"; +import { generateFlowsCode } from "js/composer/generateCode"; + // import autoDetach from "./js/autoDetach.js"; export default defineComponent({ @@ -157,10 +159,13 @@ export default defineComponent({ reslove([`超过${timeout}ms未响应`]); }, timeout); let command = dbManager.getDB("qc_" + featureCode); - let commandCode = command.cmd; + let commandCode = + command.program === "quickcomposer" + ? generateFlowsCode(command.flows) + : command.cmd; if (mainInput) commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput); - if (command.program === "quickcommand") { + if (["quickcommand", "quickcomposer"].includes(command.program)) { window.runCodeInSandbox(commandCode, (stdout, stderr) => { stderr && reslove([stderr.toString()]); reslove(stdout);