[8.0.0]PNCActions进MogoMind修改

This commit is contained in:
xuxinchao
2025-04-27 16:19:20 +08:00
parent ebdfd50752
commit e9f685e5e4

View File

@@ -16,6 +16,8 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
private const val TAG = "PNCActionsViewModel"
}
private var currentAction = ""
fun init(){
CallerPlanningActionsListenerManager.addListener(TAG, this)
}
@@ -49,9 +51,12 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
)
}
// update view
if(actions?.isNotEmpty() == true){
val action = AIMessage.PNCAction(actions!!,actions!!)
AIMessageManager.post(action)
actions?.let {
if(it.isNotEmpty() && it != currentAction){
currentAction = it
val action = AIMessage.PNCAction(it+System.currentTimeMillis(),it)
AIMessageManager.post(action)
}
}
}