systemprompt_cli/presentation/tables/
mod.rs1mod entities;
11mod trace;
12
13pub use self::entities::{artifact_list_table, context_list_table, db_tables_table};
14pub use self::trace::{
15 ai_requests_table, execution_steps_table, extract_latency_from_metadata, format_metadata_value,
16 mcp_tool_calls_table, task_artifacts_table, task_info_table, trace_events_table,
17};
18
19use crate::shared::truncate_with_ellipsis;
20
21#[must_use]
22pub fn truncate_cell(s: &str, max_len: usize) -> String {
23 let flattened = s.replace('\n', " ").replace('\r', "");
24 truncate_with_ellipsis(&flattened, max_len)
25}
26
27pub(super) fn dash() -> String {
28 "-".to_owned()
29}
30
31pub(super) fn millis(value: Option<impl std::fmt::Display>) -> String {
32 value.map_or_else(dash, |ms| format!("{ms}ms"))
33}