Class: Kward::CLI::Tabs::TabRuntime
- Inherits:
-
Struct
- Object
- Struct
- Kward::CLI::Tabs::TabRuntime
- Defined in:
- lib/kward/cli/tabs.rb
Constant Summary collapse
- TRANSIENT_SHELL_OUTPUT_LIMIT =
200_000
Instance Attribute Summary collapse
-
#agent ⇒ Object
Returns the value of attribute agent.
-
#answer ⇒ Object
Returns the value of attribute answer.
-
#cancellation ⇒ Object
Returns the value of attribute cancellation.
-
#diff ⇒ Object
Returns the value of attribute diff.
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#error ⇒ Object
Returns the value of attribute error.
-
#error_reported ⇒ Object
Returns the value of attribute error_reported.
-
#event_history ⇒ Object
Returns the value of attribute event_history.
-
#label ⇒ Object
Returns the value of attribute label.
-
#local_busy_activity ⇒ Object
Returns the value of attribute local_busy_activity.
-
#markdown_chunks ⇒ Object
Returns the value of attribute markdown_chunks.
-
#pending_question ⇒ Object
Returns the value of attribute pending_question.
-
#queued_inputs ⇒ Object
Returns the value of attribute queued_inputs.
-
#seen_events ⇒ Object
Returns the value of attribute seen_events.
-
#session ⇒ Object
Returns the value of attribute session.
-
#shell ⇒ Object
Returns the value of attribute shell.
-
#snapshot ⇒ Object
Returns the value of attribute snapshot.
-
#status ⇒ Object
Returns the value of attribute status.
-
#steering ⇒ Object
Returns the value of attribute steering.
-
#stream_state ⇒ Object
Returns the value of attribute stream_state.
-
#thread ⇒ Object
Returns the value of attribute thread.
-
#transient_shell_entries ⇒ Object
Returns the value of attribute transient_shell_entries.
-
#unread ⇒ Object
Returns the value of attribute unread.
Instance Method Summary collapse
- #append_transient_shell_entry(text) ⇒ Object
- #clear_transient_shell_entries ⇒ Object
- #idle? ⇒ Boolean
- #local_busy? ⇒ Boolean
- #record_event(event) ⇒ Object
- #running? ⇒ Boolean
Instance Attribute Details
#agent ⇒ Object
Returns the value of attribute agent
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def agent @agent end |
#answer ⇒ Object
Returns the value of attribute answer
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def answer @answer end |
#cancellation ⇒ Object
Returns the value of attribute cancellation
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def cancellation @cancellation end |
#diff ⇒ Object
Returns the value of attribute diff
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def diff @diff end |
#driver ⇒ Object
Returns the value of attribute driver
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def driver @driver end |
#error ⇒ Object
Returns the value of attribute error
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def error @error end |
#error_reported ⇒ Object
Returns the value of attribute error_reported
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def error_reported @error_reported end |
#event_history ⇒ Object
Returns the value of attribute event_history
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def event_history @event_history end |
#label ⇒ Object
Returns the value of attribute label
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def label @label end |
#local_busy_activity ⇒ Object
Returns the value of attribute local_busy_activity
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def local_busy_activity @local_busy_activity end |
#markdown_chunks ⇒ Object
Returns the value of attribute markdown_chunks
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def markdown_chunks @markdown_chunks end |
#pending_question ⇒ Object
Returns the value of attribute pending_question
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def pending_question @pending_question end |
#queued_inputs ⇒ Object
Returns the value of attribute queued_inputs
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def queued_inputs @queued_inputs end |
#seen_events ⇒ Object
Returns the value of attribute seen_events
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def seen_events @seen_events end |
#session ⇒ Object
Returns the value of attribute session
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def session @session end |
#shell ⇒ Object
Returns the value of attribute shell
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def shell @shell end |
#snapshot ⇒ Object
Returns the value of attribute snapshot
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def snapshot @snapshot end |
#status ⇒ Object
Returns the value of attribute status
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def status @status end |
#steering ⇒ Object
Returns the value of attribute steering
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def steering @steering end |
#stream_state ⇒ Object
Returns the value of attribute stream_state
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def stream_state @stream_state end |
#thread ⇒ Object
Returns the value of attribute thread
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def thread @thread end |
#transient_shell_entries ⇒ Object
Returns the value of attribute transient_shell_entries
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def transient_shell_entries @transient_shell_entries end |
#unread ⇒ Object
Returns the value of attribute unread
17 18 19 |
# File 'lib/kward/cli/tabs.rb', line 17 def unread @unread end |
Instance Method Details
#append_transient_shell_entry(text) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/kward/cli/tabs.rb', line 61 def append_transient_shell_entry(text) value = text.to_s return if value.empty? self.transient_shell_entries ||= [] transient_shell_entries << value trim_transient_shell_entries end |
#clear_transient_shell_entries ⇒ Object
70 71 72 |
# File 'lib/kward/cli/tabs.rb', line 70 def clear_transient_shell_entries self.transient_shell_entries = [] end |
#idle? ⇒ Boolean
53 54 55 |
# File 'lib/kward/cli/tabs.rb', line 53 def idle? !running? && !local_busy? end |
#local_busy? ⇒ Boolean
49 50 51 |
# File 'lib/kward/cli/tabs.rb', line 49 def local_busy? !local_busy_activity.to_s.empty? end |
#record_event(event) ⇒ Object
57 58 59 |
# File 'lib/kward/cli/tabs.rb', line 57 def record_event(event) event_history << event end |
#running? ⇒ Boolean
45 46 47 |
# File 'lib/kward/cli/tabs.rb', line 45 def running? %w[queued running waiting_for_question].include?(status.to_s) end |