import { useTabsStore } from '@/stores/useTabsStore' import { useFilesStore } from '@/stores/useFilesStore' export default function Breadcrumbs() { const tabs = useTabsStore((s) => s.tabs) const activeTabId = useTabsStore((s) => s.activeTabId) const rootPath = useFilesStore((s) => s.rootPath) if (!activeTabId || !rootPath) return null const activeTab = tabs.find((t) => t.id === activeTabId) if (!activeTab) return null const fullPath = activeTab.path let relativePath = fullPath if (fullPath.startsWith(rootPath)) { relativePath = fullPath.slice(rootPath.length).replace(/^[\\/]/, '') } const segments = relativePath.split(/[\\/]/) const lastIdx = segments.length - 1 return (