mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-25 17:15:04 +02:00
fix: improve error handling and logging in summary and transcript processing
- Enhanced error handling in summary generation by using fallback messages for missing assistant messages. - Updated the `buildSummaryPrompt` function to streamline the retrieval of the last assistant message. - Improved the `extractLastMessage` function to log errors when transcript files are missing or empty, and to ensure proper handling of messages without content. - Added checks to ensure that messages of the specified role are found in the transcript, with appropriate logging for missing messages. - Refactored the logging mechanism to provide clearer insights into processing failures and successes.
This commit is contained in:
@@ -781,7 +781,7 @@ MEMORY PROCESSING START
|
||||
Write progress notes of what was done, what was learned, and what's next. This is a checkpoint to capture progress so far. The session is ongoing - you may receive more requests and tool executions after this summary. Write "next_steps" as the current trajectory of work (what's actively being worked on or coming up next), not as post-session future work. Always write at least a minimal summary explaining current progress, even if work is still in early stages, so that users see a summary output tied to each request.
|
||||
|
||||
Claude's Full Response to User:
|
||||
${vr("Missing last_assistant_message in session for summary prompt",a,a.last_assistant_message||"")}
|
||||
${a.last_assistant_message||vr("Missing last_assistant_message in session for summary prompt",a,"")}
|
||||
|
||||
Respond in this XML format:
|
||||
<summary>
|
||||
|
||||
Reference in New Issue
Block a user