mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-10 09:04:24 +01:00
feat: improve interactivity by predict sessions
This commit is contained in:
@@ -32,13 +32,7 @@ export const useNewChatMutation = (
|
||||
},
|
||||
onSuccess: async (response) => {
|
||||
onSuccess?.();
|
||||
router.push(
|
||||
`/projects/${projectId}/sessions/${response.sessionId}` +
|
||||
response.userMessageId !==
|
||||
undefined
|
||||
? `#message-${response.userMessageId}`
|
||||
: "",
|
||||
);
|
||||
router.push(`/projects/${projectId}/sessions/${response.sessionId}`);
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -70,9 +64,7 @@ export const useResumeChatMutation = (projectId: string, sessionId: string) => {
|
||||
},
|
||||
onSuccess: async (response) => {
|
||||
if (sessionId !== response.sessionId) {
|
||||
router.push(
|
||||
`/projects/${projectId}/sessions/${response.sessionId}#message-${response.userMessageId}`,
|
||||
);
|
||||
router.push(`/projects/${projectId}/sessions/${response.sessionId}`);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user