From 2fda84a220f5074ab9da170bbb6279f17b71d2d2 Mon Sep 17 00:00:00 2001 From: SiteAgent Bot Date: Thu, 22 Jan 2026 15:55:42 +0800 Subject: [PATCH] manual save(2026-01-22 15:55) --- src/components/Breadcrumbs.tsx | 34 +- src/pages/Assistant.tsx | 719 +++++++++++++++++++++++++++++++++ 2 files changed, 732 insertions(+), 21 deletions(-) create mode 100644 src/pages/Assistant.tsx diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index 1eab47c..59bfac9 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -1,7 +1,7 @@ -import React, { useMemo } from 'react' +import React from 'react' import { Link, useLocation } from 'react-router-dom' import { ChevronRight, Home as HomeIcon } from 'lucide-react' -import { getLocaleFromPathname, stripLocalePrefix, withLocalePath } from '../lib/i18n' +import { getLocaleFromPathname, withLocalePath } from '../lib/i18n' export type BreadcrumbItem = { label: string @@ -15,48 +15,40 @@ type BreadcrumbsProps = { export const Breadcrumbs: React.FC = ({ items, className }) => { const location = useLocation() - const locale = useMemo(() => getLocaleFromPathname(location.pathname), [location.pathname]) - - const homeLabel = locale === 'en' ? 'Home' : '首页' - const homeHref = withLocalePath(locale, '/') - - const normalizedItems = useMemo(() => { - const prefix = stripLocalePrefix(location.pathname).startsWith('/') ? '' : '/' - void prefix - return items - }, [items, location.pathname]) + const locale = getLocaleFromPathname(location.pathname) return (