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.
- package/package.json +1 -1
- package/server.js +3 -0
package/package.json
CHANGED
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,
|