fix many feather

This commit is contained in:
Cai
2025-09-21 05:50:19 +00:00
parent b1f832a2fb
commit 25223ac6fe
89 changed files with 1746 additions and 454 deletions

View File

@@ -33,8 +33,8 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
elif rtype == "activeFile":
file_path = realtime_action.get("filePath")
assert isinstance(file_path, str)
with sudo_open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f
with open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f.read()
bb.active_file_path = file_path
elif rtype == "paste":
@@ -43,15 +43,15 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
bb.pasted_file_path = file_path
bb.pasted_content = realtime_action.get("content")
bb.active_file_path = file_path
with sudo_open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f
with open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f.read()
elif rtype == "fileEdit":
file_path = realtime_action.get("filePath")
assert isinstance(file_path, str)
bb.active_file_path = file_path
with sudo_open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f
with open(file_path, "r", encoding="utf-8") as f:
bb.active_file_content = f.read()
chatmanager.upload_bb()