Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e9a1f72
Add top bar to prompt to code panel
intitni Aug 23, 2023
cbf25db
Support detaching prompt to code from selection range
intitni Aug 23, 2023
832d7b7
Add a command dedicated to accept prompt to code suggestion
intitni Aug 23, 2023
22019c5
Move FocusedCodeFinder to Tool
intitni Aug 23, 2023
9090237
Add focusedEditorContent to XcodeInspector
intitni Aug 24, 2023
ebaebb3
Add attach to code to prompt to code service
intitni Aug 24, 2023
33f4d78
Update prompt to code
intitni Aug 24, 2023
18203a5
Change re-attach to attach to the initial selection range
intitni Aug 25, 2023
cf3a879
Migrate prompt to code to use TCA
intitni Aug 25, 2023
a5e0935
Hook up the service
intitni Aug 26, 2023
07b1c96
Setup promptToCodeAcceptHandler
intitni Aug 26, 2023
0baa394
Fix accepting when detached
intitni Aug 26, 2023
9402028
Disable text field when responding
intitni Aug 26, 2023
e8b8fbd
Add animation to toggle
intitni Aug 26, 2023
acd7965
Merge branch 'feature/prompt-to-code-detach' into develop
intitni Aug 26, 2023
b75cbcf
Update
intitni Aug 26, 2023
34e6cee
Merge branch 'main' into develop
intitni Aug 26, 2023
ecb962c
Support command+l to focus on chat tab input field
intitni Aug 28, 2023
2f0be3f
Fix keyboard shortcut conflicts in chat tabs
intitni Aug 28, 2023
8171174
Merge branch 'feature/commnad-l-to-focus' into develop
intitni Aug 28, 2023
34ecb5d
Add a tiny reject/close button to compact suggestion panel
intitni Aug 28, 2023
91980c0
Support Codeium enterprise
intitni Aug 28, 2023
b526087
Merge branch 'feature/codeium-enterprise' into develop
intitni Aug 28, 2023
b504b9b
Update chat tab to build it's own tab item
intitni Aug 28, 2023
22c8056
Support editing bookmark
intitni Aug 28, 2023
45581f8
Support reordering bookmarks
intitni Aug 28, 2023
dcc56b4
Split chat tab item and menu
intitni Aug 29, 2023
4a589e7
Update browser tab
intitni Aug 29, 2023
b9de177
Fix warnings
intitni Aug 29, 2023
87c2339
Make RealtimeSuggestionController an actor
intitni Sep 1, 2023
2046e85
Merge tag '0.22.3' into develop
intitni Sep 2, 2023
b639bbc
Update
intitni Sep 2, 2023
c6a870a
Migrate extension service to use new way to setup model
intitni Sep 1, 2023
bdb8ee0
WIP
intitni Sep 1, 2023
6efa867
Change migrate version
intitni Sep 2, 2023
1c6af3f
Add apiKey Keychain
intitni Sep 2, 2023
012d188
Add chat model management view
intitni Sep 2, 2023
7050a2e
Add chat model and embedding model settings view
intitni Sep 3, 2023
51a45c7
Fix Keychain.getAll, change scope implementation
intitni Sep 4, 2023
7cb8e6e
Fix migrateTo240 to apply even if the settings already has a default …
intitni Sep 4, 2023
70a1ab6
Add test to test plan
intitni Sep 4, 2023
fb8470b
Fix
intitni Sep 4, 2023
fdf5256
Remove the scroll view wrapper
intitni Sep 4, 2023
c8e720c
Adjust AIModelManagementView style
intitni Sep 4, 2023
40eba80
Sort api key names
intitni Sep 4, 2023
60cfdf4
Adjust implementation of text field with picker
intitni Sep 4, 2023
80a03d0
Trim white spaces and newlines from suggested base urls
intitni Sep 4, 2023
3bce5a8
Trim whitespaces and newlines
intitni Sep 4, 2023
90b72d1
Fix max token display
intitni Sep 4, 2023
2346fad
Update chat settings to use new models
intitni Sep 4, 2023
8dc12f0
Add support to store api keys in user defaults
intitni Sep 4, 2023
bc43b91
Disable function calling for models that don't support it
intitni Sep 4, 2023
de604b1
Remove AzureView and OpenAIView
intitni Sep 4, 2023
192d3be
Remove unused dependency
intitni Sep 4, 2023
3675e8a
Pass configuration to DynamicContextController
intitni Sep 4, 2023
eb42acd
Add feature flag
intitni Sep 4, 2023
3267270
Update target dependency
intitni Sep 4, 2023
95b5b84
Fix default max tokens for embedding models
intitni Sep 4, 2023
5ef37ab
Merge branch 'feature/new-way-to-setup-models' into develop
intitni Sep 4, 2023
eb8a5ea
Update
intitni Sep 4, 2023
06a98fd
Fix accepting suggestions from the middle of a line
intitni Sep 4, 2023
6a7cab7
Merge branch 'feature/fix-suggestion-acception-0904' into develop
intitni Sep 4, 2023
da44c76
Reimplement suffix recovering
intitni Sep 4, 2023
205c9b3
Remove the first adjacent placeholder when accepting suggestions
intitni Sep 4, 2023
e17bdd4
Update
intitni Sep 5, 2023
2486200
Remove existed chat tabs before restoring
intitni Sep 5, 2023
2815292
Fix suggestion panel position Y
intitni Sep 5, 2023
6a690f7
Adjust prompt to code panel
intitni Sep 5, 2023
d89e949
Fix system promt
intitni Sep 5, 2023
efcaa94
Change api of PromptToCodeServiceType
intitni Sep 6, 2023
ecd74a8
Pass line annotations to prompt to code service
intitni Sep 6, 2023
8f9bc5c
Support indentation recovering in prompt to code service
intitni Sep 6, 2023
4fddb24
Merge branch 'feature/prompt-to-code-with-line-annotation' into develop
intitni Sep 6, 2023
7225b05
Bump version to 0.23.0
intitni Sep 6, 2023
7b61ab8
Adjust transitions
intitni Sep 6, 2023
c591718
Make every field of CompletionStreamDataTrunk optional
intitni Sep 6, 2023
dc0b117
If there is no selection, automatically detach
intitni Sep 6, 2023
0fa3fac
Update README.md
intitni Sep 6, 2023
b7017e4
Update DEVELOPMENT.md
intitni Sep 6, 2023
1fed399
Fix prompt
intitni Sep 6, 2023
8ba71c5
Update
intitni Sep 6, 2023
03fcec5
Add debug buttons
intitni Sep 6, 2023
350a91d
Tweak base url picker
intitni Sep 6, 2023
b2b6bf0
Make Xcode active when cancelling prompt to code
intitni Sep 6, 2023
c0746aa
Update appcast
intitni Sep 6, 2023
f91cbe5
Merge branch 'release/0.23.0'
intitni Sep 6, 2023
5db1cf2
Fix unit test
intitni Sep 6, 2023
a964bf6
Adjust selection text
intitni Sep 6, 2023
d06f430
Bump version to 0.23.1
intitni Sep 6, 2023
cbe4dc2
Update appcast.xml
intitni Sep 6, 2023
919a60c
Merge branch 'hotfix/fix-tests'
intitni Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
intitni committed Sep 6, 2023
commit 0fa3facdee4804759aa757ffe3f9d03b0edf4ba5
58 changes: 36 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ Copilot for Xcode is an Xcode Source Editor Extension that provides GitHub Copil
- [Enable the Extension](#enable-the-extension)
- [Granting Permissions to the App](#granting-permissions-to-the-app)
- [Setting Up Key Bindings](#setting-up-key-bindings)
- [Setting Up GitHub Copilot](#setting-up-github-copilot)
- [Setting Up Codeium](#setting-up-codeium)
- [Setting Up OpenAI API Key](#setting-up-openai-api-key)
- [Setting Up Suggestion Feature](#setting-up-suggestion-feature)
- [Setting Up GitHub Copilot](#setting-up-github-copilot)
- [Setting Up Codeium](#setting-up-codeium)
- [Setting Up Chat Feature](#setting-up-chat-feature)
- [Managing `CopilotForXcodeExtensionService.app`](#managing-copilotforxcodeextensionserviceapp)
- [Update](#update)
- [Feature](#feature)
Expand Down Expand Up @@ -54,7 +55,8 @@ For suggestion features:

For chat and prompt to code features:

- Valid OpenAI API key.
- A valid OpenAI API key.
- Access to other LLMs, such as Azure OpenAI and LocalAI.

## Permissions Required

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

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

### Setting Up GitHub Copilot
### Setting Up Suggestion Feature

1. In the host app, switch to the service tab and click on GitHub Copilot to access your GitHub Copilot account settings.
2. Click "Install" to install the language server.
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.
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.
5. After signing in, go back to the app and click "Confirm Sign-in" to finish.
#### Setting Up GitHub Copilot

1. In the host app, navigate to "Service - GitHub Copilot" to access your GitHub Copilot account settings.
2. Click on "Install" to install the language server.
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`.

If your Node installation is located elsewhere, you can run `which node` from the terminal to obtain the correct path.

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.

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.
5. After signing in, return to the app and click on "Confirm Sign-in" to complete the process.
6. Go to "Feature - Suggestion" and update the feature provider to "GitHub Copilot".

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

### Setting Up Codeium
#### Setting Up Codeium

1. In the host app, switch to the service tab and click Codeium to access the Codeium account settings.
2. Click "Install" to install the language server.
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.
1. In the host app, navigate to "Service - Codeium" to access the Codeium account settings.
2. Click on "Install" to install the language server.
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.
4. Go to "Feature - Suggestion" and update the feature provider to "Codeium".

> 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.

The installed language server is located at `~/Library/Application Support/com.intii.CopilotForXcode/Codeium/executable/`.

### Setting Up OpenAI API Key
### Setting Up Chat Feature

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

### Managing `CopilotForXcodeExtensionService.app`

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.
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.

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

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

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

After updating, please restart Xcode to allow the extension to reload.

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.
After updating, please open Copilot for Xcode.app once and restart Xcode to allow the extension to reload.

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

Expand Down Expand Up @@ -193,6 +202,9 @@ Whenever your code is updated, the app will automatically fetch suggestions for
- Previous Suggestion: If there is more than one suggestion, switch to the previous one.
- Accept Suggestion: Add the suggestion to the code.
- Reject Suggestion: Remove the suggestion comments.

Commands called by the app:

- 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.
- Prefetch Suggestions: Call only by Copilot for Xcode. In the background, Copilot for Xcode will occasionally run this command to prefetch real-time suggestions.

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

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

### Custom Commands

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

The currently available Plus features include:

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

## Limitations

- 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.
- 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.

## License

Expand Down