From aafd98ad80110ecaa9881917a0037b711bb59f96 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 16 May 2023 11:51:59 +0800 Subject: [PATCH] refactor: add ai assistant as default builtin plugin --- client/shared/event/index.ts | 1 + client/web/src/plugin/builtin.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/client/shared/event/index.ts b/client/shared/event/index.ts index d67b131e..95e2cf8d 100644 --- a/client/shared/event/index.ts +++ b/client/shared/event/index.ts @@ -49,6 +49,7 @@ export interface SharedEventMap { /** * 接受到未被静音的消息 + * 一般用于消息推送 */ receiveUnmutedMessage: (payload: ChatMessage) => void; diff --git a/client/web/src/plugin/builtin.ts b/client/web/src/plugin/builtin.ts index 12462c0d..eb8f4130 100644 --- a/client/web/src/plugin/builtin.ts +++ b/client/web/src/plugin/builtin.ts @@ -104,4 +104,14 @@ export const builtinPlugins: PluginManifest[] = _compact([ 'description.zh-CN': '为用户信息增加地理位置记录', requireRestart: true, }, + isOffical && { + label: 'AI Assistant', + name: 'com.msgbyte.ai-assistant', + url: '/plugins/com.msgbyte.ai-assistant/index.js', + icon: '/plugins/com.msgbyte.ai-assistant/assets/icon.png', + version: '0.0.0', + author: 'moonrailgun', + description: 'Add chatgpt into Tailchat', + requireRestart: true, + }, ]);