/** * `ViewPanelBody` — renders the body of a single View panel from its id and a * project context, reusing the existing feature panels as-is. * * Shared (ticket #23) between the in-window placements of {@link ProjectsView} * (docked/floating) and the detached {@link ViewWindow} (its own OS window), so * a view looks and behaves the same wherever it is placed. The `"projects"` * panel is intentionally **not** handled here — the projects manager is * main-window chrome, never a detachable view. */ import type { ReactNode } from "react"; import { AgentsPanel } from "@/features/agents"; import { TemplatesPanel } from "@/features/templates"; import { SkillsPanel } from "@/features/skills"; import { MemoryPanel } from "@/features/memory"; import { EmbedderSettings } from "@/features/embedder"; import { PermissionsPanel } from "@/features/permissions"; import { ProjectWorkStatePanel } from "@/features/workstate"; import { TicketsView } from "@/features/tickets"; import { GitPanel } from "@/features/git"; import { ProjectContextPanel } from "./ProjectContextPanel"; import type { PanelId } from "./viewPlacement"; /** Panels that render a project-scoped view (everything except "projects"). */ export type ViewPanelId = Exclude; export interface ViewPanelBodyProps { panel: ViewPanelId; projectId: string; /** Project root — required by the agents panel (its cwd base). */ projectRoot: string; /** Optional: open a conversation viewer (only wired inside the main window). */ onOpenConversation?: (conversationId: string) => void; } /** Renders the requested view panel for the given project. */ export function ViewPanelBody({ panel, projectId, projectRoot, onOpenConversation, }: ViewPanelBodyProps): ReactNode { switch (panel) { case "context": return ; case "work": return ( ); case "tickets": return ; case "agents": return ; case "templates": return ; case "skills": return ; case "permissions": return ; case "memory": return (
); case "git": return ; } }