55import { useCallback , useContext , useEffect , useState } from "react" ;
66import { useAuth } from "../../context/Auth" ;
77import { IdeMessengerContext } from "../../context/IdeMessenger" ;
8+ import { useAppSelector } from "../../redux/hooks" ;
9+ import { selectCurrentOrg } from "../../redux/slices/profilesSlice" ;
810import { AgentsList } from "./AgentsList" ;
911
1012interface BackgroundModeViewProps {
@@ -14,6 +16,7 @@ interface BackgroundModeViewProps {
1416export function BackgroundModeView ( { onCreateAgent } : BackgroundModeViewProps ) {
1517 const { session, login } = useAuth ( ) ;
1618 const ideMessenger = useContext ( IdeMessengerContext ) ;
19+ const currentOrg = useAppSelector ( selectCurrentOrg ) ;
1720 const [ isLoggingIn , setIsLoggingIn ] = useState ( false ) ;
1821 const [ showGitHubSetup , setShowGitHubSetup ] = useState ( false ) ;
1922 const [ checkingGitHub , setCheckingGitHub ] = useState ( true ) ;
@@ -33,8 +36,9 @@ export function BackgroundModeView({ onCreateAgent }: BackgroundModeViewProps) {
3336 // Open the hub settings page for GitHub integration
3437 ideMessenger . post ( "controlPlane/openUrl" , {
3538 path : "settings/integrations/github" ,
39+ orgSlug : currentOrg ?. slug ,
3640 } ) ;
37- } , [ ideMessenger ] ) ;
41+ } , [ ideMessenger , currentOrg ] ) ;
3842
3943 // Check if user has GitHub installations when signed in
4044 useEffect ( ( ) => {
0 commit comments