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 35689a06c91..bcff408a0ad 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx @@ -17,6 +17,7 @@ import { useActiveAccount, useActiveWalletChain } from "thirdweb/react"; import { type NebulaContext, promptNebula } from "../api/chat"; import { createSession, updateSession } from "../api/session"; import type { SessionInfo } from "../api/types"; +import { examplePrompts } from "../data/examplePrompts"; import { newChatPageUrlStore, newSessionsStore } from "../stores"; import { ChatBar } from "./ChatBar"; import { type ChatMessage, Chats } from "./Chats"; @@ -181,6 +182,23 @@ export function ChatPageContent(props: { }, ]); + const lowerCaseMessage = message.toLowerCase(); + // handle hardcoded replies first + const interceptedReply = examplePrompts.find( + (prompt) => prompt.message.toLowerCase() === lowerCaseMessage, + )?.interceptedReply; + + if (interceptedReply) { + // slight delay to match other response times + await new Promise((resolve) => setTimeout(resolve, 1000)); + setMessages((prev) => [ + ...prev.slice(0, -1), + { type: "assistant", text: interceptedReply, request_id: undefined }, + ]); + + return; + } + setIsChatStreaming(true); setEnableAutoScroll(true); const abortController = new AbortController(); 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 a3a8e64e9ae..9dd7dd2d192 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/EmptyStateChatPageContent.tsx @@ -105,7 +105,7 @@ function DashedBgDiv(props: {
), diff --git a/apps/portal/src/components/others/Sidebar.tsx b/apps/portal/src/components/others/Sidebar.tsx index c88c3dc0028..56fcf121df2 100644 --- a/apps/portal/src/components/others/Sidebar.tsx +++ b/apps/portal/src/components/others/Sidebar.tsx @@ -110,6 +110,7 @@ function SidebarItem(props: { link: SidebarLink; onLinkClick?: () => void }) { void }) { return (