import { useEffect } from 'react' const BASE = 'sundynix agentix' const DEFAULT = `${BASE} — 事件驱动的 AI Agent 工作台` /** 设置页面标题;不传参恢复默认 */ export function usePageTitle(title?: string) { useEffect(() => { document.title = title ? `${title} — ${BASE}` : DEFAULT return () => { document.title = DEFAULT } }, [title]) }