Skip to content

Commit 0332f18

Browse files
committed
Merge branch 'hotfix/0.33.8'
2 parents 912a721 + 02c742d commit 0332f18

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

Core/Sources/SuggestionWidget/WidgetWindowsController.swift

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import Foundation
88
import SwiftUI
99
import XcodeInspector
1010

11+
#warning("""
12+
TODO: This part is too messy, consider breaking it up, let each window handle their own things
13+
""")
14+
1115
actor WidgetWindowsController: NSObject {
1216
let userDefaultsObservers = WidgetUserDefaultsObservers()
1317
var xcodeInspector: XcodeInspector { .shared }
@@ -419,7 +423,8 @@ extension WidgetWindowsController {
419423
0
420424
} else if previousAppIsXcode {
421425
if windows.chatPanelWindow.isFullscreen,
422-
windows.chatPanelWindow.isOnActiveSpace {
426+
windows.chatPanelWindow.isOnActiveSpace
427+
{
423428
0
424429
} else {
425430
1
@@ -513,7 +518,7 @@ extension WidgetWindowsController {
513518
)
514519

515520
updateWindowLocationTask = Task {
516-
try await Task.sleep(nanoseconds: UInt64(delay * 1_000_000_000))
521+
try await Task.sleep(nanoseconds: UInt64(delay * 500_000_000))
517522
try Task.checkCancellation()
518523
await update()
519524
}
@@ -580,9 +585,8 @@ extension WidgetWindowsController {
580585
func handleXcodeFullscreenChange() async {
581586
let activeXcode = await XcodeInspector.shared.safe.activeXcode
582587

583-
let isFullscreen = if let xcode = activeXcode?.appElement,
584-
let xcodeWindow = xcode.focusedWindow
585-
{
588+
let xcode = activeXcode?.appElement
589+
let isFullscreen = if let xcode, let xcodeWindow = xcode.focusedWindow {
586590
xcodeWindow.isFullScreen && xcode.isFrontmost
587591
} else {
588592
false
@@ -598,7 +602,7 @@ extension WidgetWindowsController {
598602
$0.send(.didChangeActiveSpace(fullscreen: isFullscreen))
599603
}
600604

601-
if windows.fullscreenDetector.isOnActiveSpace, isFullscreen {
605+
if windows.fullscreenDetector.isOnActiveSpace, xcode?.focusedWindow != nil {
602606
windows.orderFront()
603607
}
604608
}
@@ -819,7 +823,9 @@ public final class WidgetWindows {
819823
toastWindow.orderFrontRegardless()
820824
sharedPanelWindow.orderFrontRegardless()
821825
suggestionPanelWindow.orderFrontRegardless()
822-
if chatPanelWindow.level.rawValue > NSWindow.Level.normal.rawValue {
826+
if chatPanelWindow.level.rawValue > NSWindow.Level.normal.rawValue,
827+
store.withState({ !$0.chatPanelState.isDetached })
828+
{
823829
chatPanelWindow.orderFrontRegardless()
824830
}
825831
}

Tool/Sources/CodeiumService/LanguageServer/CodeiumLanguageServer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ final class CodeiumLanguageServer {
6363

6464
if isEnterpriseMode {
6565
process.arguments?.append("--enterprise_mode")
66+
process.arguments?.append("--portal_url")
67+
process.arguments?.append(UserDefaults.shared.value(for: \.codeiumPortalUrl))
6668
}
6769

6870
let indexEnabled = UserDefaults.shared.value(for: \.codeiumIndexEnabled)

Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
APP_VERSION = 0.33.7
2-
APP_BUILD = 399
1+
APP_VERSION = 0.33.8
2+
APP_BUILD = 402
33

0 commit comments

Comments
 (0)