-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69d18ad
commit 8a7a4fe
Showing
41 changed files
with
827 additions
and
1,115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve GitHub Copilot for Xcode | ||
--- | ||
|
||
<!-- Please search existing issues to avoid creating duplicates --> | ||
|
||
**Describe the bug** | ||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
**Versions** | ||
- Copilot for Xcode: [e.g. 0.25.0] | ||
- Xcode: [e.g. 16.0] | ||
- macOS: [e.g. 14.6.1] | ||
|
||
**Steps to reproduce** | ||
1. | ||
2. | ||
|
||
**Screenshots** | ||
<!-- Add screenshots or screen recordings to help explain your problem. --> | ||
|
||
**Logs** | ||
<!-- Attach relevant logs from `~/Library/Logs/GitHubCopilot/` --> | ||
|
||
**Additional context** | ||
<!-- Add any other context about the problem here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for GitHub Copilot for Xcode | ||
--- | ||
|
||
<!-- Please search existing issues to avoid creating duplicates --> | ||
|
||
<!-- Describe the feature you'd like. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Core/Sources/HostApp/AdvancedSettings/AdvancedSettings.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SwiftUI | ||
|
||
struct AdvancedSettings: View { | ||
var body: some View { | ||
ScrollView { | ||
VStack(alignment: .leading, spacing: 30) { | ||
SuggestionSection() | ||
EnterpriseSection() | ||
ProxySection() | ||
LoggingSection() | ||
} | ||
.padding(20) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
AdvancedSettings() | ||
.frame(width: 800, height: 600) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Core/Sources/HostApp/AdvancedSettings/EnterpriseSection.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import SwiftUI | ||
|
||
struct EnterpriseSection: View { | ||
@AppStorage(\.gitHubCopilotEnterpriseURI) var gitHubCopilotEnterpriseURI | ||
|
||
var body: some View { | ||
SettingsSection(title: "Enterprise") { | ||
SettingsTextField( | ||
title: "Auth provider URL", | ||
prompt: "Leave it blank if none is available.", | ||
text: $gitHubCopilotEnterpriseURI | ||
) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
EnterpriseSection() | ||
} |
52 changes: 52 additions & 0 deletions
52
Core/Sources/HostApp/AdvancedSettings/LoggingSection.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import Logger | ||
import SwiftUI | ||
|
||
struct LoggingSection: View { | ||
@AppStorage(\.verboseLoggingEnabled) var verboseLoggingEnabled: Bool | ||
@State private var shouldPresentRestartAlert = false | ||
|
||
var verboseLoggingBinding: Binding<Bool> { | ||
Binding( | ||
get: { verboseLoggingEnabled }, | ||
set: { | ||
verboseLoggingEnabled = $0 | ||
shouldPresentRestartAlert = $0 | ||
} | ||
) | ||
} | ||
|
||
var body: some View { | ||
SettingsSection(title: "Logging") { | ||
SettingsToggle( | ||
title: "Verbose Logging", | ||
isOn: verboseLoggingBinding | ||
) | ||
Divider() | ||
SettingsLink( | ||
URL(fileURLWithPath: FileLoggingLocation.path.string), | ||
title: "Open Copilot Log Folder" | ||
) | ||
.environment(\.openURL, OpenURLAction { url in | ||
NSWorkspace.shared.open(url) | ||
return .handled | ||
}) | ||
} | ||
.alert(isPresented: $shouldPresentRestartAlert) { | ||
Alert( | ||
title: Text("Quit And Restart Xcode"), | ||
message: Text( | ||
""" | ||
Logging level changes will take effect the next time Copilot \ | ||
for Xcode is started. To update logging now, please quit \ | ||
Copilot for Xcode and restart Xcode. | ||
""" | ||
), | ||
dismissButton: .default(Text("OK")) | ||
) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
LoggingSection() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Client | ||
import SwiftUI | ||
import Toast | ||
|
||
struct ProxySection: View { | ||
@AppStorage(\.gitHubCopilotProxyUrl) var gitHubCopilotProxyUrl | ||
@AppStorage(\.gitHubCopilotProxyUsername) var gitHubCopilotProxyUsername | ||
@AppStorage(\.gitHubCopilotProxyPassword) var gitHubCopilotProxyPassword | ||
@AppStorage(\.gitHubCopilotUseStrictSSL) var gitHubCopilotUseStrictSSL | ||
|
||
@Environment(\.toast) var toast | ||
|
||
var body: some View { | ||
SettingsSection(title: "Proxy") { | ||
SettingsTextField( | ||
title: "Proxy URL", | ||
prompt: "http://host:port", | ||
text: $gitHubCopilotProxyUrl | ||
) | ||
SettingsTextField( | ||
title: "Proxy username", | ||
prompt: "username", | ||
text: $gitHubCopilotProxyUsername | ||
) | ||
SettingsSecureField( | ||
title: "Proxy password", | ||
prompt: "password", | ||
text: $gitHubCopilotProxyPassword | ||
) | ||
SettingsToggle( | ||
title: "Proxy strict SSL", | ||
isOn: $gitHubCopilotUseStrictSSL | ||
) | ||
} footer: { | ||
HStack { | ||
Spacer() | ||
Button("Refresh configurations") { | ||
refreshConfiguration() | ||
} | ||
} | ||
} | ||
} | ||
|
||
func refreshConfiguration() { | ||
NotificationCenter.default.post( | ||
name: .gitHubCopilotShouldRefreshEditorInformation, | ||
object: nil | ||
) | ||
Task { | ||
let service = try getService() | ||
do { | ||
try await service.postNotification( | ||
name: Notification.Name | ||
.gitHubCopilotShouldRefreshEditorInformation.rawValue | ||
) | ||
} catch { | ||
toast(error.localizedDescription, .error) | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
ProxySection() | ||
} |
62 changes: 62 additions & 0 deletions
62
Core/Sources/HostApp/AdvancedSettings/SuggestionSection.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import SwiftUI | ||
|
||
struct SuggestionSection: View { | ||
@AppStorage(\.realtimeSuggestionToggle) var realtimeSuggestionToggle | ||
@AppStorage(\.suggestionFeatureEnabledProjectList) var suggestionFeatureEnabledProjectList | ||
@AppStorage(\.acceptSuggestionWithTab) var acceptSuggestionWithTab | ||
@State var isSuggestionFeatureDisabledLanguageListViewOpen = false | ||
@State private var shouldPresentTurnoffSheet = false | ||
|
||
var realtimeSuggestionBinding : Binding<Bool> { | ||
Binding( | ||
get: { realtimeSuggestionToggle }, | ||
set: { | ||
if !$0 { | ||
shouldPresentTurnoffSheet = true | ||
} else { | ||
realtimeSuggestionToggle = $0 | ||
} | ||
} | ||
) | ||
} | ||
|
||
var body: some View { | ||
SettingsSection(title: "Suggestion Settings") { | ||
SettingsToggle( | ||
title: "Request suggestions while typing", | ||
isOn: realtimeSuggestionBinding | ||
) | ||
Divider() | ||
SettingsToggle( | ||
title: "Accept suggestions with Tab", | ||
isOn: $acceptSuggestionWithTab | ||
) | ||
} footer: { | ||
HStack { | ||
Spacer() | ||
Button("Disabled language list") { | ||
isSuggestionFeatureDisabledLanguageListViewOpen = true | ||
} | ||
} | ||
} | ||
.sheet(isPresented: $isSuggestionFeatureDisabledLanguageListViewOpen) { | ||
DisabledLanguageList(isOpen: $isSuggestionFeatureDisabledLanguageListViewOpen) | ||
} | ||
.alert( | ||
"Disable suggestions while typing", | ||
isPresented: $shouldPresentTurnoffSheet | ||
) { | ||
Button("Disable") { realtimeSuggestionToggle = false } | ||
Button("Cancel", role: .cancel, action: {}) | ||
} message: { | ||
Text(""" | ||
If you disable requesting suggestions while typing, you will \ | ||
not see any suggestions until requested manually. | ||
""") | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
SuggestionSection() | ||
} |
63 changes: 0 additions & 63 deletions
63
Core/Sources/HostApp/FeatureSettings/LoggingSettingsView.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.