@@ -796,19 +796,20 @@ class SystemTwo {
796
796
797
797
// 5. working logs
798
798
if ( workingLogs . length > 0 ) {
799
- msg += ( t ( "working_title " ) + "\n" )
799
+ msg += ( t ( "working_log_title " ) + "\n" )
800
800
workingLogs . forEach ( v => {
801
801
msg += ( v . textToUser + "\n" )
802
802
} )
803
803
msg += "\n"
804
804
}
805
- console . log ( "see msg: " , msg )
806
805
807
806
// 6. send
808
807
if ( msg ) {
809
- await valTool . waitMilli ( 900 )
808
+ msg = msg . trim ( )
809
+ console . log ( "see msg in handleRunLogs: " , msg )
810
+ await valTool . waitMilli ( 1500 )
810
811
const entry = System2Util . mockAiEntry ( this . _ctx . user )
811
- TellUser . text ( entry , msg , { fromSystem2 : true } )
812
+ TellUser . text ( entry , msg )
812
813
}
813
814
}
814
815
@@ -1155,6 +1156,8 @@ class SystemTwo {
1155
1156
content : newUserContent ,
1156
1157
}
1157
1158
this . _reasonerAndUs . push ( userPrompt )
1159
+
1160
+ console . warn ( "tool result prompt: " , newUserContent )
1158
1161
1159
1162
return true
1160
1163
}
@@ -1439,7 +1442,7 @@ class ToolHandler2 {
1439
1442
return chatId
1440
1443
}
1441
1444
1442
- private async _replyToUser ( msg : string ) {
1445
+ private _replyToUser ( msg : string ) {
1443
1446
const entry = System2Util . mockAiEntry ( this . _user )
1444
1447
TellUser . text ( entry , msg , { fromSystem2 : true } )
1445
1448
}
@@ -1467,7 +1470,8 @@ class ToolHandler2 {
1467
1470
// 3. reply
1468
1471
const toolShared = this . _toolShared
1469
1472
const msg = toolShared . get_msg_for_adding_note ( funcJson , chatId )
1470
- await this . _replyToUser ( msg )
1473
+ console . warn ( "add_note msg: " , msg )
1474
+ this . _replyToUser ( msg )
1471
1475
return { pass : true }
1472
1476
}
1473
1477
@@ -1492,6 +1496,7 @@ class ToolHandler2 {
1492
1496
// 3. reply
1493
1497
const toolShared = this . _toolShared
1494
1498
const msg = toolShared . get_msg_for_adding_todo ( chatId , funcJson )
1499
+ console . warn ( "add_todo msg: " , msg )
1495
1500
this . _replyToUser ( msg )
1496
1501
return { pass : true }
1497
1502
}
@@ -1521,7 +1526,8 @@ class ToolHandler2 {
1521
1526
// 3. reply
1522
1527
const toolShared = this . _toolShared
1523
1528
const msg = toolShared . get_msg_for_adding_calendar ( chatId , funcJson )
1524
- await this . _replyToUser ( msg )
1529
+ console . warn ( "add_calendar msg: " , msg )
1530
+ this . _replyToUser ( msg )
1525
1531
return { pass : true }
1526
1532
}
1527
1533
@@ -1557,7 +1563,7 @@ class ToolHandler2 {
1557
1563
// 2. translate if needed
1558
1564
let imagePrompt = prompt
1559
1565
const num2 = valTool . getChineseCharNum ( prompt )
1560
- if ( num2 > 3 ) {
1566
+ if ( num2 > 6 ) {
1561
1567
const translator = new Translator ( )
1562
1568
const res2 = await translator . run ( prompt )
1563
1569
if ( ! res2 ) {
@@ -1618,6 +1624,7 @@ class ToolHandler2 {
1618
1624
data4 . text = res3 . prompt
1619
1625
}
1620
1626
AiShared . updateAiChat ( chatId , data4 )
1627
+ console . warn ( "draw picture result: " , res3 )
1621
1628
1622
1629
// 5. reply
1623
1630
const entry = System2Util . mockAiEntry ( this . _user )
0 commit comments