Commit Graph
3 Commits
Author SHA1 Message Date
Claude 5eacaa1175 voice: ask Coucou about everything — services, weather, mail, apps
Louis: "que je puisse littéralement tout demander à Coucou par la voix".

Questions (VoiceQuery, pure + tested): Stripe ("combien j'ai fait
aujourd'hui"), GitHub (stars, PRs, CI), Vercel (last deployment),
Resend, n8n, Notion, Cal.com (next booking), agents ("qu'est-ce qui se
passe sur mon Claude Code", approval waiting first), Claude/Codex plan
usage, music now playing, active pills, weather today/tomorrow. A phrase
with an action verb stays a command. Answers in French or English.

Data (VoiceDataSources, Mac): what the pollers already keep in AppState.
New network, only for services the user configured and only when asked:
- Stripe: today's succeeded charges (minus refunds) with their key;
- Open-Meteo weather: off by default, Settings → Voice toggle + city,
  15 min cache.

Mail: "envoie (le fichier X des téléchargements) à Tana" → address from
Contacts (asked on first use; NSContactsUsageDescription + addressbook
entitlement on the GitHub builds), file from Downloads/Desktop/Documents
(most recent match), then Mail opens a compose window. It never sends:
the user clicks Send (CLAUDE.md).

Apps: "ouvre Figma" → /Applications, /System/Applications, ~/Applications.

On-device model: new ServiceTool returns the same real data, and the
instructions say to call it before answering about a service.

Tests: VoiceQueryTests 48/48 (Louis's own questions), new CI step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-10-10 17:36:02 +02:00
Louis RailleandClaude Sonnet 4.6 77ed4a73b7 Voice Phase 2: review fixes — aliases, new intents, async music, question outcome, PillFixture
- EntityResolver: alias table (claude/gemini/google/music/…) + word-match before Levenshtein
- IntentParser: musicSetVolume, pillReplace, pillOnly, "principale" keyword rule, "en principal" rule, music-service-pill routing (Apple Music/Spotify → musicPlay), "pilule" stripped as article; parse order tightened so pilMainTriggers never fall through to music
- VoiceIntent: add musicSetVolume, pillReplace, pillOnly; Outcome.question(text:)
- VoiceActionRunner: play/pause/setVolume/launchAndPlay/async-artist-playlist; pillReplace+pillOnly handlers; rawTranscript param; hooksInstalled on PillControlling
- LiveVoiceControls: wire play/pause/setVolume/launchAndPlay; hooksInstalled via AppState.installedHookPills
- MusicController: play(), pause(), setVolume(), async playArtist(→Bool), async playPlaylist(→Bool)
- SpotifyController: play(), pause() commands
- AppState: installedHookPills @Published property
- IslandWindowController: rawTranscript param, .failure → botDizzy, question delay 6 s
- tests/PillFixture.swift: new file mirroring PillCatalog (avoids app compile deps in tests)
- All 3 test suites updated to use PillFixture.available; 92+48+39 = 179 tests all pass
- Localizable.xcstrings: restored to phase1 baseline + 21 voice.* keys in 10 languages
- VOICE.md removed from repo root

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-09 22:30:03 +02:00
Louis RailleandClaude Sonnet 4.6 6be8c89531 Voice phase 2: IntentParser, EntityResolver, VoiceActionRunner, VoiceResultView
- VoiceIntent enum (FR+EN music + pill intents) and VoiceActionResult
- IntentParser: normalise → word-array pattern match, article stripping, playlist-before-artist order
- EntityResolver: exact match → Levenshtein ≤ 2 with ambiguity rejection, category filter
- VoiceActionRunner: @MainActor, injectable MusicControlling/PillControlling protocols, null defaults
- LiveVoiceControls: live AppKit implementations wired up via configureLive() at app startup
- VoiceResultView: 2 s result card (✓/✗) shown at IslandView.voiceResult
- IslandWindowController: handleVoiceCommand runs intent→result→2 s auto-dismiss
- MusicController/SpotifyController: adjustVolume(by:), playArtist(_:), playPlaylist(_:)
- AppState: voiceResult published property, setMainPill(_:)
- IslandTypes: voiceResult layout; IslandViewContent: VoiceResultView case
- VoiceEngine: shouldIgnoreWake skips .voiceResult; all prints → appendAppLog
- 125 standalone tests (70 intent + 27 entity + 28 runner) + build.yml steps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-09 22:02:43 +02:00