feat(language): Allow including partial model in loadDocument when there is error#2522
feat(language): Allow including partial model in loadDocument when there is error#2522
Conversation
|
Claude finished @jiashengguo's task —— View job PR Review Complete ✅Todo List
Code Review FeedbackThis PR adds a new optional parameter ✅ Code Quality & Best Practices
✅ Potential Bugs & Issues
✅ Performance Considerations
✅ Security Concerns
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/language/src/document.ts`:
- Around line 117-123: The failure-return path is inconsistent: when
returnPartialModelForError is true you currently include
document.parseResult.value as Model in the first errors return block but omit it
in the later additionalErrors failure path; update the later error-return to
mirror the first by returning model: returnPartialModelForError ?
(document.parseResult.value as Model) : undefined (or equivalent) so callers
consistently receive the partial Model for both the initial errors branch and
the additionalErrors branch; look for the additionalErrors handling in this file
and add the same conditional model field to its returned object.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5e37f734-51cf-4d04-964e-f42764f38075
📒 Files selected for processing (1)
packages/language/src/document.ts
|
Claude finished @jiashengguo's task —— View job PR Code Review Complete ✅Todo List
Review SummaryThis PR adds an optional ✅ CodeRabbit Issue ResolutionFIXED: The inconsistency identified by CodeRabbit has been resolved! Both error return paths now correctly include the conditional model field:
✅ Code Quality & Best Practices
✅ Potential Bugs & Issues
✅ Performance Considerations
✅ Security Concerns
|
Summary by CodeRabbit