Files
Claude-Code-Workflow/ccw/frontend/src/components/shared/LogBlock/utils.ts
catlog22 a2206df50f feat: add CliStreamMonitor and related components for CLI output streaming
- Implemented CliStreamMonitor component for real-time CLI output monitoring with multi-execution support.
- Created JsonFormatter component for displaying JSON content in various formats (text, card, inline).
- Added utility functions for JSON detection and formatting in jsonUtils.ts.
- Introduced LogBlock utility functions for styling CLI output lines.
- Developed a new Collapsible component for better UI interactions.
- Created IssueHubPage for managing issues, queue, and discovery with tab navigation.
2026-01-31 23:12:39 +08:00

31 lines
806 B
TypeScript

// ========================================
// LogBlock Utility Functions
// ========================================
// Shared helper functions for LogBlock components
import type { CliOutputLine } from '@/stores/cliStreamStore';
/**
* Get the CSS class name for a given output line type
*
* @param type - The output line type
* @returns The CSS class name for styling the line
*/
export function getOutputLineClass(type: CliOutputLine['type']): string {
switch (type) {
case 'thought':
return 'text-purple-400';
case 'system':
return 'text-blue-400';
case 'stderr':
return 'text-red-400';
case 'metadata':
return 'text-yellow-400';
case 'tool_call':
return 'text-green-400';
case 'stdout':
default:
return 'text-foreground';
}
}