diff --git a/packages/cli-rs/crates/drive/src/protocol.rs b/packages/cli-rs/crates/drive/src/protocol.rs index 9486609562b..028dac1a071 100644 --- a/packages/cli-rs/crates/drive/src/protocol.rs +++ b/packages/cli-rs/crates/drive/src/protocol.rs @@ -158,7 +158,8 @@ pub enum Role { Backend, } -/// `Handshake.dispatch` for the `ui` role, after the checks `Handshake.Params` makes while decoding. +/// `Handshake.dispatch` for the `ui` role, after the checks `Handshake.Params` makes while decoding. An empty +/// `version` reports `unknown`, as `SimulationServer.start` defaults it: the schema takes no empty string. pub fn handshake(params: &HandshakeParams, version: &str) -> Result { check(params)?; if params.expected_role != Role::Ui { @@ -179,7 +180,7 @@ pub fn handshake(params: &HandshakeParams, version: &str) -> Result opentui:: // Nothing draws over stderr without a terminal, and the driver reads the endpoint line from it. app: AppOptions { capture_stderr: false, ..options }, })?; - let version = - Some(launch.args.version.clone()).filter(|version| !version.is_empty()).unwrap_or_else(|| "unknown".into()); + let version = launch.args.version.clone(); crate::app::run_on(app, launch, |tui| { let server = start(tui, manifest.ui_addr(), version)?; eprintln!("opencode drive ui websocket: {}", server.url());