OCaml client library for Claude Code
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-claude: drop unit arg from Json.pp_value calls

+16 -17
+1 -1
lib/client.ml
··· 534 534 in 535 535 Log.info (fun m -> 536 536 m "Retrieved server info: %a" 537 - (Json.pp_value Control.Server_info.json ()) 537 + (Json.pp_value Control.Server_info.json) 538 538 server_info); 539 539 Server_info.of_control server_info 540 540
+1 -1
lib/content_block.ml
··· 138 138 ~tag_to_string:Fun.id ~tag_compare:String.compare 139 139 |> Object.seal 140 140 141 - let pp ppf t = Json.pp_value json () ppf t 141 + let pp ppf t = Json.pp_value json ppf t 142 142 let log_received t = Log.debug (fun m -> m "Received content block: %a" pp t) 143 143 let log_sending t = Log.debug (fun m -> m "Sending content block: %a" pp t)
+3 -4
lib/control.ml
··· 450 450 ~tag_to_string:Fun.id ~tag_compare:String.compare 451 451 |> Object.seal 452 452 453 - let pp ppf t = Json.pp_value json () ppf t 453 + let pp ppf t = Json.pp_value json ppf t 454 454 455 455 let log_request req = 456 - Log.debug (fun m -> 457 - m "control request: %a" (Json.pp_value Request.json ()) req) 456 + Log.debug (fun m -> m "control request: %a" (Json.pp_value Request.json) req) 458 457 459 458 let log_response resp = 460 459 Log.debug (fun m -> 461 - m "control response: %a" (Json.pp_value Response.json ()) resp) 460 + m "control response: %a" (Json.pp_value Response.json) resp) 462 461 463 462 (** Server information *) 464 463 module Server_info = struct
+5 -5
lib/control.mli
··· 174 174 (** [get_server_info ?unknown ()] creates a server info request. *) 175 175 176 176 val json : t Json.codec 177 - (** [json] is the json codec for requests. Use [Json.pp_value json ()] for 177 + (** [json] is the json codec for requests. Use [Json.pp_value json] for 178 178 pretty-printing. *) 179 179 end 180 180 ··· 260 260 structured error detail. *) 261 261 262 262 val json : t Json.codec 263 - (** [json] is the json codec for responses. Use [Json.pp_value json ()] for 263 + (** [json] is the json codec for responses. Use [Json.pp_value json] for 264 264 pretty-printing. *) 265 265 end 266 266 ··· 300 300 (** [response ~response ?unknown ()] creates a control response message. *) 301 301 302 302 val json : t Json.codec 303 - (** [json] is the json codec for control messages. Use [Json.pp_value json ()] 304 - for pretty-printing. *) 303 + (** [json] is the json codec for control messages. Use [Json.pp_value json] for 304 + pretty-printing. *) 305 305 306 306 val pp : Format.formatter -> t -> unit 307 307 (** [pp ppf t] pretty-prints the SDK control message. *) ··· 381 381 (** [unknown t] returns the unknown fields. *) 382 382 383 383 val json : t Json.codec 384 - (** [json] is the json codec for server info. Use [Json.pp_value json ()] for 384 + (** [json] is the json codec for server info. Use [Json.pp_value json] for 385 385 pretty-printing. *) 386 386 end
+1 -1
lib/incoming.ml
··· 87 87 ~tag_to_string:Fun.id ~tag_compare:String.compare 88 88 |> Object.seal 89 89 90 - let pp ppf t = Json.pp_value json () ppf t 90 + let pp ppf t = Json.pp_value json ppf t
+1 -1
lib/incoming.mli
··· 24 24 25 25 val json : t Json.codec 26 26 (** Codec for incoming messages. Uses the "type" field to discriminate. Use 27 - [Json.pp_value json ()] for pretty-printing. *) 27 + [Json.pp_value json] for pretty-printing. *) 28 28 29 29 val pp : Format.formatter -> t -> unit 30 30 (** [pp ppf t] pretty-prints the incoming message. *)
+1 -1
lib/message.ml
··· 429 429 430 430 let user_string s = User (User.of_string s) 431 431 let user_blocks blocks = User (User.of_blocks blocks) 432 - let pp ppf t = Json.pp_value json () ppf t 432 + let pp ppf t = Json.pp_value json ppf t 433 433 let log_received t = Log.info (fun m -> m "<- %a" pp t) 434 434 let log_sending t = Log.info (fun m -> m "-> %a" pp t)
+2 -2
lib/options.ml
··· 188 188 |> Object.keep_unknown Unknown.mems ~enc:unknown 189 189 |> Object.seal 190 190 191 - let pp ppf t = Json.pp_value json () ppf t 191 + let pp ppf t = Json.pp_value json ppf t 192 192 end 193 193 194 194 type t = { ··· 362 362 |> apply_opt t.output_format Wire.with_output_format 363 363 end 364 364 365 - let pp ppf t = Json.pp_value Wire.json () ppf (Advanced.to_wire t) 365 + let pp ppf t = Json.pp_value Wire.json ppf (Advanced.to_wire t)
+1 -1
lib/outgoing.ml
··· 60 60 ~tag_to_string:Fun.id ~tag_compare:String.compare 61 61 |> Object.seal 62 62 63 - let pp ppf t = Json.pp_value json () ppf t 63 + let pp ppf t = Json.pp_value json ppf t 64 64 let to_json t = Json.encode json t 65 65 66 66 let of_json v =