WebShellHost class
The browser host for an InteractiveShellController: it drives the shared
LineEditor over an xterm.js TerminalView, exactly as the CLI's connect
loop drives it over a real TTY.
OmnyShell's remote shell is a pipe (no echo, no prompt); the controller owns
the protocol loop (marker priming, command wrapping, completion, passthrough)
while the editor owns the terminal specifics — echoing input, editing the
line, history, completion, and the prompt formatted from ShellPromptState.
Reusing the package's LineEditor means the browser behaves identically to
the CLI (including mid-line editing) instead of re-implementing it.
Implements TerminalKeys so the on-screen accessory bar feeds the same input pipeline.
- Implemented types
Constructors
-
WebShellHost({required TerminalView term, required ShellSessionPort session, required String principal, required String nodeId, DateTime? startedAt, LocalCommandRegistry? commands, ClientRuntime? client, Future<
List< onComplete(String word, bool isCommand, String? cwd)?, NodeDescriptor? nodeInfo()?, Principal? principalInfo, RemoteSession? remoteSession, CommandHistory? history, bool resumedInAltScreen = false, void onSessionExit()?, void onSessionDetached()?})String> > -
Creates the host over
termandsession, wires theLineEditor+InteractiveShellController, and starts them.
Properties
- ctrlArmed → bool
-
Whether the sticky Ctrl modifier is armed.
no setteroverride
- ended → bool
-
Whether the session has ended.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onCtrlChange ↔ void Function(bool armed)?
-
getter/setter pairoverride-setter
-
resizeEvents
→ Stream<
void> -
Fires when the terminal is resized — consumed by a full-screen command
(the
:idedriver) so it can reflow.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
armCtrl(
) → void -
Toggles the sticky Ctrl modifier.
override
-
close(
) → Future< void> - Terminates the session.
-
detach(
) → Future< void> - Detaches the session (keeps it alive on the node).
-
dispose(
) → Future< void> - Stops driving the session without detaching/closing it (on unmount).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendKey(
List< int> bytes) → void -
Injects
bytesas if the user typed them.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited