Remove runtime mode selection & have unified setup flow for node.js + API access

This commit is contained in:
Will Chen
2025-04-17 16:52:20 -07:00
parent ba3c9f7a28
commit 24c1be224b
12 changed files with 377 additions and 674 deletions

View File

@@ -11,8 +11,6 @@ import { ChatInput } from "@/components/chat/ChatInput";
import { isPreviewOpenAtom } from "@/atoms/viewAtoms";
import { useState, useEffect } from "react";
import { useStreamChat } from "@/hooks/useStreamChat";
import { SetupRuntimeFlow } from "@/components/SetupRuntimeFlow";
import { RuntimeMode } from "@/lib/schemas";
export default function HomePage() {
const [inputValue, setInputValue] = useAtom(chatInputValueAtom);
@@ -83,12 +81,6 @@ export default function HomePage() {
);
}
// Runtime Setup Flow
// Render this only if runtimeMode is not set in settings
if (settings?.runtimeMode === "unset") {
return <SetupRuntimeFlow />;
}
// Main Home Page Content (Rendered only if runtimeMode is set)
return (
<div className="flex flex-col items-center justify-center max-w-3xl m-auto p-8">
@@ -96,7 +88,7 @@ export default function HomePage() {
Build your dream app
</h1>
{!isAnyProviderSetup() && <SetupBanner />}
<SetupBanner />
<div className="w-full">
<ChatInput onSubmit={handleSubmit} />