(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*) (* Kitty Graphics Protocol Detection - Implementation *) let make_query () = let cmd = Kgp_command.query ~format:`Rgb24 ~transmission:`Direct ~width:1 ~height:1 () in Kgp_command.to_string cmd ~data:"\x00\x00\x00" let supports_graphics response ~da1_received = response |> Option.map Kgp_response.is_ok |> Option.value ~default:(not da1_received)