492
493
export function normalizeAgentHostTerminalAutoApproveRulesConfig(config: AgentHostTerminalAutoApproveRules | undefined, configInspectValue: IConfigurationValue<Readonly<AgentHostTerminalAutoApproveRules>>, ignoreDefaults: boolean): AgentHostTerminalAutoApproveRules {
495
return {};
496
}
498
>
const rules: AgentHostTerminalAutoApproveRules = {};
499
>
for (const [key, value] of Object.entries(config)) {
500
>
if (ignoreDefaults && isDefaultOnlyAutoApproveRule(key, value, configInspectValue)) {
501
continue;
502
}
504
>
}
505
>
return rules;
506
>
}
507
508
function isDefaultOnlyAutoApproveRule(key: string, value: AgentHostTerminalAutoApproveRuleValue, configInspectValue: IConfigurationValue<Readonly<AgentHostTerminalAutoApproveRules>>): boolean {