@@ -296,14 +296,8 @@ def _dingtalk_completed_input_lines(form_data: dict) -> list[str]:
296296 value = inputs .get (field_name )
297297 if value in (None , '' , []):
298298 continue
299- field_type = _dingtalk_field_type (field )
300299 display_value = _dingtalk_display_input_value (field , value )
301- if field_type == 'select' :
302- lines .append (f'✅ 已选择 { field_name } :{ display_value } ' )
303- elif field_type in {'file' , 'file-list' }:
304- lines .append (f'✅ 已上传 { field_name } :{ display_value } ' )
305- else :
306- lines .append (f'✅ 已填写 { field_name } :{ display_value } ' )
300+ lines .append (f'✅ { field_name } :{ display_value } ' )
307301 return lines
308302
309303
@@ -960,9 +954,7 @@ async def _paint_form_on_card(
960954 input_hint_lines = [] if native_field else _dingtalk_input_hint_lines (form_data )
961955 if input_hint_lines :
962956 parts .append ('Fill these fields in chat before choosing an action:<br>' + '<br>' .join (input_hint_lines ))
963- elif should_show_actions and actions :
964- parts .append ('Choose an action to continue.' )
965- display_content = '<br><br>' .join (parts ) or '请选择一个操作以继续。'
957+ display_content = '<br><br>' .join (parts )
966958
967959 try :
968960 await self .bot .update_card_data (
@@ -1062,9 +1054,7 @@ async def _send_form_card(
10621054 input_hint_lines = [] if native_field else _dingtalk_input_hint_lines (form_data )
10631055 if input_hint_lines :
10641056 parts .append ('Fill these fields in chat before choosing an action:<br>' + '<br>' .join (input_hint_lines ))
1065- elif should_show_actions and actions :
1066- parts .append ('Choose an action to continue.' )
1067- display_content = '<br><br>' .join (parts ) or '请选择一个操作以继续。'
1057+ display_content = '<br><br>' .join (parts )
10681058
10691059 btns = self ._build_btns (actions if should_show_actions else [], out_track_id )
10701060
@@ -1100,7 +1090,7 @@ async def _lazy_create_resume_chat_card(
11001090 """Create a new card for resumed-workflow streaming output.
11011091
11021092 Used after a button click triggers a synthetic event — the form
1103- card stays put with the "已选择" notice, and a fresh card is
1093+ card stays put with the selection notice, and a fresh card is
11041094 spawned here for the LLM reply to stream into.
11051095 """
11061096 form_template_id = (self .config .get ('human_input_card_template_id' ) or '' ).strip ()
@@ -1349,7 +1339,7 @@ async def _on_card_action(self, payload: dict) -> None:
13491339 return
13501340
13511341 # Visual feedback on the form card itself: keep the prompt visible,
1352- # add a "已选择" line, remove the buttons. The resumed-workflow
1342+ # add a selection line, remove the buttons. The resumed-workflow
13531343 # output lives on a separate new card (lazy-created in
13541344 # reply_message_chunk on the synthetic event), so the form card
13551345 # stays put as a record of the user's selection.
@@ -1367,7 +1357,7 @@ async def _on_card_action(self, payload: dict) -> None:
13671357 # Crucial: do NOT leave the form card's out_track_id in
13681358 # active_turn_card — otherwise create_message_card for the
13691359 # synthetic event would reuse it for the resume output, painting
1370- # the LLM reply on top of the "已选择" notice. Clear it so the
1360+ # the LLM reply on top of the selection notice. Clear it so the
13711361 # resume goes through the lazy-create path and spawns a fresh card.
13721362 session_key = state .get ('session_key' , '' )
13731363 if session_key and self .active_turn_card .get (session_key ) == out_track_id :
@@ -1487,7 +1477,7 @@ async def _mark_card_resolved(
14871477 ) -> None :
14881478 """Update the form card to acknowledge the user's selection.
14891479
1490- Keeps the original prompt visible, adds a "已选择: X" notice, and
1480+ Keeps the original prompt visible, adds a selection notice, and
14911481 clears the buttons. The card stays as a permanent record of the
14921482 choice; the resumed workflow's output goes to a separate new card.
14931483 """
@@ -1504,7 +1494,7 @@ async def _mark_card_resolved(
15041494 )
15051495 if completed_lines and not all (line in form_content for line in completed_lines ):
15061496 parts .append ('<hr>' + '<br>' .join (completed_lines ))
1507- parts .append (f'<hr>✅ 已选择:** { action_title } ** ' )
1497+ parts .append (f'<hr>✅ { action_title } ' )
15081498 content = '<br><br>' .join (parts )
15091499 if self .ap is not None :
15101500 self .ap .logger .info (f'DingTalk _mark_card_resolved: out_track_id={ out_track_id } action={ action_title !r} ' )
0 commit comments