Open panels above the notch; chat paperclip and in-chat file drop
- NSOpenPanel opened from BroV appeared under the notch (BroV floats above the menu bar): presentAboveNotch shows it one level higher, non-modally. Used by the terminal paperclip, the chat paperclip and the chat folder picker in Settings. - Chat: paperclip next to the input attaches a file; dropping a file over the open chat attaches it directly instead of the shelf animation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,8 +110,8 @@ final class IslandWindowController: NSWindowController {
|
||||
dropView.autoresizingMask = [.width, .height]
|
||||
dropView.onDragEntered = { [weak self] loc in
|
||||
Task { @MainActor in
|
||||
// Over an open terminal the file goes into its command line, not the shelf.
|
||||
if TerminalStore.shared.activeTab != nil { return }
|
||||
// Over an open terminal or chat the file goes there, not to the shelf.
|
||||
if TerminalStore.shared.activeTab != nil || AppState.shared.chatOnScreen { return }
|
||||
let iLoc = self?.windowToIsland(loc) ?? CGPoint(x: 320, y: 88)
|
||||
AppState.shared.fileDragOver = true
|
||||
// enterZone sets isActive=true BEFORE hookExpand triggers re-render,
|
||||
@@ -123,7 +123,7 @@ final class IslandWindowController: NSWindowController {
|
||||
}
|
||||
dropView.onDragUpdated = { [weak self] loc in
|
||||
Task { @MainActor in
|
||||
if TerminalStore.shared.activeTab != nil { return }
|
||||
if TerminalStore.shared.activeTab != nil || AppState.shared.chatOnScreen { return }
|
||||
let iLoc = self?.windowToIsland(loc) ?? CGPoint(x: 320, y: 88)
|
||||
UploadSequenceEngine.shared.updateCursor(x: iLoc.x, y: iLoc.y)
|
||||
}
|
||||
@@ -142,6 +142,11 @@ final class IslandWindowController: NSWindowController {
|
||||
TerminalStore.shared.insertPaths(urls, into: tab)
|
||||
return
|
||||
}
|
||||
if AppState.shared.chatOnScreen, let url = urls.first {
|
||||
AppState.shared.promptContext = .file(name: url.lastPathComponent, fileURL: url)
|
||||
SoundEngine.shared.play("pop")
|
||||
return
|
||||
}
|
||||
await FileDropHandler.handle(urls: urls, state: AppState.shared)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user