Commit Graph

21 Commits

Author SHA1 Message Date
Olcan
0c5673875b improve shell tool output when cancelled in debug mode (#571) 2025-05-27 13:47:40 -07:00
Brandon Keiji
4e3ba687a6 fix: forward entire tool call confirmation object through useToolScheduler (#481) 2025-05-22 06:00:36 +00:00
Olcan
2ad666a484 switch to spawn for shell mode (#467) 2025-05-21 09:31:13 -07:00
Olcan
c9de822930 fix exit code for shell tool (#465) 2025-05-21 08:51:22 -07:00
Olcan
e1e59bf0cd fix SIGPIPE and race condition causing dropping of final output ( "command not found" error) on cloudtops (#429) 2025-05-19 13:16:11 -07:00
Taylor Mullen
3aaeb44739 fix(shell): Improve error reporting for shell command failures
This commit enhances the  tool to provide more informative feedback to the user when a shell command fails, especially in non-debug mode.

Previously, if a command terminated due to a signal (e.g., SIGPIPE during a  with no upstream) or failed without producing stdout/stderr, the user would see no output, making it difficult to diagnose the issue.

Changes:
- Modified  to update the  logic.
- If a command produces no direct output but results in an error, signal, non-zero exit code, or user cancellation, a concise message indicating this outcome is now shown in .
- Utilized the existing  utility from  for consistent error message formatting, which also resolved previous TypeScript type inference issues.

This ensures users receive clearer feedback on command execution status, improving the tool's usability and aiding in troubleshooting.

Fixes https://b.corp.google.com/issues/417998119
2025-05-18 00:25:53 -07:00
Taylor Mullen
6b518dc9e4 Enable tools to cancel active execution.
- Plumbed abort signals through to tools
- Updated the shell tool to properly cancel active requests by killing the entire child process tree of the underlying shell process and then report that the shell itself was canceled.

Fixes https://b.corp.google.com/issues/416829935
2025-05-10 00:21:09 -07:00
Olcan
3b025883b6 fix json import warning (#291) 2025-05-08 14:14:09 -07:00
Olcan
5344853344 drop restriction on whitespace in bash commands (#272) 2025-05-06 23:38:36 -07:00
Olcan
e26c436d5c use temp file instead of footer to allow arbitrary chunking of streams and arbitrary interleaving with output from background processes (#267) 2025-05-06 10:44:40 -07:00
Jacob Richman
539ab947a4 Use parameter properties where possible. (#242) 2025-05-02 09:31:18 -07:00
Olcan
68a3020044 simplify directory display in shell tool description (#230) 2025-04-30 12:27:56 -07:00
Olcan
c1b23c008a do not prepend ./ to absolute paths or . (#220) 2025-04-29 22:31:46 +00:00
Olcan
57ceadb7d8 switch to shell tool, deprecating terminal (#203)
* switch to shell tool, deprecating terminal

* Merge remote-tracking branch 'origin/main' into deprecate_terminal
2025-04-28 15:05:36 -07:00
Olcan
6703b37a93 do not prepend ./ unless missing (#200)
* do not prepend ./ unless missing

* Merge remote-tracking branch 'origin/main' into dir_prefix_fix
2025-04-28 11:07:11 -07:00
Olcan
491a9da80b rename dev image with -dev suffix (#195) 2025-04-28 08:52:18 -07:00
Olcan
a8f679ccb5 shell tool tweaks (#194) 2025-04-28 08:17:52 -07:00
Olcan
6d32405d74 minimal shell tool (#191) 2025-04-27 18:57:10 -07:00
Olcan
7087c0508e more consistent confirmations, TODO to improve write confirmations, drop "description" from execution confirmation, add confirmation to new (still dummy) shell tool (#176) 2025-04-25 14:05:58 -07:00
Olcan
08463e6114 enable json imports (#165)
* enable json imports

* Merge remote-tracking branch 'origin/main' into enable_json_imports
2025-04-24 18:30:19 -07:00
Olcan
cbba8007b2 shell bones (#160)
* shell bones

* Merge remote-tracking branch 'origin/main' into shell_bones

* add line break

* another line break

* drop the log to avoid breaking terminals

* rename tool to be consistent with terminal

* fix build
2025-04-24 18:03:33 -07:00