Add example to read_file tool definition - #4526
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 398598f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
chrarnoldus
marked this pull request as ready for review
December 19, 2025 23:03
Contributor
There was a problem hiding this comment.
✅ No Issues Found
2 files reviewed | Confidence: 90% | Recommendation: Merge
Review Details
Files:
.changeset/hungry-lands-sin.md- Standard changeset filesrc/core/prompts/tools/native-tools/read_file.ts- Addsexamplesproperty to JSON Schema
Checked: Security, bugs, code quality, JSON Schema validity
Analysis:
- The
examplesproperty is a valid JSON Schema keyword that helps models understand expected input format - The example correctly adapts based on
partialReadsEnabledflag - The conditional
line_ranges: undefinedwill be omitted during JSON serialization, which is the correct behavior - Code follows existing patterns in the codebase
Minor Note: When partialReadsEnabled is false, the example includes line_ranges: undefined. This works correctly because undefined properties are omitted during JSON serialization, but an alternative approach would be to conditionally include the property only when needed. This is a stylistic preference and not a bug.
RSO
approved these changes
Dec 22, 2025
This was referenced Dec 22, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://us.posthog.com/project/141915/insights/TvhPfI2E
https://kilo-code.slack.com/archives/C08HC5A2EDT/p1765889369174699