Skip to content

Commit 9bb08cc

Browse files
committed
Merge tag '0.33.0' into develop
2 parents 474b7cf + b882211 commit 9bb08cc

7 files changed

Lines changed: 29 additions & 15 deletions

File tree

Core/Tests/ServiceTests/FilespaceSuggestionInvalidationTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class FilespaceSuggestionInvalidationTests: XCTestCase {
7878
range: .init(startPair: (1, 0), endPair: (1, 0))
7979
)
8080
let isValid = await filespace.validateSuggestions(
81-
lines: ["\n", "h🎆🎆o man\n", "\n"],
81+
lines: ["\n", "h🎆🎆o ma\n", "\n"],
8282
cursorPosition: .init(line: 1, character: 2)
8383
)
8484
XCTAssertTrue(isValid)
@@ -95,7 +95,7 @@ class FilespaceSuggestionInvalidationTests: XCTestCase {
9595
range: .init(startPair: (1, 0), endPair: (1, 0))
9696
)
9797
let isValid = await filespace.validateSuggestions(
98-
lines: ["\n", "h🎆🎆o man\n", "\n"],
98+
lines: ["\n", "h🎆🎆o ma\n", "\n"],
9999
cursorPosition: .init(line: 1, character: 3)
100100
)
101101
XCTAssertTrue(isValid)
@@ -170,7 +170,7 @@ class FilespaceSuggestionInvalidationTests: XCTestCase {
170170
range: .init(startPair: (1, 0), endPair: (1, 0))
171171
)
172172
let wasValid = await filespace.validateSuggestions(
173-
lines: ["\n", "hello man\n", "\n"],
173+
lines: ["\n", "hello ma\n", "\n"],
174174
cursorPosition: .init(line: 1, character: 8)
175175
)
176176
let isValid = await filespace.validateSuggestions(
@@ -190,7 +190,7 @@ class FilespaceSuggestionInvalidationTests: XCTestCase {
190190
range: .init(startPair: (1, 0), endPair: (1, 0))
191191
)
192192
let wasValid = await filespace.validateSuggestions(
193-
lines: ["\n", "hello m🎆🎆an\n", "\n"],
193+
lines: ["\n", "hello m🎆🎆a\n", "\n"],
194194
cursorPosition: .init(line: 1, character: 12)
195195
)
196196
let isValid = await filespace.validateSuggestions(
@@ -211,7 +211,7 @@ class FilespaceSuggestionInvalidationTests: XCTestCase {
211211
range: .init(startPair: (1, 0), endPair: (1, 0))
212212
)
213213
let wasValid = await filespace.validateSuggestions(
214-
lines: ["\n", "hello man!!!!!\n", "\n"],
214+
lines: ["\n", "hello ma!!!!\n", "\n"],
215215
cursorPosition: .init(line: 1, character: 8)
216216
)
217217
let isValid = await filespace.validateSuggestions(

Core/Tests/ServiceUpdateMigrationTests/MigrateTo240Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class MigrateTo240Tests: XCTestCase {
2828
XCTAssertEqual(chatModel.info, .init(
2929
apiKeyName: "OpenAI",
3030
baseURL: "",
31-
maxTokens: 4096,
31+
maxTokens: 16385,
3232
supportsFunctionCalling: true,
3333
modelName: "gpt-3.5-turbo"
3434
))

Pro

Submodule Pro updated from 841a2c7 to a630ea2

Tool/Sources/WorkspaceSuggestionService/Filespace+SuggestionService.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public extension Filespace {
8383
)
8484

8585
let utf16View = editingLine.utf16
86-
86+
8787
let startIndex = utf16View.index(
8888
utf16View.startIndex,
8989
offsetBy: max(0, presentingSuggestion.range.start.character),
@@ -102,11 +102,13 @@ public extension Filespace {
102102

103103
return ""
104104
}()
105-
105+
106106
/// if the line will not change after accepting the suggestion
107-
if presentingSuggestion.range.isOneLine {
108-
#warning("TODO: Also handle the case where the suggestion doesn't start at character 0")
109-
if editingLine == suggestionFirstLine {
107+
if suggestionLines.count == 1 {
108+
if editingLine.hasPrefix(suggestionFirstLine),
109+
cursorPosition.character
110+
>= suggestionFirstLine.utf16.count + presentingSuggestion.range.start.character
111+
{
110112
reset()
111113
resetSnapshot()
112114
return false

Tool/Tests/GitHubCopilotServiceTests/FetchSuggestionsTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class FetchSuggestionTests: XCTestCase {
7777
usesTabsForIndentation: false
7878
)
7979
XCTAssertEqual(completions.count, 1)
80-
XCTAssertEqual(completions.first?.text, "Hello World")
80+
XCTAssertEqual(completions.first?.text, "Hello World\n")
8181
}
8282
}
8383

Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
APP_VERSION = 0.33.0
2-
APP_BUILD = 374
2+
APP_BUILD = 376
33

appcast.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
<channel>
44
<title>Copilot for Xcode</title>
55

6+
<item>
7+
<title>0.33.0</title>
8+
<pubDate>Wed, 15 May 2024 01:34:14 +0800</pubDate>
9+
<sparkle:version>376</sparkle:version>
10+
<sparkle:shortVersionString>0.33.0</sparkle:shortVersionString>
11+
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
12+
<sparkle:releaseNotesLink>
13+
https://github.com/intitni/CopilotForXcode/releases/tag/0.33.0
14+
</sparkle:releaseNotesLink>
15+
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.33.0/Copilot.for.Xcode.app.zip" length="46218778" type="application/octet-stream" sparkle:edSignature="OiIxIyet6Qj9pDFVCDDRE64bpcGvVOk9GvqhAFN+zIiBAP7XlKkpOBWhJ2YDFKty5w2SfjVIlD19qpil1GkMBw=="/>
16+
</item>
17+
618
<item>
719
<title>0.33.0</title>
820
<pubDate>Tue, 14 May 2024 01:18:40 +0800</pubDate>
@@ -15,7 +27,7 @@
1527
</sparkle:releaseNotesLink>
1628
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.33.0.beta/Copilot.for.Xcode.0.33.0.beta.3.zip" length="46141881" type="application/octet-stream" sparkle:edSignature="ID6Ovucmhoft/40Mmh9m5yY9vu/16XTv+K164SHiYywBNnDqWoCoTHMDZE8oxUvObFcXmxt13jczlJlCr/ciDg=="/>
1729
</item>
18-
30+
1931
<item>
2032
<title>0.33.0</title>
2133
<pubDate>Fri, 10 May 2024 14:54:26 +0800</pubDate>

0 commit comments

Comments
 (0)