feat(ai): add connection tree context

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-20 15:15:19 +08:00
1 parent e4577abeed
commit 0e0edcd206
15 files changed
+132 -4

No files matched your search

@@ -12,6 +12,7 @@ import ConnectionTree from "@/components/sidebar/ConnectionTree.vue";
import { applyConnectionMultiSelection, emptyConnectionMultiSelection, isExitConnectionMultiSelectionShortcut } from "@/lib/sidebar/sidebarConnectionMultiSelect";
import { useConnectionStore } from "@/stores/connectionStore";
import { useToast } from "@/composables/useToast";
import type { TreeNode } from "@/types/database";
defineProps<{
sidebarWidth: number;
@@ -24,6 +25,7 @@ const emit = defineEmits<{
startResize: [event: MouseEvent];
collapse: [];
"open-settings": [initialTab: string];
"add-to-ai": [node: TreeNode];
}>();
type ImportSource = "dbx" | "navicat" | "dbeaver" | "datagrip";
@@ -264,7 +266,7 @@ defineExpose({ focusSearch });
</template>
</div>
<div class="flex-1 min-h-0">
<ConnectionTree ref="connectionTreeRef" @open-settings="(initialTab) => emit('open-settings', initialTab)" />
<ConnectionTree ref="connectionTreeRef" @open-settings="(initialTab) => emit('open-settings', initialTab)" @add-to-ai="(node) => emit('add-to-ai', node)" />
</div>
</div>
<div class="panel-resize-handle panel-resize-handle--right" @mousedown="emit('startResize', $event)" />