{showEmptyState ? (
- {
- updateConfig.mutate(config);
- }}
- />
+
) : (
@@ -376,11 +365,7 @@ export function ChatPageContent(props: {
{
- updateConfig.mutate(config);
- }}
abortChatStream={() => {
chatAbortController?.abort();
setChatAbortController(undefined);
diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/Chatbar.stories.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/Chatbar.stories.tsx
index cb73d8486f1..e54cc308b11 100644
--- a/apps/dashboard/src/app/nebula-app/(app)/components/Chatbar.stories.tsx
+++ b/apps/dashboard/src/app/nebula-app/(app)/components/Chatbar.stories.tsx
@@ -29,44 +29,19 @@ export const Mobile: Story = {
function Story() {
return (
-
+
{}}
- config={{
- mode: "client",
- signer_wallet_address: "xxxxx",
- }}
isChatStreaming={false}
sendMessage={() => {}}
- updateConfig={() => {}}
/>
-
+
{}}
- config={{
- mode: "client",
- signer_wallet_address: "xxxxx",
- }}
isChatStreaming={true}
sendMessage={() => {}}
- updateConfig={() => {}}
- />
-
-
-
- {}}
- config={{
- mode: "engine",
- engine_authorization_token: "xxxxx",
- engine_backend_wallet_address: "0x1234",
- engine_url: "https://some-engine-url.com",
- }}
- isChatStreaming={false}
- sendMessage={() => {}}
- updateConfig={() => {}}
/>
diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.stories.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.stories.tsx
index 4cb7d39c107..eee82fe6dc8 100644
--- a/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.stories.tsx
+++ b/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.stories.tsx
@@ -29,14 +29,7 @@ export const Mobile: Story = {
function Story() {
return (
- {}}
- updateConfig={() => {}}
- />
+ {}} />
);
}
diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx
index 21903104452..72626890f78 100644
--- a/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx
+++ b/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx
@@ -2,14 +2,11 @@
import { ArrowUpRightIcon } from "lucide-react";
import { Button } from "../../../../@/components/ui/button";
-import type { ExecuteConfig } from "../api/types";
import { NebulaIcon } from "../icons/NebulaIcon";
import { Chatbar } from "./ChatBar";
export function EmptyStateChatPageContent(props: {
- updateConfig: (config: ExecuteConfig) => void;
sendMessage: (message: string) => void;
- config: ExecuteConfig;
}) {
return (
@@ -31,9 +28,7 @@ export function EmptyStateChatPageContent(props: {
{
// the page will switch so, no need to handle abort here
}}
diff --git a/apps/dashboard/src/app/nebula-app/(app)/page.tsx b/apps/dashboard/src/app/nebula-app/(app)/page.tsx
index 136b38d5a2e..adde8c1b4fd 100644
--- a/apps/dashboard/src/app/nebula-app/(app)/page.tsx
+++ b/apps/dashboard/src/app/nebula-app/(app)/page.tsx
@@ -6,8 +6,15 @@ import {
import { loginRedirect } from "../../login/loginRedirect";
import { ChatPageContent } from "./components/ChatPageContent";
-export default async function Page() {
- const authToken = await getAuthToken();
+export default async function Page(props: {
+ searchParams: Promise<{
+ prompt?: string;
+ }>;
+}) {
+ const [searchParams, authToken] = await Promise.all([
+ props.searchParams,
+ getAuthToken(),
+ ]);
if (!authToken) {
loginRedirect();
@@ -27,6 +34,7 @@ export default async function Page() {
session={undefined}
type="landing"
account={account}
+ initialPrompt={searchParams.prompt}
/>
);
}
diff --git a/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx
new file mode 100644
index 00000000000..ede0bfc11b2
--- /dev/null
+++ b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx
@@ -0,0 +1,68 @@
+"use client";
+
+import Link from "next/link";
+import { useState } from "react";
+import { EmptyStateChatPageContent } from "../(app)/components/EmptyStateChatPageContent";
+import { NebulaIcon } from "../(app)/icons/NebulaIcon";
+import { Button } from "../../../@/components/ui/button";
+import type { Account } from "../../../@3rdweb-sdk/react/hooks/useApi";
+import { LoginAndOnboardingPageContent } from "../../login/LoginPage";
+
+export function NebulaLoginPage(props: {
+ account: Account | undefined;
+}) {
+ const [message, setMessage] = useState(undefined);
+ const [showLoginPage, setShowLoginPage] = useState(false);
+
+ return (
+
- );
+ return ;
}
+
+
+
+ {showLoginPage ? (
+
+ ) : (
+
+ );
+}
diff --git a/apps/dashboard/src/app/nebula-app/login/page.tsx b/apps/dashboard/src/app/nebula-app/login/page.tsx
index 05e92f2870b..2e9d930936c 100644
--- a/apps/dashboard/src/app/nebula-app/login/page.tsx
+++ b/apps/dashboard/src/app/nebula-app/login/page.tsx
@@ -1,19 +1,8 @@
import { getRawAccount } from "../../account/settings/getAccount";
-import { LoginAndOnboardingPage } from "../../login/LoginPage";
-import { isValidEncodedRedirectPath } from "../../login/isValidEncodedRedirectPath";
+import { NebulaLoginPage } from "./NebulaLoginPage";
-export default async function NebulaLogin(props: {
- searchParams: Promise<{
- next?: string;
- }>;
-}) {
- const nextPath = (await props.searchParams).next;
+export default async function NebulaLogin() {
const account = await getRawAccount();
- const redirectPath =
- nextPath && isValidEncodedRedirectPath(nextPath) ? nextPath : "/";
-
- return (
-
+
+
+
+
+
+ Support
+
+
+
+ Docs
+
+
+ {!showLoginPage && (
+
+ )}
+
+
+ {
+ setMessage(msg);
+ setShowLoginPage(true);
+ }}
+ />
+
+ )}
+