61c7eee2b0
"Open in new window" sits beside Float: the chat pane and chat list row menus, a floating chat window's title bar, the terminal options menu and the diff bar, plus Alt+Shift+Y for the chat with the keyboard (listed in the shortcut help). Once the window opens the item leaves the main window as Float takes a pane out of the tiling. The window is its own app instance at /window/chat/<id>, /window/terminal?tab=<key> or /window/diff/<token>: only that item, named after it, with "Bring back to main window". It has its own connection and writes no shared layout (no open-chat workspace, window store or terminal layout) and posts no notifications, so they stay the main window's. Web opens a popup window (a blocked popup offers a tab); Linux and macOS start a second process with --detached (Flutter's multi-window API is still experimental); Android and iOS hide the action. The capture kit gains a follow step for windows a page opens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1023 B
Dart
42 lines
1023 B
Dart
import 'dart:ui';
|
|
|
|
import 'detached_platform.dart';
|
|
import 'detached_route.dart';
|
|
|
|
DetachedPlatform createDetachedPlatform() => UnsupportedDetachedPlatform();
|
|
|
|
DetachedRoute? launchedDetachedRoute(List<String> args) =>
|
|
DetachedRoute.fromLaunch(args);
|
|
|
|
/// A platform without windows of its own (a phone): nothing opens.
|
|
class UnsupportedDetachedPlatform extends DetachedPlatform {
|
|
@override
|
|
bool get supported => false;
|
|
|
|
@override
|
|
Future<DetachedLaunch> launch(
|
|
DetachedRoute route, {
|
|
required String title,
|
|
required Size size,
|
|
bool tab = false,
|
|
}) async => DetachedLaunch.failed;
|
|
|
|
@override
|
|
Stream<DetachedMessage> get messages => const Stream.empty();
|
|
|
|
@override
|
|
Future<void> put(String token, String json) async {}
|
|
|
|
@override
|
|
Future<String?> take(String token) async => null;
|
|
|
|
@override
|
|
Future<bool> sendToMain(DetachedMessage message) async => false;
|
|
|
|
@override
|
|
Future<void> closeSelf() async {}
|
|
|
|
@override
|
|
Future<bool> becomeMain(String appPath) async => false;
|
|
}
|