This commit is contained in:
2025-12-01 19:28:49 +01:00
parent 98a09a3f2b
commit 086fdc1ea1
8 changed files with 406 additions and 86 deletions

View File

@@ -142,10 +142,19 @@ export function App() {
if (result.success && result.sessionId) {
setSessionId(result.sessionId);
} else {
setIsRunning(false);
alert(`Failed to start automation: ${result.error}`);
return;
}
setIsRunning(false);
if ((result as any).authRequired) {
const nextAuthState = (result as any).authState as AuthState | undefined;
setAuthState(nextAuthState ?? 'EXPIRED');
setAuthError(result.error ?? 'Authentication required before starting automation.');
return;
}
alert(`Failed to start automation: ${result.error}`);
};
const handleStopAutomation = async () => {