@layercode/js-sdk 2.1.7 → 2.2.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/README.md +1 -1
- package/dist/layercode-js-sdk.esm.js +5 -1
- package/dist/layercode-js-sdk.esm.js.map +1 -1
- package/dist/layercode-js-sdk.min.js +5 -1
- package/dist/layercode-js-sdk.min.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces.d.ts +6 -2
- package/package.json +1 -1
|
@@ -3620,7 +3620,7 @@ registerProcessor('audio_processor', AudioProcessor);
|
|
|
3620
3620
|
const NOOP = () => { };
|
|
3621
3621
|
const DEFAULT_WS_URL = 'wss://api.layercode.com/v1/agents/web/websocket';
|
|
3622
3622
|
// SDK version - updated when publishing
|
|
3623
|
-
const SDK_VERSION = '2.
|
|
3623
|
+
const SDK_VERSION = '2.2.0';
|
|
3624
3624
|
/**
|
|
3625
3625
|
* @class LayercodeClient
|
|
3626
3626
|
* @classdesc Core client for Layercode audio agent that manages audio recording, WebSocket communication, and speech processing.
|
|
@@ -3808,6 +3808,10 @@ registerProcessor('audio_processor', AudioProcessor);
|
|
|
3808
3808
|
this._wsSend({ type: 'trigger.turn.end', role: 'user' });
|
|
3809
3809
|
}
|
|
3810
3810
|
}
|
|
3811
|
+
async sendClientResponseText(text) {
|
|
3812
|
+
await this._clientInterruptAssistantReplay();
|
|
3813
|
+
this._wsSend({ type: 'client.response.text', content: text });
|
|
3814
|
+
}
|
|
3811
3815
|
/**
|
|
3812
3816
|
* Handles incoming WebSocket messages
|
|
3813
3817
|
* @param {MessageEvent} event - The WebSocket message event
|