handleCommandSelection processes command selection and prompts for parameters if needed
(targetType TargetType, target, command string, onResultClosed func())
| 137 | |
| 138 | // handleCommandSelection processes command selection and prompts for parameters if needed |
| 139 | func (u *UIManager) handleCommandSelection(targetType TargetType, target, command string, onResultClosed func()) { |
| 140 | template := ParseTemplate(command) |
| 141 | |
| 142 | if len(template.Parameters) == 0 { |
| 143 | // No parameters, execute directly |
| 144 | u.executeAndShowResult(targetType, target, command, nil, onResultClosed) |
| 145 | } else { |
| 146 | // Has parameters, show input form |
| 147 | u.showParameterForm(targetType, target, command, template, onResultClosed) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // showParameterForm displays a form to collect parameter values |
| 152 | func (u *UIManager) showParameterForm(targetType TargetType, target, command string, template CommandTemplate, onReturn func()) { |
no test coverage detected