Class: TokenReel::State

Inherits:
Struct
  • Object
show all
Defined in:
lib/token_reel/timeline.rb

Overview

A snapshot of the screen at a given moment: how much of the prompt, reasoning, and response are visible, which "phase" we're in, and whether the cursor happens to be in its "on" blink state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cursor_onObject

Returns the value of attribute cursor_on

Returns:

  • (Object)

    the current value of cursor_on



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def cursor_on
  @cursor_on
end

#dot_countObject

Returns the value of attribute dot_count

Returns:

  • (Object)

    the current value of dot_count



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def dot_count
  @dot_count
end

#phaseObject

Returns the value of attribute phase

Returns:

  • (Object)

    the current value of phase



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def phase
  @phase
end

#prompt_textObject

Returns the value of attribute prompt_text

Returns:

  • (Object)

    the current value of prompt_text



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def prompt_text
  @prompt_text
end

#reasoning_textObject

Returns the value of attribute reasoning_text

Returns:

  • (Object)

    the current value of reasoning_text



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def reasoning_text
  @reasoning_text
end

#response_textObject

Returns the value of attribute response_text

Returns:

  • (Object)

    the current value of response_text



7
8
9
# File 'lib/token_reel/timeline.rb', line 7

def response_text
  @response_text
end

Instance Method Details

#signatureObject

Identical signatures render to the identical frame, so the sampler can skip re-rendering and just extend the previous frame's delay instead.



11
12
13
# File 'lib/token_reel/timeline.rb', line 11

def signature
  [phase, prompt_text, reasoning_text, response_text, cursor_on, dot_count]
end