Skip to content

Commit 8a7a4fe

Browse files
committed
Pre-release 0.25.85
1 parent 69d18ad commit 8a7a4fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+827
-1115
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve GitHub Copilot for Xcode
4+
---
5+
6+
<!-- Please search existing issues to avoid creating duplicates -->
7+
8+
**Describe the bug**
9+
<!-- A clear and concise description of what the bug is. -->
10+
11+
**Versions**
12+
- Copilot for Xcode: [e.g. 0.25.0]
13+
- Xcode: [e.g. 16.0]
14+
- macOS: [e.g. 14.6.1]
15+
16+
**Steps to reproduce**
17+
1.
18+
2.
19+
20+
**Screenshots**
21+
<!-- Add screenshots or screen recordings to help explain your problem. -->
22+
23+
**Logs**
24+
<!-- Attach relevant logs from `~/Library/Logs/GitHubCopilot/` -->
25+
26+
**Additional context**
27+
<!-- Add any other context about the problem here. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for GitHub Copilot for Xcode
4+
---
5+
6+
<!-- Please search existing issues to avoid creating duplicates -->
7+
8+
<!-- Describe the feature you'd like. -->

CommunicationBridge/main.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AppKit
22
import Foundation
3+
import Logger
34

45
class AppDelegate: NSObject, NSApplicationDelegate {}
56

@@ -15,5 +16,6 @@ listener.delegate = delegate
1516
listener.resume()
1617
let app = NSApplication.shared
1718
app.delegate = appDelegate
19+
Logger.communicationBridge.info("Communication bridge started")
1820
app.run()
1921

Copilot-for-Xcode-Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key></key>
5+
<key>APP_ID_PREFIX</key>
66
<string>$(AppIdentifierPrefix)</string>
77
<key>APPLICATION_SUPPORT_FOLDER</key>
88
<string>$(APPLICATION_SUPPORT_FOLDER)</string>

Core/Package.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,12 @@ let package = Package(
209209
// MARK: - Helpers
210210

211211
.target(name: "FileChangeChecker"),
212-
.target(name: "LaunchAgentManager"),
212+
.target(
213+
name: "LaunchAgentManager",
214+
dependencies: [
215+
.product(name: "Logger", package: "Tool"),
216+
]
217+
),
213218
.target(
214219
name: "UpdateChecker",
215220
dependencies: [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import SwiftUI
2+
3+
struct AdvancedSettings: View {
4+
var body: some View {
5+
ScrollView {
6+
VStack(alignment: .leading, spacing: 30) {
7+
SuggestionSection()
8+
EnterpriseSection()
9+
ProxySection()
10+
LoggingSection()
11+
}
12+
.padding(20)
13+
}
14+
}
15+
}
16+
17+
#Preview {
18+
AdvancedSettings()
19+
.frame(width: 800, height: 600)
20+
}
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension List {
1515
}
1616
}
1717

18-
struct SuggestionFeatureDisabledLanguageListView: View {
18+
struct DisabledLanguageList: View {
1919
final class Settings: ObservableObject {
2020
@AppStorage(\.suggestionFeatureDisabledLanguageList)
2121
var suggestionFeatureDisabledLanguageList: [String]
@@ -100,16 +100,15 @@ struct SuggestionFeatureDisabledLanguageListView: View {
100100
}
101101
}
102102

103-
struct SuggestionFeatureDisabledLanguageListView_Preview: PreviewProvider {
104-
static var previews: some View {
105-
SuggestionFeatureDisabledLanguageListView(
106-
isOpen: .constant(true),
107-
settings: .init(suggestionFeatureDisabledLanguageList: .init(wrappedValue: [
108-
"hello/2",
109-
"hello/3",
110-
"hello/4",
111-
], "SuggestionFeatureDisabledLanguageListView_Preview"))
112-
)
113-
}
103+
#Preview {
104+
DisabledLanguageList(
105+
isOpen: .constant(true),
106+
settings: .init(suggestionFeatureDisabledLanguageList: .init(wrappedValue: [
107+
"hello/2",
108+
"hello/3",
109+
"hello/4",
110+
], "SuggestionFeatureDisabledLanguageListView_Preview"))
111+
)
114112
}
115113

114+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import SwiftUI
2+
3+
struct EnterpriseSection: View {
4+
@AppStorage(\.gitHubCopilotEnterpriseURI) var gitHubCopilotEnterpriseURI
5+
6+
var body: some View {
7+
SettingsSection(title: "Enterprise") {
8+
SettingsTextField(
9+
title: "Auth provider URL",
10+
prompt: "Leave it blank if none is available.",
11+
text: $gitHubCopilotEnterpriseURI
12+
)
13+
}
14+
}
15+
}
16+
17+
#Preview {
18+
EnterpriseSection()
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import Logger
2+
import SwiftUI
3+
4+
struct LoggingSection: View {
5+
@AppStorage(\.verboseLoggingEnabled) var verboseLoggingEnabled: Bool
6+
@State private var shouldPresentRestartAlert = false
7+
8+
var verboseLoggingBinding: Binding<Bool> {
9+
Binding(
10+
get: { verboseLoggingEnabled },
11+
set: {
12+
verboseLoggingEnabled = $0
13+
shouldPresentRestartAlert = $0
14+
}
15+
)
16+
}
17+
18+
var body: some View {
19+
SettingsSection(title: "Logging") {
20+
SettingsToggle(
21+
title: "Verbose Logging",
22+
isOn: verboseLoggingBinding
23+
)
24+
Divider()
25+
SettingsLink(
26+
URL(fileURLWithPath: FileLoggingLocation.path.string),
27+
title: "Open Copilot Log Folder"
28+
)
29+
.environment(\.openURL, OpenURLAction { url in
30+
NSWorkspace.shared.open(url)
31+
return .handled
32+
})
33+
}
34+
.alert(isPresented: $shouldPresentRestartAlert) {
35+
Alert(
36+
title: Text("Quit And Restart Xcode"),
37+
message: Text(
38+
"""
39+
Logging level changes will take effect the next time Copilot \
40+
for Xcode is started. To update logging now, please quit \
41+
Copilot for Xcode and restart Xcode.
42+
"""
43+
),
44+
dismissButton: .default(Text("OK"))
45+
)
46+
}
47+
}
48+
}
49+
50+
#Preview {
51+
LoggingSection()
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import Client
2+
import SwiftUI
3+
import Toast
4+
5+
struct ProxySection: View {
6+
@AppStorage(\.gitHubCopilotProxyUrl) var gitHubCopilotProxyUrl
7+
@AppStorage(\.gitHubCopilotProxyUsername) var gitHubCopilotProxyUsername
8+
@AppStorage(\.gitHubCopilotProxyPassword) var gitHubCopilotProxyPassword
9+
@AppStorage(\.gitHubCopilotUseStrictSSL) var gitHubCopilotUseStrictSSL
10+
11+
@Environment(\.toast) var toast
12+
13+
var body: some View {
14+
SettingsSection(title: "Proxy") {
15+
SettingsTextField(
16+
title: "Proxy URL",
17+
prompt: "http://host:port",
18+
text: $gitHubCopilotProxyUrl
19+
)
20+
SettingsTextField(
21+
title: "Proxy username",
22+
prompt: "username",
23+
text: $gitHubCopilotProxyUsername
24+
)
25+
SettingsSecureField(
26+
title: "Proxy password",
27+
prompt: "password",
28+
text: $gitHubCopilotProxyPassword
29+
)
30+
SettingsToggle(
31+
title: "Proxy strict SSL",
32+
isOn: $gitHubCopilotUseStrictSSL
33+
)
34+
} footer: {
35+
HStack {
36+
Spacer()
37+
Button("Refresh configurations") {
38+
refreshConfiguration()
39+
}
40+
}
41+
}
42+
}
43+
44+
func refreshConfiguration() {
45+
NotificationCenter.default.post(
46+
name: .gitHubCopilotShouldRefreshEditorInformation,
47+
object: nil
48+
)
49+
Task {
50+
let service = try getService()
51+
do {
52+
try await service.postNotification(
53+
name: Notification.Name
54+
.gitHubCopilotShouldRefreshEditorInformation.rawValue
55+
)
56+
} catch {
57+
toast(error.localizedDescription, .error)
58+
}
59+
}
60+
}
61+
}
62+
63+
#Preview {
64+
ProxySection()
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import SwiftUI
2+
3+
struct SuggestionSection: View {
4+
@AppStorage(\.realtimeSuggestionToggle) var realtimeSuggestionToggle
5+
@AppStorage(\.suggestionFeatureEnabledProjectList) var suggestionFeatureEnabledProjectList
6+
@AppStorage(\.acceptSuggestionWithTab) var acceptSuggestionWithTab
7+
@State var isSuggestionFeatureDisabledLanguageListViewOpen = false
8+
@State private var shouldPresentTurnoffSheet = false
9+
10+
var realtimeSuggestionBinding : Binding<Bool> {
11+
Binding(
12+
get: { realtimeSuggestionToggle },
13+
set: {
14+
if !$0 {
15+
shouldPresentTurnoffSheet = true
16+
} else {
17+
realtimeSuggestionToggle = $0
18+
}
19+
}
20+
)
21+
}
22+
23+
var body: some View {
24+
SettingsSection(title: "Suggestion Settings") {
25+
SettingsToggle(
26+
title: "Request suggestions while typing",
27+
isOn: realtimeSuggestionBinding
28+
)
29+
Divider()
30+
SettingsToggle(
31+
title: "Accept suggestions with Tab",
32+
isOn: $acceptSuggestionWithTab
33+
)
34+
} footer: {
35+
HStack {
36+
Spacer()
37+
Button("Disabled language list") {
38+
isSuggestionFeatureDisabledLanguageListViewOpen = true
39+
}
40+
}
41+
}
42+
.sheet(isPresented: $isSuggestionFeatureDisabledLanguageListViewOpen) {
43+
DisabledLanguageList(isOpen: $isSuggestionFeatureDisabledLanguageListViewOpen)
44+
}
45+
.alert(
46+
"Disable suggestions while typing",
47+
isPresented: $shouldPresentTurnoffSheet
48+
) {
49+
Button("Disable") { realtimeSuggestionToggle = false }
50+
Button("Cancel", role: .cancel, action: {})
51+
} message: {
52+
Text("""
53+
If you disable requesting suggestions while typing, you will \
54+
not see any suggestions until requested manually.
55+
""")
56+
}
57+
}
58+
}
59+
60+
#Preview {
61+
SuggestionSection()
62+
}

Core/Sources/HostApp/FeatureSettings/LoggingSettingsView.swift

-63
This file was deleted.

0 commit comments

Comments
 (0)