mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-02 22:02:13 +08:00
feat: add mode in welcome
This commit is contained in:
@@ -274,7 +274,9 @@ export default function ChatPage() {
|
||||
autoFocus={isNewThread}
|
||||
status={thread.isLoading ? "streaming" : "ready"}
|
||||
context={settings.context}
|
||||
extraHeader={isNewThread && <Welcome />}
|
||||
extraHeader={
|
||||
isNewThread && <Welcome mode={settings.context.mode} />
|
||||
}
|
||||
disabled={env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY === "true"}
|
||||
onContextChange={(context) =>
|
||||
setSettings("context", context)
|
||||
|
||||
@@ -8,7 +8,13 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
let waved = false;
|
||||
|
||||
export function Welcome({ className }: { className?: string }) {
|
||||
export function Welcome({
|
||||
className,
|
||||
mode,
|
||||
}: {
|
||||
className?: string;
|
||||
mode?: "ultra" | "pro" | "thinking" | "flash";
|
||||
}) {
|
||||
const { t } = useI18n();
|
||||
const searchParams = useSearchParams();
|
||||
useEffect(() => {
|
||||
@@ -29,7 +35,9 @@ export function Welcome({ className }: { className?: string }) {
|
||||
<div className={cn("inline-block", !waved ? "animate-wave" : "")}>
|
||||
👋
|
||||
</div>
|
||||
<div>{t.welcome.greeting}</div>
|
||||
<div className={cn(mode === "ultra" && "golden-text")}>
|
||||
{t.welcome.greeting}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user