Fix: AiScriptのreadlineの修正をPlay以外にも適用 (#12841)
* add AiScriptReadline() in api.ts * apply AiScriptReadline on flash.vue * AiScriptReadline → aiScriptReadline * Update flash.vue * Update scratchpad.vue * Update WidgetAiscript.vue * Update WidgetAiscriptApp.vue * Update WidgetButton.vue * Update plugin.ts
This commit is contained in:
parent
da154c8209
commit
f8d5a46dbf
7 changed files with 22 additions and 80 deletions
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { Interpreter, Parser, utils, values } from '@syuilo/aiscript';
|
||||
import { createAiScriptEnv } from '@/scripts/aiscript/api.js';
|
||||
import { aiScriptReadline, createAiScriptEnv } from '@/scripts/aiscript/api.js';
|
||||
import { inputText } from '@/os.js';
|
||||
import { Plugin, noteActions, notePostInterruptors, noteViewInterruptors, postFormActions, userActions, pageViewInterruptors } from '@/store.js';
|
||||
|
||||
|
@ -19,19 +19,7 @@ export async function install(plugin: Plugin): Promise<void> {
|
|||
plugin: plugin,
|
||||
storageKey: 'plugins:' + plugin.id,
|
||||
}), {
|
||||
in: (q): Promise<string> => {
|
||||
return new Promise(ok => {
|
||||
inputText({
|
||||
title: q,
|
||||
}).then(({ canceled, result: a }) => {
|
||||
if (canceled) {
|
||||
ok('');
|
||||
} else {
|
||||
ok(a);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
in: aiScriptReadline,
|
||||
out: (value): void => {
|
||||
console.log(value);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue