feat(plugins): analyze plugin data in the built-in AI panel

This commit is contained in:
zipg authored and GitHub committed 2026-09-22 15:04:33 +08:00
1 parent 7653ebfda6
commit 1566bb8a9f
33 files changed
+716 -216

No files matched your search

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue";
import { computed, inject, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue";
import { AlertTriangle, Loader2 } from "@lucide/vue";
import * as api from "@/lib/backend/api";
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
@@ -24,6 +24,7 @@ import { useI18n } from "vue-i18n";
import { useTheme } from "@/composables/useTheme";
import { useSettingsStore } from "@/stores/settingsStore";
import { useConnectionStore } from "@/stores/connectionStore";
import { OPEN_PLUGIN_AI_CONVERSATION } from "@/lib/ai/aiPluginConversation";
const props = withDefaults(
defineProps<{
@@ -45,6 +46,7 @@ const emit = defineEmits<{
const { t, locale: appLocale } = useI18n();
const { isDark, themeRevision } = useTheme();
const settingsStore = useSettingsStore();
const openAiConversation = inject(OPEN_PLUGIN_AI_CONVERSATION, undefined);
const iframe = ref<HTMLIFrameElement>();
const source = ref("");
const loading = ref(true);
@@ -373,6 +375,7 @@ function createBridge() {
notify: api.notifyPlugin,
sendBinary: api.sendPluginBinary,
readAsset: api.readPluginUiAsset,
openAiConversation,
openWorkbench: async (pluginId, contributionId, context, options) => emit("openWorkbench", pluginId, contributionId, context, options),
openFilesystem: async (pluginId, providerId, context) => emit("openFilesystem", pluginId, providerId, context),
reopenConnection: (pluginId, connectionId) => useConnectionStore().reopenPluginConnection(connectionId, pluginId),