- {isLoadingMessages || isLoadingSchema ? (
-
-
-
-
-
-
-
-
- ) : isConversationStarted ? (
-
-
setIsMessageAnimationComplete(false)}
- onAnimationComplete={() => setIsMessageAnimationComplete(true)}
- initial="show"
- animate="show"
+
+
+ {isDraggingOver && (
+
+ )}
+ {dropZoneCursor}
+
+ {isLoadingMessages || isLoadingSchema ? (
+
+
+
+
+
+
+
+
+ ) : isConversationStarted ? (
+
- {messages.map((message, i) => (
-
- ))}
-
- {isLoading && (
- setIsMessageAnimationComplete(false)}
+ onAnimationComplete={() => setIsMessageAnimationComplete(true)}
+ initial="show"
+ animate="show"
+ >
+ {messages.map((message, i) => (
+
+ ))}
+
+ {isLoading && (
+
+
+
+
+ {lastMessage &&
+ (lastMessage.role === 'user' ||
+ (lastMessage.role === 'assistant' && !lastMessage.content)) && (
+
+ Working on it...
+
+ )}
+
+ )}
+
+
+
+ ) : (
+
+ {user ? (
+
+ What would you like to create?
+
+ ) : (
+
+
+
+ To prevent abuse we ask you to sign in before chatting with AI.
+
+ {
+ setIsSignInDialogOpen(true)
}}
- initial="hidden"
- animate="show"
- exit="hidden"
>
-
-
-
- {lastMessage &&
- (lastMessage.role === 'user' ||
- (lastMessage.role === 'assistant' && !lastMessage.content)) && (
-
- Working on it...
-
- )}
-
- )}
-
-
-
- ) : (
-
- {user ? (
-
+
+ )}
+
+ )}
+
+ {!isSticky && (
+
- What would you like to create?
-
- ) : (
+
+
+ )}
+
+
+
+
+ {!user && !isLoadingUser && isConversationStarted && (
-
+
To prevent abuse we ask you to sign in before chatting with AI.
{
setIsSignInDialogOpen(true)
}}
@@ -336,183 +391,130 @@ export default function Chat() {
)}
-
- )}
-
- {!isSticky && (
-
-
-
- )}
-
-
-
-
- {!user && !isLoadingUser && isConversationStarted && (
-
-
-
- To prevent abuse we ask you to sign in before chatting with AI.
-
- {
- setIsSignInDialogOpen(true)
- }}
+
+
-
- AI can make mistakes. Check important information.
+
-
+
)
}
diff --git a/apps/postgres-new/components/layout.tsx b/apps/postgres-new/components/layout.tsx
index e3ad7b0d..ee401248 100644
--- a/apps/postgres-new/components/layout.tsx
+++ b/apps/postgres-new/components/layout.tsx
@@ -9,6 +9,7 @@ import { TooltipProvider } from '~/components/ui/tooltip'
import { useBreakpoint } from '~/lib/use-breakpoint'
import { useApp } from './app-provider'
import Sidebar from './sidebar'
+import Workspace from '~/components/workspace'
const loadFramerFeatures = () => import('./framer-features').then((res) => res.default)
@@ -29,11 +30,12 @@ export default function Layout({ children }: LayoutProps) {