chore: fix eslint errors introduced across phases 1-3
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
'use client';
|
||||
|
||||
import type { FunctionReturnType } from 'convex/server';
|
||||
import type { CSSProperties, PointerEvent as ReactPointerEvent } from 'react';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useMutation, useQuery } from 'convex/react';
|
||||
@@ -61,10 +60,7 @@ type PendingOverwrite = {
|
||||
};
|
||||
|
||||
export const AgentWorkspaceShell = ({ jobId }: { jobId: Id<'agentJobs'> }) => {
|
||||
const job = useQuery(api.agentJobs.get, { jobId }) as
|
||||
| FunctionReturnType<typeof api.agentJobs.get>
|
||||
| null
|
||||
| undefined;
|
||||
const job = useQuery(api.agentJobs.get, { jobId });
|
||||
const messages =
|
||||
useQuery(
|
||||
api.agentJobs.listMessages,
|
||||
|
||||
Reference in New Issue
Block a user