@onereach/step-voice 7.0.42-VOIC1782.0 → 7.0.42
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.
- package/dst/Voice Agent.js +7 -5
- package/package.json +1 -1
package/dst/Voice Agent.js
CHANGED
|
@@ -258,12 +258,14 @@ class VoiceAgent extends voice_1.default {
|
|
|
258
258
|
}
|
|
259
259
|
if ('pre_tool_speech_phrases' in raw && raw.pre_tool_speech_phrases != null) {
|
|
260
260
|
const phrases = raw.pre_tool_speech_phrases;
|
|
261
|
-
if (Array.isArray(phrases)
|
|
262
|
-
phrases.length
|
|
263
|
-
phrases.length
|
|
264
|
-
phrases.every((p) => typeof p === 'string' && p.trim().length > 0)) {
|
|
265
|
-
|
|
261
|
+
if (!Array.isArray(phrases) ||
|
|
262
|
+
phrases.length < 1 ||
|
|
263
|
+
phrases.length > 20 ||
|
|
264
|
+
!phrases.every((p) => typeof p === 'string' && p.trim().length > 0)) {
|
|
265
|
+
this.log.warn(`Voice Agent: invalid feedback.pre_tool_speech_phrases for tool "${toolName}" — per-tool feedback excluded`);
|
|
266
|
+
return null;
|
|
266
267
|
}
|
|
268
|
+
result.pre_tool_speech_phrases = phrases;
|
|
267
269
|
}
|
|
268
270
|
if ('tool_call_sound' in raw && raw.tool_call_sound != null) {
|
|
269
271
|
const valid = ['typing', 'none'];
|