This commit is contained in:
syuilo 2020-08-01 12:04:30 +09:00 committed by GitHub
parent 66b07578c5
commit 057ce73ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import { utils, values } from '@syuilo/aiscript'; import { utils, values } from '@syuilo/aiscript';
import { jsToVal } from '@syuilo/aiscript/built/interpreter/util'; import { jsToVal } from '@syuilo/aiscript/built/interpreter/util';
// TODO: vue3に移行した折にはvmを渡す必要は無くなるはず
export function createAiScriptEnv(vm, opts) { export function createAiScriptEnv(vm, opts) {
let apiRequests = 0; let apiRequests = 0;
return { return {
@ -42,6 +43,7 @@ export function createAiScriptEnv(vm, opts) {
}; };
} }
// TODO: vue3に移行した折にはvmを渡す必要は無くなるはず
export function createPluginEnv(vm, opts) { export function createPluginEnv(vm, opts) {
const config = new Map(); const config = new Map();
for (const [k, v] of Object.entries(opts.plugin.config || {})) { for (const [k, v] of Object.entries(opts.plugin.config || {})) {