@onereach/step-voice 7.0.41 → 7.0.42-refactorvoic1784.0
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 +11 -0
- package/package.json +1 -1
package/dst/Voice Agent.js
CHANGED
|
@@ -256,6 +256,17 @@ class VoiceAgent extends voice_1.default {
|
|
|
256
256
|
}
|
|
257
257
|
result.pre_tool_speech = raw.pre_tool_speech;
|
|
258
258
|
}
|
|
259
|
+
if ('pre_tool_speech_phrases' in raw && raw.pre_tool_speech_phrases != null) {
|
|
260
|
+
const phrases = raw.pre_tool_speech_phrases;
|
|
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;
|
|
267
|
+
}
|
|
268
|
+
result.pre_tool_speech_phrases = phrases;
|
|
269
|
+
}
|
|
259
270
|
if ('tool_call_sound' in raw && raw.tool_call_sound != null) {
|
|
260
271
|
const valid = ['typing', 'none'];
|
|
261
272
|
if (!valid.includes(raw.tool_call_sound)) {
|