improv: clean up code
This commit is contained in:
parent
a8517cdf4d
commit
b2900bb1ac
2 changed files with 4 additions and 11 deletions
|
|
@ -170,7 +170,6 @@ export class ConfigHandler {
|
|||
}
|
||||
|
||||
async loadAssistantsForSelectedOrg() {
|
||||
// debugger;
|
||||
// Get the profiles and create their lifecycle managers
|
||||
const userId = await this.controlPlaneClient.userId;
|
||||
const selectedOrgId = await this.getSelectedOrgId();
|
||||
|
|
@ -187,7 +186,6 @@ export class ConfigHandler {
|
|||
|
||||
const hubProfiles = await Promise.all(
|
||||
assistants.map(async (assistant) => {
|
||||
// debugger;
|
||||
const profileLoader = await PlatformProfileLoader.create(
|
||||
{
|
||||
...assistant.configResult,
|
||||
|
|
|
|||
|
|
@ -47,20 +47,15 @@ export function RulesPreview() {
|
|||
(state: RootState) => state.config.config.rules ?? [],
|
||||
);
|
||||
|
||||
const parsed = useMemo(() => {
|
||||
if (!selectedProfile?.rawYaml) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return parseConfigYaml(selectedProfile?.rawYaml ?? "");
|
||||
}, [rules]);
|
||||
|
||||
const mergedRules = useMemo(() => {
|
||||
const parsed = selectedProfile?.rawYaml
|
||||
? parseConfigYaml(selectedProfile?.rawYaml ?? "")
|
||||
: undefined;
|
||||
return rules.map((rule, index) => ({
|
||||
unrolledRule: rule,
|
||||
ruleFromYaml: parsed?.rules?.[index],
|
||||
}));
|
||||
}, [rules, parsed]);
|
||||
}, [rules]);
|
||||
|
||||
const openUrl = (path: string) =>
|
||||
ideMessenger.request("controlPlane/openUrl", {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue