diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx index f4bd349ab68..f35491d8330 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx @@ -100,6 +100,7 @@ The following is the user's message: return ( <>
x.toString()), + networks: props.context?.networks || null, }); }} priorityChains={[ @@ -156,6 +157,7 @@ export function ChatBar(props: { props.setContext({ walletAddress: walletMeta.address, chainIds: props.context?.chainIds || [], + networks: props.context?.networks || null, }); }} /> diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx index 17b60e36336..58f58eb7b0f 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx @@ -101,6 +101,7 @@ export function ChatPageContent(props: { props.initialParams?.chainIds.map((x) => x.toString()) || [], walletAddress: contextRes?.wallet_address || props.accountAddress || null, + networks: "mainnet", }; return value; @@ -131,6 +132,7 @@ export function ChatPageContent(props: { : { chainIds: [], walletAddress: null, + networks: null, }; if (!updatedContextFilters.walletAddress && address) { @@ -594,6 +596,7 @@ export async function handleNebulaPrompt(params: { setContextFilters({ chainIds: res.data.chain_ids.map((x) => x.toString()), walletAddress: res.data.wallet_address, + networks: res.data.networks, }); } }, 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 c5c796e1d21..78b0acd75bc 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 @@ -48,6 +48,7 @@ function Story() { isStreaming={false} context={{ chainIds: ["1"], + networks: null, walletAddress: null, }} showContextSelector={true} @@ -60,6 +61,7 @@ function Story() { isStreaming={false} context={{ chainIds: ["1", "137", "10"], + networks: null, walletAddress: null, }} showContextSelector={true} @@ -72,6 +74,7 @@ function Story() { isStreaming={false} context={{ chainIds: ["1", "137", "10", "146", "80094"], + networks: null, walletAddress: null, }} showContextSelector={true} @@ -89,6 +92,7 @@ function Story() { isStreaming={false} context={{ chainIds: ["1", "137", "10", "146", "80094"], + networks: null, walletAddress: null, }} showContextSelector={true} diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChat.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChat.tsx index ee690537cff..9dbdb8e33f5 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChat.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChat.tsx @@ -16,6 +16,7 @@ import { useState, } from "react"; import type { ThirdwebClient } from "thirdweb"; +import type { NebulaContext } from "../../api/chat"; import type { ExamplePrompt } from "../../data/examplePrompts"; import { NebulaIcon } from "../../icons/NebulaIcon"; @@ -25,6 +26,7 @@ export function NebulaChatButton(props: { pageType: "chain" | "contract" | "support"; authToken: string | undefined; examplePrompts: ExamplePrompt[]; + networks: NebulaContext["networks"]; label: string; client: ThirdwebClient; isFloating: boolean; @@ -91,6 +93,7 @@ export function NebulaChatButton(props: {
chainId.toString()) || null, walletAddress: props.nebulaParams?.wallet || null, + networks: props.networks, }; }); diff --git a/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx index 2f34007e8bf..159562dff61 100644 --- a/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx +++ b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx @@ -93,6 +93,7 @@ export function NebulaLoggedOutStatePage(props: { context={{ walletAddress: null, chainIds: chainIds.map((x) => x.toString()), + networks: null, }} setContext={(v) => { if (v?.chainIds) {