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
# Custom Suggestion Service for Copilot for Xcode (WIP)
1
+
# Custom Suggestion Service for Copilot for Xcode
2
2
3
-
This is an extension that provides a custom suggestion service for Copilot for Xcode. It enables you to use a chat model to provide suggestions for the code you are writing.
3
+
This extension offers a custom suggestion service for [Copilot for Xcode](https://github.com/intitni/CopilotForXcode), allowing you to leverage a chat model to enhance the suggestions provided as you write code.
4
4
5
5
## Installation
6
6
7
-
1. Install the app to the Applications folder.
8
-
2. Open the app.
9
-
3. Open Copilot for Xcode, and click "Extensions".
10
-
4. Click "Select Extensions" and select this app.
11
-
5. Then you can change the suggestion provider to this app.
7
+
1. Install the application in the Applications folder.
8
+
2. Launch the application.
9
+
3. Open Copilot for Xcode and navigate to "Extensions".
10
+
4. Click "Select Extensions" and enable this extension.
11
+
5. You can now set this application as the suggestion provider in the suggestion settings.
12
+
13
+
## Update
14
+
15
+
To update the app, you can do so directly within the app itself. Once updated, you should perform one of the following steps to ensure Copilot for Xcode recognizes the new version:
16
+
17
+
1. Restart the `CopilotForXcodeExtensionService`.
18
+
2. Alternatively, terminate the "Custom Suggestion Service (CopilotForXcodeExtensionService)" process, open the extension manager in Copilot for Xcode, and click "Restart Extensions".
19
+
20
+
We are exploring better methods to tweak the update process.
12
21
13
22
## Settings
14
23
15
-
It is recommended to use Tabby since they have been working on the prompt fro a long time. Request strategies will not work for Tabby.
24
+
The app supports three types of suggestion services:
25
+
26
+
- Models with chat completions API
27
+
- Models with completions API
28
+
-[Tabby](https://tabby.tabbyml.com)
29
+
30
+
It is recommended to use Tabby since they have extensive experience in crafting prompts.
16
31
17
-
If you don't want to use Tabby, it is recommended to use a custom model with completion API, and use the default request strategy.
32
+
If you choose not to use Tabby, it is advisable to use a custom model with the completions API and employ the default request strategy.
18
33
19
-
Make sure the format of the prompt is is this simple when using the completion API.
34
+
Ensure that the prompt format remains as simple as the following:
20
35
21
36
```
22
37
{System}
@@ -26,12 +41,12 @@ Make sure the format of the prompt is is this simple when using the completion A
26
41
27
42
## Strategies
28
43
29
-
- Default: This strategy explains everything carefully to the model and ask it to generate a suggestion.
30
-
- Naive: This strategy remixes the code and snippets into the prompt to fool the model that it's writing code at the end of a file.
31
-
- Continue: This strategy use the "Please Continue" technique to fool the model that it has generated a part of the suggestion, but needs to continue to generate the rest. (Only work with the chat completion API).
44
+
- Default: This strategy meticulously explains the context to the model, prompting it to generate a suggestion.
45
+
- Naive: This strategy rearranges the code in a naive way to trick the model into believing it's appending code at the end of a file.
46
+
- Continue: This strategy employs the "Please Continue" technique to persuade the model that it has started a suggestion and must continue to complete it. (Only effective with the chat completion API).
32
47
33
48
## Contribution
34
49
35
-
Prompt engineering is really hard and we really need your help.
50
+
Prompt engineering is a challenging task, and your assistance is invaluable.
36
51
37
-
Most hard things are in the `Shared` package. If you want to add a new model service, please check the file `CodeCompletionService.swift`. If you want to add new request strategies, please check the file `RequestStrategy.swift`.
52
+
The most complex things are located within the `Shared` package. To add a new service, please refer to the `CodeCompletionService.swift` file. To add new request strategies, check out the `RequestStrategy.swift` file.
0 commit comments