feat(event): add reactive runtime event plumbing#28
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a ChangesLifecycle Event and Usage Key Standardization
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/assistant/lifecycle.go`:
- Around line 129-139: The new dispatchContextBuild, and its helper
contextBuildLifecyclePayload, are never called (dead code), so wire
runtime.dispatchContextBuild(...) into the context construction/execution path
where the active prompt and messages are assembled (the same place that
currently builds systemPrompt, messages []database.MessageEntity, sessionID, cwd
and usage before executing the prompt). Locate the routine that prepares the
prompt context (e.g., the method that constructs or executes the prompt for
Runtime), and after assembling sessionID, cwd, systemPrompt, messages and usage,
call runtime.dispatchContextBuild(ctx, sessionID, cwd, systemPrompt, messages,
usage) so the context_build lifecycle event is emitted; ensure you pass the same
values used for prompt execution and keep the existing runtime.dispatchLifecycle
usage intact (it will reuse dispatchContextBuild’s payload via
contextBuildLifecyclePayload).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fa7fad34-5f54-4919-9ee7-fdbafe4500d8
📒 Files selected for processing (4)
internal/assistant/client.gointernal/assistant/lifecycle.gointernal/assistant/runtime_lifecycle_test.gointernal/assistant/usage_events.go
191fc11 to
e853469
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 57.29% 57.36% +0.06%
==========================================
Files 160 160
Lines 15758 15782 +24
==========================================
+ Hits 9029 9053 +24
Misses 5767 5767
Partials 962 962
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Summary
Validation
Note: this is intended to stack after #23; GitButler would not attach the branch to the stack locally due to the current base segment state.