Class: SystemMessageDecorator

Inherits:
EventDecorator show all
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::RETURN_ARROW, EventDecorator::TOOL_ICON

Instance Method Summary collapse

Methods inherited from EventDecorator

for, #render

Instance Method Details

#render_basicnil

Returns system messages are hidden in basic mode.

Returns:

  • (nil)

    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_debugHash

Returns same as verbose — system messages have no additional debug data.

Returns:

  • (Hash)

    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_verboseHash

Returns structured system message data ‘:system, content: String, timestamp: Integer|nil`.

Returns:

  • (Hash)

    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: timestamp}
end