IHex1bTerminalTokenWorkloadAdapter
Namespace: Hex1b
Assembly: Hex1b.dll
Optional extension interface for workloads that can supply pre-tokenized output.
csharp
public interface IHex1bTerminalTokenWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposableMethods
ReadOutputItemAsync(CancellationToken)
Read output FROM the workload, optionally including a pre-tokenized representation.
Parameters:
ct(CancellationToken): Cancellation token.
Returns: ValueTask<WorkloadOutputItem>
A workload output item containing bytes and optional tokens.
csharp
ValueTask<WorkloadOutputItem> ReadOutputItemAsync(CancellationToken ct = default)Remarks
Most workloads expose output as raw UTF-8 bytes via . Implement this interface when the workload already has an ANSI token stream available (or is willing to tokenize once) so can skip UTF-8 decoding and tokenization.
When is non-null, it should represent the same output as .