From e44f83fb9c13e4fab8aee07603632d533d12b4d8 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Tue, 3 Jan 2023 15:51:49 +0900
Subject: update AiScript to 0.12.0

---
 packages/frontend/src/widgets/button.vue | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'packages/frontend/src/widgets/button.vue')

diff --git a/packages/frontend/src/widgets/button.vue b/packages/frontend/src/widgets/button.vue
index f0148d7f4e..f65b115cc0 100644
--- a/packages/frontend/src/widgets/button.vue
+++ b/packages/frontend/src/widgets/button.vue
@@ -8,7 +8,7 @@
 
 <script lang="ts" setup>
 import { onMounted, onUnmounted, ref, watch } from 'vue';
-import { AiScript, parse, utils } from '@syuilo/aiscript';
+import { Interpreter, Parser, utils } from '@syuilo/aiscript';
 import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
 import { GetFormResultType } from '@/scripts/form';
 import * as os from '@/os';
@@ -48,8 +48,10 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
 	emit,
 );
 
+const parser = new Parser();
+
 const run = async () => {
-	const aiscript = new AiScript(createAiScriptEnv({
+	const aiscript = new Interpreter(createAiScriptEnv({
 		storageKey: 'widget',
 		token: $i?.token,
 	}), {
@@ -72,7 +74,7 @@ const run = async () => {
 
 	let ast;
 	try {
-		ast = parse(widgetProps.script);
+		ast = parser.parse(widgetProps.script);
 	} catch (err) {
 		os.alert({
 			type: 'error',
-- 
cgit v1.2.3-freya

