| 45 | static FILTERED_FILE_CACHE: OnceLock<Mutex<Option<CachedFilteredFiles>>> = OnceLock::new(); |
| 46 | static EDITOR_TREE_ICON_CACHE: OnceLock<Mutex<Vec<(String, TextureID)>>> = OnceLock::new(); |
| 47 | |
| 48 | pub fn classify_editor_log(text: &str) -> &'static str { |
| 49 | let first = text.lines().next().unwrap_or_default().to_ascii_lowercase(); |
| 50 | if first.contains("fail") || first.contains("error") || first.contains("blocked") { |
| 51 | "error" |
| 52 | } else if first.contains("warn") || first.contains("dirty") || first.contains("timeout") { |
| 53 | "warn" |
| 54 | } else { |
| 55 | "info" |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | pub fn capture_editor_output_state(state: &mut EditorState) { |