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.
-
#attention ⇒ Object
Returns the value of attribute attention.
-
#background_run ⇒ Object
Returns the value of attribute background_run.
-
#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.
-
#pending_runtime_outputs ⇒ Object
Returns the value of attribute pending_runtime_outputs.
-
#plugin_host ⇒ Object
Returns the value of attribute plugin_host.
-
#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.
-
#shell_agent ⇒ Object
Returns the value of attribute shell_agent.
-
#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_pending_runtime_output(text) ⇒ Object
- #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
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def agent @agent end |
#answer ⇒ Object
Returns the value of attribute answer
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def answer @answer end |
#attention ⇒ Object
Returns the value of attribute attention
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def attention @attention end |
#background_run ⇒ Object
Returns the value of attribute background_run
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def background_run @background_run end |
#cancellation ⇒ Object
Returns the value of attribute cancellation
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def cancellation @cancellation end |
#diff ⇒ Object
Returns the value of attribute diff
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def diff @diff end |
#driver ⇒ Object
Returns the value of attribute driver
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def driver @driver end |
#error ⇒ Object
Returns the value of attribute error
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def error @error end |
#error_reported ⇒ Object
Returns the value of attribute error_reported
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def error_reported @error_reported end |
#event_history ⇒ Object
Returns the value of attribute event_history
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def event_history @event_history end |
#label ⇒ Object
Returns the value of attribute label
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def label @label end |
#local_busy_activity ⇒ Object
Returns the value of attribute local_busy_activity
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def local_busy_activity @local_busy_activity end |
#markdown_chunks ⇒ Object
Returns the value of attribute markdown_chunks
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def markdown_chunks @markdown_chunks end |
#pending_question ⇒ Object
Returns the value of attribute pending_question
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def pending_question @pending_question end |
#pending_runtime_outputs ⇒ Object
Returns the value of attribute pending_runtime_outputs
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def pending_runtime_outputs @pending_runtime_outputs end |
#plugin_host ⇒ Object
Returns the value of attribute plugin_host
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def plugin_host @plugin_host end |
#queued_inputs ⇒ Object
Returns the value of attribute queued_inputs
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def queued_inputs @queued_inputs end |
#seen_events ⇒ Object
Returns the value of attribute seen_events
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def seen_events @seen_events end |
#session ⇒ Object
Returns the value of attribute session
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def session @session end |
#shell ⇒ Object
Returns the value of attribute shell
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def shell @shell end |
#shell_agent ⇒ Object
Returns the value of attribute shell_agent
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def shell_agent @shell_agent end |
#snapshot ⇒ Object
Returns the value of attribute snapshot
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def snapshot @snapshot end |
#status ⇒ Object
Returns the value of attribute status
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def status @status end |
#steering ⇒ Object
Returns the value of attribute steering
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def steering @steering end |
#stream_state ⇒ Object
Returns the value of attribute stream_state
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def stream_state @stream_state end |
#thread ⇒ Object
Returns the value of attribute thread
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def thread @thread end |
#transient_shell_entries ⇒ Object
Returns the value of attribute transient_shell_entries
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def transient_shell_entries @transient_shell_entries end |
#unread ⇒ Object
Returns the value of attribute unread
19 20 21 |
# File 'lib/kward/cli/tabs.rb', line 19 def unread @unread end |
Instance Method Details
#append_pending_runtime_output(text) ⇒ Object
60 61 62 63 |
# File 'lib/kward/cli/tabs.rb', line 60 def append_pending_runtime_output(text) self.pending_runtime_outputs ||= [] pending_runtime_outputs << text.to_s end |
#append_transient_shell_entry(text) ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/kward/cli/tabs.rb', line 73 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
82 83 84 |
# File 'lib/kward/cli/tabs.rb', line 82 def clear_transient_shell_entries self.transient_shell_entries = [] end |
#idle? ⇒ Boolean
65 66 67 |
# File 'lib/kward/cli/tabs.rb', line 65 def idle? !running? && !local_busy? end |
#local_busy? ⇒ Boolean
56 57 58 |
# File 'lib/kward/cli/tabs.rb', line 56 def local_busy? !local_busy_activity.to_s.empty? end |
#record_event(event) ⇒ Object
69 70 71 |
# File 'lib/kward/cli/tabs.rb', line 69 def record_event(event) event_history << event end |
#running? ⇒ Boolean
52 53 54 |
# File 'lib/kward/cli/tabs.rb', line 52 def running? %w[queued running waiting_for_question].include?(status.to_s) end |