diff --git a/Html/apps/services/backboard_service.py b/Html/apps/services/backboard_service.py index 7d4cb57..11cbf9a 100644 --- a/Html/apps/services/backboard_service.py +++ b/Html/apps/services/backboard_service.py @@ -57,9 +57,14 @@ def realtime_response(config: dict, realtime_action: dict) -> None: # emit('paste_detected', paste_data) #判断一下,如果粘帖内容过多就发送,后期可加入更多条件判断 - if bb.pasted_content and len(bb.pasted_content) > 250: - chatmanager.ase_client.send("pasted_detected_in", {"file_path": file_path, "content": bb.pasted_content}) - + if bb.pasted_content and len(bb.pasted_content) > 200: + print(f"粘贴内容 : {bb.pasted_content[:100]}...") + print(f"ready to send") + try: + result = chatmanager.ase_client.send_text("pasted_detected_in", bb.pasted_content) + print(f"Send result: {result}") + except Exception as e: + print(f"Error sending: {e}") elif rtype == "fileEdit": file_path = realtime_action.get("filePath")