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

stacklok / codegate-ui / 12791977239

15 Jan 2025 03:48PM UTC coverage: 69.536%. Remained the same
12791977239

Pull #50

github

web-flow
Merge bb214a870 into 989f4bc41
Pull Request #50: Bump @tailwindcss/typography from 0.5.15 to 0.5.16

209 of 380 branches covered (55.0%)

Branch coverage included in aggregate %.

421 of 526 relevant lines covered (80.04%)

32.42 hits per line

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

71.43
/src/components/PromptList.tsx
1
import { Link } from "react-router-dom";
2
import {
3
  extractTitleFromMessage,
4
  groupPromptsByRelativeDate,
5
  sanitizeQuestionPrompt,
6
} from "@/lib/utils";
7
import { usePromptsStore } from "@/hooks/usePromptsStore";
8
import clsx from "clsx";
9
import { Conversation } from "@/api/generated";
10

11
export function PromptList({ prompts }: { prompts: Conversation[] }) {
12
  const { currentPromptId, setCurrentPromptId } = usePromptsStore();
6✔
13

14
  const groupedPrompts = groupPromptsByRelativeDate(prompts);
6✔
15

16
  return (
17
    <div className="mx-2">
18
      {Object.entries(groupedPrompts).map(([group, prompts]) => (
19
        <div key={group} className="mb-3">
20
          <h2 className="font-bold text-sm text-gray-700 mb-2 mt-6">{group}</h2>
21
          <ul className="space-y-2">
22
            {prompts.map((prompt) => (
23
              <li key={prompt.chat_id} className="flex items-center p-1 w-full">
24
                <Link
25
                  onClick={() => setCurrentPromptId(prompt.chat_id)}
×
26
                  to={`/prompt/${prompt.chat_id}`}
27
                  className={clsx(
28
                    `text-gray-800 text-sm truncate hover:text-gray-500`,
29
                    { "font-bold": currentPromptId === prompt.chat_id },
30
                  )}
31
                >
32
                  {extractTitleFromMessage(
33
                    prompt.question_answers?.[0]?.question?.message
14✔
34
                      ? sanitizeQuestionPrompt({
35
                          question:
36
                            prompt.question_answers?.[0].question.message,
37
                          answer:
38
                            prompt.question_answers?.[0]?.answer?.message ?? "",
13!
39
                        })
40
                      : `Prompt ${prompt.conversation_timestamp}`,
41
                  )}
42
                </Link>
43
              </li>
44
            ))}
45
          </ul>
46
        </div>
47
      ))}
48
    </div>
49
  );
50
}
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