Refactor trace log display and handling

Truncate trace logs to improve GUI performance and prevent excessive
display. This change also introduces line length limits for individual
log entries, adding "..." for truncated lines. The display logic for
trace logs has been updated to use `egui::ScrollArea` for better user
experience.
This commit is contained in:
Michael Schimmel
2026-02-18 13:08:38 +01:00
parent 94fc6bf56d
commit 3630cb3c6c
2 changed files with 28 additions and 17 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ impl Value {
Value::Function { .. } => StaticType::Any, // Dynamic function
Value::Object(o) => StaticType::Object(o.type_name()),
Value::Cell(c) => c.borrow().static_type(),
Value::TailCallRequest(_) => panic!("Internal VM state leaked: TailCallRequest"),
Value::TailCallRequest(_) => StaticType::Any, // Internal state, but typable as Any
}
}
}
@@ -181,7 +181,7 @@ impl fmt::Display for Value {
Value::Function(_) => write!(f, "<native fn>"),
Value::Object(o) => write!(f, "<{}>", o.type_name()),
Value::Cell(c) => write!(f, "{}", c.borrow()),
Value::TailCallRequest(_) => panic!("Internal VM state leaked: TailCallRequest"),
Value::TailCallRequest(_) => write!(f, "<tail call request>"),
}
}
}