managarten/apps
Till JS 56ffcbac39 feat: add Ollama memory optimization, LLM metrics, and chat streaming
Three improvements to the unified LLM infrastructure:

1. Ollama memory optimization (scripts/mac-mini/configure-ollama.sh):
   - OLLAMA_KEEP_ALIVE=5m → models unload after 5min idle (saves 3-16GB RAM)
   - OLLAMA_NUM_PARALLEL=1 → predictable memory usage
   - OLLAMA_MAX_LOADED_MODELS=1 → max 1 model in RAM at a time

2. Request-level metrics in @manacore/shared-llm:
   - LlmRequestMetrics interface (model, latency, tokens, fallback detection)
   - LlmMetricsCollector class with summary stats (for health endpoints)
   - Optional onMetrics callback in LlmModuleOptions
   - Automatic metrics emission in chatMessages() (success + error)

3. Chat streaming (token-by-token SSE):
   - Backend: POST /chat/completions/stream SSE endpoint
   - OllamaService.createStreamingCompletion() via llm.chatStreamMessages()
   - ChatService.createStreamingCompletion() with upfront credit consumption
   - Web: chatApi.createStreamingCompletion() SSE consumer
   - Chat store: sendMessage() now streams tokens into assistant message
   - UI updates reactively as each token arrives

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 09:41:33 +01:00
..
calendar feat: add right-click context menus to calendar agenda, chat, contacts, and storage 2026-03-23 22:51:07 +01:00
chat feat: add Ollama memory optimization, LLM metrics, and chat streaming 2026-03-24 09:41:33 +01:00
citycorners feat: unify QuickInputBar across all apps with locale + deferSearch 2026-03-23 21:06:58 +01:00
clock feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
contacts feat: add right-click context menus to calendar agenda, chat, contacts, and storage 2026-03-23 22:51:07 +01:00
context feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
docs fix: replace all manacore.app URLs with mana.how 2026-03-22 18:40:37 +01:00
manacore feat(manacore): implement mukke, presi, and context dashboard widgets 2026-03-23 22:34:56 +01:00
manadeck feat: add right-click context menus to presi, manadeck, photos, and zitare 2026-03-23 22:34:57 +01:00
matrix feat: add QuickInputBar to 6 more apps (mukke, matrix, manadeck, planta, photos, presi) 2026-03-23 21:25:51 +01:00
mukke feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
nutriphi feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
photos feat: add right-click context menus to presi, manadeck, photos, and zitare 2026-03-23 22:34:57 +01:00
picture feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
planta feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
playground refactor(auth): standardize URL resolution and token handling across all web auth stores 2026-03-23 12:11:52 +01:00
presi feat: add right-click context menus to presi, manadeck, photos, and zitare 2026-03-23 22:34:57 +01:00
questions feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
skilltree feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
storage feat: add right-click context menus to calendar agenda, chat, contacts, and storage 2026-03-23 22:51:07 +01:00
todo feat: add onboarding to 6 new apps and feature intro step to all 16 apps 2026-03-23 21:58:14 +01:00
traces feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
zitare feat: add right-click context menus to presi, manadeck, photos, and zitare 2026-03-23 22:34:57 +01:00