feat(dingtalk): enhance human input card functionality with streaming support and active turn management

- Updated the DingTalk card template to enable streaming mode and multi-update configuration.
- Removed the obsolete delete_card method from DingTalkClient to streamline card management.
- Enhanced DingTalkAdapter to manage active turn cards and accumulated streaming text, ensuring a seamless user experience during human input prompts.
- Modified the create_message_card method to utilize existing active cards for resumed workflows, preventing duplication.
- Improved the _paint_form_on_card method to update existing cards with human input prompts and buttons dynamically.
- Updated the dingtalk_human_input_card.json template to reflect the new streaming capabilities and configuration options.
This commit is contained in:
fdc310
2026-06-15 17:45:09 +08:00
parent 83b0d26e99
commit a32c4d152f
4 changed files with 197 additions and 94 deletions

View File

@@ -35,7 +35,7 @@ def markdown_block(node_id, variable='content'):
'valueType': 'fixed',
'condition': {'op': 'and', 'conditions': []},
},
'isStreaming': False,
'isStreaming': True,
'enableLinkStatPoint': False,
'linkStatPoint': {'type': 'dynamicString', 'content': '', 'i18n': False},
'linkStatPointParams': [],
@@ -552,6 +552,7 @@ def build_editor_data():
return {
'schemaVersion': '3.0.0',
'schema': {
'config': {'update_multi': True, 'streaming_mode': True},
'componentsMap': components_map,
'componentsTree': [root],
'i18n': {},