Skip to content

Commit 2046e85

Browse files
committed
Merge tag '0.22.3' into develop
# Conflicts: # Version.xcconfig
2 parents 87c2339 + 5898b16 commit 2046e85

File tree

6 files changed

+76
-7
lines changed

6 files changed

+76
-7
lines changed

Core/Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ let package = Package(
119119
"LaunchAgentManager",
120120
"PlusFeatureFlag",
121121
.product(name: "Toast", package: "Tool"),
122+
.product(name: "SharedUIComponents", package: "Tool"),
122123
.product(name: "SuggestionModel", package: "Tool"),
123124
.product(name: "MarkdownUI", package: "swift-markdown-ui"),
124125
.product(name: "OpenAIService", package: "Tool"),

Core/Sources/HostApp/AccountSettings/CopilotView.swift

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import AppKit
22
import Client
33
import GitHubCopilotService
44
import Preferences
5+
import SharedUIComponents
56
import SuggestionModel
67
import SwiftUI
78

@@ -32,7 +33,7 @@ struct CopilotView: View {
3233
@Published var installationStep: GitHubCopilotInstallationManager.InstallationStep?
3334

3435
init() {}
35-
36+
3637
init(
3738
installationStatus: GitHubCopilotInstallationManager.InstallationStatus,
3839
installationStep: GitHubCopilotInstallationManager.InstallationStep?
@@ -142,10 +143,23 @@ struct CopilotView: View {
142143
HStack {
143144
VStack(alignment: .leading, spacing: 8) {
144145
Form {
145-
TextField(text: $settings.nodePath, prompt: Text("node")) {
146+
TextField(
147+
text: $settings.nodePath,
148+
prompt: Text(
149+
"node"
150+
)
151+
) {
146152
Text("Path to Node (v17+)")
147153
}
148154

155+
Text(
156+
"Provide the path to the executable if it can't be found by the app, shim executable is not supported"
157+
)
158+
.lineLimit(10)
159+
.foregroundColor(.secondary)
160+
.font(.callout)
161+
.dynamicHeightTextInFormWorkaround()
162+
149163
Picker(selection: $settings.runNodeWith) {
150164
ForEach(NodeRunner.allCases, id: \.rawValue) { runner in
151165
switch runner {
@@ -160,11 +174,28 @@ struct CopilotView: View {
160174
} label: {
161175
Text("Run Node with")
162176
}
177+
178+
Group {
179+
switch settings.runNodeWith {
180+
case .env:
181+
Text(
182+
"PATH: `/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`"
183+
)
184+
case .bash:
185+
Text("PATH inherited from bash configurations.")
186+
case .shell:
187+
Text("PATH inherited from $SHELL configurations.")
188+
}
189+
}
190+
.lineLimit(10)
191+
.foregroundColor(.secondary)
192+
.font(.callout)
193+
.dynamicHeightTextInFormWorkaround()
163194
}
164195

165-
Text(
166-
"You may have to restart the helper app to apply the changes. To do so, simply close the helper app by clicking on the menu bar icon that looks like a steer wheel, it will automatically restart as needed."
167-
)
196+
Text("""
197+
You may have to restart the helper app to apply the changes. To do so, simply close the helper app by clicking on the menu bar icon that looks like a tentacle, it will automatically restart as needed.
198+
""")
168199
.lineLimit(6)
169200
.fixedSize(horizontal: false, vertical: true)
170201
.foregroundColor(.secondary)
@@ -236,9 +267,16 @@ struct CopilotView: View {
236267

237268
Form {
238269
Toggle(
239-
"Ignore Trailing New Lines and Whitespaces",
270+
"Remove Extra New Lines Generated by GitHub Copilot",
240271
isOn: $settings.gitHubCopilotIgnoreTrailingNewLines
241272
)
273+
Text(
274+
"Sometimes GitHub Copilot may generate extra unwanted new lines at the end of a suggestion. If you don't like that, you can turn this toggle on."
275+
)
276+
.lineLimit(10)
277+
.foregroundColor(.secondary)
278+
.font(.callout)
279+
.dynamicHeightTextInFormWorkaround()
242280
Toggle("Verbose Log", isOn: $settings.gitHubCopilotVerboseLog)
243281
}
244282

DEVELOPMENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Most of the logics are implemented inside the package `Core` and `Tool`.
2929

3030
1. Update the xcconfig files, launchAgent.plist, and Tool/Configs/Configurations.swift.
3131
2. Build or archive the Copilot for Xcode target.
32+
3. If Xcode complains that the pro package doesn't exist, please remove the package from the project, and update the last function in Core/Package.swift to return false.
3233

3334
## Testing Extension
3435

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import SwiftUI
2+
3+
struct DynamicHeightTextInFormWorkaroundModifier: ViewModifier {
4+
func body(content: Content) -> some View {
5+
HStack(spacing: 0) {
6+
content
7+
Spacer()
8+
}
9+
.fixedSize(horizontal: false, vertical: true)
10+
}
11+
}
12+
13+
public extension View {
14+
func dynamicHeightTextInFormWorkaround() -> some View {
15+
modifier(DynamicHeightTextInFormWorkaroundModifier())
16+
}
17+
}

Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
APP_VERSION = 0.22.2
1+
APP_VERSION = 0.22.3
22
APP_BUILD = 233

appcast.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
<channel>
44
<title>Copilot for Xcode</title>
55

6+
<item>
7+
<title>0.22.3</title>
8+
<pubDate>Sat, 02 Sep 2023 15:51:16 +0800</pubDate>
9+
<sparkle:version>233</sparkle:version>
10+
<sparkle:shortVersionString>0.22.3</sparkle:shortVersionString>
11+
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
12+
<sparkle:releaseNotesLink>
13+
https://github.com/intitni/CopilotForXcode/releases/tag/0.22.3
14+
</sparkle:releaseNotesLink>
15+
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.22.3/Copilot.for.Xcode.app.zip" length="31397137" type="application/octet-stream" sparkle:edSignature="1wu9QYOxI9TkSY2/+JcRZFv/9WjvRwMZ0j1Hdt3x4hh0QSxP5xELKJZzMkf7yOTz0qyNM/5mbmAmCtO6nP4gAg=="/>
16+
</item>
17+
618
<item>
719
<title>0.22.2</title>
820
<pubDate>Sat, 19 Aug 2023 10:48:38 +0800</pubDate>

0 commit comments

Comments
 (0)