Expand description
User ! commands: run in the shell, stream sanitized output, keep the tail.
Port of packages/coding-agent/src/core/bash-executor.ts in pi v1.0.0.
Structs§
- Bash
Result - What a user
!command produced: thebashresponse data.
Functions§
- execute
- Runs
commandincwdwith the configured shell, callingon_chunkwith each sanitized piece of output, until it exits orcancelfires. - execute_
with - pi’s
executeBashWithOperations: runs a command throughexec, which sends its output to the sender it gets and returns the exit code, and collects the output asexecutedoes. A run that fails or ends aftercancelfired is cancelled. - sanitize_
binary - pi’s
sanitizeBinaryOutput: drops control characters other than tab, newline and carriage return, and Unicode interlinear annotations. - strip_
ansi - pi’s
stripAnsi: removes OSC (operating system command) and CSI (control sequence introducer) sequences.