Skip to content

Expose console command execution#85

Open
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-export-execute
Open

Expose console command execution#85
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-export-execute

Conversation

@M09Ic

@M09Ic M09Ic commented Jun 27, 2026

Copy link
Copy Markdown

Background

Menu.RunCommandArgs is the normal public entry point for programmatic execution, but it always goes through the active-menu reset flow. Some integrations prepare a menu command tree themselves and need direct access to the lower-level execution path that StartContext and RunCommandArgs use internally.

Approach

  • Add Console.Execute(ctx, menu, args, async) as a small public wrapper around the existing internal execution path.
  • Keep the existing execute implementation and current callers unchanged.
  • Document that most callers should continue using Menu.RunCommandArgs unless they already prepared a menu.

Tests

  • Added a regression test that executes a prepared menu command through Console.Execute.
  • Verified the target command runs and the console execution flag is cleared afterwards.
  • Ran go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant