Skip to content

Commit 542efb8

Browse files
fix: urls
1 parent 7212a63 commit 542efb8

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

extensions/vscode/src/extension/VsCodeMessenger.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ConfigHandler } from "core/config/ConfigHandler";
2-
import { getControlPlaneEnv } from "core/control-plane/env";
32
import { DataLogger } from "core/data/log";
43
import { EDIT_MODE_STREAM_ID } from "core/edit/constants";
54
import {
@@ -388,9 +387,12 @@ export class VsCodeMessenger {
388387
);
389388

390389
if (selection === "Connect GitHub") {
391-
const env = await getControlPlaneEnv(this.ide.getIdeSettings());
392-
vscode.env.openExternal(
393-
vscode.Uri.parse(`${env.APP_URL}settings/integrations`),
390+
await this.inProcessMessenger.externalRequest(
391+
"controlPlane/openUrl",
392+
{
393+
path: "settings/integrations",
394+
orgSlug: configHandler.currentOrg?.slug,
395+
},
394396
);
395397
}
396398
} else {

gui/src/components/BackgroundMode/AgentsList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export function AgentsList() {
111111
// Open agent detail in browser
112112
ideMessenger.post("controlPlane/openUrl", {
113113
path: `agents/${agent.id}`,
114+
orgSlug: currentOrg?.slug,
114115
});
115116
}}
116117
>

gui/src/components/BackgroundMode/BackgroundModeView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
import { useCallback, useContext, useEffect, useState } from "react";
66
import { useAuth } from "../../context/Auth";
77
import { IdeMessengerContext } from "../../context/IdeMessenger";
8+
import { useAppSelector } from "../../redux/hooks";
9+
import { selectCurrentOrg } from "../../redux/slices/profilesSlice";
810
import { AgentsList } from "./AgentsList";
911

1012
interface BackgroundModeViewProps {
@@ -14,6 +16,7 @@ interface BackgroundModeViewProps {
1416
export 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

Comments
 (0)