Commit Graph

9 Commits

Author SHA1 Message Date
Adrià Arrufat
ee2964fb0f agent.spinner: handle thread spawn failure 2026-05-13 10:15:33 +02:00
Adrià Arrufat
bfe9f98fb7 agent: unify REPL result and error formatting 2026-05-12 12:22:17 +02:00
Adrià Arrufat
11fb6a3f6e agent: improve slash command parsing and spinner logic
- Use `SlashCommand.splitNameRest` for cleaner command handling.
- Centralize `max_hint_slots` constant and add assertions.
- Refactor `Spinner` thread management and rendering code.
2026-05-12 11:58:24 +02:00
Adrià Arrufat
dd5e4ad43f agent: add spinner for manual REPL commands 2026-05-12 11:52:02 +02:00
Adrià Arrufat
13fc1ee044 refactor: optimize agent tool handling and browser helpers
- Omit tool definitions when tool_choice is none to reduce request size.
- Skip tool argument stringification in low-verbosity modes.
- Optimize capToolOutput to avoid large memory copies during truncation.
- Introduce requireFrame and renderJson helpers in browser tools.
- Use a pre-computed tool names array for faster lookups.
2026-05-12 09:59:26 +02:00
Adrià Arrufat
1a84f56160 refactor: relocate PandaScript and improve agent reliability
Moves script logic to `browser/script/` for shared use. Implements
message rollback on API failure, caches environment variables, and
fixes a potential panic in the spinner.

- Relocate Command, Recorder, and Verifier to `src/browser/script/`
- Implement message rollback on API and synthesis failures in Agent
- Cache `LP_*` environment variables process-wide with mutex protection
- Fix potential panic in Spinner during backward clock jumps
- Improve Recorder to handle write failures and multi-line comments
- Update documentation regarding attachments and path safety
2026-05-11 19:49:15 +02:00
Adrià Arrufat
2b4e69b517 refactor: improve recorder and spinner state management
Moves recording state into Recorder and uses a tagged union for Spinner
state. Introduces TurnInput to simplify Agent turn processing.
2026-05-09 18:05:52 +02:00
Adrià Arrufat
372c0a12a2 agent: simplify logic and cleanup comments 2026-05-08 08:23:19 +02:00
Adrià Arrufat
c6ccd83ac4 mcp: add pandascript recording and self-healing tools
Adds tools to record sessions and heal scripts over MCP. Refactors
shared logic to `script.zig` and adds a TTY spinner for the agent.
2026-05-07 20:11:40 +02:00