monacopilot 0.18.5 → 0.18.6

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 +6 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -39,22 +39,24 @@ const editor = monaco.editor.create(document.getElementById('container'), {
39
39
  });
40
40
 
41
41
  registerCompletion(monaco, editor, {
42
- endpoint: 'https://api.example.com/code-completion', // Your API endpoint for handling completion requests
43
42
  language: 'javascript',
43
+ // Your API endpoint for handling completion requests
44
+ endpoint: 'https://api.example.com/code-completion',
44
45
  });
45
46
  ```
46
47
 
47
48
  3. **Create your completion API handler**
48
49
 
49
50
  ```javascript
50
- // Create an API handler for the endpoint (e.g. /code-completion) you provided in the `registerCompletion` function
51
+ // Create an API handler for the endpoint (e.g. /code-completion) you provided
52
+ // in the `registerCompletion` function
51
53
  // to handle completion requests from the editor
52
54
 
53
55
  import {Copilot} from 'monacopilot';
54
56
 
55
57
  const copilot = new Copilot(OPENAI_API_KEY, {
56
- provider: 'openai', // or 'anthropic', 'google', etc.,
57
- model: 'gpt-4o', // or 'claude-3-5-haiku', 'gpt-4o-mini', etc.
58
+ provider: 'openai',
59
+ model: 'gpt-4o',
58
60
  });
59
61
 
60
62
  // Handle completion requests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacopilot",
3
- "version": "0.18.5",
3
+ "version": "0.18.6",
4
4
  "description": "AI auto-completion plugin for Monaco Editor",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",