@toothfairyai/cli 1.0.9 → 1.0.10
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/bin/toothfairy.js +5 -4
- package/package.json +1 -1
- package/src/api.js +6 -2
package/bin/toothfairy.js
CHANGED
|
@@ -329,12 +329,13 @@ program
|
|
|
329
329
|
|
|
330
330
|
// Only show text when agent is actually replying
|
|
331
331
|
if (text && type === 'response' && agentStatus === 'replying') {
|
|
332
|
-
|
|
333
|
-
if
|
|
332
|
+
const trimmedText = text.trim();
|
|
333
|
+
// Check if text is actually new/different and longer than before
|
|
334
|
+
if (trimmedText !== currentText && trimmedText.length > currentText.length) {
|
|
334
335
|
// For real-time streaming, we overwrite the current line
|
|
335
336
|
process.stdout.write('\r\x1b[K'); // Clear current line
|
|
336
|
-
process.stdout.write(chalk.green('🧚 Response: ') +
|
|
337
|
-
currentText =
|
|
337
|
+
process.stdout.write(chalk.green('🧚 Response: ') + trimmedText);
|
|
338
|
+
currentText = trimmedText;
|
|
338
339
|
}
|
|
339
340
|
}
|
|
340
341
|
};
|
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -318,7 +318,9 @@ class ToothFairyAPI {
|
|
|
318
318
|
};
|
|
319
319
|
|
|
320
320
|
const createdChat = await this.createChat(chatData);
|
|
321
|
-
|
|
321
|
+
if (this.verbose) {
|
|
322
|
+
console.debug(`Chat created: ${createdChat.id}`);
|
|
323
|
+
}
|
|
322
324
|
|
|
323
325
|
// Create message
|
|
324
326
|
const messageData = {
|
|
@@ -328,7 +330,9 @@ class ToothFairyAPI {
|
|
|
328
330
|
userID: 'CLI',
|
|
329
331
|
};
|
|
330
332
|
const createdMessage = await this.createMessage(messageData);
|
|
331
|
-
|
|
333
|
+
if (this.verbose) {
|
|
334
|
+
console.debug(`Message created: ${createdMessage.id}`);
|
|
335
|
+
}
|
|
332
336
|
|
|
333
337
|
// Prepare agent data for streaming
|
|
334
338
|
const agentData = {
|