My agentic slop goes here. Not intended for anyone else!

json

Changed files
+30 -12
stack
river
+30 -12
stack/river/bin/river_cli.ml
···
(* Use user's full name for all entries *)
let author_name = user.fullname in
let content_len = get_content_length entry in
-
Fmt.pr "%a %a %a %a %a %a %a %a@."
+
let entry_id = Uri.to_string entry.id in
+
(* Shorten ID for display if it's too long *)
+
let display_id =
+
if String.length entry_id > 40 then
+
String.sub entry_id 0 37 ^ "..."
+
else
+
entry_id
+
in
+
Fmt.pr "%a %a@."
Fmt.(styled `Cyan string) (Printf.sprintf "[%d]" (i + 1))
-
Fmt.(styled (`Fg `Blue) string) (format_text_construct entry.title)
-
Fmt.(styled `Faint string) "-"
+
Fmt.(styled (`Fg `Blue) string) (format_text_construct entry.title);
+
Fmt.pr " %a %a@."
+
Fmt.(styled `Faint string) "ID:"
+
Fmt.(styled `Faint string) display_id;
+
Fmt.pr " %a - %a - %a chars@."
Fmt.(styled `Green string) author_name
-
Fmt.(styled `Faint string) "-"
Fmt.(styled `Magenta string) (format_date entry.updated)
-
Fmt.(styled `Faint string) "-"
-
Fmt.(styled `Yellow string) (Printf.sprintf "%d chars" content_len)
+
Fmt.(styled `Yellow string) (string_of_int content_len)
) to_show;
0
end)
···
String.trim author.name
in
let content_len = get_content_length entry in
-
Fmt.pr "%a %a %a %a %a %a %a %a@."
+
let entry_id = Uri.to_string entry.id in
+
(* Shorten ID for display if it's too long *)
+
let display_id =
+
if String.length entry_id > 40 then
+
String.sub entry_id 0 37 ^ "..."
+
else
+
entry_id
+
in
+
Fmt.pr "%a %a@."
Fmt.(styled `Cyan string) (Printf.sprintf "[%d]" (i + 1))
-
Fmt.(styled (`Fg `Blue) string) (format_text_construct entry.title)
-
Fmt.(styled `Faint string) "-"
+
Fmt.(styled (`Fg `Blue) string) (format_text_construct entry.title);
+
Fmt.pr " %a %a@."
+
Fmt.(styled `Faint string) "ID:"
+
Fmt.(styled `Faint string) display_id;
+
Fmt.pr " %a - %a - %a chars@."
Fmt.(styled `Green string) author_name
-
Fmt.(styled `Faint string) "-"
Fmt.(styled `Magenta string) (format_date entry.updated)
-
Fmt.(styled `Faint string) "-"
-
Fmt.(styled `Yellow string) (Printf.sprintf "%d chars" content_len)
+
Fmt.(styled `Yellow string) (string_of_int content_len)
) to_show;
0
end