mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-24 08:44:21 +01:00
feat: set timeout for new-chat & resume-chat
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user