1
0
Fork 0
mirror of https://github.com/imjasonh/cnotes synced 2026-07-10 18:03:41 +00:00

Add small delay to ensure transcript is written before parsing

- Add 100ms delay before reading transcript
- Ensures user prompts are captured even if transcript writing is async
- Should fix issue where user prompts weren't appearing in git notes
This commit is contained in:
Jason Hall 2025-07-21 14:03:30 -04:00
parent f7482327c3
commit def9a335f2
Failed to extract signature

View file

@ -145,6 +145,9 @@ func processGitCommit(ctx context.Context, input HookInput, bashInput BashToolIn
// Get the timestamp of the previous commit in this session
previousCommitTime := getLastCommitTimeForSession(ctx, notesManager, input.SessionID)
// Small delay to ensure transcript is written
time.Sleep(100 * time.Millisecond)
// Extract conversation context since the last commit
contextExtractor := conv.NewContextExtractor()
conversationContext, err := contextExtractor.ExtractContextSince(input.TranscriptPath, input.SessionID, previousCommitTime)