Merge branch 'worktree-agent-a717651aa412e3b7c'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user