fix(client): validate input response in aiscript
This commit is contained in:
@@ -155,7 +155,11 @@ async function run() {
|
|||||||
os.inputText({
|
os.inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -86,7 +86,11 @@ async function run() {
|
|||||||
os.inputText({
|
os.inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -20,7 +20,11 @@ export function install(plugin) {
|
|||||||
inputText({
|
inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -72,7 +72,11 @@ const run = async () => {
|
|||||||
os.inputText({
|
os.inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -67,7 +67,11 @@ async function run() {
|
|||||||
os.inputText({
|
os.inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -60,7 +60,11 @@ const run = async () => {
|
|||||||
os.inputText({
|
os.inputText({
|
||||||
title: q,
|
title: q,
|
||||||
}).then(({ canceled, result: a }) => {
|
}).then(({ canceled, result: a }) => {
|
||||||
ok(a);
|
if (canceled) {
|
||||||
|
ok('');
|
||||||
|
} else {
|
||||||
|
ok(a);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user