Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f6a1abe
Merge tag '0.30.4' into develop
intitni Feb 17, 2024
2d2e337
Remove warnings
intitni Feb 18, 2024
ecc4e9d
Merge tag '0.30.5.beta.1' into develop
intitni Feb 20, 2024
769eafd
Replace AsyncPassthroughSubject from AsyncExtension
intitni Feb 20, 2024
65c1e31
Merge branch 'feature/fix-deadlock' into develop
intitni Feb 20, 2024
021abbb
Update the default chat prompt
intitni Feb 20, 2024
cd4e807
Update Azure OpenAI API version
intitni Feb 20, 2024
b0a740f
Fix that the active application can be incorrect after debouncing
intitni Feb 20, 2024
5900121
Add timeout for UI elements
intitni Feb 20, 2024
3c3bacb
Bump version to 0.30.5
intitni Feb 20, 2024
dbbb30c
Update CopilotForXcodeKit to 0.3.0
intitni Feb 21, 2024
8325c3e
Support GitHub Copilot enterprise
intitni Feb 20, 2024
af2f668
Support Copilot.vim 1.17.0 to 1.19.x
intitni Feb 20, 2024
8fea60a
Fix auth provider url position
intitni Feb 21, 2024
3ad7e55
Bump Copilot.vim to 1.19.2
intitni Feb 21, 2024
65043e0
Replace miss-used NSWorkspace notification center
intitni Feb 21, 2024
079ad69
Support refreshing configuration
intitni Feb 21, 2024
e09d808
Merge branch 'feature/github-copilot-enterprise' into develop
intitni Feb 21, 2024
d609ddb
Update realtime suggestion debounce to minimum 0.25
intitni Feb 21, 2024
d7bcfcd
Discard suggestion when the focused editor element is changed
intitni Feb 21, 2024
ce0b20b
Update locations immediately in some situations
intitni Feb 21, 2024
c517f66
Remove the notification center thing
intitni Feb 21, 2024
6b4e6f8
Fix that the suggestion panel counld dance around when the completion…
intitni Feb 21, 2024
93bc361
Merge branch 'feature/tweak-about-widget-location-update' into develop
intitni Feb 21, 2024
5944902
Bump build number
intitni Feb 21, 2024
321236a
Ignore .applicationDeactivated because it's handled somewhere else
intitni Feb 21, 2024
efe5e20
Remove the useless await
intitni Feb 21, 2024
f9c30c6
Adjust interval
intitni Feb 21, 2024
5e86b93
Move the state retrieval to after the debouncing
intitni Feb 21, 2024
c1f506b
Bump version
intitni Feb 21, 2024
ec0da25
Merge tag '0.30.5.beta.2' into develop
intitni Feb 21, 2024
0266337
Make XcodeInspector a bit more thread safe
intitni Feb 21, 2024
9bee878
Access XcodeInspector thru actor
intitni Feb 21, 2024
b1dddcc
Update
intitni Feb 22, 2024
a03221f
Support opening ExtensionManager from menu item
intitni Feb 22, 2024
46fff5d
Merge branch 'feature/xcode-inspector-thread-safe-trial' into develop
intitni Feb 22, 2024
a82942d
Update build number
intitni Feb 22, 2024
9c7e86a
Access XcodeInspector state through actor
intitni Feb 22, 2024
e864847
Update
intitni Feb 22, 2024
d586dad
Update appcast.xml
intitni Feb 22, 2024
365050d
Merge branch 'release/0.30.5'
intitni Feb 22, 2024
f8394dc
Update README.md
intitni Feb 22, 2024
38faffe
Update README.md
intitni Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix that the suggestion panel counld dance around when the completion…
… panel updates
  • Loading branch information
intitni committed Feb 21, 2024
commit 6b4e6f837f6b135f664fe6038c7d6e98038f8c99
28 changes: 19 additions & 9 deletions Core/Sources/SuggestionWidget/WidgetWindowsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ actor WidgetWindowsController: NSObject {
var updateWindowLocationTask: Task<Void, Error>?
var lastUpdateWindowLocationTime = Date(timeIntervalSince1970: 0)

var beatingCompletionPanelTask: Task<Void, Error>?

deinit {
userDefaultsObservers.presentationModeChangeObserver.onChange = {}
observeToAppTask?.cancel()
Expand Down Expand Up @@ -61,15 +63,7 @@ actor WidgetWindowsController: NSObject {

xcodeInspector.$completionPanel.sink { [weak self] newValue in
Task { [weak self] in
if newValue == nil {
// so that the buttons on the suggestion panel could be
// clicked
// before the completion panel updates the location of the
// suggestion panel
try await Task.sleep(nanoseconds: 400_000_000)
}
await self?.updateWindowLocation(animated: false, immediately: false)
await self?.updateWindowOpacity(immediately: false)
await self?.handleCompletionPanelChange(isDisplaying: newValue != nil)
}
}.store(in: &cancellable)

Expand Down Expand Up @@ -373,6 +367,22 @@ private extension WidgetWindowsController {
}
}
}

func handleCompletionPanelChange(isDisplaying: Bool) {
beatingCompletionPanelTask?.cancel()
beatingCompletionPanelTask = Task {
if !isDisplaying {
// so that the buttons on the suggestion panel could be
// clicked
// before the completion panel updates the location of the
// suggestion panel
try await Task.sleep(nanoseconds: 400_000_000)
}

await updateWindowLocation(animated: false, immediately: false)
await updateWindowOpacity(immediately: false)
}
}
}

extension WidgetWindowsController {
Expand Down