Right after the line...
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10])
@command_window.height = n * 32 + 32
where n = # of commands you want showing
Window_Command calculates the height as: commands.size * 32 + 32
So you just force it back to whatever you want.
Be Well