Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/controls/controls.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/controls/controls.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/controls/controls.tsx
-
curl -L -o controls.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/controls/controls.tsx
1.41 kB
| import { useParams } from "react-router"; | |
| import React from "react"; | |
| import { AgentControlBar } from "./agent-control-bar"; | |
| import { AgentStatusBar } from "./agent-status-bar"; | |
| import { SecurityLock } from "./security-lock"; | |
| import { useUserConversation } from "#/hooks/query/use-user-conversation"; | |
| import { ConversationCard } from "../conversation-panel/conversation-card"; | |
| import { useAutoTitle } from "#/hooks/use-auto-title"; | |
| interface ControlsProps { | |
| setSecurityOpen: (isOpen: boolean) => void; | |
| showSecurityLock: boolean; | |
| } | |
| export function Controls({ setSecurityOpen, showSecurityLock }: ControlsProps) { | |
| const params = useParams(); | |
| const { data: conversation } = useUserConversation( | |
| params.conversationId ?? null, | |
| ); | |
| useAutoTitle(); | |
| return ( | |
| <div className="flex items-center justify-between"> | |
| <div className="flex items-center gap-2"> | |
| <AgentControlBar /> | |
| <AgentStatusBar /> | |
| {showSecurityLock && ( | |
| <SecurityLock onClick={() => setSecurityOpen(true)} /> | |
| )} | |
| </div> | |
| <ConversationCard | |
| variant="compact" | |
| showOptions | |
| title={conversation?.title ?? ""} | |
| lastUpdatedAt={conversation?.created_at ?? ""} | |
| selectedRepository={conversation?.selected_repository ?? null} | |
| status={conversation?.status} | |
| conversationId={conversation?.conversation_id} | |
| /> | |
| </div> | |
| ); | |
| } | |