Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ function healthFooterMessage(health: ServerHealth | null): string {
return 'Instant analysis active · Skills work without AI'
}

/**
* Renders the assistant chat panel with messaging, spreadsheet actions, attachments, feedback, and usage controls.
*
* @param isMobileOpen - Whether the standalone panel is open on mobile.
* @param onCloseMobile - Callback invoked when the mobile panel is closed.
* @param embedded - Whether to render the panel without standalone header and visibility controls.
* @returns The assistant chat panel.
*/
export function ChatPanel({ isMobileOpen, onCloseMobile, embedded }: { isMobileOpen?: boolean; onCloseMobile?: () => void; embedded?: boolean }) {
const {
messages,
Expand Down
8 changes: 8 additions & 0 deletions src/components/panels/DockPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ interface DockPanelProps {
headerActions?: React.ReactNode
}

/**
* Renders an active dock panel with resizable content and header controls.
*
* @param panelId - Identifier of the panel to render and resize
* @param title - Optional title displayed in the panel header
* @param headerActions - Optional controls displayed before the close button
* @returns The dock panel when active, or `null` otherwise
*/
export function DockPanel({ panelId, children, title, headerActions }: DockPanelProps) {
const activePanel = useStore((s) => s.activePanel)
const setActivePanel = useStore((s) => s.setActivePanel)
Expand Down
6 changes: 6 additions & 0 deletions src/components/panels/panelTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const PANELS: PanelDef[] = [
{ id: 'inspector', icon: <Microscope size={15} strokeWidth={1.8} />, label: 'Inspector', defaultWidth: 300, minWidth: 260, maxWidth: 440 },
]

/**
* Retrieves the definition for a panel identifier.
*
* @param id - The identifier of the panel to retrieve
* @returns The matching panel definition
*/
export function getPanelDef(id: PanelId): PanelDef {
return PANELS.find((p) => p.id === id)!
}
Loading