refactor: rename inspect to replay across the codebase

Renames inspect-ui/ to replay-ui/, internal/inspect/ to internal/replay/,
the CLI subcommand from `sanderling inspect` to `sanderling replay`, and
updates all references in docs, Makefile, README, and Go comments.
This commit is contained in:
pj committed 2026-06-03 16:16:37 +05:30
1 parent a6f43e15b2
commit 4f381841dd
71 files changed
+92 -90

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { useEffect } from "react";
export function useSse(eventName: string, onEvent: () => void) {
useEffect(() => {
if (typeof EventSource === "undefined") {
return;
}
const source = new EventSource("/api/events");
const messageHandler = () => {
onEvent();
};
source.addEventListener(eventName, messageHandler);
return () => {
source.removeEventListener(eventName, messageHandler);
source.close();
};
}, [eventName, onEvent]);
}