= ({
}
return (
-
- {
- rangeRef.current = newRange
- }}
- data={flattenedItems}
- itemContent={(index) => renderRow(index)}
- style={{ height: "100%" }}
- />
-
+ <>
+
+ {
+ rangeRef.current = newRange
+ }}
+ data={flattenedItems}
+ itemContent={(index) => renderRow(index)}
+ style={{ height: "100%" }}
+ />
+
+ {schemaExplanationDialog && (
+ !open && setSchemaExplanationDialog(null)}
+ tableName={schemaExplanationDialog.tableName}
+ explanation={schemaExplanationDialog.explanation}
+ />
+ )}
+ >
)
}
diff --git a/src/scenes/Schema/index.tsx b/src/scenes/Schema/index.tsx
index e3393ed80..5d5017af7 100644
--- a/src/scenes/Schema/index.tsx
+++ b/src/scenes/Schema/index.tsx
@@ -75,6 +75,10 @@ import { useSchema } from "./SchemaContext"
import { SchemaProvider } from "./SchemaContext"
import { TreeNodeKind } from "./Row"
import { toast } from "../../components/Toast"
+import {
+ useAIStatus,
+ isBlockingAIStatus,
+} from "../../providers/AIStatusProvider"
type Props = Readonly<{
hideMenu?: boolean
@@ -149,6 +153,7 @@ const Schema = ({
const listenerActiveRef = useRef(false)
const latestFocusChangeTimestampRef = useRef(0)
const { addBuffer } = useEditor()
+ const { status } = useAIStatus()
const { selectOpen, setSelectOpen, selectedTables, setSelectedTables } =
useSchema()
@@ -447,6 +452,7 @@ const Schema = ({