MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / handleConnect

Function handleConnect

cli/src/components/chatgpt-connect-banner.tsx:54–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

connectChatGptOAuthFunction · 0.90
setErrorFunction · 0.85

Tested by

no test coverage detected