Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.
Merge branch 'development' into opencode/issue24-20260806041047
Rishabh Bajpai0710cb906d88
diff --cc CHANGELOG.mdindex 6a95e2d,b2fffdd..dfe24e2--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -4,25 -4,58 +4,77 @@@ All notable changes to Gotcha are docum## [Unreleased]+### Added — Document attachments in chat (#24)++- **Attach more than images.** The composer's "+" now opens a picker that accepts+ documents as well as images: PDF, Word (`.docx`), Excel (`.xlsx`),+ PowerPoint (`.pptx`) and plain text (TXT/CSV/MD/JSON/HTML). A new+ `DocumentParser` (pure Kotlin, ZIP + XML for Office files, pdfbox-android for+ PDF, jsoup for HTML) extracts the file's text; legacy `.doc`/`.xls` and+ unsupported formats show a clear error instead of failing silently.+- **The model reads the file.** Attaching a document sends an+ `[Attached file: name (type, N pages)]` header plus the extracted text (capped+ at ~40k chars, ~10k tokens) as the message's single text part, so token+ accounting, history trimming and compaction all count it correctly. The bytes+ are copied into the app cache at pick time so a revoked content grant can't+ break a later send.+- **Attachment UI.** Pending attachments show as a chip (name, type, size,+ truncated flag) instead of a bitmap preview; sent messages render the same+ chip. Attachment metadata persists with the session, so editing a sent+ document message re-sends the extracted text without re-reading the file.++ ### Added — Home Assistant MCP connector (#21)++ - **Gotcha can now control and query your smart home through Home Assistant's+ Model Context Protocol server** (Settings ▸ Devices & Services ▸ Model Context+ Protocol Server). Connect with your Home Assistant URL plus a long-lived access+ token (profile ▸ Security ▸ Long-lived access tokens).+ - **The tools come from your server, not a fixed list.** On connect, the app+ calls the MCP `tools/list` endpoint and registers exactly the tools Home+ Assistant exposes for the entities you share with Assist — e.g. `HassTurnOn`,+ `HassGetState`, `GetLiveContext` — so the agent can toggle a light or read a+ sensor state in the same way the built-in connectors work.+ - **Monitor/Operator split is preserved.** Read-only HA tools (state/context+ reads) are offered to Monitor; everything else is Operator-only. Disconnect —+ or switching the connector off — hides the tools again from the model.++ ### Changed — Wake word & call-mode feel (#25)++ - **The wake-word acknowledgment is now one short word.** Saying "Hey Gotcha"+ used to reply with the full "Call started. I'm ready when you are." sentence,+ which made the wake word feel ignored and delayed the mic opening. It now+ answers with a single "Yes?" (translated per language) and the mic opens+ sooner. Normal long-press calls get a tighter "Call started. Go ahead."+ - **The ball now visibly reacts when the wake word fires.** It gives a quick+ scale bounce while an accent ring radiates from it on its own overlay window,+ so the pulse still plays after the ball is hidden by the call window. Respects+ the system "remove animations" preference.+ - **Long-press to start a call is 1 second instead of 2.** The hold-to-call+ gesture on the floating ball was reduced from 2000 ms to 1000 ms; the+ expanding ring that previews it stays in sync.++ ### Fixed — Call mode no longer swallows STT/TTS failures (#23)++ - **A failed mic tap is now visible.** When `startMic` can't start the+ recognizer (busy, MediaRecorder failure, provider unavailable), the call shows+ "Couldn't start the microphone — tap again to retry." instead of silently doing+ nothing; the mic stays ready for another tap.+ - **Hands-free STT failures are no longer mistaken for silence.** The wake-word+ listen loop now tells a real recognition failure apart from "No speech+ detected": genuine errors (network, permissions, recognizer busy, ...) are+ surfaced with the existing error card + vibration and end the call with an+ explanation, while silence keeps its quiet retry-and-auto-end behaviour. Only+ silence counts toward the auto-end strikes.+ - **Tool-progress narration TTS failures surface too.** A failed narration shows+ the shared "Couldn't play voice audio — check your Text-to-Speech settings."+ card once per call (repeats are logged), instead of being fire-and-forget.+ - **In-call error line.** The two floating call buttons now show a transient+ error line above them, so an in-call error is visible right where the user's+ eyes are even when the overlay card is off-screen. The overlay card remains+ the persistent mid-call surface.+ - Hands-free loop also hands control back to the pre-listen state after a blank+ listen, so retry (and answering an agent question in place) works as intended.+### Fixed — Malformed tool call no longer bricks the chat (#13)- **A tool call with invalid `arguments` JSON can no longer poison a chat.** When