mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
3047ad3066
* Restructure harness console so that reactive app is the entry point * Further refactoring to split tool formatters, improve UX, make console configurable and fix bugs * Address PR comments. * UX tweak * Fix streaming text bug * Address PR comments.
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
namespace Harness.Shared.Console;
|
|
|
|
/// <summary>
|
|
/// Represents the type of an output entry in the console conversation.
|
|
/// </summary>
|
|
internal enum OutputEntryType
|
|
{
|
|
/// <summary>User input echo (e.g. "You: hello").</summary>
|
|
UserInput,
|
|
|
|
/// <summary>In-progress streaming text from the agent (accumulated chunk by chunk).</summary>
|
|
StreamingText,
|
|
|
|
/// <summary>Informational line (tool calls, errors, usage, approval requests, etc.).</summary>
|
|
InfoLine,
|
|
|
|
/// <summary>Stream footer (e.g. "(no text response from agent)").</summary>
|
|
StreamFooter,
|
|
|
|
/// <summary>Pending injected message notification.</summary>
|
|
PendingMessage,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents a single output entry in the console conversation history.
|
|
/// Used internally by <see cref="HarnessConsoleUXStateDriver"/> to track
|
|
/// the in-progress streaming entry and last-entry type for spacing decisions.
|
|
/// </summary>
|
|
/// <param name="Type">The type of output entry.</param>
|
|
/// <param name="Text">The text content of the entry.</param>
|
|
/// <param name="Color">Optional foreground color for rendering.</param>
|
|
internal sealed record OutputEntry(OutputEntryType Type, string Text, ConsoleColor? Color = null);
|