Class: BruteCLI::REPL::PromptStatus

Inherits:
Struct
  • Object
show all
Defined in:
lib/brute_cli/repl/user_input.rb

Overview

Handles Reline prompt setup and reading user input.

Decoupled from Execution — receives the terminal for output, display data via a simple Struct, and returns intent hashes that the REPL interprets.

Intents returned by #read_prompt:

nil                                        — EOF / Ctrl-D
{ type: :input,       text: "..." }        — user typed a prompt
{ type: :cycle_agent, direction: :forward } — Tab on empty line
{ type: :cycle_agent, direction: :backward} — Shift-Tab on empty line

The caller must update the status and call #read_prompt again after handling a :cycle_agent intent.

Instance Attribute Summary collapse

Instance Attribute Details

#current_agentObject

Returns the value of attribute current_agent

Returns:

  • (Object)

    the current value of current_agent



24
25
26
# File 'lib/brute_cli/repl/user_input.rb', line 24

def current_agent
  @current_agent
end

#model_shortObject

Returns the value of attribute model_short

Returns:

  • (Object)

    the current value of model_short



24
25
26
# File 'lib/brute_cli/repl/user_input.rb', line 24

def model_short
  @model_short
end

#provider_nameObject

Returns the value of attribute provider_name

Returns:

  • (Object)

    the current value of provider_name



24
25
26
# File 'lib/brute_cli/repl/user_input.rb', line 24

def provider_name
  @provider_name
end