mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-26 07:44:05 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
import { Lightbulb } from 'lucide-react'
|
|
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
|
|
import { useProjectLintsQuery } from 'data/lint/lint-query'
|
|
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
|
|
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
|
|
import { cn } from 'ui'
|
|
|
|
export const AdvisorButton = ({ projectRef }: { projectRef?: string }) => {
|
|
const { toggleSidebar, activeSidebar } = useSidebarManagerSnapshot()
|
|
const { data: lints } = useProjectLintsQuery({ projectRef })
|
|
|
|
const hasCriticalIssues = Array.isArray(lints) && lints.some((lint) => lint.level === 'ERROR')
|
|
|
|
const isOpen = activeSidebar?.id === SIDEBAR_KEYS.ADVISOR_PANEL
|
|
|
|
const handleClick = () => {
|
|
toggleSidebar(SIDEBAR_KEYS.ADVISOR_PANEL)
|
|
}
|
|
|
|
return (
|
|
<div className="relative">
|
|
<ButtonTooltip
|
|
type="outline"
|
|
size="tiny"
|
|
id="advisor-center-trigger"
|
|
className={cn(
|
|
'rounded-full w-[32px] h-[32px] flex items-center justify-center p-0 group',
|
|
isOpen && 'bg-foreground text-background'
|
|
)}
|
|
onClick={handleClick}
|
|
tooltip={{
|
|
content: {
|
|
text: 'Advisor Center',
|
|
},
|
|
}}
|
|
>
|
|
<Lightbulb
|
|
size={16}
|
|
strokeWidth={1.5}
|
|
className={cn(
|
|
'text-foreground-light group-hover:text-foreground',
|
|
isOpen && 'text-background group-hover:text-background'
|
|
)}
|
|
/>
|
|
</ButtonTooltip>
|
|
{hasCriticalIssues && (
|
|
<span className="absolute top-1.5 right-1.5 w-1.5 h-1.5 rounded-full bg-destructive" />
|
|
)}
|
|
</div>
|
|
)
|
|
}
|