agentvibes 2.0.17-beta.4 → 2.0.17-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,7 +88,8 @@ provider_switch() {
88
88
  fi
89
89
 
90
90
  # Auto-enable force mode if running non-interactively (e.g., from MCP)
91
- if [[ ! -t 0 ]]; then
91
+ # Check multiple conditions for MCP/non-interactive context
92
+ if [[ ! -t 0 ]] || [[ -n "$CLAUDE_PROJECT_DIR" ]] || [[ -n "$MCP_SERVER" ]]; then
92
93
  force_mode=true
93
94
  fi
94
95
 
@@ -156,13 +157,14 @@ provider_switch() {
156
157
  echo " 2. Switch language to English"
157
158
  echo " 3. Cancel provider switch"
158
159
  echo ""
159
- read -p "Choose option [1-3]: " -n 1 -r
160
- echo
161
160
 
162
161
  # Skip prompt in force mode
163
162
  if [[ "$force_mode" == true ]]; then
164
163
  echo "⏩ Force mode: Continuing with fallback to English..."
165
164
  else
165
+ read -p "Choose option [1-3]: " -n 1 -r
166
+ echo
167
+
166
168
  case $REPLY in
167
169
  1)
168
170
  echo "⏩ Continuing with fallback to English..."
@@ -209,6 +211,47 @@ provider_switch() {
209
211
  # Perform switch
210
212
  set_active_provider "$new_provider"
211
213
 
214
+ # Update target voice if language learning mode is active
215
+ local target_lang_file=""
216
+ local target_voice_file=""
217
+
218
+ # Check project-local first, then global
219
+ if [[ -d "$SCRIPT_DIR/../.." ]]; then
220
+ local project_dir="$SCRIPT_DIR/../.."
221
+ if [[ -f "$project_dir/.claude/tts-target-language.txt" ]]; then
222
+ target_lang_file="$project_dir/.claude/tts-target-language.txt"
223
+ target_voice_file="$project_dir/.claude/tts-target-voice.txt"
224
+ fi
225
+ fi
226
+
227
+ # Fallback to global
228
+ if [[ -z "$target_lang_file" ]]; then
229
+ if [[ -f "$HOME/.claude/tts-target-language.txt" ]]; then
230
+ target_lang_file="$HOME/.claude/tts-target-language.txt"
231
+ target_voice_file="$HOME/.claude/tts-target-voice.txt"
232
+ fi
233
+ fi
234
+
235
+ # If target language is set, update voice for new provider
236
+ if [[ -n "$target_lang_file" ]] && [[ -f "$target_lang_file" ]]; then
237
+ local target_lang
238
+ target_lang=$(cat "$target_lang_file")
239
+
240
+ if [[ -n "$target_lang" ]]; then
241
+ # Get the recommended voice for this language with new provider
242
+ local new_target_voice
243
+ new_target_voice=$(get_voice_for_language "$target_lang" "$new_provider")
244
+
245
+ if [[ -n "$new_target_voice" ]]; then
246
+ echo "$new_target_voice" > "$target_voice_file"
247
+ echo ""
248
+ echo "🔄 Updated target language voice:"
249
+ echo " Language: $target_lang"
250
+ echo " Voice: $new_target_voice (for $new_provider)"
251
+ fi
252
+ fi
253
+ fi
254
+
212
255
  # Test new provider
213
256
  echo ""
214
257
  echo "🔊 Testing provider..."
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "agentvibes",
4
- "version": "2.0.17-beta.4",
4
+ "version": "2.0.17-beta.6",
5
5
  "description": "Now your AI Agents can finally talk back! Professional TTS voice for Claude Code and Claude Desktop (via MCP) with multi-provider support.",
6
6
  "homepage": "https://agentvibes.org",
7
7
  "keywords": [