Centralize g3 status message formatting
Extract a new g3_status module in g3-cli that provides consistent formatting for all 'g3:' prefixed system status messages. Key changes: - Add G3Status struct with methods for progress, done, failed, error, etc. - Add Status enum with Done, Failed, Error, Resolved, Insufficient, NoChanges - Add ThinResult struct in g3-core for semantic thinning data - Update UiWriter trait with print_thin_result() method - Refactor context thinning to return ThinResult instead of formatted strings - Update all callers to use the new centralized formatting - Session resume/decline messages now use G3Status - Compaction status messages now use G3Status This maintains clean separation of concerns: g3-core emits semantic data, g3-cli handles all terminal formatting and colors.
This commit is contained in:
@@ -274,7 +274,7 @@ impl UiWriter for TrackingUiWriter {
|
||||
fn print_context_status(&self, _message: &str) {}
|
||||
fn print_g3_progress(&self, _message: &str) {}
|
||||
fn print_g3_status(&self, _message: &str, _status: &str) {}
|
||||
fn print_context_thinning(&self, _message: &str) {}
|
||||
fn print_thin_result(&self, _result: &g3_core::ThinResult) {}
|
||||
|
||||
fn print_tool_header(&self, _tool_name: &str, _tool_args: Option<&serde_json::Value>) {
|
||||
// Count each tool call
|
||||
|
||||
Reference in New Issue
Block a user