import { Event } from "../../../../base/common/event.js"; import { Disposable } from "../../../../base/common/lifecycle.js"; import { URI } from "../../../../base/common/uri.js"; import { IAgentConnection } from "../../../../platform/agentHost/common/agentService.js"; import type { IChatTerminalOutputPosition, IChatTerminalOutputSource } from "./terminal.js"; /** * Read-only view of an AHP output channel. Unlike {@link AgentHostPty}, this * does not create a terminal process or an {@code ITerminalInstance}; chat * renders the retained plain-text output in its own detached xterm. */ export declare class AgentHostOutputChannel extends Disposable implements IChatTerminalOutputSource { private readonly _onDidChange; readonly onDidChange: Event; private _output; get output(): string; /** The retained output as the host sent it, before line endings are normalized into {@link _output}. */ private _rawOutput; private _outputPosition; get outputPosition(): IChatTerminalOutputPosition; /** Whether the last data ended with a carriage return whose line feed may arrive with the next data. */ private _endsWithCarriageReturn; /** The state content the output last reflected, so a change that leaves it as it was keeps the output. */ private _content; private _hasExited; get hasExited(): boolean; private _exitCode; get exitCode(): number | undefined; constructor(connection: IAgentConnection, terminalUri: URI); private _acceptState; private _append; private _replace; /** * Keeps only as much output as the host retains, so an update costs the same however long the stream runs. * The host counts the characters it sends, so the limits apply to the raw output rather than the normalized one. */ private _setOutput; }