Widgets / AgentShell

AgentShell

A ready-made coding-agent shell Program — transcript + prompt + approvals + streaming — in a few lines.

AgentShell (Mire.Agent)┌──────────────────────────────────────────────────────────────┐│ └ mire · agent shell│└──────────────────────────────────────────────────────────────┘┌──────────────────────────────────────────────────────────────┐│❯ you│││build the project │││◆ assistant│││Sure — running the build now. │││┌───────────────────────────────────────────────────────────┐││││shell · dotnet build✓ 1.1s│││││Build succeeded.││││└───────────────────────────────────────────────────────────┘││└──────────────────────────────────────────────────────────────┘┌──────────────────────────────────────────────────────────────┐│❯ type a message — or `run`│└──────────────────────────────────────────────────────────────┘

Signature

AgentShell.program
    (config: ShellConfig)
    : Program<ShellModel, ShellMsg>

Parameters

parameter type what it is
Title / Placeholder string Header title and the prompt's placeholder text.
OnSubmit string -> ShellModel -> ShellModel * Cmd What a submitted line does — echo, run a tool, or stream a reply.
OnApprove bool -> string -> ShellModel -> ShellModel * Cmd What accepting / denying a tool approval does.
OnCancel ShellModel -> ShellModel * Cmd Cancel the app's operation when the user stops streaming.
Triggers / Completions char list / (CompletionToken -> string list) Completion triggers and candidate source; defaults to / and @ with no candidates.
MaxPromptRows int Maximum multiline prompt rows; defaults to 6.

Notes

Composes ChatTranscript + PromptBox + ApprovalModal + the Conversation model — owning scroll/follow-tail, multiline editing, history, completions, approval queues, cancellation routing, and a derived Idle/Streaming/AwaitingApproval session. Build the config with AgentShell.config; scrolling up pauses follow-tail. Stream a reply by dispatching Apply (AgentShell.stream id chunk) from a Cmd.ofAsync.