File tree Expand file tree Collapse file tree
agents/matmaster_agent/flow_agents Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 MATMASTER_FLOW ,
4343 MATMASTER_FLOW_PLANS ,
4444 MATMASTER_GENERATE_NPS ,
45+ MATMASTER_INTENT_UI ,
4546)
4647from agents .matmaster_agent .flow_agents .execution_agent .agent import (
4748 MatMasterSupervisorAgent ,
@@ -961,9 +962,42 @@ async def _run_async_impl(
961962
962963 # 用户意图识别(一旦进入 research 模式,暂时无法退出)
963964 if ctx .session .state ['intent' ].get ('type' , None ) != IntentEnum .RESEARCH :
965+ for _intent_ui_event in context_function_event (
966+ ctx ,
967+ self .name ,
968+ MATMASTER_INTENT_UI ,
969+ None ,
970+ ModelRole ,
971+ {
972+ 'matmaster_intent_ui_args' : json .dumps (
973+ {
974+ 'title' : '正在进行意图识别...' ,
975+ 'status' : 'start' ,
976+ }
977+ )
978+ },
979+ ):
980+ yield _intent_ui_event
981+
964982 async for intent_event in self .intent_agent .run_async (ctx ):
965983 yield intent_event
966984
985+ for _intent_ui_event in context_function_event (
986+ ctx ,
987+ self .name ,
988+ MATMASTER_INTENT_UI ,
989+ None ,
990+ ModelRole ,
991+ {
992+ 'matmaster_intent_ui_args' : json .dumps (
993+ {
994+ 'status' : 'end' ,
995+ }
996+ )
997+ },
998+ ):
999+ yield _intent_ui_event
1000+
9671001 # 如果用户上传文件,强制为 research 模式
9681002 if (
9691003 ctx .session .state [UPLOAD_FILE ]
Original file line number Diff line number Diff line change 99MATMASTER_FLOW = 'matmaster_flow'
1010MATMASTER_FLOW_PLANS = 'matmaster_flow_plans'
1111MATMASTER_GENERATE_NPS = 'matmaster_generate_nps'
12+ MATMASTER_INTENT_UI = 'matmaster_intent_ui'
1213
1314# matmaster_flow 展示文案,直接传给前端(正常执行无标签则传空字符串)
1415EXECUTION_TYPE_LABEL_RETRY = '重试工具'
You can’t perform that action at this time.
0 commit comments