pass around continue for teams enabled
This commit is contained in:
parent
ae6e9fa884
commit
e7c2d33e58
4 changed files with 15 additions and 11 deletions
|
|
@ -129,6 +129,8 @@ export class Core {
|
|||
this.configHandler.currentProfile?.profileDescription.id || null,
|
||||
organizations: this.configHandler.getSerializedOrgs(),
|
||||
selectedOrgId: this.configHandler.currentOrg.id,
|
||||
usingContinueForTeams: (await ideSettingsPromise)
|
||||
.enableControlServerBeta,
|
||||
});
|
||||
|
||||
// update additional submenu context providers registered via VSCode API
|
||||
|
|
@ -458,6 +460,8 @@ export class Core {
|
|||
this.configHandler.currentProfile?.profileDescription.id ?? null,
|
||||
organizations: this.configHandler.getSerializedOrgs(),
|
||||
selectedOrgId: this.configHandler.currentOrg.id,
|
||||
usingContinueForTeams: (await ideSettingsPromise)
|
||||
.enableControlServerBeta,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
|
|||
profileId: string | null;
|
||||
organizations: SerializedOrgWithProfiles[];
|
||||
selectedOrgId: string;
|
||||
usingContinueForTeams: boolean;
|
||||
},
|
||||
];
|
||||
"config/deleteModel": [{ title: string }, void];
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export type ToWebviewFromIdeOrCoreProtocol = {
|
|||
profileId: string | null;
|
||||
organizations: SerializedOrgWithProfiles[];
|
||||
selectedOrgId: string | null;
|
||||
usingContinueForTeams: boolean;
|
||||
},
|
||||
void,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import React, {
|
|||
useState,
|
||||
} from "react";
|
||||
import ConfirmationDialog from "../components/dialogs/ConfirmationDialog";
|
||||
import { useWebviewListener } from "../hooks/useWebviewListener";
|
||||
import { selectCurrentOrg, selectSelectedProfile } from "../redux/";
|
||||
import { useAppDispatch, useAppSelector } from "../redux/hooks";
|
||||
import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice";
|
||||
|
|
@ -121,17 +122,14 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
|||
});
|
||||
}, []);
|
||||
|
||||
// useWebviewListener(
|
||||
// setControlServerBetaEnabled(settings.enableControlServerBeta);
|
||||
// "didChangeIdeSettings",
|
||||
// async (msg) => {
|
||||
// const { settings } = msg;
|
||||
// dispatch(
|
||||
// setLastControlServerBetaEnabledStatus(settings.enableControlServerBeta),
|
||||
// );
|
||||
// },
|
||||
// [],
|
||||
// );
|
||||
// Hacky, remove once continue for teams is deprecated
|
||||
useWebviewListener(
|
||||
"configUpdate",
|
||||
async (msg) => {
|
||||
setControlServerBetaEnabled(msg.usingContinueForTeams);
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
const refreshProfiles = async () => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue