Repository navigation
feat(events): Emit event when title generation is finished - #788
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughAdds optional event emitter parameter threading through conversation memory factory and initializer, enabling RedisConversationMemoryManager to emit a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/lib/core/redisConversationMemoryManager.ts`:
- Around line 410-417: The success path emits "conversation:titleGenerated" via
this.eventEmitter.emit but the catch/error path doesn't notify listeners; update
the error handling in the title-generation flow (the block around
this.eventEmitter.emit in redisConversationMemoryManager.ts) to also emit a
failure event (e.g., "conversation:titleGenerationFailed") when title creation
throws, including the same identifiers (sessionId, normalizedUserId/userId), the
error (or error.message), and a timestamp, and guard the emit with the existing
this.eventEmitter check so listeners receive a clear failure signal.
In `@src/lib/types/common.ts`:
- Around line 190-192: The public event map currently exports only the success
event "conversation:titleGenerated"; add the missing failure event
"conversation:titleGenerationFailed" to the same map in the types declaration so
consumers can type and discover the failure case. Locate the event map
definition (where "conversation:titleGenerated" is declared) and add an entry
for "conversation:titleGenerationFailed": unknown (matching the shape used for
other events), update any exported types that derive from this map if necessary
so the new key is included in the public type union.
0d4d0b8 to
0418e24
Compare
|
@Yaswanth-2874 this is a good feature that is required for everybody. I need you to update all the relevant documentation. Add one line in the readme.md in the current quarters feature release like we add for every feature release. Also update the feature document with details of how to access the document needs to be updated with all of the new features that we release. |
32f20d5 to
00483ef
Compare
00483ef to
4d192ad
Compare
|
🎉 This PR is included in version 8.40.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request
Description
What does this PR do?
Adds event emission for conversation title generation in the RedisConversationMemoryManager. When a conversation title is generated (or fails to generate), an event is emitted via the NeuroLink event emitter, enabling real-time monitoring and integration.
Related Issues
Does this PR close any issues?
Relates to: feature request for event-driven updates on conversation metadata.
Type of Change
Motivation and Context
Why is this change needed? What problem does it solve?
Changes Made
NeuroLinkEvents:conversation:titleGeneratedRedisConversationMemoryManagerto accept an event emitter.conversation:titleGeneratedon successful title generationBreaking Changes
Testing
How has this been tested?
neurolink.getEventEmitter().Manual Testing Steps
conversation:titleGenerated.Code Quality
Documentation
Commit Message Format
feat(conversation): emit events for title generationDependencies
Performance Impact
Security Considerations
Deployment Notes
Screenshots / Videos
N/A
Reviewer Checklist
Additional Notes
This PR enables event-driven workflows for conversation metadata, making it easier to build reactive UIs and integrations.
Pre-submission Checklist
pnpm testpnpm buildpnpm run validate:alland all checks passSummary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.