chore: fix eslint errors introduced across phases 1-3

This commit is contained in:
Gabriel Brown
2026-07-11 13:27:23 -04:00
parent 12b1c98cfc
commit a5bc0434f3
9 changed files with 26 additions and 29 deletions
@@ -1,6 +1,5 @@
'use client';
import type { FunctionReturnType } from 'convex/server';
import { useEffect } from 'react';
import Link from 'next/link';
import { useParams, useRouter } from 'next/navigation';
@@ -16,10 +15,7 @@ const AgentWorkspacePage = () => {
const router = useRouter();
const params = useParams<{ spoonId: string; jobId: string }>();
const jobId = params.jobId as Id<'agentJobs'>;
const job = useQuery(api.agentJobs.get, { jobId }) as
| FunctionReturnType<typeof api.agentJobs.get>
| null
| undefined;
const job = useQuery(api.agentJobs.get, { jobId });
useEffect(() => {
if (job?.threadId) router.replace(`/threads/${job.threadId}`);
@@ -1,6 +1,5 @@
'use client';
import type { FunctionReturnType } from 'convex/server';
import { useState } from 'react';
import Link from 'next/link';
import { useParams, useRouter } from 'next/navigation';
@@ -34,10 +33,7 @@ const ThreadDetailPage = () => {
const router = useRouter();
const params = useParams<{ threadId: string }>();
const threadId = params.threadId as Id<'threads'>;
const details = useQuery(api.threads.get, { threadId }) as
| FunctionReturnType<typeof api.threads.get>
| null
| undefined;
const details = useQuery(api.threads.get, { threadId });
const createJob = useMutation(api.agentJobs.createForThread);
const markResolved = useMutation(api.threads.markResolved);
const cancel = useMutation(api.threads.cancel);
@@ -1,4 +1,3 @@
import type { FunctionReturnType } from 'convex/server';
import { NextResponse } from 'next/server';
import { proxyWorker } from '@/lib/agent-worker-proxy';
import { convexAuthNextjsToken } from '@convex-dev/auth/nextjs/server';
@@ -40,7 +39,7 @@ export const POST = async (
api.threads.get,
{ threadId },
{ token },
)) as FunctionReturnType<typeof api.threads.get> | null;
));
if (details === null) {
return NextResponse.json({ error: 'Thread not found.' }, { status: 404 });
}