monacopilot 0.13.0 → 0.13.1

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 +3 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -85,12 +85,14 @@ app.post('/complete', async (req, res) => {
85
85
  });
86
86
 
87
87
  // Process raw LLM response if needed
88
+ // `raw` can be undefined if an error occurred, which happens when `error` is present
88
89
  if (raw) {
89
90
  calculateCost(raw.usage.total_tokens);
90
91
  }
91
92
 
92
- // Handle error if needed
93
+ // Handle errors if present
93
94
  if (error) {
95
+ console.error('Completion error:', error);
94
96
  res.status(500).json({completion: null, error});
95
97
  }
96
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacopilot",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "AI auto-completion plugin for Monaco Editor",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",