mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 22:15:18 +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>
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { LOCAL_STORAGE_KEYS } from 'common'
|
|
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
|
|
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
|
|
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
|
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
|
|
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
|
|
import { AiIconAnimation, cn, KeyboardShortcut } from 'ui'
|
|
|
|
export const AssistantButton = () => {
|
|
const { activeSidebar, toggleSidebar } = useSidebarManagerSnapshot()
|
|
const [isAIAssistantHotkeyEnabled] = useLocalStorageQuery<boolean>(
|
|
LOCAL_STORAGE_KEYS.HOTKEY_SIDEBAR(SIDEBAR_KEYS.AI_ASSISTANT),
|
|
true
|
|
)
|
|
|
|
const isOpen = activeSidebar?.id === SIDEBAR_KEYS.AI_ASSISTANT
|
|
|
|
return (
|
|
<ButtonTooltip
|
|
type="outline"
|
|
size="tiny"
|
|
id="assistant-trigger"
|
|
className={cn(
|
|
'rounded-full w-[32px] h-[32px] flex items-center justify-center p-0',
|
|
isOpen && 'bg-foreground text-background'
|
|
)}
|
|
onClick={() => {
|
|
toggleSidebar(SIDEBAR_KEYS.AI_ASSISTANT)
|
|
}}
|
|
tooltip={{
|
|
content: {
|
|
className: 'p-1 pl-2.5',
|
|
text: (
|
|
<div className="flex items-center gap-2.5">
|
|
<span>AI Assistant</span>
|
|
{isAIAssistantHotkeyEnabled && <KeyboardShortcut keys={['Meta', 'I']} />}
|
|
</div>
|
|
),
|
|
},
|
|
}}
|
|
>
|
|
<AiIconAnimation
|
|
allowHoverEffect={false}
|
|
size={16}
|
|
className={cn(isOpen && 'text-background')}
|
|
/>
|
|
</ButtonTooltip>
|
|
)
|
|
}
|