LCORE-2310: Refactor source resolution utility#1850
Conversation
|
Warning Review limit reached
More reviews will be available in 12 minutes and 7 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
| for result in results: | ||
| resolved_source = _resolve_source_for_result(result, vs_ids, id_mapping) | ||
|
|
||
| # Handle both object and dict access |
There was a problem hiding this comment.
result is always an object
| Parameters: | ||
| ---------- | ||
| result: A file search result object with optional attributes. | ||
| attributes: A dictionary of attributes from a file search result. |
There was a problem hiding this comment.
Pass only attributes dict for more general usage. Pydantic uses native openai models while llama stack uses its own (mirrored) types.
Description
Refactors source resolution utility function to use only result attributes so that it is reusable for pydantic-based handler.
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing