mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
修复可视化编排的命令定时任务和主搜索框推送失效的BUG
This commit is contained in:
parent
34230fa140
commit
fcf3d5912e
@ -16,6 +16,8 @@ import programmings from "./js/options/programs.js";
|
|||||||
import defaultProfile from "./js/options/defaultProfile.js";
|
import defaultProfile from "./js/options/defaultProfile.js";
|
||||||
import Cron from "croner";
|
import Cron from "croner";
|
||||||
import QuickCommand from "components/quickcommandUI/QuickCommand";
|
import QuickCommand from "components/quickcommandUI/QuickCommand";
|
||||||
|
import { generateFlowsCode } from "js/composer/generateCode";
|
||||||
|
|
||||||
// import autoDetach from "./js/autoDetach.js";
|
// import autoDetach from "./js/autoDetach.js";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -157,10 +159,13 @@ export default defineComponent({
|
|||||||
reslove([`超过${timeout}ms未响应`]);
|
reslove([`超过${timeout}ms未响应`]);
|
||||||
}, timeout);
|
}, timeout);
|
||||||
let command = dbManager.getDB("qc_" + featureCode);
|
let command = dbManager.getDB("qc_" + featureCode);
|
||||||
let commandCode = command.cmd;
|
let commandCode =
|
||||||
|
command.program === "quickcomposer"
|
||||||
|
? generateFlowsCode(command.flows)
|
||||||
|
: command.cmd;
|
||||||
if (mainInput)
|
if (mainInput)
|
||||||
commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput);
|
commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput);
|
||||||
if (command.program === "quickcommand") {
|
if (["quickcommand", "quickcomposer"].includes(command.program)) {
|
||||||
window.runCodeInSandbox(commandCode, (stdout, stderr) => {
|
window.runCodeInSandbox(commandCode, (stdout, stderr) => {
|
||||||
stderr && reslove([stderr.toString()]);
|
stderr && reslove([stderr.toString()]);
|
||||||
reslove(stdout);
|
reslove(stdout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user