mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
1. VoiceBrain: replace stub with real FoundationModels Tools (PillTool,
MusicTool, StatusTool) + BrainResult struct, IntentCollector, SessionContainer,
4-second timeout via withThrowingTaskGroup. Remove languageUnsupported case.
Called from handleVoiceCommand after .unknown; beginConversation/endConversation
wired at conversation boundaries.
2. VoiceSpeaker: track currentUtterance identity with ObjectIdentifier so
didCancel for a replaced utterance never clears isSpeaking for the new one.
3. VoiceEngine: remove onDidFinish init side-effect (was overwritten by IWC);
add audio?.resetVAD() in startConversationTurn.
4. IslandWindowController: .question outcome speaks via VoiceSpeaker then
re-listens only after onDidFinish; handleAnswer path continues conversation
via speakAndContinueConversation; VoiceBrain called after .unknown; remove
local conversationEndPhrases (use TurnEndPolicy); VoiceBrain lifecycle at all
conversation boundaries including collapse() and silence-end path.
5. TurnEndPolicy: add static conversationEndPhrases as single source of truth
for VoiceEngine and IslandWindowController.
6. ConversationContext: remove bare "annule" from reverse triggers (it is a
conversation-end phrase, not an undo trigger; use "annule ça" instead).
7. SettingsView: @AppStorage("voiceSpeakEnabled") for proper binding invalidation;
remove languageUnsupported from localModelStatusLabel switch.
8. VoiceActionRunner: musicPlaySearch — opening Apple Music search is .success.
9. New test: scripts/test-voice-conversation.sh verifies conversationEndPhrases
membership; wired into CI. Updated VoiceActionRunnerTests and
ConversationContextTests to match corrected behaviours.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
352 B
Bash
Executable File
11 lines
352 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
OUT=/tmp/voice-conversation-tests
|
|
echo "=== Voice conversation end-phrase tests ==="
|
|
swiftc -swift-version 6 -strict-concurrency=complete \
|
|
"$ROOT/NotchBuddy/Sources/App/Voice/TurnEndPolicy.swift" \
|
|
"$ROOT/tests/VoiceConversationTests.swift" \
|
|
-o "$OUT"
|
|
"$OUT"
|