Skip to content

The open-source app everyone uses to manage agents at work

333 B
Raw Blame
export function skillVersionSelectionMap(
  entries: Array<{ key: string; versionId: string | null }>,
  options: { versionPinsEnabled?: boolean } = {},
) {
  const versionPinsEnabled = options.versionPinsEnabled ?? true;
  return new Map(entries.map((entry) => [entry.key, versionPinsEnabled ? entry.versionId : null] as const));
}