Publish harness and TUI open-source
initial sync from the monorepo
This commit is contained in:
commit
c68e39f604
2734 changed files with 1437016 additions and 0 deletions
28
crates/codegen/xai-grok-pager/src/startup.rs
Normal file
28
crates/codegen/xai-grok-pager/src/startup.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//! Generic startup warnings displayed on the welcome screen.
|
||||
//!
|
||||
//! Any subsystem (terminal diagnostics, auth, config migration, etc.) can
|
||||
//! produce [`StartupWarning`]s.
|
||||
|
||||
/// A non-fatal startup warning from any subsystem.
|
||||
///
|
||||
/// This is a **display contract only** -- the subsystem formats the message
|
||||
/// and optional action hint. Detailed diagnostics (fix commands, config paths)
|
||||
/// live in the subsystem-specific slash commands (e.g. `/terminal-setup`).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StartupWarning {
|
||||
/// Severity controls rendering color (yellow for warnings, dim for info).
|
||||
pub severity: WarningSeverity,
|
||||
/// Short, user-facing message (fits in ~60 columns).
|
||||
pub message: String,
|
||||
/// Optional action hint (e.g. "run /terminal-setup").
|
||||
pub action: Option<String>,
|
||||
}
|
||||
|
||||
/// Severity level for startup warnings.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum WarningSeverity {
|
||||
/// Rendered in warning color (yellow). Something is misconfigured.
|
||||
Warning,
|
||||
/// Rendered in dim/gray. Informational, not actionable.
|
||||
Info,
|
||||
}
|
||||
Loading…
Reference in a new issue