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

json

Changed files
+5 -11
stack
+3 -2
stack/river/bin/river_cli.ml
···
let info_cmd =
let doc = "Display detailed information about a post by ID" in
let id_arg =
-
let doc = "Post ID or partial ID to search for" in
+
let doc = "Exact post ID to display" in
Arg.(required & pos 0 (some string) None & info [] ~docv:"ID" ~doc)
in
let verbose_flag =
···
match River_store.find_entry_by_id store ~id with
| None ->
Fmt.pr "%a@." Fmt.(styled `Red string) (Printf.sprintf "No post found with ID: %s" id);
+
Fmt.pr "%a@." Fmt.(styled `Faint string) "Hint: Use 'river-cli list' to see available posts and their IDs";
1
| Some entry ->
(* Print header *)
Fmt.pr "@.";
Fmt.pr "%a@." Fmt.(styled `Bold string)
(String.make 70 '=');
-
Fmt.pr " %a@." Fmt.(styled `Bold (styled (`Fg `Blue) string)) entry.title;
+
Fmt.pr " %a@." Fmt.(styled `Bold (styled (`Fg `Blue) string)) entry.River_store.title;
Fmt.pr "%a@.@." Fmt.(styled `Bold string)
(String.make 70 '=');
+2 -9
stack/river/lib/river_store.ml
···
let json_str = Eio.Buf_read.(parse_exn take_all) source ~max_size:Int.max_int in
let json = Yojson.Safe.from_string json_str in
let entry = entry_of_json json in
-
(* Check if atom_id matches exactly or contains the search id *)
-
let contains_substring s substr =
-
try
-
let _ = Str.search_forward (Str.regexp_string substr) s 0 in
-
true
-
with Not_found -> false
-
in
-
if entry.atom_id = id || String.starts_with ~prefix:id entry.atom_id ||
-
contains_substring entry.atom_id id then
+
(* Exact ID match only *)
+
if entry.atom_id = id then
Some entry
else
None