fs: remove dead switch cases from writeAgentCtl and writeAgentCfg
Remove no-op cases that did nothing but carry stale comments: - ctl: backend (selection via cfg instead) - ctl: skills (handled elsewhere) - cfg: backend, model
This commit is contained in:
parent
5a946a6729
commit
09d5462445
|
|
@ -610,8 +610,6 @@ func writeAgentCfg(ctx HandlerCtx, data []byte) error {
|
|||
if strings.TrimSpace(parts[1]) != "" {
|
||||
ctx.Agent.SetName(strings.TrimSpace(parts[1]))
|
||||
}
|
||||
case "backend":
|
||||
case "model":
|
||||
default:
|
||||
return fmt.Errorf("unknown cfg key: %s", parts[0])
|
||||
}
|
||||
|
|
@ -639,8 +637,6 @@ func writeAgentCtl(ctx HandlerCtx, data []byte) error {
|
|||
ctx.Agent.HandleCommand(ctx.Session.Ctx(), "/compact")
|
||||
case "clear":
|
||||
ctx.Agent.HandleCommand(ctx.Session.Ctx(), "/clear")
|
||||
case "backend":
|
||||
// Backend selection via cfg
|
||||
case "model":
|
||||
if len(cmd) > 1 {
|
||||
if be := ctx.Agent.Backend(); be != nil {
|
||||
|
|
@ -655,8 +651,6 @@ func writeAgentCtl(ctx HandlerCtx, data []byte) error {
|
|||
if len(cmd) > 1 {
|
||||
ctx.Agent.SetCWD(strings.Join(cmd[1:], " "))
|
||||
}
|
||||
case "skills":
|
||||
// skill list handled elsewhere
|
||||
default:
|
||||
return fmt.Errorf("unknown agent ctl command: %s", cmd[0])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue