🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
interface RegionRef {
evidenceId: string;
key: number;
}
export interface RegionLocation {
image: number;
region: number;
}
export const regionLocations = (
annotations: RegionRef[],
evidenceIds: string[],
): RegionLocation[] => {
const drawnPerImage = new Map<string, number>();
return annotations.map((annotation) => {
const region = (drawnPerImage.get(annotation.evidenceId) ?? 0) + 1;
drawnPerImage.set(annotation.evidenceId, region);
return { image: evidenceIds.indexOf(annotation.evidenceId) + 1, region };
});
};