-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(tools): add support for reading PDF, DOCX, and IPYNB files in read_file tool #4288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/core/tools/readFileTool.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User‐facing text is hardcoded (e.g. 'Binary file') when blocking unsupported binary files. Use the translation function t(...) so that the UI messages can be localized.
| notice: "Binary file", | |
| notice: t("tools:readFile.binaryFile"), |
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
|
This PR fixes a regression:
This PR adds another check for supported extensions, however Looks good to me. |
8389e00 to
f24cac3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks good to me if it still looks good to @daniel-lxs (er... once tests pass)
Yeah, we do have the same check twice (once in |
…ad_file tool - Allow specific binary formats (.pdf, .docx, .ipynb) to be processed by extractTextFromFile - Block unsupported binary files with existing "Binary file" notice - Update tests to cover both supported and unsupported binary file scenarios - Refactor test mocks for better maintainability and coverage
f24cac3 to
b564634
Compare
|
@mrubens @daniel-lxs tests passed now haha 😆 |
…ad_file tool (RooCodeInc#4288) - Allow specific binary formats (.pdf, .docx, .ipynb) to be processed by extractTextFromFile - Block unsupported binary files with existing "Binary file" notice - Update tests to cover both supported and unsupported binary file scenarios - Refactor test mocks for better maintainability and coverage
Related GitHub Issue
Closes: #4287
Description
Test Procedure
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Add support for reading
.pdf,.docx, and.ipynbfiles inreadFileTool, updating tests accordingly.readFileToolinreadFileTool.tsnow supports reading.pdf,.docx, and.ipynbfiles usingextractTextFromFile.readFileTool.test.tsto cover supported and unsupported binary file scenarios.This description was created by
for 8389e00d0942b1fbf0c4d84ed723fae7df53c25b. You can customize this summary. It will automatically update as commits are pushed.