Frontend Enhancements: - Complete React TypeScript frontend with modern UI components - Distributed workflows management interface with real-time updates - Socket.IO integration for live agent status monitoring - Agent management dashboard with cluster visualization - Project management interface with metrics and task tracking - Responsive design with proper error handling and loading states Backend Infrastructure: - Distributed coordinator for multi-agent workflow orchestration - Cluster management API with comprehensive agent operations - Enhanced database models for agents and projects - Project service for filesystem-based project discovery - Performance monitoring and metrics collection - Comprehensive API documentation and error handling Documentation: - Complete distributed development guide (README_DISTRIBUTED.md) - Comprehensive development report with architecture insights - System configuration templates and deployment guides The platform now provides a complete web interface for managing the distributed AI cluster with real-time monitoring, workflow orchestration, and agent coordination capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
import {InternMap} from "d3-array";
|
|
import {initRange} from "./init.js";
|
|
|
|
export const implicit = Symbol("implicit");
|
|
|
|
export default function ordinal() {
|
|
var index = new InternMap(),
|
|
domain = [],
|
|
range = [],
|
|
unknown = implicit;
|
|
|
|
function scale(d) {
|
|
let i = index.get(d);
|
|
if (i === undefined) {
|
|
if (unknown !== implicit) return unknown;
|
|
index.set(d, i = domain.push(d) - 1);
|
|
}
|
|
return range[i % range.length];
|
|
}
|
|
|
|
scale.domain = function(_) {
|
|
if (!arguments.length) return domain.slice();
|
|
domain = [], index = new InternMap();
|
|
for (const value of _) {
|
|
if (index.has(value)) continue;
|
|
index.set(value, domain.push(value) - 1);
|
|
}
|
|
return scale;
|
|
};
|
|
|
|
scale.range = function(_) {
|
|
return arguments.length ? (range = Array.from(_), scale) : range.slice();
|
|
};
|
|
|
|
scale.unknown = function(_) {
|
|
return arguments.length ? (unknown = _, scale) : unknown;
|
|
};
|
|
|
|
scale.copy = function() {
|
|
return ordinal(domain, range).unknown(unknown);
|
|
};
|
|
|
|
initRange.apply(scale, arguments);
|
|
|
|
return scale;
|
|
}
|