fix: reduce compact citation marker scaling (#118)#123
Conversation
📝 WalkthroughWalkthroughThe ChangesCompact Citation Instruction Simplification
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
plugin/src/claude_smart/context_format.py (1)
223-250: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick winRemove the dead
marker_partswork from compact rendering
render_inline_compact_with_registrystill buildsmarker_partsfor every entry and passes it into_compact_citation_instruction(), but that helper immediately discards the argument. Drop the list construction and the parameter so compact rendering no longer does per-entry link formatting that is never used.🤖 Prompt for 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. In `@plugin/src/claude_smart/context_format.py` around lines 223 - 250, The compact citation path in render_inline_compact_with_registry still builds marker_parts even though _compact_citation_instruction ignores it, so remove the per-entry link formatting work and stop passing that unused data through the call. Update the render_inline_compact_with_registry flow to only collect the rendered skill/preference items and adjust _compact_citation_instruction accordingly so its signature no longer accepts the discarded marker input.
🤖 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.
Outside diff comments:
In `@plugin/src/claude_smart/context_format.py`:
- Around line 223-250: The compact citation path in
render_inline_compact_with_registry still builds marker_parts even though
_compact_citation_instruction ignores it, so remove the per-entry link
formatting work and stop passing that unused data through the call. Update the
render_inline_compact_with_registry flow to only collect the rendered
skill/preference items and adjust _compact_citation_instruction accordingly so
its signature no longer accepts the discarded marker input.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b63e3ac8-44a0-4653-8fb5-68618291876e
📒 Files selected for processing (3)
plugin/src/claude_smart/context_format.pytests/test_context_format.pytests/test_events.py
Summary
Test Plan
uv run --project plugin pytest tests/test_context_format.py tests/test_events.py -qgit diff --checkFixes #118
Summary by CodeRabbit
Bug Fixes
Tests