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