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