// A signal is the normal stop of the daemon and the client, so their
// result does not include ctx.Err().
case len(args) == 1 && args[0] == "daemon":
return daemon(ctx, os.Stdout)
case len(args) == 0 || len(args) == 1 && args[0] == "chat":
return terminal(ctx, os.Stdin, os.Stdout)
// A signal is the normal stop of the daemon and the client, so their
// result does not include ctx.Err().
case len(args) == 1 && args[0] == "daemon":
return daemon(ctx, os.Stdout)
case len(args) == 0 || len(args) == 1 && args[0] == "chat":
return terminal(ctx, os.Stdin, os.Stdout)