Skip to content
391 changes: 391 additions & 0 deletions Resources/Localizable.xcstrings

Large diffs are not rendered by default.

454 changes: 453 additions & 1 deletion Sources/App/TerminalDirectoryOpenSupport.swift

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7262,9 +7262,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
@discardableResult
func openDirectoryInInlineVSCode(
_ directoryURL: URL,
vscodeApplicationURL preferredVSCodeApplicationURL: URL? = nil,
tabManager preferredTabManager: TabManager? = nil
) -> Bool {
guard let vscodeApplicationURL = TerminalDirectoryOpenTarget.vscodeInline.applicationURL() else {
guard let vscodeApplicationURL = preferredVSCodeApplicationURL
?? TerminalDirectoryOpenTarget.vscodeInline.applicationURL() else {
return false
}

Expand Down Expand Up @@ -7302,8 +7304,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
return true
}

func showOpenFolderInInlineVSCodePanel(tabManager preferredTabManager: TabManager? = nil) {
guard TerminalDirectoryOpenTarget.vscodeInline.isAvailable() else {
func showOpenFolderInInlineVSCodePanel(
vscodeApplicationURL preferredVSCodeApplicationURL: URL? = nil,
tabManager preferredTabManager: TabManager? = nil
) {
guard preferredVSCodeApplicationURL != nil || TerminalDirectoryOpenTarget.vscodeInline.isAvailable() else {
NSSound.beep()
return
}
Expand Down Expand Up @@ -7334,7 +7339,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent

if panel.runModal() == .OK,
let url = panel.url,
!openDirectoryInInlineVSCode(url, tabManager: targetTabManager) {
!openDirectoryInInlineVSCode(
url,
vscodeApplicationURL: preferredVSCodeApplicationURL,
tabManager: targetTabManager
) {
NSSound.beep()
}
}
Expand Down
Loading
Loading