-
Notifications
You must be signed in to change notification settings - Fork 5
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
baf6492
commit 69d18ad
Showing
11 changed files
with
251 additions
and
81 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
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 |
---|---|---|
@@ -1,30 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key></key> | ||
<string>$(AppIdentifierPrefix)</string> | ||
<key>APPLICATION_SUPPORT_FOLDER</key> | ||
<string>$(APPLICATION_SUPPORT_FOLDER)</string> | ||
<key>BUNDLE_IDENTIFIER_BASE</key> | ||
<string>$(BUNDLE_IDENTIFIER_BASE)</string> | ||
<key>EXTENSION_BUNDLE_NAME</key> | ||
<string>$(EXTENSION_BUNDLE_NAME)</string> | ||
<key>HOST_APP_NAME</key> | ||
<string>$(HOST_APP_NAME)</string> | ||
<key>LANGUAGE_SERVER_PATH</key> | ||
<string>$(LANGUAGE_SERVER_PATH)</string> | ||
<key>NODE_PATH</key> | ||
<string>$(NODE_PATH)</string> | ||
<key>SUEnableAutomaticChecks</key> | ||
<string>YES</string> | ||
<key>SUEnableJavaScript</key> | ||
<string>NO</string> | ||
<key>SUFeedURL</key> | ||
<string>$(SPARKLE_FEED_URL)</string> | ||
<key>SUPublicEDKey</key> | ||
<string>$(SPARKLE_PUBLIC_KEY)</string> | ||
<key>TEAM_ID_PREFIX</key> | ||
<string>$(TeamIdentifierPrefix)</string> | ||
</dict> | ||
<dict> | ||
<key></key> | ||
<string>$(AppIdentifierPrefix)</string> | ||
<key>APPLICATION_SUPPORT_FOLDER</key> | ||
<string>$(APPLICATION_SUPPORT_FOLDER)</string> | ||
<key>BUNDLE_IDENTIFIER_BASE</key> | ||
<string>$(BUNDLE_IDENTIFIER_BASE)</string> | ||
<key>EXTENSION_BUNDLE_NAME</key> | ||
<string>$(EXTENSION_BUNDLE_NAME)</string> | ||
<key>HOST_APP_NAME</key> | ||
<string>$(HOST_APP_NAME)</string> | ||
<key>LANGUAGE_SERVER_PATH</key> | ||
<string>$(LANGUAGE_SERVER_PATH)</string> | ||
<key>NODE_PATH</key> | ||
<string>$(NODE_PATH)</string> | ||
<key>SUEnableAutomaticChecks</key> | ||
<string>YES</string> | ||
<key>SUScheduledCheckInterval</key> | ||
<string>3600</string> | ||
<key>SUEnableJavaScript</key> | ||
<string>NO</string> | ||
<key>SUFeedURL</key> | ||
<string>$(SPARKLE_FEED_URL)</string> | ||
<key>SUPublicEDKey</key> | ||
<string>$(SPARKLE_PUBLIC_KEY)</string> | ||
<key>TEAM_ID_PREFIX</key> | ||
<string>$(TeamIdentifierPrefix)</string> | ||
</dict> | ||
</plist> |
63 changes: 63 additions & 0 deletions
63
Core/Sources/HostApp/FeatureSettings/LoggingSettingsView.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,63 @@ | ||
import AppKit | ||
import Logger | ||
import Preferences | ||
import SwiftUI | ||
|
||
struct LoggingSettingsView: View { | ||
@AppStorage(\.verboseLoggingEnabled) var verboseLoggingEnabled: Bool | ||
@State private var shouldPresentRestartAlert = false | ||
|
||
var body: some View { | ||
VStack(alignment: .leading) { | ||
Text("Logging") | ||
.bold() | ||
.padding(.leading, 8) | ||
VStack(spacing: .zero) { | ||
HStack(alignment: .center) { | ||
Text("Verbose Logging") | ||
.padding(.horizontal, 8) | ||
Spacer() | ||
Toggle(isOn: $verboseLoggingEnabled) { | ||
} | ||
.toggleStyle(.switch) | ||
.padding(.horizontal, 8) | ||
} | ||
.padding(.vertical, 8) | ||
.onChange(of: verboseLoggingEnabled) { _ in | ||
shouldPresentRestartAlert = true | ||
} | ||
|
||
Divider() | ||
|
||
HStack { | ||
Text("Open Copilot Log Folder") | ||
.font(.body) | ||
Spacer() | ||
Image(systemName: "chevron.right") | ||
} | ||
.onTapGesture { | ||
NSWorkspace.shared.open(URL(fileURLWithPath: FileLoggingLocation.path.string, isDirectory: true)) | ||
} | ||
.foregroundStyle(.primary) | ||
.padding(.horizontal, 8) | ||
.padding(.vertical, 10) | ||
} | ||
.background(Color.gray.opacity(0.1)) | ||
.cornerRadius(8) | ||
} | ||
.padding(.horizontal, 20) | ||
.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")) | ||
) | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.