groove-dev 0.24.6 → 0.24.7

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/png" href="/favicon.png" />
7
7
  <title>Groove GUI</title>
8
- <script type="module" crossorigin src="/assets/index-CuL9rJki.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-C7dW1iUw.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/vendor-C0HXlhrU.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/reactflow-BQPfi37R.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/codemirror-BBL3i_JW.js">
@@ -1,5 +1,5 @@
1
1
  // FSL-1.1-Apache-2.0 — see LICENSE
2
- import { useState, useEffect } from 'react';
2
+ import { useState, useEffect, useRef } from 'react';
3
3
  import {
4
4
  Download, Check, Cpu, HardDrive, RefreshCw, Copy,
5
5
  Trash2, ChevronDown, Star, Zap, AlertCircle, Monitor,
@@ -79,10 +79,18 @@ function InstallSection({ onRecheck }) {
79
79
  const result = await api.post('/providers/ollama/serve');
80
80
  if (result.ok) {
81
81
  addToast('success', 'Ollama server started!');
82
- // Recheck to update state
83
- const check = await api.post('/providers/ollama/check');
84
- setData(check);
85
- if (check.serverRunning) onRecheck();
82
+ // Poll until server is fully ready (ollama list works), max 10s
83
+ let ready = false;
84
+ for (let attempt = 0; attempt < 5; attempt++) {
85
+ await new Promise((r) => setTimeout(r, 2000));
86
+ const check = await api.post('/providers/ollama/check');
87
+ setData(check);
88
+ if (check.serverRunning) {
89
+ ready = true;
90
+ break;
91
+ }
92
+ }
93
+ if (ready) onRecheck();
86
94
  }
87
95
  } catch (err) {
88
96
  addToast('error', 'Could not start server', err.message);
@@ -243,8 +251,17 @@ function ModelBrowser({ onModelChange }) {
243
251
  const [showAll, setShowAll] = useState(false);
244
252
  const addToast = useGrooveStore((s) => s.addToast);
245
253
 
254
+ const retried = useRef(false);
255
+
246
256
  function load() {
247
- api.get('/providers/ollama/models').then(setData).catch(() => {});
257
+ api.get('/providers/ollama/models').then((result) => {
258
+ setData(result);
259
+ // If no installed models on first load, retry once after 2s (server may still be warming up)
260
+ if (!retried.current && result.installed?.length === 0) {
261
+ retried.current = true;
262
+ setTimeout(load, 2000);
263
+ }
264
+ }).catch(() => {});
248
265
  }
249
266
 
250
267
  useEffect(() => { load(); }, []);