Skip to content

Commit 8ea3c77

Browse files
committed
Merge branch 'hotfix/0.31.1'
2 parents 7e91a10 + 5e099da commit 8ea3c77

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ actor OpenAIChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI
134134

135135
struct Choice: Codable, Equatable {
136136
var message: Message
137-
var index: Int
138-
var finish_reason: String
137+
var index: Int?
138+
var finish_reason: String?
139139
}
140140

141141
struct Usage: Codable, Equatable {
142-
var prompt_tokens: Int
143-
var completion_tokens: Int
144-
var total_tokens: Int
142+
var prompt_tokens: Int?
143+
var completion_tokens: Int?
144+
var total_tokens: Int?
145145
}
146146

147147
var id: String?
@@ -287,7 +287,7 @@ actor OpenAIChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI
287287
return .init(chunk: chunk, done: false)
288288
} catch {
289289
Logger.service.error("Error decoding stream data: \(error)")
290-
throw error
290+
return .init(chunk: nil, done: false)
291291
}
292292
}
293293

Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
APP_VERSION = 0.31.0
2-
APP_BUILD = 333
1+
APP_VERSION = 0.31.1
2+
APP_BUILD = 334
33

appcast.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
33
<channel>
44
<title>Copilot for Xcode</title>
5+
<item>
6+
<title>0.31.1</title>
7+
<pubDate>Wed, 13 Mar 2024 21:24:28 +0800</pubDate>
8+
<sparkle:version>334</sparkle:version>
9+
<sparkle:shortVersionString>0.31.1</sparkle:shortVersionString>
10+
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
11+
<sparkle:releaseNotesLink>
12+
https://github.com/intitni/CopilotForXcode/releases/tag/0.31.1
13+
</sparkle:releaseNotesLink>
14+
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.31.1/Copilot.for.Xcode.app.zip" length="40209085" type="application/octet-stream" sparkle:edSignature="RyuAk0iYffsUpWrvxHqtVPIp+JYf7u6Y5zRk72mxsqU7A6L037NqCBdFlk4SWNwl++zmD42hXpY6oNe3dENnDQ=="/>
15+
</item>
16+
517
<item>
618
<title>0.31.0</title>
719
<pubDate>Fri, 08 Mar 2024 14:48:32 +0800</pubDate>

0 commit comments

Comments
 (0)