• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 12866978279

20 Jan 2025 11:24AM UTC coverage: 67.828% (+2.8%) from 64.986%
12866978279

Pull #127

github

web-flow
Merge 018980856 into 51fd254af
Pull Request #127: test: system prompt editor & workspace route

247 of 438 branches covered (56.39%)

Branch coverage included in aggregate %.

493 of 653 relevant lines covered (75.5%)

56.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/Help.tsx
1
import { useEffect, useState } from "react";
2
import { useParams } from "react-router-dom";
3
import { Markdown } from "./Markdown";
4
import Prism from "prismjs";
5
import "prismjs/themes/prism-tomorrow.css";
6
import "prismjs/components/prism-bash";
7
import "prismjs/components/prism-javascript";
8
import "prismjs/components/prism-python";
9
import "prismjs/components/prism-json";
10
import "prismjs/components/prism-yaml";
11

12
export function Help() {
13
  const { section } = useParams();
×
14
  const [content, setContent] = useState<string>("");
×
15

16
  useEffect(() => {
×
17
    const fetchContent = async () => {
×
18
      try {
×
19
        const response = await fetch(`/help/${section}.md`);
×
20
        if (!response.ok) {
×
21
          throw new Error("Failed to load content");
×
22
        }
23
        const text = await response.text();
×
24
        setContent(text);
×
25

26
        // Allow content to render before highlighting
27
        setTimeout(() => {
×
28
          Prism.highlightAll();
×
29
        }, 0);
30
      } catch (error) {
31
        console.error("Error loading help content:", error);
×
32
        setContent(
×
33
          "# Error\nFailed to load help content. Please try again later.",
34
        );
35
      }
36
    };
37

38
    fetchContent();
×
39
  }, [section]);
40

41
  return (
42
    <div className="max-w-5xl bg-base rounded-lg px-6 mx-auto">
43
      <Markdown>{content}</Markdown>
44
    </div>
45
  );
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc