 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>
		
			
				
	
	
		
			48 lines
		
	
	
		
			923 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			923 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| const stripAnsi = require('strip-ansi');
 | |
| const isFullwidthCodePoint = require('is-fullwidth-code-point');
 | |
| const emojiRegex = require('emoji-regex');
 | |
| 
 | |
| const stringWidth = string => {
 | |
| 	if (typeof string !== 'string' || string.length === 0) {
 | |
| 		return 0;
 | |
| 	}
 | |
| 
 | |
| 	string = stripAnsi(string);
 | |
| 
 | |
| 	if (string.length === 0) {
 | |
| 		return 0;
 | |
| 	}
 | |
| 
 | |
| 	string = string.replace(emojiRegex(), '  ');
 | |
| 
 | |
| 	let width = 0;
 | |
| 
 | |
| 	for (let i = 0; i < string.length; i++) {
 | |
| 		const code = string.codePointAt(i);
 | |
| 
 | |
| 		// Ignore control characters
 | |
| 		if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
 | |
| 			continue;
 | |
| 		}
 | |
| 
 | |
| 		// Ignore combining characters
 | |
| 		if (code >= 0x300 && code <= 0x36F) {
 | |
| 			continue;
 | |
| 		}
 | |
| 
 | |
| 		// Surrogates
 | |
| 		if (code > 0xFFFF) {
 | |
| 			i++;
 | |
| 		}
 | |
| 
 | |
| 		width += isFullwidthCodePoint(code) ? 2 : 1;
 | |
| 	}
 | |
| 
 | |
| 	return width;
 | |
| };
 | |
| 
 | |
| module.exports = stringWidth;
 | |
| // TODO: remove this in the next major version
 | |
| module.exports.default = stringWidth;
 |