check to code-server-like
This commit is contained in:
@@ -32,10 +32,10 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
|
||||
|
||||
elif rtype == "activeFile":
|
||||
file_path = realtime_action.get("filePath")
|
||||
assert isinstance(file_path, str)
|
||||
with open(file_path, "r", encoding="utf-8") as f:
|
||||
bb.active_file_content = f.read()
|
||||
bb.active_file_path = file_path
|
||||
assert isinstance(file_path, str)
|
||||
with open(os.path.join(bb.root_path, bb.active_file_content), "r", encoding="utf-8") as f:
|
||||
bb.active_file_content = f.read()
|
||||
|
||||
elif rtype == "paste":
|
||||
file_path = realtime_action.get("filePath")
|
||||
@@ -43,14 +43,14 @@ 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 open(file_path, "r", encoding="utf-8") as f:
|
||||
with open(os.path.join(bb.root_path, bb.active_file_content), "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 open(file_path, "r", encoding="utf-8") as f:
|
||||
with open(os.path.join(bb.root_path, bb.active_file_content), "r", encoding="utf-8") as f:
|
||||
bb.active_file_content = f.read()
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
.chat-message {
|
||||
max-width: 70%;
|
||||
max-width: 95%;
|
||||
padding: 10px 15px;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 10px;
|
||||
@@ -114,7 +114,7 @@
|
||||
/* 主容器,使用 grid 布局 */
|
||||
#maxcontainer {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 5px 3fr 5px 1fr; /* 默认宽度比例 */
|
||||
grid-template-columns: 2fr 5px 3fr 5px 2fr; /* 默认宽度比例 */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
document.addEventListener('mousemove', function(e) {
|
||||
if (isDraggingLeft) {
|
||||
leftWidth = e.clientX; // 更新左侧栏宽度
|
||||
container.style.gridTemplateColumns = `${leftWidth}px 5px 1fr 5px ${rightWidth}px`;
|
||||
container.style.gridTemplateColumns = `${leftWidth}px 5px 2fr 5px ${rightWidth}px`;
|
||||
} else if (isDraggingRight) {
|
||||
rightWidth = window.innerWidth - e.clientX; // 更新右侧栏宽度
|
||||
container.style.gridTemplateColumns = `${leftWidth}px 5px 1fr 5px ${rightWidth}px`;
|
||||
container.style.gridTemplateColumns = `${leftWidth}px 5px 2fr 5px ${rightWidth}px`;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user