Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7485ff2
Merge tag '0.30.0' into develop
intitni Jan 22, 2024
4818634
Prevent the chat window size and position being reset when it's hidden
intitni Jan 25, 2024
23b7f3c
Use isWindowHidden to control the opacity of chat window
intitni Jan 25, 2024
ae6c551
Merge branch 'feature/fix-detached-window-resized-repositioned-once-d…
intitni Jan 25, 2024
6e6bc96
Add a dismiss button to non-compact mode suggestion
intitni Jan 26, 2024
97eb465
Truncate file name in the middle when it's too long
intitni Jan 26, 2024
e5293a1
Use accent color instead of indigo
intitni Jan 26, 2024
94bee9d
Bump GitHub Copilot version to 1.17.0
intitni Jan 26, 2024
2ed2634
Merge branch 'feature/bump-github-copilot-1-17-0' into develop
intitni Jan 26, 2024
b516513
Bump Codeium language server to 1.6.9
intitni Jan 26, 2024
4ad9263
Merge branch 'feature/bump-codeium-to-1.6.9' into develop
intitni Jan 26, 2024
9f1d0cf
Add AsyncExtensions to use a concurrency version of passthrough subject
intitni Jan 25, 2024
53d49ef
Adjust AXNotificationStream
intitni Jan 25, 2024
930780f
Handle AXNotification on app in XcodeAppInstanceInspector
intitni Jan 25, 2024
a464a49
Handle source editor AXNotifications in SourceEditor
intitni Jan 25, 2024
efdd979
Replace AXNotificationStream creation
intitni Jan 25, 2024
e564d0f
Update Logger
intitni Jan 25, 2024
0c8c20f
Minor adjustment
intitni Jan 26, 2024
a8537c0
Update
intitni Jan 26, 2024
5bdc538
Update
intitni Jan 26, 2024
8419b80
Merge branch 'feature/handle-ax-notifications-universally' into develop
intitni Jan 26, 2024
535cbba
WIP
intitni Jan 24, 2024
eeff068
Add accessibility api malfunction check
intitni Jan 24, 2024
143db5a
Skip checks within 5 seconds since last recovery
intitni Jan 27, 2024
85ddfe4
Extend debounce interval
intitni Jan 27, 2024
44e4634
Add check when activate Xcode
intitni Jan 27, 2024
a491f45
Update
intitni Jan 27, 2024
5421b6e
Adjust logs
intitni Jan 27, 2024
1c2ee31
Update
intitni Jan 27, 2024
d1fc4d6
Merge branch 'feature/accessibility-api-malfunction-recovery' into de…
intitni Jan 27, 2024
3e8ff22
Prevent getting multiple content from SourceEditor in a single run
intitni Jan 27, 2024
cd124aa
Implement cache for SourceEditor
intitni Jan 27, 2024
8b3ad69
Skip invalidating suggestion early if no suggestion presented
intitni Jan 27, 2024
786e19a
Prevent using split by \.newLine for faster speed
intitni Jan 27, 2024
6654aac
Prevent events to be sent to a store rapidly
intitni Jan 27, 2024
cf9cbd8
Make minimum suggestion debounce to 0.15
intitni Jan 27, 2024
e1231f1
Get content after we check cancellation
intitni Jan 27, 2024
569fb71
Remove logs
intitni Jan 27, 2024
95f2963
Update dependency
intitni Jan 27, 2024
26b8ebe
Adjust logs
intitni Jan 27, 2024
b482d82
Remove optional
intitni Jan 27, 2024
bdc9c0b
Update
intitni Jan 27, 2024
e29dca3
Merge branch 'feature/performance-fix-for-realtime-suggestion' into d…
intitni Jan 27, 2024
eda2e8a
Remove optional
intitni Jan 27, 2024
8d9b257
Bump version to 0.30.1
intitni Jan 28, 2024
20b560f
Add tests for SourceEditor.Cache
intitni Jan 28, 2024
9b75b43
Add todos
intitni Jan 28, 2024
3c72675
Update prompt
intitni Jan 28, 2024
d580cd4
Add missing task cancellation check
intitni Jan 28, 2024
da24d8b
Add todo
intitni Jan 28, 2024
cf9aa83
Update appcasts.xml
intitni Jan 28, 2024
5a62827
Update README.md
intitni Jan 28, 2024
077560c
Merge branch 'release/0.30.1'
intitni Jan 28, 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
Get content after we check cancellation
  • Loading branch information
intitni committed Jan 27, 2024
commit e1231f1916a7cfaef331122e2ec0e2a84bdb91da
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ struct PseudoCommandHandler {

@WorkspaceActor
func generateRealtimeSuggestions(sourceEditor: SourceEditor?) async {
// Can't use handler if content is not available.
guard
let editor = await getEditorContent(sourceEditor: sourceEditor),
let filespace = await getFilespace(),
guard let filespace = await getFilespace(),
let (workspace, _) = try? await Service.shared.workspacePool
.fetchOrCreateWorkspaceAndFilespace(fileURL: filespace.fileURL) else { return }

if Task.isCancelled { return }

// Can't use handler if content is not available.
guard let editor = await getEditorContent(sourceEditor: sourceEditor)
else { return }

let fileURL = filespace.fileURL
let presenter = PresentInWindowSuggestionPresenter()
Expand Down Expand Up @@ -359,6 +362,7 @@ extension PseudoCommandHandler {
guard let filespace = await getFilespace(),
let sourceEditor = sourceEditor ?? XcodeInspector.shared.focusedEditor
else { return nil }
if Task.isCancelled { return nil }
let content = sourceEditor.getContent()
let uti = filespace.codeMetadata.uti ?? ""
let tabSize = filespace.codeMetadata.tabSize ?? 4
Expand Down