Skip to content

Commit 0fa3fac

Browse files
committed
Update README.md
1 parent dc0b117 commit 0fa3fac

1 file changed

Lines changed: 36 additions & 22 deletions

File tree

README.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ Copilot for Xcode is an Xcode Source Editor Extension that provides GitHub Copil
2424
- [Enable the Extension](#enable-the-extension)
2525
- [Granting Permissions to the App](#granting-permissions-to-the-app)
2626
- [Setting Up Key Bindings](#setting-up-key-bindings)
27-
- [Setting Up GitHub Copilot](#setting-up-github-copilot)
28-
- [Setting Up Codeium](#setting-up-codeium)
29-
- [Setting Up OpenAI API Key](#setting-up-openai-api-key)
27+
- [Setting Up Suggestion Feature](#setting-up-suggestion-feature)
28+
- [Setting Up GitHub Copilot](#setting-up-github-copilot)
29+
- [Setting Up Codeium](#setting-up-codeium)
30+
- [Setting Up Chat Feature](#setting-up-chat-feature)
3031
- [Managing `CopilotForXcodeExtensionService.app`](#managing-copilotforxcodeextensionserviceapp)
3132
- [Update](#update)
3233
- [Feature](#feature)
@@ -54,7 +55,8 @@ For suggestion features:
5455

5556
For chat and prompt to code features:
5657

57-
- Valid OpenAI API key.
58+
- A valid OpenAI API key.
59+
- Access to other LLMs, such as Azure OpenAI and LocalAI.
5860

5961
## Permissions Required
6062

@@ -118,36 +120,45 @@ Essentially using `⌥⇧` as the "access" key combination for all bindings.
118120

119121
Another convenient method to access commands is by using the `⇧⌘/` shortcut to search for a command in the menu bar.
120122

121-
### Setting Up GitHub Copilot
123+
### Setting Up Suggestion Feature
122124

123-
1. In the host app, switch to the service tab and click on GitHub Copilot to access your GitHub Copilot account settings.
124-
2. Click "Install" to install the language server.
125-
3. Optionally setup the path to Node. The default value is just `node`, Copilot for Xcode.app will try to find the Node from the PATH available in a login shell. If your Node is installed somewhere else, you can run `which node` from terminal to get the path.
126-
4. 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.
127-
5. After signing in, go back to the app and click "Confirm Sign-in" to finish.
125+
#### Setting Up GitHub Copilot
126+
127+
1. In the host app, navigate to "Service - GitHub Copilot" to access your GitHub Copilot account settings.
128+
2. Click on "Install" to install the language server.
129+
3. Optionally, set up the path to Node. The default value is simply `node`. Copilot for Xcode.app will attempt to locate Node from the following directories: `/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`.
130+
131+
If your Node installation is located elsewhere, you can run `which node` from the terminal to obtain the correct path.
132+
133+
If you are using a node version manager that provides a shim executable, you will need to find the path to the actual executable. Please refer to the FAQ for more information.
134+
135+
4. Click on "Sign In", and you will be redirected to a verification website provided by GitHub. A user code will be copied to your clipboard.
136+
5. After signing in, return to the app and click on "Confirm Sign-in" to complete the process.
128137
6. Go to "Feature - Suggestion" and update the feature provider to "GitHub Copilot".
129138

130139
The installed language server is located at `~/Library/Application Support/com.intii.CopilotForXcode/GitHub Copilot/executable/`.
131140

132-
### Setting Up Codeium
141+
#### Setting Up Codeium
133142

134-
1. In the host app, switch to the service tab and click Codeium to access the Codeium account settings.
135-
2. Click "Install" to install the language server.
136-
3. Click "Sign In", and you will be directed to codeium.com. After signing in, a token will be presented. You will need to paste the token back to the app to finish signing in.
143+
1. In the host app, navigate to "Service - Codeium" to access the Codeium account settings.
144+
2. Click on "Install" to install the language server.
145+
3. Click on "Sign In" and you will be redirected to codeium.com. After signing in, a token will be provided. You need to copy and paste this token back into the app to complete the sign-in process.
137146
4. Go to "Feature - Suggestion" and update the feature provider to "Codeium".
138147

139148
> The key is stored in the keychain. When the helper app tries to access the key for the first time, it will prompt you to enter the password to access the keychain. Please select "Always Allow" to let the helper app access the key.
140149
141150
The installed language server is located at `~/Library/Application Support/com.intii.CopilotForXcode/Codeium/executable/`.
142151

143-
### Setting Up OpenAI API Key
152+
### Setting Up Chat Feature
144153

145-
1. In the host app, click OpenAI to enter the OpenAI account settings.
146-
2. Enter your api key to the text field.
154+
1. In the host app, navigate to "Service - Chat Model".
155+
2. Update the OpenAI model or create a new one if necessary. Use the test button to verify the model.
156+
3. Optionally, set up the embedding model in "Service - Embedding Model", which is required for a subset of the chat feature.
157+
4. Go to "Feature - Chat" and update the chat/embedding feature provider with the one you just updated/created.
147158

148159
### Managing `CopilotForXcodeExtensionService.app`
149160

150-
This app runs whenever you open `Copilot for Xcode.app` or `Xcode.app`. You can quit it with its menu bar item that looks like a steering wheel.
161+
This app runs whenever you open `Copilot for Xcode.app` or `Xcode.app`. You can quit it with its menu bar item that looks like a tentacle.
151162

152163
You can also set it to quit automatically when the above 2 apps are closed.
153164

@@ -161,9 +172,7 @@ brew upgrade --cask copilot-for-xcode
161172

162173
Alternatively, You can use the in-app updater or download the latest version manually from the latest [release](https://github.com/intitni/CopilotForXcode/releases).
163174

164-
After updating, please restart Xcode to allow the extension to reload.
165-
166-
If you are upgrading from a version lower than **0.7.0**, please run `Copilot for Xcode.app` at least once to let it set up the new launch agent for you and re-grant the permissions according to the new rules.
175+
After updating, please open Copilot for Xcode.app once and restart Xcode to allow the extension to reload.
167176

168177
If you find that some of the features are no longer working, please first try regranting permissions to the app.
169178

@@ -193,6 +202,9 @@ Whenever your code is updated, the app will automatically fetch suggestions for
193202
- Previous Suggestion: If there is more than one suggestion, switch to the previous one.
194203
- Accept Suggestion: Add the suggestion to the code.
195204
- Reject Suggestion: Remove the suggestion comments.
205+
206+
Commands called by the app:
207+
196208
- Real-time Suggestions: Call only by Copilot for Xcode. When suggestions are successfully fetched, Copilot for Xcode will run this command to present the suggestions.
197209
- Prefetch Suggestions: Call only by Copilot for Xcode. In the background, Copilot for Xcode will occasionally run this command to prefetch real-time suggestions.
198210

@@ -283,6 +295,7 @@ This feature is recommended when you need to update a specific piece of code. So
283295
#### Commands
284296

285297
- Prompt to Code: Open a prompt to code window, where you can use natural language to write or edit selected code.
298+
- Accept Prompt to Code: Accept the result of prompt to code.
286299

287300
### Custom Commands
288301

@@ -310,6 +323,7 @@ These features are included in another repo, and are not open sourced.
310323

311324
The currently available Plus features include:
312325

326+
- Unlimited chat/embedding models.
313327
- Tab to accept suggestions.
314328
- Persisted chat panel.
315329
- Browser tab in chat panel.
@@ -326,7 +340,7 @@ The request contains only the license key, the email address (only on activation
326340

327341
## Limitations
328342

329-
- The extension uses some dirty tricks to get the file and project/workspace paths. It may fail, it may be incorrect, especially when you have multiple Xcode windows running, and maybe even worse when they are in different displays. I am not sure about that though.
343+
- The extension utilizes various tricks to monitor the state of Xcode. It may fail, it may be incorrect, especially when you have multiple Xcode windows running, and maybe even worse when they are in different displays. I am not sure about that though.
330344

331345
## License
332346

0 commit comments

Comments
 (0)