Skip to content

Commit e417f8a

Browse files
committed
Merge tag '0.10.0' into develop
2 parents 345b10c + 0ea2342 commit e417f8a

4 files changed

Lines changed: 53 additions & 12 deletions

File tree

DEVELOPMENT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ To run unit tests, just run test from the `Copilot for Xcode` target.
4141

4242
For new tests, they should be added to the `TestPlan.xctestplan`.
4343

44+
## Chat Plugins
45+
46+
To create a chat plugin, please use the `TerminalChatPlugin` as an example. You should add your plugin to the target `ChatPlugin` and register it in `ChatService`.
47+
4448
## Code Style
4549

4650
We use SwiftFormat to format the code.

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Thanks to [LSP-copilot](https://github.com/TerminalFi/LSP-copilot) for showing t
1414
- [Permissions Required](#permissions-required)
1515
- [Installation and Setup](#installation-and-setup)
1616
- [Install](#install)
17+
- [Enable the Extension](#enable-the-extension)
1718
- [Sign In GitHub Copilot](#sign-in-github-copilot)
19+
- [Setting Up OpenAI API Key](#setting-up-openai-api-key)
1820
- [Granting Permissions to the App](#granting-permissions-to-the-app)
1921
- [Managing `CopilotForXcodeExtensionService.app`](#managing-copilotforxcodeextensionserviceapp)
2022
- [Update](#update)
@@ -23,7 +25,8 @@ Thanks to [LSP-copilot](https://github.com/TerminalFi/LSP-copilot) for showing t
2325
- [Prevent Suggestions Being Committed](#prevent-suggestions-being-committed)
2426
- [Limitations](#limitations)
2527
- [License](#license)
26-
- [FAQ](https://github.com/intitni/CopilotForXcode/issues/65)
28+
29+
For frequently asked questions, check [FAQ](https://github.com/intitni/CopilotForXcode/issues/65).
2730

2831
For development instruction, check [Development.md](DEVELOPMENT.md).
2932

@@ -57,18 +60,26 @@ Then set it up with the following steps:
5760

5861
1. Open the app, the app will create a launch agent to setup a background running Service that does the real job.
5962
2. Optionally setup the path to Node. The default value is just `node`, Copilot for Xcode.app will try to find the Node from `/usr/bin:/usr/local/bin`. If your Node is installed somewhere else, you can run `which node` from terminal to get the path.
60-
3. Enable the extension in `System Settings.app`.
6163

62-
From the Apple menu located in the top-left corner of your screen click `System Settings`. Navigate to `Privacy & Security` then toward the bottom click `Extensions`. Click `Xcode Source Editor` and tick `Copilot`.
64+
### Enable the Extension
65+
66+
Enable the extension in `System Settings.app`.
67+
68+
From the Apple menu located in the top-left corner of your screen click `System Settings`. Navigate to `Privacy & Security` then toward the bottom click `Extensions`. Click `Xcode Source Editor` and tick `Copilot`.
6369

64-
If you are using macOS Monterey, enter the `Extensions` menu in `System Preferences.app` with its dedicated icon.
70+
If you are using macOS Monterey, enter the `Extensions` menu in `System Preferences.app` with its dedicated icon.
6571

6672
### Sign In GitHub Copilot
6773

68-
1. In the app, refresh the Copilot status (it may fail for the first time, try at least one more time).
74+
1. In the host app, click GitHub Copilot to enter the GitHub Copilot account settings.
6975
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.
7076
3. After signing in, go back to the app and click "Confirm Sign-in" to finish.
7177

78+
### Setting Up OpenAI API Key
79+
80+
1. In the host app, click OpenAI to enter the OpenAI account settings.
81+
2. Enter your api key to the text field.
82+
7283
### Granting Permissions to the App
7384

7485
The first time the app is open and command run, the extension will ask for the necessary permissions.
@@ -99,8 +110,6 @@ Alternatively, You can use the in-app updater or download the latest version man
99110

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

102-
If you want to keep track of the new releases, you can watch the releases of this repo to get notifications about updates.
103-
104113
If you find that some of the features are no longer working, please first try regranting permissions to the app.
105114

106115
## Commands
@@ -127,6 +136,17 @@ Whenever you stop typing for a few milliseconds, the app will automatically fetc
127136

128137
Chat commands are not available in comment mode.
129138

139+
#### Chat Plugins
140+
141+
The chat panel supports chat plugins that may not require an OpenAI API key. For example, if you need to use the `/run` plugin, you just type
142+
```
143+
/run echo hello
144+
```
145+
146+
| Command | Description |
147+
|:---:|---|
148+
| `/run` | Runs the command under the project root. You can also use environment variable `PROJECT_ROOT` to get the project root and `FILE_PATH` to get the editing file path.|
149+
130150
## Key Bindings
131151

132152
It looks like there is no way to add default key bindings to commands, but you can set them up in `Xcode settings > Key Bindings`. You can filter the list by typing `copilot` in the search bar.
@@ -164,7 +184,6 @@ fi
164184
- The first run of the extension will be slow. Be patient.
165185
- 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.
166186
- The suggestions are presented as C-style comments in comment mode, they may break your code if you are editing a JSON file or something.
167-
- When a real-time suggestion request is triggered, there is a chance that it may briefly block the editor. This can occur at most once for each file after each restart of the extension because the extension needs to initiate real-time suggestion by clicking an item from the menu bar. However, once a command has been executed and some information is cached, the extension will be able to trigger real-time suggestion using a different method.
168187

169188
## License
170189

Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
APP_VERSION = 0.9.1
2-
APP_BUILD = 64
1+
APP_VERSION = 0.10.0
2+
APP_BUILD = 70

appcast.xml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,30 @@
33
<channel>
44
<title>Copilot for Xcode</title>
55
<item>
6-
<title>0.9.0</title>
6+
<title>0.10.0</title>
7+
<pubDate>Fri, 31 Mar 2023 23:12:28 +0800</pubDate>
8+
<sparkle:version>70</sparkle:version>
9+
<sparkle:shortVersionString>0.10.0</sparkle:shortVersionString>
10+
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
11+
<sparkle:releaseNotesLink>
12+
https://github.com/intitni/CopilotForXcode/releases/tag/0.10.0
13+
</sparkle:releaseNotesLink>
14+
<enclosure
15+
url="https://github.com/intitni/CopilotForXcode/releases/download/0.10.0/Copilot.for.Xcode.app.zip"
16+
length="19323141" type="application/octet-stream"
17+
sparkle:edSignature="ZZaFNR57G+EzHtYM3+xCJRSSMZXX1Leq2HKFaZBpD/lUW38z6oB4D561toB4r5M8nelfkNEJ3dLPgIUYl1qNBw==" />
18+
</item>
19+
20+
<item>
21+
<title>
22+
0.9.0</title>
723
<pubDate>Sat, 25 Mar 2023 23:43:42 +0800</pubDate>
824
<sparkle:version>62</sparkle:version>
925
<sparkle:shortVersionString>0.9.0</sparkle:shortVersionString>
1026
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
11-
<sparkle:releaseNotesLink>https://github.com/intitni/CopilotForXcode/releases/tag/0.9.0</sparkle:releaseNotesLink>
27+
<sparkle:releaseNotesLink>
28+
https://github.com/intitni/CopilotForXcode/releases/tag/0.9.0
29+
</sparkle:releaseNotesLink>
1230
<enclosure
1331
url="https://github.com/intitni/CopilotForXcode/releases/download/0.9.0/Copilot.for.Xcode.app.zip"
1432
sparkle:edSignature="VMbUoqNEeVUMhJVkz+yVljTC7m0PxQFxv1uDJnXB1AUwoe1JMTMR4kBiriul+UWMoXTeSB6Bo+1TTJDOBbToDA=="

0 commit comments

Comments
 (0)