convo-ai-sdk 1.1.1 → 1.1.2
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/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,6 +177,9 @@ export class ChatClient {
|
|
|
177
177
|
if (sessionToken && conversationId && !sessionInitiated) {
|
|
178
178
|
await this._loadHistory(conversationId, sessionToken);
|
|
179
179
|
}
|
|
180
|
+
else {
|
|
181
|
+
this._setConversationStatus('started');
|
|
182
|
+
}
|
|
180
183
|
this._setStatus('connected');
|
|
181
184
|
}
|
|
182
185
|
async sendToolResult(toolCallId, toolCallName, result) {
|
|
@@ -289,6 +292,12 @@ export class ChatClient {
|
|
|
289
292
|
currentMessage = null;
|
|
290
293
|
break;
|
|
291
294
|
}
|
|
295
|
+
else if (line.startsWith('status: ')) {
|
|
296
|
+
const data = JSON.parse(line.substring(8));
|
|
297
|
+
if (data.value) {
|
|
298
|
+
this._setConversationStatus(data.value);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
292
301
|
else if (line.startsWith('done') && currentMessage) {
|
|
293
302
|
this._addMessage(currentMessage);
|
|
294
303
|
this._emit('messageDone', currentMessage);
|