Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNonZeroExitCode = xerrors.New("non-zero exit code")
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func StartProcess ¶
func StartProcess(ctx context.Context, args StartProcessConfig) (*Process, error)
func (*Process) Close ¶
Close closes the process using a SIGINT signal or forcefully killing it if the process does not exit after the timeout. It then closes the pseudo terminal.
func (*Process) ReadScreen ¶
ReadScreen returns the contents of the terminal window. It waits for the terminal to be stable for 16ms before returning, or 48 ms since it's called, whichever is sooner.
This logic acts as a kind of vsync. Agents regularly redraw parts of the screen. If we naively snapshotted the screen, we'd often capture it while it's being updated. This would result in a malformed agent message being returned to the user.
Click to show internal directories.
Click to hide internal directories.