docs: expand JSDoc for onSessionTranscriptUpdate params and return

This commit is contained in:
SciFantastic 2026-02-17 17:02:54 -06:00 committed by Peter Steinberger
parent 2365c6c86a
commit bab5d994bc
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ const SESSION_TRANSCRIPT_LISTENERS = new Set<SessionTranscriptListener>();
* Register a listener for session transcript updates.
* Returns an unsubscribe function. Listeners are guarded with try/catch
* so a throwing subscriber cannot prevent other listeners from firing.
*
* @param listener - Callback invoked with the updated session file path.
* @returns Unsubscribe function; call it to remove the listener.
*/
export function onSessionTranscriptUpdate(listener: SessionTranscriptListener): () => void {
SESSION_TRANSCRIPT_LISTENERS.add(listener);