@@ -35,6 +35,8 @@ internal struct EditorTabPayload: Codable, Hashable {
3535 internal let initialFilterState : TabFilterState ?
3636 /// Source file URL for .sql files opened from disk (used for deduplication)
3737 internal let sourceFileURL : URL ?
38+ /// Whether this is a Cmd+T new tab (creates default tab eagerly, skips disk restoration)
39+ internal let isNewTab : Bool
3840
3941 internal init (
4042 id: UUID = UUID ( ) ,
@@ -48,7 +50,8 @@ internal struct EditorTabPayload: Codable, Hashable {
4850 skipAutoExecute: Bool = false ,
4951 isPreview: Bool = false ,
5052 initialFilterState: TabFilterState ? = nil ,
51- sourceFileURL: URL ? = nil
53+ sourceFileURL: URL ? = nil ,
54+ isNewTab: Bool = false
5255 ) {
5356 self . id = id
5457 self . connectionId = connectionId
@@ -62,6 +65,7 @@ internal struct EditorTabPayload: Codable, Hashable {
6265 self . isPreview = isPreview
6366 self . initialFilterState = initialFilterState
6467 self . sourceFileURL = sourceFileURL
68+ self . isNewTab = isNewTab
6569 }
6670
6771 internal init ( from decoder: Decoder ) throws {
@@ -78,6 +82,7 @@ internal struct EditorTabPayload: Codable, Hashable {
7882 isPreview = try container. decodeIfPresent ( Bool . self, forKey: . isPreview) ?? false
7983 initialFilterState = try container. decodeIfPresent ( TabFilterState . self, forKey: . initialFilterState)
8084 sourceFileURL = try container. decodeIfPresent ( URL . self, forKey: . sourceFileURL)
85+ isNewTab = try container. decodeIfPresent ( Bool . self, forKey: . isNewTab) ?? false
8186 }
8287
8388 /// Whether this payload is a "connection-only" payload — just a connectionId
@@ -101,5 +106,6 @@ internal struct EditorTabPayload: Codable, Hashable {
101106 self . isPreview = false
102107 self . initialFilterState = nil
103108 self . sourceFileURL = tab. sourceFileURL
109+ self . isNewTab = false
104110 }
105111}
0 commit comments