monacopilot 0.12.4 → 0.12.5

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 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,10 +17,11 @@
17
17
  - [API Handler](#api-handler)
18
18
  - [Register Completion with the Monaco Editor](#register-completion-with-the-monaco-editor)
19
19
  - [Register Completion Options](#register-completion-options)
20
- - [Get Completions in Real-Time](#get-completions-in-real-time)
21
- - [Manually Trigger Completions](#manually-trigger-completions)
22
- - [Trigger Completions with a Keyboard Shortcut](#trigger-completions-with-a-keyboard-shortcut)
23
- - [Trigger Completions with an Editor Action](#trigger-completions-with-an-editor-action)
20
+ - [Trigger Mode](#trigger-mode)
21
+ - [Get Completions in Real-Time](#get-completions-in-real-time)
22
+ - [Manually Trigger Completions](#manually-trigger-completions)
23
+ - [Trigger Completions with a Keyboard Shortcut](#trigger-completions-with-a-keyboard-shortcut)
24
+ - [Trigger Completions with an Editor Action](#trigger-completions-with-an-editor-action)
24
25
  - [Multi-File Context](#multi-file-context)
25
26
  - [Filename](#filename)
26
27
  - [Completions for Specific Technologies](#completions-for-specific-technologies)
@@ -147,7 +148,7 @@ registerCompletion(monaco, editor, {
147
148
 
148
149
  ## Register Completion Options
149
150
 
150
- ### Get Completions in Real-Time
151
+ ### Trigger Mode
151
152
 
152
153
  The `trigger` option determines when the completion service provides code completions. You can choose between receiving suggestions/completions in real-time as you type or after a brief pause.
153
154
 
@@ -167,12 +168,10 @@ registerCompletion(monaco, editor, {
167
168
 
168
169
  > **Note:** If you prefer real-time completions, you can set the `trigger` option to `'onTyping'`. This may increase the number of requests made to the provider and the cost. This should not be too costly since most small models are very inexpensive.
169
170
 
170
- ### Manually Trigger Completions
171
+ #### Manually Trigger Completions
171
172
 
172
173
  If you prefer not to trigger completions automatically (e.g., on typing or on idle), you can trigger completions manually. This is useful in scenarios where you want to control when completions are provided, such as through a button click or a keyboard shortcut.
173
174
 
174
- #### Usage
175
-
176
175
  ```javascript
177
176
  const completion = registerCompletion(monaco, editor, {
178
177
  trigger: 'onDemand',
@@ -183,7 +182,7 @@ completion.trigger();
183
182
 
184
183
  To set up manual triggering, configure the `trigger` option to `'onDemand'`. This disables automatic completions, allowing you to call the `completion.trigger()` method explicitly when needed.
185
184
 
186
- #### Trigger Completions with a Keyboard Shortcut
185
+ ##### Trigger Completions with a Keyboard Shortcut
187
186
 
188
187
  You can set up completions to trigger when the `Ctrl+Shift+Space` keyboard shortcut is pressed.
189
188
 
@@ -200,7 +199,7 @@ monaco.editor.addCommand(
200
199
  );
201
200
  ```
202
201
 
203
- #### Trigger Completions with an Editor Action
202
+ ##### Trigger Completions with an Editor Action
204
203
 
205
204
  You can add a custom editor action to trigger completions manually.
206
205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacopilot",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "AI auto-completion plugin for Monaco Editor",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",