feat: keep short context inline - #34
Conversation
c6c06a8 to
eb1d3eb
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb1d3ebb7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if currentInputFile.MinChars != 0 { | ||
| return ValidateIntRange("current_input_file.min_chars", currentInputFile.MinChars, 1, 100000000, true) | ||
| } | ||
| if currentInputFile.InlineMaxTokens != 0 { | ||
| return ValidateIntRange("current_input_file.inline_max_tokens", currentInputFile.InlineMaxTokens, 1, 100000000, true) |
There was a problem hiding this comment.
Validate both current_input_file fields before returning
ValidateCurrentInputFileConfig returns immediately when min_chars is non-zero, so the new inline_max_tokens check never runs in configs that set both fields. A config like {min_chars: 1, inline_max_tokens: -1} is therefore accepted by ValidateConfig, which allows an invalid threshold into runtime behavior. Please avoid early return here and validate min_chars and inline_max_tokens independently so both constraints are enforced when both keys are present.
Useful? React with 👍 / 👎.
Summary
Tests
Replacement for closed stacked PR #32 after its base branch was squash-merged.