"use client"; import { Search } from "lucide-react"; import { usePathname } from "next/navigation"; import { buttonClass } from "@/lib/ui/variants"; import { CommandPalette, openCommandPalette } from "./CommandPalette"; // 全局挂载命令面板(⌘K):读当前 pathname 注入项目上下文。 // 放在 RootLayout 内,对所有页面生效。 export function CommandPaletteMount() { const pathname = usePathname(); return ; } // 命令面板的可见入口(顶栏常驻):让不知道 ⌘K 的用户也能发现搜索。 // 与 ⌘K 触发同一外部 store,移动端折叠为图标。 export function CommandSearchButton() { return ( ); }