diff --git a/web/src/app/chat/components/input-box.tsx b/web/src/app/chat/components/input-box.tsx index 12234d4..b965ae5 100644 --- a/web/src/app/chat/components/input-box.tsx +++ b/web/src/app/chat/components/input-box.tsx @@ -15,7 +15,7 @@ import { Tooltip } from "~/components/deer-flow/tooltip"; import { BorderBeam } from "~/components/magicui/border-beam"; import { Button } from "~/components/ui/button"; import { enhancePrompt } from "~/core/api"; -import { getConfig } from "~/core/api/config"; +import { useConfig } from "~/core/api/hooks"; import type { Option, Resource } from "~/core/messages"; import { setEnableDeepThinking, @@ -52,7 +52,7 @@ export function InputBox({ const backgroundInvestigation = useSettingsStore( (state) => state.general.enableBackgroundInvestigation, ); - const reasoningModel = useMemo(() => getConfig().models.reasoning?.[0], []); + const { config, loading } = useConfig(); const reportStyle = useSettingsStore((state) => state.general.reportStyle); const containerRef = useRef(null); const inputRef = useRef(null); @@ -203,13 +203,15 @@ export function InputBox({ isEnhanceAnimating && "transition-all duration-500", )} ref={inputRef} + loading={loading} + config={config} onEnter={handleSendMessage} onChange={setCurrentPrompt} />
- {reasoningModel && ( + {config?.models.reasoning?.[0] && (

When enabled, DeerFlow will use reasoning model ( - {reasoningModel}) to generate more thoughtful plans. + {config.models.reasoning?.[0]}) to generate more thoughtful + plans.

} diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index a199e39..8b5b6ab 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -8,7 +8,6 @@ import { Geist } from "next/font/google"; import Script from "next/script"; import { ThemeProviderWrapper } from "~/components/deer-flow/theme-provider-wrapper"; -import { loadConfig } from "~/core/api/config"; import { env } from "~/env"; import { Toaster } from "../components/deer-flow/toaster"; @@ -28,11 +27,9 @@ const geist = Geist({ export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { - const conf = await loadConfig(); return ( - {/* Define isSpace function globally to fix markdown-it issues with Next.js + Turbopack https://github.com/markdown-it/markdown-it/issues/1082#issuecomment-2749656365 */}