From c2f4d57e68c777cbc8dfdc14d00daca17b4530f4 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 00:56:40 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../interview_openhands.toml | 2 +- .../interview_openhands/llm_agent.py | 4 +- .../nodes/frontend/public/index.html | 2 +- .../experimental/nodes/frontend/server.js | 2 +- .../experimental/nodes/frontend/src/App.css | 2 +- .../experimental/nodes/frontend/src/App.tsx | 14 ++-- .../src/components/Browser/Browser.css | 16 ++-- .../src/components/Browser/Browser.tsx | 4 +- .../ChatInterface/ChatInterface.css | 74 +++++++++---------- .../ChatInterface/ChatInterface.tsx | 10 +-- .../src/components/CodeEditor/CodeEditor.css | 7 +- .../src/components/CodeEditor/CodeEditor.tsx | 2 +- .../src/components/CodeEditor/FileSystem.css | 9 +-- .../src/components/CodeEditor/FileSystem.tsx | 16 ++-- .../src/components/Terminal/Terminal.css | 28 +++---- .../src/components/Terminal/Terminal.tsx | 6 +- .../experimental/nodes/frontend/src/logo.svg | 2 +- 17 files changed, 98 insertions(+), 102 deletions(-) diff --git a/examples/experimental/interview_openhands/interview_openhands.toml b/examples/experimental/interview_openhands/interview_openhands.toml index 5138a012..ed1e64fa 100644 --- a/examples/experimental/interview_openhands/interview_openhands.toml +++ b/examples/experimental/interview_openhands/interview_openhands.toml @@ -144,4 +144,4 @@ jsonl_file_path = "logs/interview_openhands.jsonl" "Agent:Runtime" = "agent_action" "Runtime:Agent" = "text" "Scene:Jane" = "text" -"Scene:Jack" = "text" \ No newline at end of file +"Scene:Jack" = "text" diff --git a/examples/experimental/interview_openhands/llm_agent.py b/examples/experimental/interview_openhands/llm_agent.py index c3aaf3d9..eb41c2d6 100644 --- a/examples/experimental/interview_openhands/llm_agent.py +++ b/examples/experimental/interview_openhands/llm_agent.py @@ -311,9 +311,7 @@ async def aact(self, message: AgentAction | Tick | Text) -> AgentAction: "BrowserOutputObservation received.", ) ) - text = text.split("BrowserOutputObservation", 1)[1][ - :100 - ] + text = text.split("BrowserOutputObservation", 1)[1][:100] self.message_history.append((self.name, "observation data", text)) return AgentAction( agent_name=self.name, action_type="none", argument="", path="" diff --git a/examples/experimental/nodes/frontend/public/index.html b/examples/experimental/nodes/frontend/public/index.html index aa069f27..e65acb3d 100644 --- a/examples/experimental/nodes/frontend/public/index.html +++ b/examples/experimental/nodes/frontend/public/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/experimental/nodes/frontend/server.js b/examples/experimental/nodes/frontend/server.js index 7905b0cd..93cb7e22 100644 --- a/examples/experimental/nodes/frontend/server.js +++ b/examples/experimental/nodes/frontend/server.js @@ -61,4 +61,4 @@ app.get('/', (req, res) => { // Start the server server.listen(8000, () => { console.log('Server is running on http://localhost:8000'); -}); \ No newline at end of file +}); diff --git a/examples/experimental/nodes/frontend/src/App.css b/examples/experimental/nodes/frontend/src/App.css index a644904e..15393593 100644 --- a/examples/experimental/nodes/frontend/src/App.css +++ b/examples/experimental/nodes/frontend/src/App.css @@ -71,4 +71,4 @@ body { padding: 10px; box-sizing: border-box; resize: none; -} */ \ No newline at end of file +} */ diff --git a/examples/experimental/nodes/frontend/src/App.tsx b/examples/experimental/nodes/frontend/src/App.tsx index cf2260c0..c8feec3a 100644 --- a/examples/experimental/nodes/frontend/src/App.tsx +++ b/examples/experimental/nodes/frontend/src/App.tsx @@ -64,7 +64,7 @@ const App: React.FC = () => { const handleAgentAction = (messageData: any) => { const actionType = messageData.data.action_type; const agentName = messageData.data.agent_name; - + if (actionType === "speak") { const newMessage = { text: `${agentName}: ${messageData.data.argument}`, @@ -108,14 +108,14 @@ const App: React.FC = () => {
- -
); -}; \ No newline at end of file +}; diff --git a/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.css b/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.css index 3dc75b20..5dbc7b4f 100644 --- a/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.css +++ b/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.css @@ -5,7 +5,7 @@ background-color: #1e1e1e; overflow: hidden; } - + .editor-header { padding: 8px 12px; background-color: #252526; @@ -14,7 +14,7 @@ border-bottom: 1px solid #333; user-select: none; } - + .editor-content { flex: 1; overflow: auto; @@ -39,7 +39,7 @@ height: 100vh; overflow: hidden; } - + #ide-container { display: flex; flex-direction: row; @@ -48,4 +48,3 @@ border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } - \ No newline at end of file diff --git a/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.tsx b/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.tsx index 7b90d611..21d96ff9 100644 --- a/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.tsx +++ b/examples/experimental/nodes/frontend/src/components/CodeEditor/CodeEditor.tsx @@ -81,4 +81,4 @@ const CodeEditor: React.FC = ({ code, onChange, filename }) => ); }; -export default CodeEditor; \ No newline at end of file +export default CodeEditor; diff --git a/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.css b/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.css index 0c5a0734..770c8dfc 100644 --- a/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.css +++ b/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.css @@ -7,7 +7,7 @@ overflow-y: auto; padding: 0px 0 0 10px; } - + #file-explorer-header { background-color: #252526; color: #d4d4d4; @@ -16,7 +16,7 @@ border-bottom: 1px solid #333; font-weight: bold; } - + .file-item { display: flex; align-items: center; @@ -25,13 +25,12 @@ font-size: 13px; color: #cccccc; } - + .file-item:hover { background-color: #2a2d2e; } - + .folder-icon, .file-icon { margin-right: 6px; color: #c5c5c5; } - \ No newline at end of file diff --git a/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.tsx b/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.tsx index 4793cbe4..57b04897 100644 --- a/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.tsx +++ b/examples/experimental/nodes/frontend/src/components/CodeEditor/FileSystem.tsx @@ -23,8 +23,8 @@ export const FileSystem: React.FC = ({ onFileSelect }) => { style={{ paddingLeft: `${depth * 12 + 12}px` }} onClick={() => item.type === 'file' && onFileSelect(`/workspace/${item.name}`)} > - {item.type === 'folder' ? - : + {item.type === 'folder' ? + : } {item.name} @@ -34,9 +34,9 @@ export const FileSystem: React.FC = ({ onFileSelect }) => { const renderFolder = (folder: any, depth: number = 0) => (
{renderItem(folder, depth)} - {folder.children && folder.children.map((child: any) => - child.type === 'folder' ? - renderFolder(child, depth + 1) : + {folder.children && folder.children.map((child: any) => + child.type === 'folder' ? + renderFolder(child, depth + 1) : renderItem(child, depth + 1) )}
@@ -46,11 +46,11 @@ export const FileSystem: React.FC = ({ onFileSelect }) => { <>
Folders
- {files.map(file => file.type === 'folder' ? - renderFolder(file) : + {files.map(file => file.type === 'folder' ? + renderFolder(file) : renderItem(file) )}
); -}; \ No newline at end of file +}; diff --git a/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.css b/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.css index dd91eee0..69b44a1d 100644 --- a/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.css +++ b/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.css @@ -8,14 +8,14 @@ border-bottom: 1px solid #333; text-align: left; } - + .terminal-title { font-size: 13px; color: #cccccc; } - - - + + + #terminal { height: 33vh; padding: 10px; @@ -29,7 +29,7 @@ display: flex; flex-direction: column; } - + .terminal-container { display: flex; flex-direction: column; @@ -38,7 +38,7 @@ color: #d4d4d4; font-family: 'Courier New', monospace; } - + .terminal-header { background-color: #333; color: #fff; @@ -47,7 +47,7 @@ font-weight: bold; border-radius: 8px 8px 0 0; } - + .terminal-body { flex: 1; display: flex; @@ -55,19 +55,19 @@ padding: 10px; overflow: hidden; } - + .terminal-history { flex: 1; overflow-y: auto; margin-bottom: 10px; } - + .terminal-line { padding: 2px 0; white-space: pre-wrap; word-wrap: break-word; } - + .terminal-input-line { display: flex; align-items: center; @@ -75,12 +75,12 @@ padding: 5px; border-radius: 4px; } - + .terminal-prompt { color: #d4d4d4; margin-right: 8px; } - + .terminal-input { flex: 1; background: transparent; @@ -91,8 +91,8 @@ padding: 0; outline: none; } - + .terminal-input:focus { outline: none; box-shadow: none; - } \ No newline at end of file + } diff --git a/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.tsx b/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.tsx index 66c5c2c9..e71cb49c 100644 --- a/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.tsx +++ b/examples/experimental/nodes/frontend/src/components/Terminal/Terminal.tsx @@ -4,7 +4,7 @@ import './Terminal.css'; // Import the CSS file interface TerminalProps { externalMessages: string[]; - socket: Socket; + socket: Socket; } // Function to strip ANSI color codes @@ -56,7 +56,7 @@ export const Terminal: React.FC = ({ externalMessages, socket }) Terminal
-
@@ -80,4 +80,4 @@ export const Terminal: React.FC = ({ externalMessages, socket })
); -}; \ No newline at end of file +}; diff --git a/examples/experimental/nodes/frontend/src/logo.svg b/examples/experimental/nodes/frontend/src/logo.svg index 9dfc1c05..71694760 100644 --- a/examples/experimental/nodes/frontend/src/logo.svg +++ b/examples/experimental/nodes/frontend/src/logo.svg @@ -1 +1 @@ - \ No newline at end of file +