When runProjectScript reuses an existing terminal, it was always passing
hardcoded cols=120/rows=30 to api.terminal.open(), causing the server to
resize the PTY while the client-side xterm.js was never notified (its
resize effect dependencies didn't change). This resulted in a persistent
dimension mismatch and garbled terminal output.
Fix:
- Make cols/rows optional in terminalOpenInputSchema
- In TerminalManager.open()/restart()/startSession(), fall back to the
session's current dimensions (or 80x24 defaults for new sessions)
when cols/rows are omitted
- In runProjectScript, only pass hardcoded dimensions when creating a
new terminal; omit them for reused terminals so the existing
TerminalViewport-managed dimensions are preserved