fix: executeDefinition Unknown option

This commit is contained in:
mingmxren 2026-03-04 20:10:42 +08:00
parent d898ec7020
commit c87533eb7a
2 changed files with 1 additions and 2 deletions

View file

@ -1533,7 +1533,6 @@ func (al *AgentLoop) buildCommandsRuntime() *commands.Runtime {
defaultAgent.Model = value defaultAgent.Model = value
if al.cfg != nil { if al.cfg != nil {
al.cfg.Agents.Defaults.ModelName = value al.cfg.Agents.Defaults.ModelName = value
al.cfg.Agents.Defaults.Model = value
} }
return oldModel, nil return oldModel, nil
}, },

View file

@ -84,6 +84,6 @@ func (e *Executor) executeDefinition(ctx context.Context, req Request, def Defin
} }
// Unknown sub-command // Unknown sub-command
err := req.Reply(fmt.Sprintf("Unknown parameter: %s. Usage: %s", subName, def.EffectiveUsage())) err := req.Reply(fmt.Sprintf("Unknown option: %s. Usage: %s", subName, def.EffectiveUsage()))
return ExecuteResult{Outcome: OutcomeHandled, Command: def.Name, Err: err} return ExecuteResult{Outcome: OutcomeHandled, Command: def.Name, Err: err}
} }