MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / pty_request

Method pty_request

crates/openshell-supervisor-process/src/ssh.rs:364–388  ·  view source on GitHub ↗
(
        &mut self,
        channel: ChannelId,
        term: &str,
        col_width: u32,
        row_height: u32,
        _pix_width: u32,
        _pix_height: u32,
        _modes: &[(russh::Pty, 

Source from the content-addressed store, hash-verified

362 }
363
364 async fn pty_request(
365 &mut self,
366 channel: ChannelId,
367 term: &str,
368 col_width: u32,
369 row_height: u32,
370 _pix_width: u32,
371 _pix_height: u32,
372 _modes: &[(russh::Pty, u32)],
373 session: &mut Session,
374 ) -> Result<(), Self::Error> {
375 let state = self
376 .channels
377 .get_mut(&channel)
378 .ok_or_else(|| anyhow::anyhow!("pty_request on unknown channel {channel:?}"))?;
379 state.pty_request = Some(PtyRequest {
380 term: term.to_string(),
381 col_width,
382 row_height,
383 pixel_width: 0,
384 pixel_height: 0,
385 });
386 session.channel_success(channel)?;
387 Ok(())
388 }
389
390 async fn window_change_request(
391 &mut self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected