groove-dev 0.26.9 → 0.26.10

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,12 +5,12 @@
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-CfD162Lt.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-UCdYAYEi.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">
12
12
  <link rel="modulepreload" crossorigin href="/assets/xterm--7_ns2zW.js">
13
- <link rel="stylesheet" crossorigin href="/assets/index-DVRmIjTA.css">
13
+ <link rel="stylesheet" crossorigin href="/assets/index-C4cVCdfw.css">
14
14
  </head>
15
15
  <body>
16
16
  <div id="root"></div>
@@ -200,13 +200,16 @@ function FilePicker({ repoId, onDownload, systemRamGb }) {
200
200
  }
201
201
 
202
202
  // ---- Recommended Model Card ----
203
- function RecommendedModel({ model, systemRamGb, onPull, pulling }) {
203
+ function RecommendedModel({ model, systemRamGb, onPull, pulling, isInstalled }) {
204
204
  const tierColors = { light: 'text-green-400', medium: 'text-blue-400', heavy: 'text-orange-400' };
205
205
  const categoryIcons = { code: '{}', general: 'AI' };
206
206
  const headroom = systemRamGb ? Math.round((1 - model.ramGb / systemRamGb) * 100) : null;
207
207
 
208
208
  return (
209
- <div className="flex items-center gap-3 px-4 py-3 bg-surface-1 border border-border-subtle rounded-lg hover:border-accent/20 transition-colors">
209
+ <div className={cn(
210
+ 'flex items-center gap-3 px-4 py-3 border rounded-lg transition-colors',
211
+ isInstalled ? 'bg-success/5 border-success/20' : 'bg-surface-1 border-border-subtle hover:border-accent/20',
212
+ )}>
210
213
  <div className="w-9 h-9 rounded-lg bg-surface-3 flex items-center justify-center text-xs font-mono text-text-2 flex-shrink-0">
211
214
  {categoryIcons[model.category] || 'AI'}
212
215
  </div>
@@ -214,6 +217,7 @@ function RecommendedModel({ model, systemRamGb, onPull, pulling }) {
214
217
  <div className="flex items-center gap-2">
215
218
  <span className="text-sm font-mono font-bold text-text-0 truncate">{model.name}</span>
216
219
  <span className={cn('text-2xs font-semibold capitalize', tierColors[model.tier])}>{model.tier}</span>
220
+ {isInstalled && <Badge variant="success" className="text-2xs gap-1"><Check size={8} /> Installed</Badge>}
217
221
  </div>
218
222
  <div className="text-2xs text-text-3 font-sans mt-0.5">{model.description}</div>
219
223
  <div className="flex items-center gap-3 mt-1 text-2xs font-sans">
@@ -222,14 +226,18 @@ function RecommendedModel({ model, systemRamGb, onPull, pulling }) {
222
226
  {headroom !== null && <span className="text-text-4">{headroom}% headroom</span>}
223
227
  </div>
224
228
  </div>
225
- <button
226
- onClick={() => onPull(model.id)}
227
- disabled={pulling === model.id}
228
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-sans font-medium bg-accent/10 text-accent hover:bg-accent/20 transition-colors cursor-pointer disabled:opacity-40"
229
- >
230
- {pulling === model.id ? <Loader2 size={12} className="animate-spin" /> : <Download size={12} />}
231
- Pull
232
- </button>
229
+ {isInstalled ? (
230
+ <span className="text-xs text-success font-sans font-medium px-3 py-1.5">Ready</span>
231
+ ) : (
232
+ <button
233
+ onClick={() => onPull(model.id)}
234
+ disabled={pulling === model.id}
235
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-sans font-medium bg-accent/10 text-accent hover:bg-accent/20 transition-colors cursor-pointer disabled:opacity-40"
236
+ >
237
+ {pulling === model.id ? <Loader2 size={12} className="animate-spin" /> : <Download size={12} />}
238
+ Pull
239
+ </button>
240
+ )}
233
241
  </div>
234
242
  );
235
243
  }
@@ -246,6 +254,7 @@ export default function ModelsView() {
246
254
  const [hardware, setHardware] = useState(null);
247
255
  const [expandedResult, setExpandedResult] = useState(null);
248
256
  const [pulling, setPulling] = useState(null);
257
+ const [ollamaModels, setOllamaModels] = useState([]);
249
258
  const toast = useToast();
250
259
 
251
260
  // Fetch installed models
@@ -255,7 +264,13 @@ export default function ModelsView() {
255
264
  }).catch(() => {});
256
265
  }, []);
257
266
 
258
- // Fetch hardware info + recommended models
267
+ const fetchOllamaModels = useCallback(() => {
268
+ api.get('/providers/ollama/models').then((data) => {
269
+ setOllamaModels((data.installed || []).map((m) => m.id));
270
+ }).catch(() => {});
271
+ }, []);
272
+
273
+ // Fetch hardware info + recommended models + Ollama installed
259
274
  useEffect(() => {
260
275
  api.get('/providers/ollama/hardware').then(setHardware).catch(() => {});
261
276
  api.get('/models/recommended').then((data) => {
@@ -263,14 +278,16 @@ export default function ModelsView() {
263
278
  if (!hardware && data.hardware) setHardware(data.hardware);
264
279
  }).catch(() => {});
265
280
  fetchInstalled();
266
- }, [fetchInstalled]);
281
+ fetchOllamaModels();
282
+ }, [fetchInstalled, fetchOllamaModels]);
267
283
 
268
284
  async function handlePull(modelId) {
269
285
  setPulling(modelId);
270
286
  try {
271
287
  await api.post('/providers/ollama/pull', { model: modelId });
272
- toast.success(`${modelId} pulled successfully`);
288
+ toast.success(`${modelId} ready to use`);
273
289
  fetchInstalled();
290
+ fetchOllamaModels();
274
291
  } catch (err) {
275
292
  toast.error(`Pull failed: ${err.message}`);
276
293
  }
@@ -419,15 +436,21 @@ export default function ModelsView() {
419
436
  <div className="text-xs text-text-3 font-sans mb-2">
420
437
  Top models for your system ({hardware?.totalRamGb || '?'} GB RAM). Click Pull to download via Ollama.
421
438
  </div>
422
- {recommended.map((m) => (
423
- <RecommendedModel
424
- key={m.id}
425
- model={m}
426
- systemRamGb={hardware?.totalRamGb}
427
- onPull={handlePull}
428
- pulling={pulling}
429
- />
430
- ))}
439
+ {recommended.map((m) => {
440
+ // Check if this model (or a variant) is already installed in Ollama
441
+ const baseId = m.id.split(':')[0];
442
+ const isInstalled = ollamaModels.some((id) => id === m.id || id.startsWith(baseId + ':') || id === baseId);
443
+ return (
444
+ <RecommendedModel
445
+ key={m.id}
446
+ model={m}
447
+ systemRamGb={hardware?.totalRamGb}
448
+ onPull={handlePull}
449
+ pulling={pulling}
450
+ isInstalled={isInstalled}
451
+ />
452
+ );
453
+ })}
431
454
  </>
432
455
  )}
433
456
  </>