fix(convo): recognize camelCase filePath/fileName in the shared file-path extractor#129
Open
akesling wants to merge 1 commit into
Open
Conversation
|
🔍 Preview deployed: https://0481edfb.toolpath.pages.dev |
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.
Follow-up to #124 (stacked on it — base will auto-retarget to
mainwhen #124 merges).The gap
The shared
derive_pathfile-path extractor (toolpath-convo/src/derive.rs) probed only["file_path", "path", "filename", "file"]— no camelCase. A provider that leaves file-mutation synthesis to the shared derive (rather than pre-buildingTurn.file_mutations) therefore dropped aFileWritetool's artifact when its input used the camelCase convention. opencode's tool inputs usefilePath; it dodges the bug only because it pre-buildsfile_mutationsvia its owntool_input_file_pathhelper (which also carries snapshot diffs, so it stays). Any provider without that pre-build — or a future one — silently loses the file fromchange.The fix
Add the camelCase siblings of the fields already probed:
filePath(forfile_path) andfileName(forfilename). snake_case is probed first, so no existing input changes which field wins. One line inextract_file_path.Tests
TDD (both red before the fix): a
FileWritetool whose input has onlyfilePath/ onlyfileNamenow produces achangeentry (previously dropped). Existing snake_case and no-recognized-field tests unchanged. Full workspace build/test/clippy green.Scope notes
absolute_path/absolutePath(a distinct gemini-specific field) into the generic list — gemini already handles its own; that's a separate judgment.toolpath-convo0.11.3 (stacked on fix(convo): relativize file change keys against path.base #124's 0.11.2). No path-cli/toolpath-cli bump.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.