feat(ai): drag scoped table references into chat

This commit is contained in:
Allen authored and GitHub committed 2026-08-21 13:03:14 +08:00
1 parent cc78d4f528
commit 09b326558f
6 files changed
+197 -4

No files matched your search

@@ -24,7 +24,16 @@ export interface QueryEditorTableReferenceDropDetail {
let activeTableReferencePayload: QueryEditorTableReferencePayload | null = null;
export function createTableReferencePayload(options: { connectionId?: string; database?: string; schema?: string; tableName?: string; columnName?: string; referenceType?: "database" | "table" | "column"; databaseType?: DatabaseType; driverProfile?: string }): QueryEditorTableReferencePayload | null {
export function createTableReferencePayload(options: {
connectionId?: string;
database?: string;
schema?: string;
tableName?: string;
columnName?: string;
referenceType?: "database" | "table" | "column";
databaseType?: DatabaseType;
driverProfile?: string;
}): QueryEditorTableReferencePayload | null {
if (!options.connectionId || options.database == null) return null;
const referenceType = options.referenceType ?? (options.columnName ? "column" : "table");
if (referenceType !== "database" && !options.tableName) return null;