monacopilot 0.18.7 → 0.18.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -21,16 +21,17 @@ Add GitHub Copilot-style AI completions to your Monaco Editor in minutes! 🚀
21
21
 
22
22
  ### Quick Start (3 Simple Steps)
23
23
 
24
- 1. **Install the package**
24
+ #### Install the package
25
25
 
26
26
  ```bash
27
27
  npm install monacopilot
28
28
  ```
29
29
 
30
- 2. **Register the AI completion to your editor**
30
+ #### Register the AI completion to your editor
31
+
32
+ In your frontend code:
31
33
 
32
34
  ```javascript
33
- // In your frontend code
34
35
  import * as monaco from 'monaco-editor';
35
36
  import {registerCompletion} from 'monacopilot';
36
37
 
@@ -45,14 +46,13 @@ registerCompletion(monaco, editor, {
45
46
  });
46
47
  ```
47
48
 
48
- 3. **Create your completion API handler**
49
+ #### Create your completion API handler
49
50
 
50
- ```javascript
51
- // Create an API handler for the endpoint (e.g. /code-completion) you provided
52
- // in the `registerCompletion` function
53
- // to handle completion requests from the editor
51
+ Create an API handler for the endpoint (e.g. `/code-completion`) you provided in the `registerCompletion` function to handle completion requests from the editor.
52
+
53
+ Example using Express.js:
54
54
 
55
- // Example using Express.js
55
+ ```javascript
56
56
  import {Copilot} from 'monacopilot';
57
57
 
58
58
  const copilot = new Copilot(OPENAI_API_KEY, {
@@ -76,9 +76,10 @@ app.post('/code-completion', async (req, res) => {
76
76
  });
77
77
  ```
78
78
 
79
- You can use any backend framework or programming language for your API handler, as long as the endpoint is accessible from the browser. For non-JavaScript implementations, see [Cross-Language API Handler Implementation](#cross-language-api-handler-implementation).
79
+ **That's it! Your Monaco Editor now has AI-powered completions! 🎉**
80
80
 
81
- That's it! Your Monaco Editor now has AI-powered completions! 🎉
81
+ > [!NOTE]
82
+ > You can use any backend framework or programming language for your API handler, as long as the endpoint is accessible from the browser. For non-JavaScript implementations, see [Cross-Language API Handler Implementation](#cross-language-api-handler-implementation).
82
83
 
83
84
  ### Examples
84
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacopilot",
3
- "version": "0.18.7",
3
+ "version": "0.18.9",
4
4
  "description": "AI auto-completion plugin for Monaco Editor",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",