Class: AgUiProtocol::Core::Events::ThinkingStartEvent

Inherits:
BaseEvent show all
Defined in:
lib/ag_ui_protocol/core/events.rb

Overview

Event indicating the start of a thinking step event.

“‘ruby event = AgUiProtocol::Core::Events::ThinkingStartEvent.new(title: “step”) “`

Instance Attribute Summary collapse

Attributes inherited from BaseEvent

#raw_event, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(title: nil, timestamp: nil, raw_event: nil) ⇒ ThinkingStartEvent

Returns a new instance of ThinkingStartEvent.



561
562
563
564
# File 'lib/ag_ui_protocol/core/events.rb', line 561

def initialize(title: nil, timestamp: nil, raw_event: nil)
  super(type: EventType::THINKING_START, timestamp: timestamp, raw_event: raw_event)
  @title = title
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



555
556
557
# File 'lib/ag_ui_protocol/core/events.rb', line 555

def title
  @title
end

Instance Method Details

#to_hObject



567
568
569
# File 'lib/ag_ui_protocol/core/events.rb', line 567

def to_h
  super.merge(title: @title)
end