Class: SystemMessageDecorator
- Inherits:
-
EventDecorator
- Object
- Draper::Decorator
- ApplicationDecorator
- EventDecorator
- SystemMessageDecorator
- Defined in:
- app/decorators/system_message_decorator.rb
Overview
Decorates system_message events for display in the TUI. Hidden in basic mode. Verbose and debug modes return timestamped system info.
Constant Summary
Constants inherited from EventDecorator
EventDecorator::ERROR_ICON, EventDecorator::MIDDLE_TRUNCATION_MARKER, EventDecorator::RETURN_ARROW, EventDecorator::TOOL_ICON
Instance Method Summary collapse
-
#render_basic ⇒ nil
System messages are hidden in basic mode.
-
#render_debug ⇒ Hash
Same as verbose — system messages have no additional debug data.
-
#render_verbose ⇒ Hash
Structured system message data ‘:system, content: String, timestamp: Integer|nil`.
Methods inherited from EventDecorator
Instance Method Details
#render_basic ⇒ nil
Returns system messages are hidden in basic mode.
7 8 9 |
# File 'app/decorators/system_message_decorator.rb', line 7 def render_basic nil end |
#render_debug ⇒ Hash
Returns same as verbose — system messages have no additional debug data.
18 19 20 |
# File 'app/decorators/system_message_decorator.rb', line 18 def render_debug render_verbose end |
#render_verbose ⇒ Hash
Returns structured system message data ‘:system, content: String, timestamp: Integer|nil`.
13 14 15 |
# File 'app/decorators/system_message_decorator.rb', line 13 def render_verbose {role: :system, content: content, timestamp: } end |