Skip to content

Commit 1e8b302

Browse files
Fix TypeScript build errors in frontend
- Add explicit type parameter to fetchWrapper call in schedules.ts - Import QuestionRequest type in SessionDetail.tsx
1 parent f18bcbb commit 1e8b302

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/api/schedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export async function listRepoSchedules(repoId: number): Promise<{ jobs: Schedul
2727
}
2828

2929
export async function getScheduleCounts(): Promise<Map<number, ScheduleCount>> {
30-
const response = await fetchWrapper(`${API_BASE_URL}/api/schedules/all`)
31-
const jobs = response.jobs as ScheduleJobWithRepo[]
30+
const response = await fetchWrapper<{ jobs: ScheduleJobWithRepo[] }>(`${API_BASE_URL}/api/schedules/all`)
31+
const jobs = response.jobs
3232
const counts = new Map<number, ScheduleCount>()
3333

3434
jobs.forEach((job) => {

frontend/src/pages/SessionDetail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { RepoSkillsDialog } from "@/components/repo/RepoSkillsDialog";
4141
import { createOpenCodeClient } from "@/api/opencode";
4242
import { useSessionStatus, useSessionStatusForSession } from "@/stores/sessionStatusStore";
4343
import { useQuestions } from "@/contexts/EventContext";
44+
import type { QuestionRequest } from "@/api/types";
4445
import { QuestionPrompt } from "@/components/session/QuestionPrompt";
4546
import { MinimizedQuestionIndicator } from "@/components/session/MinimizedQuestionIndicator";
4647
import { PendingActionsGroup } from "@/components/notifications/PendingActionsGroup";

0 commit comments

Comments
 (0)