Class: Clacky::RichAgentShell
- Inherits:
-
RubyRich::AgentShell
- Object
- RubyRich::AgentShell
- Clacky::RichAgentShell
- Defined in:
- lib/clacky/rich_ui/shell/rich_agent_shell.rb
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
-
#clacky_controller ⇒ Object
Returns the value of attribute clacky_controller.
-
#sidebar ⇒ Object
readonly
Returns the value of attribute sidebar.
-
#thinking_live ⇒ Object
readonly
Returns the value of attribute thinking_live.
Instance Method Summary collapse
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
12 13 14 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 12 def callbacks @callbacks end |
#clacky_controller ⇒ Object
Returns the value of attribute clacky_controller.
11 12 13 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 11 def clacky_controller @clacky_controller end |
#sidebar ⇒ Object (readonly)
Returns the value of attribute sidebar.
10 11 12 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 10 def @sidebar end |
#thinking_live ⇒ Object (readonly)
Returns the value of attribute thinking_live.
10 11 12 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 10 def thinking_live @thinking_live end |
Instance Method Details
#on_esc(&block) ⇒ Object
173 174 175 176 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 173 def on_esc(&block) @callbacks[:esc] = block self end |
#toggle_permission_mode ⇒ Object
163 164 165 166 167 168 169 170 171 |
# File 'lib/clacky/rich_ui/shell/rich_agent_shell.rb', line 163 def current = @callbacks[:mode_toggle] ? @mode : :confirm_safes # Toggle between confirm_safes and confirm_all new_mode = current.to_s == "confirm_all" ? "confirm_safes" : "confirm_all" @mode = new_mode.to_sym @callbacks[:mode_toggle]&.call(@mode) @status = "mode ยท #{@mode}" @focus_manager.focus(:composer) end |