Merge branch 'worktree-agent-ab9de97501bc94a9c'

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 23:38:04 +00:00
28 changed files with 1223 additions and 87 deletions
@@ -98,6 +98,7 @@ class _ChatShellTerminalViewState extends State<ChatShellTerminalView> {
final ScrollController _scroll = ScrollController();
final Map<ShortcutActivator, Intent> _shortcuts =
chatShellTerminalShortcuts();
bool _focused = false;
@override
void initState() {
@@ -105,10 +106,20 @@ class _ChatShellTerminalViewState extends State<ChatShellTerminalView> {
// A paste while the terminal has focus goes to the process, not to the
// chat composer.
ChatComposerPasteFocus.registerInput(_focus);
_focus.addListener(_focusChanged);
}
/// Focusing a terminal makes this client the one it is sized for, the
/// way typing in it does.
void _focusChanged() {
final focused = _focus.hasFocus;
if (focused && !_focused) widget.session.activate();
_focused = focused;
}
@override
void dispose() {
_focus.removeListener(_focusChanged);
ChatComposerPasteFocus.unregisterInput(_focus);
_controller.dispose();
_focus.dispose();