monacopilot 0.18.7 → 0.18.8

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 +9 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -29,8 +29,9 @@ npm install monacopilot
29
29
 
30
30
  2. **Register the AI completion to your editor**
31
31
 
32
+ In your frontend code:
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
 
@@ -47,12 +48,11 @@ registerCompletion(monaco, editor, {
47
48
 
48
49
  3. **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.8",
4
4
  "description": "AI auto-completion plugin for Monaco Editor",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",