Merge branch 'worktree-agent-a2791c24c562412e3'

# Conflicts:
#	app/lib/features/chat/conversation/chat_thread_view.dart
#	internal/protocol/message.go
This commit is contained in:
2026-11-09 22:07:45 +00:00
50 changed files with 5051 additions and 9 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;
@@ -74,7 +74,7 @@ class ChatShellTerminals {
_inputs
.putIfAbsent(
runId,
() => _InputPipe(
() => ChatShellInputPipe(
(data) => _repository.input(_sessionId, runId, data),
(error) => onError(runId, error),
),
@@ -106,11 +106,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;