UNPKG

tlnt

Version:

TLNT - HMS-Powered Multi-Agent Platform with Government Agency Analysis, Deep Research, and Enterprise-Ready Deployment. Self-optimizing multi-domain AI agent with continuous learning and enterprise-grade performance monitoring.

105 lines (104 loc) 3.61 kB
import chalk from 'chalk'; import ora from 'ora'; export class LoadingScreen { spinner; asciiArt; constructor() { this.asciiArt = this.getBlaxAsciiArt(); this.spinner = ora({ text: 'Initializing Blax...', spinner: 'dots3', color: 'cyan' }); } /** * Show loading screen with ASCII art and progress */ async show() { // Clear console and show ASCII art console.clear(); console.log(chalk.cyan(this.asciiArt)); console.log(chalk.gray('━'.repeat(60))); console.log(); // Start spinner this.spinner.start(); // Simulate initialization steps with realistic timing await this.simulateStep('Loading core systems...', 800); await this.simulateStep('Initializing agent hub...', 600); await this.simulateStep('Loading plugins...', 500); await this.simulateStep('Establishing connections...', 700); await this.simulateStep('Verifying credentials...', 400); await this.simulateStep('Preparing interface...', 300); this.spinner.succeed(chalk.green('Blax ready! 🚀')); console.log(); } /** * Show quick loading for fast operations */ async showQuick(message = 'Loading...') { this.spinner.text = message; this.spinner.start(); await new Promise(resolve => setTimeout(resolve, 200)); this.spinner.succeed(); } /** * Show error state */ showError(message) { this.spinner.fail(chalk.red(message)); } /** * Stop spinner */ stop() { this.spinner.stop(); } async simulateStep(text, duration) { this.spinner.text = text; await new Promise(resolve => setTimeout(resolve, duration)); } getBlaxAsciiArt() { return ` ██████╗ ██╗ █████╗ ██╗ ██╗ ██╔══██╗██║ ██╔══██╗╚██╗██╔╝ ██████╔╝██║ ███████║ ╚███╔╝ ██╔══██╗██║ ██╔══██║ ██╔██╗ ██████╔╝███████╗██║ ██║██╔╝ ██╗ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ Multi-Agent Collaboration Platform Human-in-the-Loop Supervision Deal-Centric Value Contracts Enterprise-Ready v2.0 `; } } /** * Global loading screen instance */ export const loadingScreen = new LoadingScreen(); /** * Show loading screen with custom steps */ export async function showLoadingWithSteps(steps) { const loader = new LoadingScreen(); console.clear(); console.log(chalk.cyan(loader['asciiArt'])); console.log(chalk.gray('━'.repeat(60))); console.log(); const spinner = ora({ spinner: 'dots3', color: 'cyan' }).start(); for (const step of steps) { spinner.text = step.text; await new Promise(resolve => setTimeout(resolve, step.duration)); } spinner.succeed(chalk.green('Operation complete! ✨')); console.log(); } /** * Show minimal loading for quick operations */ export async function showQuickLoading(message = 'Processing...', duration = 300) { const spinner = ora({ text: message, spinner: 'dots', color: 'cyan' }).start(); await new Promise(resolve => setTimeout(resolve, duration)); spinner.succeed(); } //# sourceMappingURL=loadingScreen.js.map