使用 qwen 进行语音识别,加入 tag

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 20:10:08 +08:00
co-authored by Copilot
parent 040273586b
commit 206a561ee7
26 changed files with 3720 additions and 443 deletions
+6 -4
View File
@@ -1,10 +1,10 @@
"use client";
import { useState } from "react";
import { useRouter } from "next/navigation";
import { Search } from "lucide-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function SearchBox() {
export default function SearchBox({ tag }: { tag?: string | null }) {
const [query, setQuery] = useState("");
const router = useRouter();
@@ -12,7 +12,9 @@ export default function SearchBox() {
e.preventDefault();
const trimmed = query.trim();
if (!trimmed) return;
router.push(`/search?q=${encodeURIComponent(trimmed)}`);
const params = new URLSearchParams({ q: trimmed });
if (tag) params.set("tag", tag);
router.push(`/search?${params.toString()}`);
};
return (