Class: RubynCode::CLI::Commands::Plan
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::Plan
show all
- Defined in:
- lib/rubyn_code/cli/commands/plan.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
aliases, all_names, hidden?
Class Method Details
.command_name ⇒ Object
7
|
# File 'lib/rubyn_code/cli/commands/plan.rb', line 7
def self.command_name = '/plan'
|
.description ⇒ Object
8
|
# File 'lib/rubyn_code/cli/commands/plan.rb', line 8
def self.description = 'Toggle plan mode (think before acting)'
|
Instance Method Details
#execute(_args, ctx) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/rubyn_code/cli/commands/plan.rb', line 10
def execute(_args, ctx)
if ctx.plan_mode?
ctx.renderer.info('Plan mode OFF — back to full execution. 🚀')
{ action: :set_plan_mode, enabled: false }
else
ctx.renderer.info("Plan mode ON — read-only tools only. I can explore but won't change anything. 🧠")
{ action: :set_plan_mode, enabled: true }
end
end
|