(text, state)
| 1743 | |
| 1744 | |
| 1745 | def send_dummy_message(text, state): |
| 1746 | history = state['history'] |
| 1747 | |
| 1748 | # Handle both dict and string inputs |
| 1749 | if isinstance(text, dict): |
| 1750 | text = text['text'] |
| 1751 | |
| 1752 | # Initialize metadata if not present |
| 1753 | if 'metadata' not in history: |
| 1754 | history['metadata'] = {} |
| 1755 | |
| 1756 | row_idx = len(history['internal']) |
| 1757 | history['visible'].append([html.escape(text), '']) |
| 1758 | history['internal'].append([apply_extensions('input', text, state, is_chat=True), '']) |
| 1759 | update_message_metadata(history['metadata'], "user", row_idx, timestamp=get_current_timestamp()) |
| 1760 | |
| 1761 | return history |
| 1762 | |
| 1763 | |
| 1764 | def send_dummy_reply(text, state): |
no test coverage detected