diff --git a/src/app/projects/[projectId]/components/newChat/NewChat.tsx b/src/app/projects/[projectId]/components/newChat/NewChat.tsx index 3e615a2..f7aa95b 100644 --- a/src/app/projects/[projectId]/components/newChat/NewChat.tsx +++ b/src/app/projects/[projectId]/components/newChat/NewChat.tsx @@ -21,10 +21,17 @@ export const NewChat: FC<{ mutationFn: async (options: { message: string }) => { const response = await honoClient.api.projects[":projectId"][ "new-session" - ].$post({ - param: { projectId }, - json: { message: options.message }, - }); + ].$post( + { + param: { projectId }, + json: { message: options.message }, + }, + { + init: { + signal: AbortSignal.timeout(10 * 1000), + }, + }, + ); if (!response.ok) { throw new Error(response.statusText); diff --git a/src/app/projects/[projectId]/sessions/[sessionId]/components/resumeChat/ResumeChat.tsx b/src/app/projects/[projectId]/sessions/[sessionId]/components/resumeChat/ResumeChat.tsx index 57911c1..485c46e 100644 --- a/src/app/projects/[projectId]/sessions/[sessionId]/components/resumeChat/ResumeChat.tsx +++ b/src/app/projects/[projectId]/sessions/[sessionId]/components/resumeChat/ResumeChat.tsx @@ -24,10 +24,17 @@ export const ResumeChat: FC<{ mutationFn: async (options: { message: string }) => { const response = await honoClient.api.projects[":projectId"].sessions[ ":sessionId" - ].resume.$post({ - param: { projectId, sessionId }, - json: { resumeMessage: options.message }, - }); + ].resume.$post( + { + param: { projectId, sessionId }, + json: { resumeMessage: options.message }, + }, + { + init: { + signal: AbortSignal.timeout(10 * 1000), + }, + }, + ); if (!response.ok) { throw new Error(response.statusText);