mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): revert useChatSession mutation call to match generated API
The generated mutateAsync requires an argument even for void mutations due to react-query typing. Use `as never` cast to satisfy both the generated type and the void constraint.
This commit is contained in:
@@ -95,7 +95,7 @@ export function useChatSession() {
|
||||
async function createSession() {
|
||||
if (sessionId) return sessionId;
|
||||
try {
|
||||
const response = await createSessionMutation();
|
||||
const response = await createSessionMutation({ data: null } as never);
|
||||
if (response.status !== 200 || !response.data?.id) {
|
||||
const error = new Error("Failed to create session");
|
||||
Sentry.captureException(error, {
|
||||
|
||||
Reference in New Issue
Block a user