mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-07-04 05:09:19 +00:00
修复函数传递方式
This commit is contained in:
parent
2bca00ee10
commit
48d68efe6e
@ -1,5 +1,5 @@
|
|||||||
const configEffect = {
|
const configEffect = {
|
||||||
async generateRealisticConfig({ command, devices = [] }) {
|
async generateRealisticConfig(command, devices = []) {
|
||||||
const timestamp = new Date().toLocaleString();
|
const timestamp = new Date().toLocaleString();
|
||||||
let config = `! 配置生成于 ${timestamp}\n`;
|
let config = `! 配置生成于 ${timestamp}\n`;
|
||||||
const cmd = command.toLowerCase();
|
const cmd = command.toLowerCase();
|
||||||
|
@ -58,7 +58,7 @@ const ConfigPage = () => {
|
|||||||
const performParse = async () => {
|
const performParse = async () => {
|
||||||
if (testMode) {
|
if (testMode) {
|
||||||
await Common.sleep(800 + Math.random() * 700);
|
await Common.sleep(800 + Math.random() * 700);
|
||||||
return await configEffect.generateRealisticConfig(inputText);
|
return await configEffect.generateRealisticConfig(inputText, devices);
|
||||||
}
|
}
|
||||||
return await api.parseCommand(inputText);
|
return await api.parseCommand(inputText);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user