0.5 缩减重构

This commit is contained in:
lix-2026
2026-04-13 19:21:42 +08:00
parent af92c4b149
commit 71fb1aee7e
2023 changed files with 21113 additions and 394493 deletions
@@ -26,6 +26,8 @@ export function Breadcrumb({ documents }: BreadcrumbProps) {
const showInspector = usePageLayoutStore((state) => state.showInspector);
const toggleInspector = usePageLayoutStore((state) => state.toggleInspector);
const backendStatus = useBackendHealth();
const globalAgentOpen = useAiAgentUiStore((s) => s.globalAgentOpen);
const toggleGlobalAgentOpen = useAiAgentUiStore((s) => s.toggleGlobalAgentOpen);
const documentAgentAvailable = useAiAgentUiStore((s) => s.documentAgentAvailable);
const toggleDocumentAgentOpen = useAiAgentUiStore((s) => s.toggleDocumentAgentOpen);
const isStarred = useQuery(
@@ -82,6 +84,20 @@ export function Breadcrumb({ documents }: BreadcrumbProps) {
}`}
aria-label="后端连接状态"
/>
<button
type="button"
className={cn(
"rounded-full px-3 py-1 text-sm transition-colors",
globalAgentOpen
? "bg-[#2563eb] text-white hover:bg-[#1d4ed8]"
: "hover:bg-wolai-bg-hover hover:text-wolai-text-primary",
)}
onClick={() => toggleGlobalAgentOpen()}
title="打开全局 AI"
>
<Sparkles className="mr-1 inline h-4 w-4" />
AI
</button>
<button
type="button"
className={cn(