Skip to content

Commit 418f5ab

Browse files
committed
Pass size when connecting web socket URL
I think this will solve an issue where screen does does not correctly handle an immediate resize. It seems to ignore the resize, but even if you send it again nothing changes, seemingly thinking it is already at that size?
1 parent f516846 commit 418f5ab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

site/src/pages/TerminalPage/TerminalPage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ const TerminalPage: FC = () => {
229229
reconnectionToken,
230230
workspaceAgent.id,
231231
command,
232+
terminal.rows,
233+
terminal.cols,
232234
)
233235
.then((url) => {
234236
if (disposed) {

site/src/utils/terminal.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ export const terminalWebsocketUrl = async (
55
reconnect: string,
66
agentId: string,
77
command: string | undefined,
8+
height: number,
9+
width: number,
810
): Promise<string> => {
911
const query = new URLSearchParams({ reconnect });
1012
if (command) {
1113
query.set("command", command);
1214
}
15+
query.set("height", height.toString());
16+
query.set("width", width.toString());
1317

1418
const url = new URL(baseUrl || `${location.protocol}//${location.host}`);
1519
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";

0 commit comments

Comments
 (0)