vim-todo-ai-bridge 1.0.0 → 1.0.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/package.json +1 -1
  2. package/server.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vim-todo-ai-bridge",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Local omp RPC bridge for vim-todo-list",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
package/server.js CHANGED
@@ -338,6 +338,9 @@ async function complete(body) {
338
338
  documentBlock,
339
339
  ].filter(Boolean).join('\n\n');
340
340
  const result = await omp.complete(provider, body.model, prompt);
341
+ if (!String(result.text || '').trim()) {
342
+ throw new Error(`model ${result.model} returned no text; choose another model in Settings`);
343
+ }
341
344
  return {
342
345
  provider,
343
346
  model: result.model,