()
| 52 | }, []) |
| 53 | |
| 54 | const handleConnect = () => { |
| 55 | setFlowState('waiting-for-code') |
| 56 | const result = connectChatGptOAuth() |
| 57 | setAuthUrl(result.authUrl) |
| 58 | result.credentials |
| 59 | .then(() => { |
| 60 | setFlowState('connected') |
| 61 | }) |
| 62 | .catch((err) => { |
| 63 | setError(err instanceof Error ? err.message : 'Failed to connect') |
| 64 | setFlowState('error') |
| 65 | }) |
| 66 | } |
| 67 | |
| 68 | const handleDisconnect = () => { |
| 69 | disconnectChatGptOAuth() |
nothing calls this directly
no test coverage detected