You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Download the Copilot for Xcode.app from the latest release, and extract it to the Applications folder.
@@ -46,12 +44,16 @@ The first time the actions run, the extension will ask for 2 types of permission
46
44
47
45
**About realtime suggestions**
48
46
49
-
The implementation feels fragile to me.
47
+
The implementation won't feel as smooth as that of VSCode.
50
48
51
49
The magic behind it is that it will keep calling the action from the menu when you are not typing, clicking or moving your mouse. So it will have to listen to those events, I am not sure if people like it.
52
50
53
51
Hope that next year, Apple can spend some time on Xcode Extensions.
54
52
53
+
Known Issues:
54
+
55
+
- If a realtime suggestions request is triggered, it will block your editor until the result is return.
56
+
55
57
## Prevent Suggestions Being Committed
56
58
57
59
Since the suggestions are presented as comments, they are in your code. If you are not careful enough, they can be committed to your git repo. To avoid that, I would recommend adding a pre-commit git hook to prevent this from happening. Maybe later I will add an action for that.
@@ -60,8 +62,8 @@ Since the suggestions are presented as comments, they are in your code. If you a
60
62
#!/bin/sh
61
63
62
64
# Check if the commit message contains the string
63
-
if git diff --cached --diff-filter=A| grep -q "/*========== Copilot Suggestion";then
64
-
echo"Error: Commit contains Copilot suggestions."
65
+
if git diff --cached --diff-filter=ACMR| grep -q "/*========== Copilot Suggestion";then
66
+
echo"Error: Commit contains Copilot suggestions generated by Copilot for Xcode."
65
67
exit 1
66
68
fi
67
69
```
@@ -95,7 +97,3 @@ fi
95
97
**Q: Will it work in future Xcode updates?**
96
98
97
99
> A: I don't know. This extension uses many tricks to do its job, and these tricks can break in the future.
98
-
99
-
## How It Works
100
-
Check my [other extension](https://github.com/intitni/XccurateFormatter), you can find a short introduction there.
0 commit comments