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

stacklok / codegate-ui / 12724381682

11 Jan 2025 12:52PM UTC coverage: 68.31% (+0.5%) from 67.801%
12724381682

push

github

web-flow
chore: add openapi-ts and hey-api/client-fetch  (#47)

* chore: add openapi-ts and hey-api/client-fetch

* chore: replace interfaces

186 of 354 branches covered (52.54%)

Branch coverage included in aggregate %.

45 of 49 new or added lines in 9 files covered. (91.84%)

17 existing lines in 4 files now uncovered.

396 of 498 relevant lines covered (79.52%)

27.58 hits per line

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

78.57
/src/hooks/usePromptsStore.ts
1
import { create } from "zustand";
2
import { PromptState } from "../types";
3
import { serverApi } from "@/api/service";
4

5
export const usePromptsStore = create<PromptState>((set) => ({
2✔
6
  prompts: [],
7
  loading: false,
8
  currentPromptId: "",
9
  setCurrentPromptId: (id: string) => set({ currentPromptId: id }),
×
10
  fetchPrompts: async () => {
11
    set({ loading: true });
2✔
12
    const { getMessagesDashboardMessagesGet } = await serverApi();
2✔
13
    const { data } = await getMessagesDashboardMessagesGet();
2✔
14

15
    if (data !== undefined) {
2!
16
      set({
2✔
17
        prompts: data.filter((prompt) =>
18
          prompt.question_answers?.every(
36✔
19
            (item) => item.answer && item.question,
36✔
20
          ),
21
        ),
22
        loading: false,
23
      });
24
    } else {
NEW
UNCOV
25
      set({ prompts: [], loading: false });
×
26
    }
27
  },
28
}));
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