787
*/
788
export function buildCustomAgentHandoffsInfo(modes: readonly IChatMode[]): ICustomAgentInfo[] {
790
>
const handoffs = mode.handOffs?.get() ?? [];
791
>
const visibility = mode.visibility?.get();
792
>
return {
793
>
id: mode.id,
794
>
name: mode.name.get(),
795
>
isBuiltin: mode.isBuiltin,
796
>
visibility: {
797
>
userInvocable: visibility?.userInvocable ?? true,
798
>
agentInvocable: visibility?.agentInvocable ?? true,
799
>
},
800
>
handoffs: handoffs.map(h => ({
801
id: getHandoffId(h),
802
label: h.label,