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.



583
584
585
586
# File 'lib/ag_ui_protocol/core/events.rb', line 583

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.



577
578
579
# File 'lib/ag_ui_protocol/core/events.rb', line 577

def title
  @title
end

Instance Method Details

#to_hObject



589
590
591
# File 'lib/ag_ui_protocol/core/events.rb', line 589

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