Skip to content

Commit fe4df09

Browse files
committed
Fix
1 parent 6a45443 commit fe4df09

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Core/Sources/Service/GUI/GraphicalUserInterfaceController.swift.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,19 @@ enum ChatTabFactory {
204204

205205
enum ChatTabFactory {
206206
static var chatTabBuilderCollection: [ChatTabBuilderCollection] {
207-
func folderIfNeeded(_ builders: [any ChatTabBuilder]) -> ChatTabBuilderCollection? {
208-
if builders.count > 1 { return .folder(builders) }
209-
if let first = builders.first { return .type(first) }
207+
func folderIfNeeded(
208+
_ builders: [any ChatTabBuilder],
209+
title: String
210+
) -> ChatTabBuilderCollection? {
211+
if builders.count > 1 {
212+
return .folder(title: title, kinds: builders.map(ChatTabKind.init))
213+
}
214+
if let first = builders.first { return .kind(ChatTabKind(first)) }
210215
return nil
211216
}
212217

213218
return [
214-
folderIfNeeded(ChatGPTChatTab.chatBuilders()),
219+
folderIfNeeded(ChatGPTChatTab.chatBuilders(), title: ChatGPTChatTab.name),
215220
].compactMap { $0 }
216221
}
217222
}

0 commit comments

Comments
 (0)