sapper-iq 1.1.25 → 1.1.26

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/sapper.mjs +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sapper-iq",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "AI-powered development assistant that executes commands and builds projects",
5
5
  "main": "sapper.mjs",
6
6
  "bin": {
package/sapper.mjs CHANGED
@@ -522,7 +522,22 @@ async function runSapper() {
522
522
  }
523
523
  }
524
524
 
525
- const localModels = await ollama.list();
525
+ let localModels;
526
+ try {
527
+ localModels = await ollama.list();
528
+ } catch (e) {
529
+ console.error(chalk.red('\n❌ Cannot connect to Ollama!'));
530
+ console.log(chalk.yellow(' Make sure Ollama is running: ') + chalk.cyan('ollama serve'));
531
+ console.log(chalk.gray(' Or install from: https://ollama.ai\n'));
532
+ process.exit(1);
533
+ }
534
+
535
+ if (!localModels.models || localModels.models.length === 0) {
536
+ console.error(chalk.red('\n❌ No models found!'));
537
+ console.log(chalk.yellow(' Pull a model first: ') + chalk.cyan('ollama pull llama3.2'));
538
+ process.exit(1);
539
+ }
540
+
526
541
  console.log(divider());
527
542
  console.log(statusBadge('MODELS', 'info') + chalk.gray(' Available Ollama models:\n'));
528
543
  localModels.models.forEach((m, i) => {