mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
fix(webcrt): resize hop PTY before nested CLI jump
Nested stelnet/telnet captures hop TTY width at start; Netmiko's default 511 cols made mid-line edit redraws wrap and garble in ~80-col WebCRT. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b690914f18
commit
b540ea21c1
6 changed files with 88 additions and 3 deletions
|
|
@ -593,7 +593,11 @@ def create_session(
|
|||
log_buf = io.BytesIO()
|
||||
try:
|
||||
conn = open_netmiko_connection(
|
||||
creds, session_timeout=connect_timeout, session_log=log_buf
|
||||
creds,
|
||||
session_timeout=connect_timeout,
|
||||
session_log=log_buf,
|
||||
cols=c,
|
||||
rows=r,
|
||||
)
|
||||
except Exception as exc:
|
||||
partial = _session_log_text(log_buf).strip()
|
||||
|
|
@ -686,6 +690,7 @@ def create_session(
|
|||
"cols": sess.cols,
|
||||
"rows": sess.rows,
|
||||
"ws_path": f"/v1/webcrt/sessions/{session_id}/ws",
|
||||
"cli_hop": bool(hop_guard),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue