mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
- 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.
31 lines
806 B
TypeScript
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';
|
|
}
|
|
}
|