Add structured user feedback for terminal, hosted sessions, and MCP#21
Merged
carldebilly merged 16 commits intomainfrom Apr 19, 2026
Merged
Add structured user feedback for terminal, hosted sessions, and MCP#21carldebilly merged 16 commits intomainfrom
carldebilly merged 16 commits intomainfrom
Conversation
…cess Add two injectable interfaces following the IMcpClientRoots pattern so command handlers can use MCP sampling (LLM completions) and elicitation (structured user input) directly as workflow steps. IMcpElicitation exposes typed methods (ElicitTextAsync, ElicitBooleanAsync, ElicitChoiceAsync, ElicitNumberAsync) instead of raw MCP SDK types to keep the public API dependency-agnostic. ElicitChoiceAsync returns the zero-based index for safety against unexpected client responses. Includes E2E tests (9 scenarios), updated sample 08, and documentation.
Member
Author
|
Follow-up pushed in Included fixes:
Validation run locally:
|
Member
Author
|
Follow-up pushed in Included fixes:
Validation run locally:
Result:
|
Member
Author
|
Additional follow-up pushed in The MCP feedback test now captures raw Validation run locally:
Result:
|
…ew allowlist The Auto case in ConsoleReplInteractionPresenter now uses a conservative allowlist (WT_SESSION, ConEmuANSI, WezTerm) and explicitly stays silent under tmux/screen. Update the doc table to match, and add a note that Always is safe on modern terminals because unknown OSC sequences are typically ignored silently.
The sample grew to ~1300 lines across CSS and JS. Add visual section banners to both and targeted "why" comments at non-obvious points: - OSC 9;4 sequence format and state-code mapping (0..4) - profilePresets (basic/styled/rich) with "custom" as fallback label - vtinput/progress require ANSI (feature coupling) - partial-chunk tail buffering in consumeTerminalChunk - body.connected-session layout-compaction trick No behavior change, pure editorial cleanup for comprehension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reframes the branch from logging-oriented infrastructure to user-facing execution feedback.
It adds structured progress states across the interaction stack, enables advanced terminal progress reporting, exposes MCP-specific feedback primitives, and updates the hosted/MCP samples to demonstrate the new behavior end to end.
What changed
NormalWarningErrorIndeterminateClearAdvancedProgressModewithAuto,Always, andNeverIMcpFeedbackSamples
Hosted sessions (
05-hosting-remote)feedback demoandfeedback failProgressReportinginstatusanddebugOSC 9;4ProgressReportingfor ANSI-capable browser transportsMCP sample (
08-mcp-server)import {file}to show:feedback demoandfeedback failtools for MCP Inspector demosDocumentation
Updated:
docs/interaction.mddocs/mcp-reference.mddocs/mcp-agent-capabilities.mdThe docs now clarify:
IReplInteractionChannelvsIMcpFeedbackValidation
dotnet build src/Repl.slnx -v minimal dotnet test --solution src/Repl.slnx --no-build -v minimalResult:
Notes
This PR intentionally focuses on user feedback during execution rather than helping applications surface logs to end users.