Commit Graph

26 Commits

Author SHA1 Message Date
Laith Weinberger 8ebe4385ed fix: preserve non-ASCII chars in all remaining JSON file outputs 2026-03-01 14:19:38 -05:00
Laith Weinberger e239d1f523 fix: remove redundant local tempfile imports
tempfile is already imported at module level (line 3). The local
imports inside set_default_downloads_path() and _extract_extension()
were shadowing the module-level import with no effect.

Refs: browser-use/browser-use#4242
2026-03-01 11:44:20 -05:00
Magnus Müller aac5cad62a Fix system prompt code use 2026-01-10 20:00:18 -08:00
Mert Unsal a742645416 Revert "Improve demo mode" 2025-11-29 13:09:20 -08:00
Mert Unsal 7851657ded Merge branch 'main' into kalil0321/codeagent-api-improv 2025-11-26 13:18:06 -08:00
Mert Unsal 81fe5c0573 Merge branch 'main' into kalil0321/demo-mode 2025-11-26 10:28:04 -08:00
Cursor Agent e9cd88e6a5 Refactor page boundary indicators in prompts and formatting
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-11-24 22:10:08 +00:00
kalil0321 ebc74b75ca Don't log summaries 2025-11-18 13:25:05 +01:00
kalil0321 55493cbdda Add demo mode logging for LLM calls and output previews 2025-11-08 22:43:46 +01:00
kalil0321 3f64178894 Implement demo mode for in-browser logging 2025-11-08 21:39:57 +01:00
kalil0321 24508d69f5 Merge branch 'main' into kalil0321/codeagent-api-improv 2025-11-07 02:12:48 +01:00
mertunsall 67d2f12665 default to PNG everywhere 2025-11-06 14:51:52 -08:00
Magnus Müller 821472ba0b Update CodeAgent to use CodeAgentTools and add custom pricing for new models
- Refactored CodeAgent to utilize CodeAgentTools instead of the generic Tools class for enhanced functionality.
- Introduced custom pricing for 'bu-latest' and 'smart' models, specifying input and output costs per token, along with cache read costs.

This update improves the agent's tool capabilities and introduces new pricing structures for better cost management.
2025-11-02 21:32:53 -08:00
kalil0321 9fe82f083d Add CodeAgentHistoryList for improved history management 2025-11-01 23:45:18 +01:00
kalil0321 dcb3f8e2c6 Format 2025-10-24 16:03:26 +02:00
kalil0321 b569473631 Code use exports now include JavaScript code blocks 2025-10-24 16:02:33 +02:00
Magnus Müller 4ac49de9cf fix(code-use): prevent done() execution inside conditional blocks
Previously, done() calls inside if/else/elif blocks would only show a warning
but still execute, potentially causing tasks to never complete if the condition
wasn't met. This changes the behavior to raise a RuntimeError, forcing the LLM
to restructure code properly.

The proper pattern is:
```python
# Validate and set result variables
if condition:
    result = "success"
else:
    result = "failure"

# Then call done() unconditionally
await done(result, success=True)
```

Changes:
- Upgraded warning to RuntimeError in namespace.py
- Added comprehensive test suite with 5 test cases
- Tests cover if/else/elif blocks and verify standalone done() still works

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 10:03:10 -07:00
Magnus Müller 035617e228 llm_response 2025-10-21 23:40:51 -07:00
Magnus Müller 32999fc570 More robust check for is wrapped => 2025-10-21 21:25:51 -07:00
Magnus Müller c222780712 'source': cell.source.split('\n'), 2025-10-21 20:08:55 -07:00
Magnus Müller 1535bb1aa5 Typo 2025-10-21 20:05:42 -07:00
Magnus Müller 1f35dc3c84 Linter 2025-10-21 20:03:01 -07:00
Magnus Müller 0fd93c6c97 Linter 2025-10-21 20:02:50 -07:00
Magnus Müller 345aea6d10 Allow other llms 2025-10-21 19:47:16 -07:00
Magnus Müller c0a11ae41a Increase max_failures parameter from 3 to 8 in CodeAgent to allow for more consecutive errors before termination. 2025-10-21 19:03:40 -07:00
Magnus Müller 9caa248316 Merge code7 branch changes 2025-10-21 18:55:54 -07:00