Skip to content

Commit 8479377

Browse files
committed
Merge tag '0.8.3' into develop
2 parents 70049a7 + 3ec13ad commit 8479377

File tree

12 files changed

+17
-18
lines changed

12 files changed

+17
-18
lines changed

Copilot for Xcode/InstructionView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Text("""
2424
Text("Granting Permissions")
2525
.font(.title3)
2626
Text("""
27-
The app needs at least **Accessibility API** permissions to work. If you are using real-time suggestions, please also enabling **Input Monitoring**..
27+
The app needs at least **Accessibility API** permissions to work.
2828
2929
please visit the [project's GitHub page](https://github.com/intitni/CopilotForXcode#granting-permissions-to-the-app) for instructions.
3030
""")

Copilot for Xcode/SettingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct SettingsView: View {
2222
@StateObject var settings = Settings()
2323
@State var editingRealtimeSuggestionDebounce: Double = UserDefaults.shared
2424
.value(forKey: SettingsKey.realtimeSuggestionDebounce) as? Double ?? 0.7
25-
25+
2626
var body: some View {
2727
Section {
2828
Form {

Core/Sources/AXExtension/AXUIElement.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public extension AXUIElement {
5151
}
5252
return nil
5353
}
54-
54+
5555
var size: CGSize? {
5656
guard let value: AXValue = try? copyValue(key: kAXSizeAttribute)
5757
else { return nil }
@@ -61,7 +61,7 @@ public extension AXUIElement {
6161
}
6262
return nil
6363
}
64-
64+
6565
var rect: CGRect? {
6666
guard let position, let size else { return nil }
6767
return .init(origin: position, size: size)
@@ -126,7 +126,7 @@ public extension AXUIElement {
126126
}
127127
return nil
128128
}
129-
129+
130130
var verticalScrollBar: AXUIElement? {
131131
try? copyValue(key: kAXVerticalScrollBarAttribute)
132132
}

Core/Sources/Client/XPCService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
2+
import Logger
23
import os.log
34
import XPCShared
4-
import Logger
55

66
let shared = XPCService()
77

Core/Sources/Environment/Environment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public enum Environment {
4747
let application = AXUIElementCreateApplication(xcode.processIdentifier)
4848
let focusedWindow = application.focusedWindow
4949
for child in focusedWindow?.children ?? [] {
50-
if child.description.starts(with: "/") {
50+
if child.description.starts(with: "/"), child.description.count > 1 {
5151
let path = child.description
5252
let trimmedNewLine = path.trimmingCharacters(in: .newlines)
5353
var url = URL(fileURLWithPath: trimmedNewLine)

Core/Sources/Service/RealtimeSuggestionController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public class RealtimeSuggestionController {
192192
if Task.isCancelled { return }
193193

194194
Logger.service.info("Prefetch suggestions.")
195-
195+
196196
if !force, isCommentMode, await !Environment.frontmostXcodeWindowIsEditor() {
197197
Logger.service.info("Completion panel is open, blocked.")
198198
return

Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct WindowBaseCommandHandler: SuggestionCommandHandler {
138138
func acceptSuggestion(editor: EditorContent) async throws -> UpdatedContent? {
139139
presenter.markAsProcessing(true)
140140
defer { presenter.markAsProcessing(false) }
141-
141+
142142
do {
143143
let result = try await CommentBaseCommandHandler().acceptSuggestion(editor: editor)
144144
Task {

Core/Sources/Service/Workspace.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ final class Filespace {
1313
}
1414

1515
let fileURL: URL
16-
private(set) lazy var language: String = languageIdentifierFromFileURL(fileURL)?.rawValue ?? "plaintext"
16+
private(set) lazy var language: String = languageIdentifierFromFileURL(fileURL)?
17+
.rawValue ?? "plaintext"
1718
var suggestions: [CopilotCompletion] = [] {
1819
didSet { lastSuggestionUpdateTime = Environment.now() }
1920
}

Core/Sources/SuggestionWidget/SuggestionPanelView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct SuggestionPanelView: View {
8282
}
8383
.allowsHitTesting(viewModel.isPanelDisplayed && !viewModel.suggestion.isEmpty)
8484
.preferredColorScheme(.dark)
85-
85+
8686
if viewModel.alignTopToAnchor {
8787
Spacer()
8888
.frame(minHeight: 0, maxHeight: .infinity)

Core/Sources/SuggestionWidget/WidgetView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct WidgetView: View {
7676
}
7777
}
7878
}
79-
79+
8080
func refreshRing() {
8181
Task {
8282
await Task.yield()

0 commit comments

Comments
 (0)