mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-06-04 12:05:59 -04:00
Replace the stub GeminiNanoSummaryProvider with a real implementation that uses com.google.mlkit:genai-prompt:1.0.0-beta2 for on-device AI-powered scan summaries on supported Android hardware. Implementation: - Generation.getClient() to obtain the GenerativeModel - generateContentRequest with TextPart for structured prompts - Temperature 0.3, topK 16, maxOutputTokens 200 for concise output - Graceful fallback to DiscoverySummaryGenerator on any failure - Lazy model initialization with error logging via Kermit The existing buildSessionPrompt() and buildPresetPrompt() methods in DiscoverySummaryGenerator provide the prompt text. On unsupported devices or fdroid builds, the provider falls through to the deterministic algorithmic summary seamlessly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>