Chat quick switcher MRU, Closed section and markers; Alt+N, Alt+J and run tab keys

Ctrl+K lists open chats most recently used first (tracked on open and pane
focus, persisted per server) and preselects the previous chat, so Ctrl+K,
Enter returns to it. Rows mark needs you / working / unread; a query also
lists matching closed chats under Closed, and choosing one reopens it.
Alt+N (Option+N) starts a new chat and Alt+J (Option+J) opens the next chat
waiting for you, unread or failed, cycling; the terminal keeps both. In run
detail, bare 1-4 switch tabs when not typing. Cheatsheet entries added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 00:49:36 +00:00
parent accb9970b6
commit 12c7642e35
25 changed files with 1223 additions and 46 deletions
+23 -1
View File
@@ -15,6 +15,7 @@ import '../core/servers/server_scope.dart';
import '../core/transport/pipelines_client.dart';
import '../shell/adaptive_shell.dart';
import '../shell/destination.dart';
import '../shell/shell_chat_actions_shortcut.dart';
import '../features/attention/notify/notification_controller.dart';
import '../features/attention/notify/notification_models.dart';
import '../features/attention/notify/chat_question_notices.dart';
@@ -55,6 +56,7 @@ import '../shell/windows/window_store.dart';
import 'app_terminals.dart';
import '../features/chat/chat_run_opener.dart';
import '../features/chat/chat_runtime.dart';
import '../features/chat/data/chat_recency.dart';
import '../features/changes/windows/diff_windows.dart';
import '../features/chat/windows/chat_windows.dart';
import 'open_in_chat.dart';
@@ -359,7 +361,13 @@ class _PipelinesAppState extends State<PipelinesApp>
final chatScope = widget.chatPool != null
? 'all-saved-servers'
: serverStorageScope(serverIdentity(chatGateway));
_chatRuntime = ChatRuntime(gateway: chatGateway, serverKey: chatScope);
_chatRuntime = ChatRuntime(
gateway: chatGateway,
serverKey: chatScope,
recency: ChatRecency(
store: SharedPreferencesChatRecencyStore(serverScope: chatScope),
),
);
_chatWindows = ChatWindows(
manager: _windows,
runtime: _chatRuntime,
@@ -868,6 +876,19 @@ class _PipelinesAppState extends State<PipelinesApp>
if (!_chatRuntime.quickSwitch.toggle()) _focusOpenChatComposer();
}
/// Alt+N / Alt+J: the shell has shown Chat; once it has built (a first
/// visit mounts the chat screen), the chat screen acts.
void _chatAction(ShellChatAction action) {
final requests = switch (action) {
ShellChatAction.newChat => _chatRuntime.newChat,
ShellChatAction.nextAttention => _chatRuntime.nextAttention,
};
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) requests.toggle();
});
WidgetsBinding.instance.ensureVisualUpdate();
}
void _selectDestination(AppDestination destination) {
// Settings is shown from its own nav item and has no Back, so its route
// (filed under the Pipelines tab) must not trap the Pipelines item: that
@@ -1130,6 +1151,7 @@ class _PipelinesAppState extends State<PipelinesApp>
onDestinationReselected: _reselectDestination,
onOpenChat: _focusOpenChatComposer,
onChatQuickSwitch: _toggleChatQuickSwitch,
onChatAction: _chatAction,
destinationBodies: {
AppDestination.pipelines: (_) => FirstRunWalkthroughGate(
store: _walkthroughStore,