| 1 | import { useLump } from "../LumpContext"; |
| 2 | import { ContextSection } from "./ContextSection"; |
| 3 | import DocsSection from "./docs/DocsSection"; |
| 4 | import { ErrorSection } from "./errors/ErrorSection"; |
| 5 | import MCPSection from "./mcp/MCPSection"; |
| 6 | import { ModelsSection } from "./ModelsSection"; |
| 7 | import { PromptsSection } from "./PromptsSection"; |
| 8 | import { RulesSection } from "./RulesSection"; |
| 9 | import { ToolPoliciesSection } from "./tool-policies/ToolPoliciesSection"; |
| 10 | |
| 11 | /** |
| 12 | * Renders the appropriate section based on the selected section in the Lump context |
| 13 | */ |
| 14 | export function SelectedSection() { |
| 15 | const { displayedSection } = useLump(); |
| 16 | |
| 17 | switch (displayedSection) { |
| 18 | case "models": |
| 19 | return <ModelsSection />; |
| 20 | case "rules": |
| 21 | return <RulesSection />; |
| 22 | case "docs": |
| 23 | return <DocsSection />; |
| 24 | case "prompts": |
| 25 | return <PromptsSection />; |
| 26 | case "context": |
| 27 | return <ContextSection />; |
| 28 | case "tools": |
| 29 | return <ToolPoliciesSection />; |
| 30 | case "mcp": |
| 31 | return <MCPSection />; |
| 32 | case "error": |
| 33 | return <ErrorSection />; |
| 34 | default: |
| 35 | return null; |
| 36 | } |
| 37 | } |