code-server-liek

This commit is contained in:
Cai
2025-09-17 07:46:38 +00:00
parent 50a570eccf
commit 025c8c1a20
12 changed files with 797 additions and 1511 deletions

View File

@@ -34,7 +34,7 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
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.read()
bb.active_file_content = f
bb.active_file_path = file_path
elif rtype == "paste":
@@ -44,14 +44,14 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
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.read()
bb.active_file_content = f
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.read()
bb.active_file_content = f
chatmanager.upload_bb()