Commit Graph

31 Commits

Author SHA1 Message Date
Magnus Müller
e86182e11c feat(filesystem): add JSONL (JSON Lines) file support
Adds support for .jsonl file extension in the FileSystem class to enable
code-use mode to work with JSON Lines files (where each line is a valid
JSON object).

Changes:
- Added JsonlFile class implementing BaseFile interface
- Registered 'jsonl' extension in _file_types dictionary
- Updated external file reading to include .jsonl files
- Added state restoration support for JsonlFile
- Added comprehensive test coverage for JSONL file operations

Fixes issue where code agent rejected filenames like 'WebVoyager_data.jsonl'
with error "Invalid filename format. Must be alphanumeric with supported
extension."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 10:07:07 -07:00
Magnus Müller
301fab0726 Reduce tokens for extract 2025-10-12 13:08:44 -07:00
mertunsall
3c41727b55 track session pdf urls and redownload if URL changes or if the file was left from previous session.
dispatch navigation complete even when switching tabs. this ensure auto pdf downloads work

increase max pdf pages to 20 so that it works better :)
2025-09-23 02:54:25 +02:00
Louis
f89d497fd1 style: Run pre-commit --all-files to fix formatting
Addressed @pirate's feedback to fix lint errors by running pre-commit.
This reformatted 242 files across the codebase for consistency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 20:04:51 +02:00
Louis
26628d96c6 Fix #2610: Replace markdown-pdf with reportlab to resolve AGPL license conflict
The markdown-pdf dependency had a transitive dependency on pymupdf (AGPL-3.0),
which conflicts with browser-use's MIT license and could require commercial
users to open-source their entire application.

This change:
- Replaces markdown-pdf==1.5 with reportlab>=4.0.0 (BSD licensed)
- Updates PdfFile.sync_to_disk_sync() to use reportlab for PDF generation
- Maintains the same API surface with no breaking changes
- Supports basic markdown formatting (headers, paragraphs)
- All existing tests continue to pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 19:44:00 +02:00
mertunsall
4f18bf8cc8 catch small issue 2025-07-11 18:14:03 +02:00
mertunsall
d1f532b45d - remove append_file and instead merge it into write_file
- new replace_file_str
- add trailing new lines and leading_newline parameters to writing into file for robustness
- adapt system prompts accordingly
2025-07-11 17:58:01 +02:00
mertunsall
709569e3ab pdf file creation supported. 2025-07-09 13:02:15 +02:00
mertunsall
e951c4fe98 increase max pdf length to 10 pages 2025-07-08 11:25:54 +02:00
mertunsall
304b065d59 more security 2025-07-05 02:07:11 +02:00
mertunsall
f3e1a59642 improve 2025-07-05 01:51:00 +02:00
mertunsall
550a2a2552 feat: enhance file handling capabilities with JSON and CSV support
- Added new file types: JsonFile and CsvFile to the file system.
- Updated read_file method to handle external files with .json and .csv extensions.
- Modified write_file action to allow .json and .csv file extensions in addition to .md and .txt.
- Introduced pypdf dependency for PDF file handling.

This update improves the flexibility of file operations within the application.
2025-07-05 01:36:04 +02:00
mertunsall
35120fc253 dont use fs for short tasks, dont initialize results.md 2025-07-01 10:29:11 +02:00
mertunsall
c7ef21535e fix more 2025-06-26 01:12:27 +02:00
mertunsall
c717271f50 fix linter 2025-06-26 01:06:55 +02:00
mertunsall
47b2b7f2fa fix more 2025-06-26 01:02:50 +02:00
mertunsall
1b7cc0abd5 fix more 2025-06-26 00:55:49 +02:00
mertunsall
17ac82e655 fix 2025-06-26 00:54:58 +02:00
mertunsall
6b4953e922 rewrite file system 2025-06-26 00:41:56 +02:00
mertunsall
58c25af1a1 Implement data directory cleanup in FileSystem class
- Added functionality to remove existing data directory before creating a new one, ensuring a clean state for operations.
- Introduced `shutil` for directory removal.
2025-06-25 16:26:05 +02:00
mertunsall
b2b95b086a tell allowed extensions to the model 2025-06-25 09:33:42 +02:00
mertunsall
adb73b9d30 more fixes and simplify 2025-06-24 23:22:09 +02:00
mertunsall
fa60e747d9 mr cloudrunner 2025-06-24 23:02:08 +02:00
mertunsall
ce61e4e2f8 hotfix 2025-06-23 14:19:01 +02:00
mertunsall
fde5e09c6a improve file system descriptions and memory 2025-06-23 13:54:28 +02:00
mertunsall
bbc8d26f63 - Updated ActionResult to include an attachments field for displaying files in the done message.
- Enhanced logging in the Agent class to inform users about available attachments after task completion.
- Revised system prompt guidelines to clarify the use of text and files_to_display in the done action.
2025-06-18 14:24:27 +02:00
Magnus Müller
0871e4cf28 Refactor file appending logic in file_system.py to use a dedicated function for writing content, improving readability and maintainability. Enhanced error handling to include exception messages for better debugging. 2025-06-09 21:03:26 +02:00
mertunsall
1e549d72f3 now the model can display files to the users 2025-06-03 18:07:47 +02:00
Magnus Müller
f75d3e0fac Refactor file appending logic in FileSystem class to improve performance and readability by using a dedicated function for file operations. 2025-06-02 15:16:12 +02:00
mertunsall
60ce87e2c0 address concerns with hanging stuff 2025-06-01 12:22:55 +02:00
mertunsall
bcdc522ade Nuke it all 2025-05-31 17:30:21 +02:00