]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ui: Refactor models store, MCP service, and gate logs behind VITE_DEBUG (#23236)
authorAleksander Grygier <redacted>
Mon, 18 May 2026 14:09:40 +0000 (16:09 +0200)
committerGitHub <redacted>
Mon, 18 May 2026 14:09:40 +0000 (16:09 +0200)
commit1ff0fc138461c882db6a50b5545601182994ff2e
tree5a14b1c692cf302a550a353acf2fbd67b2b9c88d
parenta135ec0baa1bcf7eb0437c9fd04920f87cf33ace
ui: Refactor models store, MCP service, and gate logs behind VITE_DEBUG (#23236)

* refactor: Scope console logs to `DEV` + `VITE_DEBUG` env vars

* refactor: skip MCP proxy probe when no server requires it

* refactor: suppress expected disconnect errors during MCP client shutdown

* refactor: Deduplicate requests

* refactor: deduplicate model fetching across ROUTER and MODEL modes

* refactor: Clean up models logic

* chore: Add `.env.example` file

* refactor: replace client-side CORS proxy probe with server status flag

* refactor: Post-review fixes

* test: add vitest client setup with API fetch mocks
17 files changed:
tools/server/server-context.cpp
tools/server/server-models.cpp
tools/ui/.env.example [new file with mode: 0644]
tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionModels.svelte
tools/ui/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPickerMcpPrompts.svelte
tools/ui/src/lib/hooks/use-models-selector.svelte.ts
tools/ui/src/lib/services/mcp.service.ts
tools/ui/src/lib/services/migration.service.ts
tools/ui/src/lib/stores/mcp.svelte.ts
tools/ui/src/lib/stores/models.svelte.ts
tools/ui/src/lib/types/api.d.ts
tools/ui/src/lib/utils/api-key-validation.ts
tools/ui/src/lib/utils/legacy-migration.ts
tools/ui/src/routes/(chat)/+page.svelte
tools/ui/src/routes/+layout.svelte
tools/ui/tests/client/page.svelte.test.ts
tools/ui/vitest-setup-client.ts