mirror of
https://github.com/coder/coder.git
synced 2026-06-05 22:18:20 +00:00
398e80f003
# Add timeout support to workspace bash tool This PR adds a timeout feature to the workspace bash tool, allowing users to specify a maximum execution time for commands. Key changes include: - Added a `timeout_ms` parameter to control command execution time (defaults to 60 seconds, with a maximum of 5 minutes) - Implemented a new `executeCommandWithTimeout` function that properly handles command timeouts - Added proper output capturing during timeout scenarios, returning all output collected before the timeout - Updated documentation to explain the timeout feature and provide usage examples - Added comprehensive tests for the timeout functionality, including integration tests When a command times out, the tool now returns all captured output up to that point along with a cancellation message, making it clear to users what happened. Signed-off-by: Thomas Kosiewski <tk@coder.com>