Skip to content

Commit 635a027

Browse files
committed
Merge tag '0.34.3' into develop
# Conflicts: # Version.xcconfig
2 parents 9638941 + 35a955f commit 635a027

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

Core/Sources/Service/GUI/GraphicalUserInterfaceController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ extension ChatTabPool {
363363
let id = id
364364
let info = ChatTabInfo(id: id, title: "")
365365
guard let chatTap = await builder.build(store: createStore(id)) else { return nil }
366-
setTab(chatTap)
366+
setTab(chatTap, forId: id)
367367
return (chatTap, info)
368368
}
369369

@@ -382,7 +382,7 @@ extension ChatTabPool {
382382
return ChatGPTChatTab.defaultBuilder()
383383
}()
384384
guard let chatTap = await builder.build(store: createStore(id)) else { return nil }
385-
setTab(chatTap)
385+
setTab(chatTap, forId: id)
386386
return (chatTap, info)
387387
}
388388

Core/Sources/SuggestionWidget/ChatPanelWindow.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ final class ChatPanelWindow: WidgetWindow {
1212
private let store: StoreOf<ChatPanel>
1313

1414
var minimizeWindow: () -> Void = {}
15-
15+
1616
var isDetached: Bool {
17-
store.withState({$0.isDetached})
17+
store.withState { $0.isDetached }
1818
}
1919

2020
override var defaultCollectionBehavior: NSWindow.CollectionBehavior {
@@ -35,7 +35,7 @@ final class ChatPanelWindow: WidgetWindow {
3535
self.minimizeWindow = minimizeWindow
3636
super.init(
3737
contentRect: .init(x: 0, y: 0, width: 300, height: 400),
38-
styleMask: [.resizable, .titled, .miniaturizable, .fullSizeContentView],
38+
styleMask: [.resizable, .titled, .miniaturizable, .fullSizeContentView, .closable],
3939
backing: .buffered,
4040
defer: false
4141
)
@@ -121,5 +121,9 @@ final class ChatPanelWindow: WidgetWindow {
121121
override func miniaturize(_: Any?) {
122122
minimizeWindow()
123123
}
124+
125+
override func close() {
126+
store.send(.closeActiveTabClicked)
127+
}
124128
}
125129

Tool/Sources/ChatTab/ChatTabPool.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public final class ChatTabPool {
2222
pool[id]
2323
}
2424

25-
public func setTab(_ tab: any ChatTab) {
26-
pool[tab.id] = tab
25+
public func setTab(_ tab: any ChatTab, forId id: String) {
26+
pool[id] = tab
2727
}
2828

2929
public func removeTab(of id: String) {

Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import Preferences
88

99
/// https://docs.anthropic.com/claude/reference/messages_post
1010
public actor ClaudeChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI {
11+
/// https://docs.anthropic.com/en/docs/about-claude/models
1112
public enum KnownModel: String, CaseIterable {
12-
case claude35Sonnet = "claude-3-5-sonnet-20240620"
13-
case claude3Opus = "claude-3-opus-20240229"
13+
case claude35Sonnet = "claude-3-5-sonnet-latest"
14+
case claude3Opus = "claude-3-opus-latest"
1415
case claude3Sonnet = "claude-3-sonnet-20240229"
1516
case claude3Haiku = "claude-3-haiku-20240307"
1617

0 commit comments

Comments
 (0)