Skip to content

Commit

Permalink
Merge branch 'hotfix/0.33.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
intitni committed Aug 21, 2024
2 parents 912a721 + 02c742d commit 0332f18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
20 changes: 13 additions & 7 deletions Core/Sources/SuggestionWidget/WidgetWindowsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import Foundation
import SwiftUI
import XcodeInspector

#warning("""
TODO: This part is too messy, consider breaking it up, let each window handle their own things
""")
actor WidgetWindowsController: NSObject {
let userDefaultsObservers = WidgetUserDefaultsObservers()
var xcodeInspector: XcodeInspector { .shared }
Expand Down Expand Up @@ -419,7 +423,8 @@ extension WidgetWindowsController {
0
} else if previousAppIsXcode {
if windows.chatPanelWindow.isFullscreen,
windows.chatPanelWindow.isOnActiveSpace {
windows.chatPanelWindow.isOnActiveSpace
{
0
} else {
1
Expand Down Expand Up @@ -513,7 +518,7 @@ extension WidgetWindowsController {
)

updateWindowLocationTask = Task {
try await Task.sleep(nanoseconds: UInt64(delay * 1_000_000_000))
try await Task.sleep(nanoseconds: UInt64(delay * 500_000_000))
try Task.checkCancellation()
await update()
}
Expand Down Expand Up @@ -580,9 +585,8 @@ extension WidgetWindowsController {
func handleXcodeFullscreenChange() async {
let activeXcode = await XcodeInspector.shared.safe.activeXcode

let isFullscreen = if let xcode = activeXcode?.appElement,
let xcodeWindow = xcode.focusedWindow
{
let xcode = activeXcode?.appElement
let isFullscreen = if let xcode, let xcodeWindow = xcode.focusedWindow {
xcodeWindow.isFullScreen && xcode.isFrontmost
} else {
false
Expand All @@ -598,7 +602,7 @@ extension WidgetWindowsController {
$0.send(.didChangeActiveSpace(fullscreen: isFullscreen))
}

if windows.fullscreenDetector.isOnActiveSpace, isFullscreen {
if windows.fullscreenDetector.isOnActiveSpace, xcode?.focusedWindow != nil {
windows.orderFront()
}
}
Expand Down Expand Up @@ -819,7 +823,9 @@ public final class WidgetWindows {
toastWindow.orderFrontRegardless()
sharedPanelWindow.orderFrontRegardless()
suggestionPanelWindow.orderFrontRegardless()
if chatPanelWindow.level.rawValue > NSWindow.Level.normal.rawValue {
if chatPanelWindow.level.rawValue > NSWindow.Level.normal.rawValue,
store.withState({ !$0.chatPanelState.isDetached })
{
chatPanelWindow.orderFrontRegardless()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ final class CodeiumLanguageServer {

if isEnterpriseMode {
process.arguments?.append("--enterprise_mode")
process.arguments?.append("--portal_url")
process.arguments?.append(UserDefaults.shared.value(for: \.codeiumPortalUrl))
}

let indexEnabled = UserDefaults.shared.value(for: \.codeiumIndexEnabled)
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.33.7
APP_BUILD = 399
APP_VERSION = 0.33.8
APP_BUILD = 402

0 comments on commit 0332f18

Please sign in to comment.