ctl: add /i alias for inject

This commit is contained in:
Ollie Agent 2026-08-11 10:47:58 +02:00
parent 573c9f4462
commit c3afe1453d
1 changed files with 8 additions and 0 deletions

View File

@ -304,6 +304,14 @@ var agentCtlHandlers = map[string]rdwrHandler{
ctx.Agent.InjectRewrite(text)
return []byte("ok\n"), nil
},
"i": func(ctx HandlerCtx, args []string) ([]byte, error) {
text := strings.Join(args, " ")
if text == "" {
return nil, fmt.Errorf("inject requires text")
}
ctx.Agent.InjectRewrite(text)
return []byte("ok\n"), nil
},
"agent": func(ctx HandlerCtx, args []string) ([]byte, error) {
if len(args) == 0 {
return []byte(ctx.Agent.Profile() + "\n"), nil