Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Add local LLM playground metadata test
[._.]/ Adam Eivy9920a4b74f54
diff --git a/client/src/pages/LocalLlmPlayground.test.jsx b/client/src/pages/LocalLlmPlayground.test.jsxnew file mode 100644index 0000000000..7d2a9f073f--- /dev/null+++ b/client/src/pages/LocalLlmPlayground.test.jsx@@ -0,0 +1,71 @@+import { describe, it, expect, vi, beforeEach } from 'vitest';+import { render, screen, waitFor } from '@testing-library/react';+import { MemoryRouter } from 'react-router-dom';++vi.mock('../services/api', () => ({+ getLocalLlmStatus: vi.fn(),+ getLocalLlmCatalog: vi.fn(),+ testLocalLlmModel: vi.fn(),+ compareLocalLlmModels: vi.fn(),+}));++vi.mock('../components/ui/Toast', () => ({+ default: { error: vi.fn(), success: vi.fn(), info: vi.fn() },+}));++import LocalLlmPlayground from './LocalLlmPlayground';+import { getLocalLlmCatalog, getLocalLlmStatus } from '../services/api';++const renderPlayground = () => render(+ <MemoryRouter initialEntries={['/local-llm/playground?backend=ollama&model=command-r-plus%3A104b']}>+ <LocalLlmPlayground />+ </MemoryRouter>,+);++beforeEach(() => {+ vi.clearAllMocks();+ getLocalLlmStatus.mockResolvedValue({+ backend: 'ollama',+ ollama: {+ models: [+ {+ id: 'command-r-plus:104b',+ name: 'command-r-plus:104b',+ size: 59 * 1024 ** 3,+ params: '104B',+ quantization: null,+ family: 'command-r',+ },+ ],+ },+ lmstudio: { models: [] },+ });+ getLocalLlmCatalog.mockResolvedValue({+ backend: 'ollama',+ models: [+ {+ id: 'command-r-plus:104b',+ name: 'Command R+ 104B',+ category: 'chat',+ params: '104B',+ size: '59 GB',+ family: 'command-r',+ description: 'Cohere long-context model tuned for RAG and dialogue.',+ capabilities: ['chat', 'tools', 'multilingual'],+ },+ ],+ });+});++describe('LocalLlmPlayground', () => {+ it('shows model size, memory requirements, and use-case tags in the selector', async () => {+ renderPlayground();++ await waitFor(() => expect(screen.getAllByText('command-r-plus:104b').length).toBeGreaterThan(0));++ expect(getLocalLlmCatalog).toHaveBeenCalledWith('ollama');+ expect(screen.getByText('104B · 59 GB · ~71 GB RAM')).toBeTruthy();+ expect(screen.getByText('Tool use')).toBeTruthy();+ expect(screen.getByText('Multilingual')).toBeTruthy();+ });+});