fix: Application The parent application embeds the child application and sets the variable by passing the parameter "akser" through the interface. The sub application is not displayed in the conversation log (#4471)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-12-09 16:51:33 +08:00 committed by GitHub
parent 32e5b3273f
commit bd473498a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -171,6 +171,14 @@ class BaseApplicationNode(IApplicationNode):
if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def get_chat_asker(self, kwargs):
asker = kwargs.get('asker')
if asker:
if isinstance(asker, dict):
return asker
return {'username': asker}
return self.workflow_manage.work_flow_post_handler.chat_info.get_chat_user()
def execute(self, application_id, message, chat_id, chat_record_id, stream, re_chat,
chat_user_id,
chat_user_type,
@ -185,7 +193,8 @@ class BaseApplicationNode(IApplicationNode):
'application_id': application_id,
'abstract': message[0:1024],
'chat_user_id': chat_user_id,
'chat_user_type': chat_user_type
'chat_user_type': chat_user_type,
'asker': self.get_chat_asker(kwargs)
})
if app_document_list is None:
app_document_list = []

View File

@ -26,7 +26,7 @@ class ChatUserType(models.TextChoices):
def default_asker():
return {'user_name': '游客'}
return {'username': '游客'}
class Chat(AppModelMixin):