App: open a chat, the terminal or a diff in a new window
"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>
This commit is contained in:
@@ -82,6 +82,30 @@ class FileChange {
|
||||
parsedPatch: parsedPatch,
|
||||
);
|
||||
|
||||
/// The entry as the server records it ([tryParse] reads it back), with
|
||||
/// the stages that touched it, so a diff can be handed to another window.
|
||||
Map<String, Object?> toJson() => {
|
||||
'path': path,
|
||||
'kind': kind.name,
|
||||
'patch': ?patch,
|
||||
if (binary) 'binary': true,
|
||||
if (truncated) 'truncated': true,
|
||||
'no_patch_reason': ?noPatchReason,
|
||||
'before_mode': ?beforeMode,
|
||||
'after_mode': ?afterMode,
|
||||
if (steps.isNotEmpty) 'steps': steps,
|
||||
};
|
||||
|
||||
/// Reads back an entry [toJson] wrote, stages included.
|
||||
static FileChange? fromHandover(Object? value) {
|
||||
final file = tryParse(value);
|
||||
if (file == null || value is! Map) return file;
|
||||
final steps = value['steps'];
|
||||
return steps is List && steps.isNotEmpty
|
||||
? file.withSteps([for (final step in steps) '$step'])
|
||||
: file;
|
||||
}
|
||||
|
||||
/// Parses one server file entry; null when it has no usable path. The
|
||||
/// capture owns the decision to skip such an entry, so it is never rendered
|
||||
/// as an anonymous row.
|
||||
|
||||
Reference in New Issue
Block a user