Elffuss BraidHub

kikocis/continue public

8cf316c34504 · 1.1 KiBRawPermalink
1import { useLump } from "../LumpContext";
2import { ContextSection } from "./ContextSection";
3import DocsSection from "./docs/DocsSection";
4import { ErrorSection } from "./errors/ErrorSection";
5import MCPSection from "./mcp/MCPSection";
6import { ModelsSection } from "./ModelsSection";
7import { PromptsSection } from "./PromptsSection";
8import { RulesSection } from "./RulesSection";
9import { ToolPoliciesSection } from "./tool-policies/ToolPoliciesSection";
10
11/**
12 * Renders the appropriate section based on the selected section in the Lump context
13 */
14export 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}