Skip to content

Commit 8379cfa

Browse files
committed
Pre-release 0.29.98
1 parent dfe1195 commit 8379cfa

File tree

13 files changed

+146
-29
lines changed

13 files changed

+146
-29
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xF5",
9+
"green" : "0xF9",
10+
"red" : "0xFF"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x07",
9+
"green" : "0x37",
10+
"red" : "0x8A"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xB4",
9+
"green" : "0xCF",
10+
"red" : "0xFD"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
},
20+
"properties" : {
21+
"localizable" : true
22+
}
23+
}

Core/Sources/HostApp/GeneralSettings/AppInfoView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ struct AppInfoView: View {
1717
@StateObject var viewModel: GitHubCopilotViewModel
1818

1919
@State var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
20+
@State var automaticallyCheckForUpdates: Bool?
2021

2122
let store: StoreOf<General>
2223

@@ -47,8 +48,8 @@ struct AppInfoView: View {
4748
}
4849
HStack {
4950
Toggle(isOn: .init(
50-
get: { updateChecker.getAutomaticallyChecksForUpdates() },
51-
set: { updateChecker.setAutomaticallyChecksForUpdates($0) }
51+
get: { automaticallyCheckForUpdates ?? updateChecker.getAutomaticallyChecksForUpdates() },
52+
set: { updateChecker.setAutomaticallyChecksForUpdates($0); automaticallyCheckForUpdates = $0 }
5253
)) {
5354
Text("Automatically Check for Updates")
5455
}

Core/Sources/HostApp/GeneralSettings/CopilotConnectionView.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct CopilotConnectionView: View {
2121
var accountStatus: some View {
2222
SettingsButtonRow(
2323
title: "GitHub Account Status Permissions",
24-
subtitle: "GitHub Connection: \(viewModel.status?.description ?? "Loading...")"
24+
subtitle: "GitHub Account: \(viewModel.status?.description ?? "Loading...")"
2525
) {
2626
if viewModel.isRunningAction || viewModel.waitingForSignIn {
2727
ProgressView().controlSize(.small)
@@ -34,7 +34,7 @@ struct CopilotConnectionView: View {
3434
viewModel.cancelWaiting()
3535
}
3636
} else if viewModel.status == .notSignedIn {
37-
Button("Login to GitHub") {
37+
Button("Log in to GitHub") {
3838
viewModel.signIn()
3939
}
4040
.alert(
@@ -56,17 +56,24 @@ struct CopilotConnectionView: View {
5656
if viewModel.status == .ok || viewModel.status == .alreadySignedIn ||
5757
viewModel.status == .notAuthorized
5858
{
59-
Button("Logout from GitHub") { viewModel.signOut()
59+
Button("Log Out from GitHub") { viewModel.signOut()
6060
viewModel.isSignInAlertPresented = false
6161
}
6262
}
6363
}
6464
}
6565

6666
var connection: some View {
67-
SettingsSection(title: "Copilot Connection") {
67+
SettingsSection(title: "Account Settings", showWarning: viewModel.status == .notAuthorized) {
6868
accountStatus
6969
Divider()
70+
if viewModel.status == .notAuthorized {
71+
SettingsLink(
72+
url: "https://github.com/features/copilot/plans",
73+
title: "Enable powerful AI features for free with the GitHub Copilot Free plan"
74+
)
75+
Divider()
76+
}
7077
SettingsLink(
7178
url: "https://github.com/settings/copilot",
7279
title: "GitHub Copilot Account Settings"

Core/Sources/HostApp/GitHubCopilotViewModel.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ class GitHubCopilotViewModel: ObservableObject {
6161
status = try await service.checkStatus()
6262
version = try await service.version()
6363
isRunningAction = false
64-
65-
if status != .ok, status != .notSignedIn {
66-
toast(
67-
"GitHub Copilot status is not \"ok\". Please check if you have a valid GitHub Copilot subscription.",
68-
.error
69-
)
70-
}
7164
} catch {
7265
toast(error.localizedDescription, .error)
7366
}

Core/Sources/HostApp/SharedComponents/SettingsSection.swift

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,36 @@ import SwiftUI
22

33
struct SettingsSection<Content: View, Footer: View>: View {
44
let title: String
5+
let showWarning: Bool
56
@ViewBuilder let content: () -> Content
67
@ViewBuilder let footer: () -> Footer
78

9+
10+
init(title: String, showWarning: Bool = false, @ViewBuilder content: @escaping () -> Content, @ViewBuilder footer: @escaping () -> Footer) {
11+
self.title = title
12+
self.showWarning = showWarning
13+
self.content = content
14+
self.footer = footer
15+
}
16+
817
var body: some View {
918
VStack(alignment: .leading, spacing: 10) {
1019
Text(title)
1120
.bold()
1221
.padding(.horizontal, 10)
22+
if showWarning {
23+
HStack{
24+
Text("GitHub Copilot features are disabled. Please check your subscription to access them.")
25+
.foregroundColor(Color("WarningForegroundColor"))
26+
.padding(4)
27+
Spacer()
28+
}
29+
.background(Color("WarningBackgroundColor"))
30+
.overlay(
31+
RoundedRectangle(cornerRadius: 3)
32+
.stroke(Color("WarningStrokeColor"), lineWidth: 1)
33+
)
34+
}
1335
VStack(alignment: .leading, spacing: 0) {
1436
content()
1537
}
@@ -22,8 +44,8 @@ struct SettingsSection<Content: View, Footer: View>: View {
2244
}
2345

2446
extension SettingsSection where Footer == EmptyView {
25-
init(title: String, @ViewBuilder content: @escaping () -> Content) {
26-
self.init(title: title, content: content, footer: { EmptyView() })
47+
init(title: String, showWarning: Bool = false, @ViewBuilder content: @escaping () -> Content) {
48+
self.init(title: title, showWarning: showWarning, content: content, footer: { EmptyView() })
2749
}
2850
}
2951

@@ -37,7 +59,7 @@ extension SettingsSection where Footer == EmptyView {
3759
Divider()
3860
SettingsLink(url: "https://example.com", title: "Example")
3961
}
40-
SettingsSection(title: "Advanced") {
62+
SettingsSection(title: "Advanced", showWarning: true) {
4163
SettingsLink(url: "https://example.com", title: "Example")
4264
} footer: {
4365
Text("Footer")

Docs/macos-download-open-confirm.png

130 KB
Loading

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ Use of the GitHub Copilot Xcode Extension is subject to [GitHub's Pre-Release Te
3737

3838
Updates can be downloaded and installed by the app.
3939

40-
1. A background item will be added to enable Copilot to start when Xcode is opened.
40+
1. Open the `GitHub Copilot for Xcode` application (from the `Applications` folder). Accept the security warning.
41+
<p align="center">
42+
<img alt="Screenshot of MacOS download permission request" src="./Docs/macos-download-open-confirm.png" width="529" />
43+
</p>
44+
45+
46+
1. A background item will be added to enable Copilot to start when `GitHub Copilot for Xcode` is opened.
4147
<p align="center">
4248
<img alt="Screenshot of background item" src="./Docs/background-item.png" width="370" />
4349
</p>
@@ -53,16 +59,16 @@ Use of the GitHub Copilot Xcode Extension is subject to [GitHub's Pre-Release Te
5359
</p>
5460

5561
The `Xcode Source Editor Extension` permission needs to be enabled manually. Click
56-
`Extension Permission` from the `Copilot for Xcode` settings to open the
62+
`Extension Permission` from the `GitHub Copilot for Xcode` application settings to open the
5763
System Preferences to the `Extensions` panel. Select `Xcode Source Editor`
5864
and enable `GitHub Copilot`:
5965

6066
<p align="center">
6167
<img alt="Screenshot of extension permission" src="./Docs/extension-permission.png" width="582" />
6268
</p>
6369

64-
1. After granting the extension permission, please restart Xcode to ensure the
65-
`Github Copilot` menu is available and not disabled under the Xcode `Editor`
70+
1. After granting the extension permission, open Xcode. Verify that the
71+
`Github Copilot` menu is available and enabled under the Xcode `Editor`
6672
menu.
6773
<br>
6874
<p align="center">

Server/package-lock.json

Lines changed: 29 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy