From 6e912d68c8e4fd58be6031e893fd0b2ecdbfc541 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Sun, 25 Jun 2023 18:24:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E6=8C=81ap=E7=9A=84dev?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/tools/APTool.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/tools/APTool.js b/utils/tools/APTool.js index d7eecaa..9c6368c 100644 --- a/utils/tools/APTool.js +++ b/utils/tools/APTool.js @@ -13,7 +13,7 @@ export class APTool extends AbstractTool { required: ['prompt'] } - description = 'Useful when you want to draw' + description = 'Useful when you want to draw picture' func = async function (opts, e) { let { prompt } = opts @@ -23,7 +23,14 @@ export class APTool extends AbstractTool { let { Ai_Painting } = await import('../../../ap-plugin/apps/aiPainting.js') ap = new Ai_Painting(e) } catch (err) { - return 'the user didn\'t install ap-plugin' + try { + // ap的dev分支改名了 + // eslint-disable-next-line camelcase + let { Ai_Painting } = await import('../../../ap-plugin/apps/ai_painting.js') + ap = new Ai_Painting(e) + } catch (err1) { + return 'the user didn\'t install ap-plugin. suggest him to install' + } } try { e.msg = '#绘图' + prompt