MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / update_pty

Function update_pty

crates/opencode-server/src/routes.rs:3430–3440  ·  view source on GitHub ↗
(
    Path(id): Path<String>,
    Json(req): Json<UpdatePtyRequest>,
)

Source from the content-addressed store, hash-verified

3428}
3429
3430async fn update_pty(
3431 Path(id): Path<String>,
3432 Json(req): Json<UpdatePtyRequest>,
3433) -> Result<Json<PtyInfo>> {
3434 let manager = get_pty_manager();
3435 let session = manager
3436 .update_session(&id, req.command.as_deref(), req.cwd.as_deref())
3437 .await
3438 .map_err(|e| ApiError::NotFound(e.to_string()))?;
3439 Ok(Json(PtyInfo::from(session)))
3440}
3441
3442async fn delete_pty(Path(id): Path<String>) -> Result<Json<bool>> {
3443 let manager = get_pty_manager();

Callers

nothing calls this directly

Calls 2

get_pty_managerFunction · 0.85
update_sessionMethod · 0.80

Tested by

no test coverage detected