mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): use type-safe any cast for createSessionMutation call
The generated mutation type differs between local (void) and CI (requires CreateSessionRequest) due to export-api-schema regeneration. Use an explicit any cast to handle both generated type variants.
This commit is contained in:
@@ -95,7 +95,8 @@ export function useChatSession() {
|
||||
async function createSession() {
|
||||
if (sessionId) return sessionId;
|
||||
try {
|
||||
const response = await createSessionMutation();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const response = await (createSessionMutation as any)({ data: null });
|
||||
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