Halide-Controlled Extending-Shrinking Motion of a Covalent Cage