refactor(ai): AI助手优化和移除MCP插件

This commit is contained in:
Ray.Hao
2025-11-15 09:08:35 +08:00
parent a9f2697ef0
commit 5aa6773cac
10 changed files with 1101 additions and 722 deletions

View File

@@ -20,6 +20,7 @@ import { useAppStore, useSettingsStore } from "@/store";
import { defaultSettings } from "@/settings";
import { ThemeMode, ComponentSize } from "@/enums";
import AiAssistant from "@/components/AiAssistant/index.vue";
import { AuthStorage } from "@/utils/auth";
const appStore = useAppStore();
const settingsStore = useSettingsStore();
@@ -27,7 +28,13 @@ const settingsStore = useSettingsStore();
const locale = computed(() => appStore.locale);
const size = computed(() => appStore.size as ComponentSize);
const showWatermark = computed(() => settingsStore.showWatermark);
const enableAiAssistant = computed(() => settingsStore.enableAiAssistant);
// 只有在启用 AI 助手且用户已登录时才显示
const enableAiAssistant = computed(() => {
const isEnabled = settingsStore.enableAiAssistant;
const isLoggedIn = !!AuthStorage.getAccessToken();
return isEnabled && isLoggedIn;
});
// 明亮/暗黑主题水印字体颜色适配
const fontColor = computed(() => {