Skip to content

Commit a9b1816

Browse files
committed
Merge tag '0.6.0' into develop
2 parents d7fa221 + 01935eb commit a9b1816

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

Copilot for Xcode/InstructionView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ Text("""
2020
6. Go to `System Settings.app > Privacy & Security > Extensions > Xcode Source Editor` , check the **Copilot** checkbox to enable the extension.
2121
7. Restart Xcode, the Copilot commands should be available in the menu bar.
2222
""")
23+
24+
Text("Granting Permissions")
25+
.font(.title3)
26+
Text("""
27+
The app needs at least **Accessibility API** permissions to work. If you are using real-time suggestions, **Input Monitoring** is also needed.
28+
29+
please visit the [project's GitHub page](https://github.com/intitni/CopilotForXcode#granting-permissions-to-the-app) for instructions.
30+
""")
2331

2432
Text("Disable Extension")
2533
.font(.title3)

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Thanks to [LSP-copilot](https://github.com/TerminalFi/LSP-copilot) for showing t
3636
2. Click "Sign In", and you will be directed to a verification website provided by GitHub, and a user code will be pasted into your clipboard.
3737
3. After signing in, go back to the app and click "Confirm Sign-in" to finish.
3838

39-
### Giving Permissions to the App
39+
### Granting Permissions to the App
4040

4141
The first time the commands run, the extension will ask for the permissions needed.
4242

@@ -54,15 +54,17 @@ Alternatively, you can skip the Launch Agent part and use other applications to
5454

5555
You can download the latest version manually from the latest [release](https://github.com/intitni/CopilotForXcode/releases).
5656

57-
If you are upgrading from a version lower than 0.5.1, don't forget to click `Restart XPC Service` in the application after the update to kill the old version and start the new one.
57+
If you are upgrading from a version lower than 0.6.0, don't forget to click `Restart XPC Service` in the application after the update to kill the old version and start the new one.
5858

5959
If you want to keep track of the new releases, you can watch the releases of this repo to get notifications about updates.
6060

61+
If you find that some of the features are no longer working, please first try regranting permissions to the app.
62+
6163
## Commands
6264

6365
- Get Suggestions: Get suggestions for the editing file at the current cursor position.
64-
- Next Suggestion: If there is more than 1 suggestion, switch to the next one.
65-
- Previous Suggestion: If there is more than 1 suggestion, switch to the previous one.
66+
- Next Suggestion: If there is more than one suggestion, switch to the next one.
67+
- Previous Suggestion: If there is more than one suggestion, switch to the previous one.
6668
- Accept Suggestion: Add the suggestion to the code.
6769
- Reject Suggestion: Remove the suggestion comments.
6870
- Turn On Real-time Suggestions: When turn on, Copilot will auto-insert suggestion comments to your code while editing.

Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
APP_VERSION = 0.5.0
2-
APP_BUILD = 18
1+
APP_VERSION = 0.6.0
2+
APP_BUILD = 20

XPCService/main.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ func setupRestartOnUpdate() {
2727
guard let url = Bundle.main.executableURL else { return }
2828
let checker = await FileChangeChecker(fileURL: url)
2929

30-
// If Xcode or Copilot for Xcode is launched, check if the executable of this program is
30+
// If Xcode or Copilot for Xcode is made active, check if the executable of this program is
3131
// changed.
3232
// If changed, restart the launch agent.
3333

3434
let sequence = NSWorkspace.shared.notificationCenter
35-
.notifications(named: NSWorkspace.didLaunchApplicationNotification)
35+
.notifications(named: NSWorkspace.didActivateApplicationNotification)
3636
for await notification in sequence {
3737
try Task.checkCancellation()
3838
guard let app = notification
@@ -56,7 +56,11 @@ func setupRestartOnUpdate() {
5656
do {
5757
try await manager.restartLaunchAgent()
5858
} catch {
59-
os_log(.error, "XPC Service failed to restart. %{public}s", error.localizedDescription)
59+
os_log(
60+
.error,
61+
"XPC Service failed to restart. %{public}s",
62+
error.localizedDescription
63+
)
6064
}
6165
#endif
6266
}

0 commit comments

Comments
 (0)