Add the app's terminal surface: bottom panel, floating window and full-screen page

This commit is contained in:
2026-11-09 21:42:52 +00:00
parent a5842e6b3b
commit acd160b49e
28 changed files with 2266 additions and 10 deletions
@@ -28,7 +28,7 @@ class ChatShellTerminals {
final void Function(String runId, Object error) onError;
final Map<String, ChatShellTerminalSession> _sessions = {};
final Map<String, _InputPipe> _inputs = {};
final Map<String, ChatShellInputPipe> _inputs = {};
final Map<String, Timer> _resizes = {};
final Map<String, (int, int)> _sentSizes = {};
bool _disposed = false;
@@ -66,7 +66,7 @@ class ChatShellTerminals {
_inputs
.putIfAbsent(
runId,
() => _InputPipe(
() => ChatShellInputPipe(
(data) => _repository.input(_sessionId, runId, data),
(error) => onError(runId, error),
),
@@ -98,11 +98,12 @@ class ChatShellTerminals {
}
}
/// One run's typed input on its way to the server, in order: what arrives
/// One terminal's typed input on its way to the server (a chat run's or a
/// machine terminal's), in order: what arrives
/// while a request is in flight goes in the next one. Nothing is kept once
/// sent, and a refusal discards what was waiting rather than retyping it.
class _InputPipe {
_InputPipe(this._send, this._failed);
class ChatShellInputPipe {
ChatShellInputPipe(this._send, this._failed);
final Future<void> Function(String data) _send;
final void Function(Object error) _failed;