Skip to content

Commit db434c1

Browse files
committed
Merge branch 'release/0.16.1'
# Conflicts: # appcast.xml
2 parents 4b09974 + 699d11e commit db434c1

4 files changed

Lines changed: 30 additions & 12 deletions

File tree

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ public final class SuggestionWidgetController: NSObject {
172172
if app != previousApp {
173173
windowChangeObservationTask?.cancel()
174174
windowChangeObservationTask = nil
175-
self.observeXcodeWindowChangeIfNeeded(app)
175+
observeXcodeWindowChangeIfNeeded(app)
176176
}
177-
await self.updateContentForActiveEditor()
178-
self.updateWindowLocation()
177+
await updateContentForActiveEditor()
178+
updateWindowLocation()
179+
orderFront()
179180
} else {
180181
if ActiveApplicationMonitor.activeApplication?.bundleIdentifier != Bundle
181182
.main.bundleIdentifier
@@ -203,11 +204,8 @@ public final class SuggestionWidgetController: NSObject {
203204
guard let activeXcode = ActiveApplicationMonitor.activeXcode else { continue }
204205
guard fullscreenDetector.isOnActiveSpace else { continue }
205206
let app = AXUIElementCreateApplication(activeXcode.processIdentifier)
206-
if let window = app.focusedWindow, window.isFullScreen {
207-
widgetWindow.orderFrontRegardless()
208-
tabWindow.orderFrontRegardless()
209-
panelWindow.orderFrontRegardless()
210-
chatWindow.orderFrontRegardless()
207+
if let window = app.focusedWindow {
208+
orderFront()
211209
}
212210
}
213211
}
@@ -263,6 +261,13 @@ public final class SuggestionWidgetController: NSObject {
263261
}
264262
}
265263
}
264+
265+
func orderFront() {
266+
widgetWindow.orderFrontRegardless()
267+
tabWindow.orderFrontRegardless()
268+
panelWindow.orderFrontRegardless()
269+
chatWindow.orderFrontRegardless()
270+
}
266271
}
267272

268273
// MARK: - Handle Events

Core/Sources/SuggestionWidget/SyntaxHighlighting.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ func highlightedCodeBlock(
7777
return formatted
7878
default:
7979
var language = language
80-
if language == "objective-c" {
80+
// Workaround: Highlightr uses a different identifier for Objective-C.
81+
if language.lowercased().hasPrefix("objective"), language.lowercased().hasSuffix("c") {
8182
language = "objectivec"
8283
}
8384
func unhighlightedCode() -> NSAttributedString {

Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
APP_VERSION = 0.16.0
2-
APP_BUILD = 160
1+
APP_VERSION = 0.16.1
2+
APP_BUILD = 161

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.16.1</title>
8+
<pubDate>Tue, 23 May 2023 11:06:14 +0800</pubDate>
9+
<sparkle:version>161</sparkle:version>
10+
<sparkle:shortVersionString>0.16.1</sparkle:shortVersionString>
11+
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
12+
<sparkle:releaseNotesLink>
13+
https://github.com/intitni/CopilotForXcode/releases/tag/0.16.1
14+
</sparkle:releaseNotesLink>
15+
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.16.1/Copilot.for.Xcode.app.zip" length="21012368" type="application/octet-stream" sparkle:edSignature="Z4Krbh53X0frA0WhhGHh2QXEKUJQz65SXQKFyn6rJmk7eXdbF0HhllEchUUooeQMeeIkR8I2VhK5Uq7Qenh1Dw=="/>
16+
</item>
17+
618
<item>
719
<title>0.16.0</title>
820
<pubDate>Thu, 18 May 2023 18:42:47 +0800</pubDate>
@@ -14,7 +26,7 @@
1426
</sparkle:releaseNotesLink>
1527
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.16.0/Copilot.for.Xcode.app.zip" length="21012542" type="application/octet-stream" sparkle:edSignature="K/lsLbYeNCJrE71a9xaUOf3lD5SyFqrkgMlTUd7xJinMnx4fWkP9WtzPFCq9n/A2H6X1awFtDhov6mEkMhx7Bg=="/>
1628
</item>
17-
29+
1830
<item>
1931
<title>0.15.4</title>
2032
<pubDate>Mon, 15 May 2023 22:13:11 +0800</pubDate>

0 commit comments

Comments
 (0)