 85bf1341f3
			
		
	
	85bf1341f3
	
	
	
		
			
			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>
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { isVisible } from '../util/TickUtils';
 | |
| import { getEveryNthWithCondition } from '../util/getEveryNthWithCondition';
 | |
| export function getEquidistantTicks(sign, boundaries, getTickSize, ticks, minTickGap) {
 | |
|   var result = (ticks || []).slice();
 | |
|   var initialStart = boundaries.start,
 | |
|     end = boundaries.end;
 | |
|   var index = 0;
 | |
|   // Premature optimisation idea 1: Estimate a lower bound, and start from there.
 | |
|   // For now, start from every tick
 | |
|   var stepsize = 1;
 | |
|   var start = initialStart;
 | |
|   var _loop = function _loop() {
 | |
|       // Given stepsize, evaluate whether every stepsize-th tick can be shown.
 | |
|       // If it can not, then increase the stepsize by 1, and try again.
 | |
| 
 | |
|       var entry = ticks === null || ticks === void 0 ? void 0 : ticks[index];
 | |
| 
 | |
|       // Break condition - If we have evaluate all the ticks, then we are done.
 | |
|       if (entry === undefined) {
 | |
|         return {
 | |
|           v: getEveryNthWithCondition(ticks, stepsize)
 | |
|         };
 | |
|       }
 | |
| 
 | |
|       // Check if the element collides with the next element
 | |
|       var i = index;
 | |
|       var size;
 | |
|       var getSize = function getSize() {
 | |
|         if (size === undefined) {
 | |
|           size = getTickSize(entry, i);
 | |
|         }
 | |
|         return size;
 | |
|       };
 | |
|       var tickCoord = entry.coordinate;
 | |
|       // We will always show the first tick.
 | |
|       var isShow = index === 0 || isVisible(sign, tickCoord, getSize, start, end);
 | |
|       if (!isShow) {
 | |
|         // Start all over with a larger stepsize
 | |
|         index = 0;
 | |
|         start = initialStart;
 | |
|         stepsize += 1;
 | |
|       }
 | |
|       if (isShow) {
 | |
|         // If it can be shown, update the start
 | |
|         start = tickCoord + sign * (getSize() / 2 + minTickGap);
 | |
|         index += stepsize;
 | |
|       }
 | |
|     },
 | |
|     _ret;
 | |
|   while (stepsize <= result.length) {
 | |
|     _ret = _loop();
 | |
|     if (_ret) return _ret.v;
 | |
|   }
 | |
|   return [];
 | |
| } |