PtySessionOptions Type
Tuning for a `PtySession`: how much output a pattern may be matched against, whether the session keeps a transcript for diagnostics, and what `SendLineAsync` sends as the line ending. Both sizes are hard memory bounds in **characters**, so a long-lived session over a chatty child can never grow without limit; both bound by dropping the OLDEST text, since the tail is what the next pattern will match and what a failed session's diagnosis needs.
Record fields
| Record Field |
Description
|
Full Usage:
CaptureTranscript
Field type: bool
|
Keep a transcript of everything the child emits this session (`true`, the default) or keep none at all (`false`). Turn it OFF for a session that handles credentials: a terminal echoes typed input back into its own output stream by default, so a password sent through a PTY with `PtyConfig.Echo = true` would otherwise be recorded in `Transcript` — see `PtyConfig`'s secret-safety note.
|
|
What `SendLineAsync` appends to the text it sends (the default is `PtyLineEnding.Auto`).
|
Full Usage:
TranscriptChars
Field type: int
|
How many characters of transcript to retain when `CaptureTranscript` is on (must be positive; the default is 1048576). Once reached, the oldest text is dropped and `TranscriptTruncated` reports it.
|
Full Usage:
WindowChars
Field type: int
|
How many characters of not-yet-matched output the sliding match window holds (must be positive; the default is 65536). Output older than this is evicted, so a pattern that would need more context than the window holds simply cannot match — raise it for a child that emits a lot between prompts, lower it to cap memory harder.
|
Static members
| Static member |
Description
|
|
The default session tuning: a 65536-character match window, a transcript capped at 1048576 characters, and `PtyLineEnding.Auto`.
|
ProcessKit API Reference