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
+17 -3
View File
@@ -13,6 +13,7 @@ import 'conversation/chat_transcript_cache.dart';
import 'conversation/chat_composer_controller.dart';
import 'conversation/chat_quick_switch_requests.dart';
import 'conversation/composer_focus_request.dart';
import 'data/chat_recency.dart';
import 'data/chat_repository.dart';
import 'ui/sessions/chat_sessions_body.dart';
import 'ui/sessions/chat_sessions_controller.dart';
@@ -24,9 +25,13 @@ import 'ui/sessions/chat_sessions_controller.dart';
///
/// It notifies when a row a conversation is drawn from changes.
class ChatRuntime extends ChangeNotifier {
ChatRuntime({required ApiGateway gateway, this.serverKey = ''})
: _gateway = gateway,
sessions = ChatSessionsController(ChatRepository(gateway)) {
ChatRuntime({
required ApiGateway gateway,
this.serverKey = '',
ChatRecency? recency,
}) : _gateway = gateway,
recency = recency ?? ChatRecency(),
sessions = ChatSessionsController(ChatRepository(gateway)) {
sessions.onSessionReplaced = (previousId, session) {
for (final listener in _replaced.toList()) {
listener(previousId, session);
@@ -132,6 +137,15 @@ class ChatRuntime extends ChangeNotifier {
/// The Chat destination's quick switcher, toggled by Ctrl+K / Alt+K there.
final ChatQuickSwitchRequests quickSwitch = ChatQuickSwitchRequests();
/// New chat (Alt+N) and the next chat needing the operator (Alt+J), asked
/// of the mounted Chat destination.
final ChatQuickSwitchRequests newChat = ChatQuickSwitchRequests();
final ChatQuickSwitchRequests nextAttention = ChatQuickSwitchRequests();
/// The chats this device used, most recent first (the quick switcher's
/// order with no query).
final ChatRecency recency;
/// Mounted composers are registered so external actions can append without
/// sending. A selection made before a pane mounts is queued here.
final Map<String, ChatComposerController> composers = {};