Files
ECC/scripts
Affaan MustafaandAffaan Mustafa 35c7681d47 refactor(hooks): break up session-end summary and main flow
extractSessionSummary did user-message filtering and two kinds of tool_use collection in one loop body six blocks deep. The per-entry work now lives in userMessageText, recordToolUse and collectEntry. main() is down to the sequence of steps: resolveTranscriptPath, sessionShortId, maybeGenerateLlmSummary, then updateSessionFile or createSessionFile, with the shared footer and empty-session template as constants.

Call order, log lines, file names and the written markdown are unchanged, including the exact summary block replacement and the migration path for files without markers.
2026-10-19 22:03:57 -04:00
..