Skip to content

Commit

Permalink
Merge branch 'hotfix/0.34.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
intitni committed Oct 30, 2024
2 parents 1fe0874 + 42b1b8f commit 35a955f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ extension ChatTabPool {
let id = id
let info = ChatTabInfo(id: id, title: "")
guard let chatTap = await builder.build(store: createStore(id)) else { return nil }
setTab(chatTap)
setTab(chatTap, forId: id)
return (chatTap, info)
}

Expand All @@ -379,7 +379,7 @@ extension ChatTabPool {
let info = ChatTabInfo(id: id, title: "")
let builder = kind?.builder ?? ChatGPTChatTab.defaultBuilder()
guard let chatTap = await builder.build(store: createStore(id)) else { return nil }
setTab(chatTap)
setTab(chatTap, forId: id)
return (chatTap, info)
}

Expand Down
10 changes: 7 additions & 3 deletions Core/Sources/SuggestionWidget/ChatPanelWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ final class ChatPanelWindow: WidgetWindow {
private let store: StoreOf<ChatPanel>

var minimizeWindow: () -> Void = {}

var isDetached: Bool {
store.withState({$0.isDetached})
store.withState { $0.isDetached }
}

override var defaultCollectionBehavior: NSWindow.CollectionBehavior {
Expand All @@ -35,7 +35,7 @@ final class ChatPanelWindow: WidgetWindow {
self.minimizeWindow = minimizeWindow
super.init(
contentRect: .init(x: 0, y: 0, width: 300, height: 400),
styleMask: [.resizable, .titled, .miniaturizable, .fullSizeContentView],
styleMask: [.resizable, .titled, .miniaturizable, .fullSizeContentView, .closable],
backing: .buffered,
defer: false
)
Expand Down Expand Up @@ -121,5 +121,9 @@ final class ChatPanelWindow: WidgetWindow {
override func miniaturize(_: Any?) {
minimizeWindow()
}

override func close() {
store.send(.closeActiveTabClicked)
}
}

4 changes: 2 additions & 2 deletions Tool/Sources/ChatTab/ChatTabPool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public final class ChatTabPool {
pool[id]
}

public func setTab(_ tab: any ChatTab) {
pool[tab.id] = tab
public func setTab(_ tab: any ChatTab, forId id: String) {
pool[id] = tab
}

public func removeTab(of id: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import Preferences

/// https://docs.anthropic.com/claude/reference/messages_post
public actor ClaudeChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI {
/// https://docs.anthropic.com/en/docs/about-claude/models
public enum KnownModel: String, CaseIterable {
case claude35Sonnet = "claude-3-5-sonnet-20240620"
case claude3Opus = "claude-3-opus-20240229"
case claude35Sonnet = "claude-3-5-sonnet-latest"
case claude3Opus = "claude-3-opus-latest"
case claude3Sonnet = "claude-3-sonnet-20240229"
case claude3Haiku = "claude-3-haiku-20240307"

Expand Down
4 changes: 2 additions & 2 deletions Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
APP_VERSION = 0.34.2
APP_BUILD = 415
APP_VERSION = 0.34.3
APP_BUILD = 416

0 comments on commit 35a955f

Please sign in to comment.