From 435f47ca0e1ecb6f69c1f5633383faa65ddcbbe9 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Thu, 2 May 2024 02:07:40 +0800 Subject: [PATCH] Improve the both frontend and backend for CodeActAgent (#1494) * improve the both frontend and backend for CodeActAgent * fix linter * update integration test --- agenthub/codeact_agent/codeact_agent.py | 12 +- agenthub/codeact_agent/prompt.py | 2 +- .../agenthub/codeact_agent/codeact_agent.md | 8 + frontend/src/components/Jupyter.tsx | 28 +- .../components/file-explorer/FileExplorer.tsx | 6 +- .../modals/settings/SettingsModal.tsx | 12 +- .../test_write_simple_script/prompt_001.log | 2 +- .../test_write_simple_script/prompt_002.log | 4 +- .../test_write_simple_script/prompt_003.log | 6 +- .../test_write_simple_script/prompt_004.log | 8 +- .../test_write_simple_script/prompt_005.log | 259 ------------------ .../test_write_simple_script/response_001.log | 2 +- .../test_write_simple_script/response_002.log | 2 +- .../test_write_simple_script/response_003.log | 2 +- .../test_write_simple_script/response_004.log | 2 +- .../test_write_simple_script/response_005.log | 1 - 16 files changed, 65 insertions(+), 291 deletions(-) delete mode 100644 tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_005.log delete mode 100644 tests/integration/mock/CodeActAgent/test_write_simple_script/response_005.log diff --git a/agenthub/codeact_agent/codeact_agent.py b/agenthub/codeact_agent/codeact_agent.py index 3154db5daf..7afa8165d8 100644 --- a/agenthub/codeact_agent/codeact_agent.py +++ b/agenthub/codeact_agent/codeact_agent.py @@ -34,6 +34,14 @@ def parse_response(response) -> str: action += f'' return action +def truncate_observation(observation: str, max_chars: int=5000) -> str: + """ + Truncate the middle of the observation if it is too long. + """ + if len(observation) <= max_chars: + return observation + half = max_chars // 2 + return observation[:half] + '\n[... Observation truncated due to length ...]\n' + observation[-half:] class CodeActAgent(Agent): """ @@ -117,9 +125,10 @@ class CodeActAgent(Agent): if obs.content.strip() == '/exit': return AgentFinishAction() elif isinstance(obs, CmdOutputObservation): - content = 'OBSERVATION:\n' + obs.content + content = 'OBSERVATION:\n' + truncate_observation(obs.content) content += f'\n[Command {obs.command_id} finished with exit code {obs.exit_code}]]' self.messages.append({'role': 'user', 'content': content}) + elif isinstance(obs, IPythonRunCellObservation): content = 'OBSERVATION:\n' + obs.content # replace base64 images with a placeholder @@ -128,6 +137,7 @@ class CodeActAgent(Agent): if '![image](data:image/png;base64,' in line: splited[i] = '![image](data:image/png;base64, ...) already displayed to user' content = '\n'.join(splited) + content = truncate_observation(content) self.messages.append({'role': 'user', 'content': content}) else: raise NotImplementedError( diff --git a/agenthub/codeact_agent/prompt.py b/agenthub/codeact_agent/prompt.py index b504a12951..d6c3c54a21 100644 --- a/agenthub/codeact_agent/prompt.py +++ b/agenthub/codeact_agent/prompt.py @@ -40,9 +40,9 @@ The assistant should stop and provide an answer when they have already {_COMMAND_DOCS} -Whenever possible, execute the code for the user using or instead of providing it. The assistant's response should be concise, but do express their thoughts. Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. +IMPORTANT: Whenever possible, execute the code for the user using or instead of providing it. """ EXAMPLES = """ diff --git a/docs/modules/python/agenthub/codeact_agent/codeact_agent.md b/docs/modules/python/agenthub/codeact_agent/codeact_agent.md index bfb5466e9c..64a486308d 100644 --- a/docs/modules/python/agenthub/codeact_agent/codeact_agent.md +++ b/docs/modules/python/agenthub/codeact_agent/codeact_agent.md @@ -3,6 +3,14 @@ sidebar_label: codeact_agent title: agenthub.codeact_agent.codeact_agent --- +#### truncate\_observation + +```python +def truncate_observation(observation: str, max_chars: int = 5000) -> str +``` + +Truncate the middle of the observation if it is too long. + ## CodeActAgent Objects ```python diff --git a/frontend/src/components/Jupyter.tsx b/frontend/src/components/Jupyter.tsx index 22b27e80c0..62fe5ca3fd 100644 --- a/frontend/src/components/Jupyter.tsx +++ b/frontend/src/components/Jupyter.tsx @@ -28,6 +28,21 @@ function JupyterCell({ cell }: IJupyterCell): JSX.Element { ); } + + // aggregate all the NON-image lines into a single plaintext. + const lines: { type: "plaintext" | "image"; content: string }[] = []; + let current = ""; + for (const line of code.split("\n")) { + if (line.startsWith("![image](data:image/png;base64,")) { + lines.push({ type: "plaintext", content: current }); + lines.push({ type: "image", content: line }); + current = ""; + } else { + current += `${line}\n`; + } + } + lines.push({ type: "plaintext", content: current }); + return (
STDOUT/STDERR
@@ -35,25 +50,22 @@ function JupyterCell({ cell }: IJupyterCell): JSX.Element { className="scrollbar-custom scrollbar-thumb-gray-500 hover:scrollbar-thumb-gray-400 dark:scrollbar-thumb-white/10 dark:hover:scrollbar-thumb-white/20 overflow-auto px-5 max-h-[60vh] bg-gray-800" style={{ padding: 0, marginBottom: 0, fontSize: "0.75rem" }} > - {/* split code by newline and render each line as a plaintext, except it starts with `![image]` so we render it as markdown */} - {code.split("\n").map((line, index) => { - if (line.startsWith("![image](data:image/png;base64,")) { - // add new line before and after the image + {/* display the lines as plaintext or image */} + {lines.map((line, index) => { + if (line.type === "image") { return (
value}> - {line} + {line.content} -
); } return (
- {line} + {line.content} -
); })} diff --git a/frontend/src/components/file-explorer/FileExplorer.tsx b/frontend/src/components/file-explorer/FileExplorer.tsx index 51a39cd829..b73322855c 100644 --- a/frontend/src/components/file-explorer/FileExplorer.tsx +++ b/frontend/src/components/file-explorer/FileExplorer.tsx @@ -6,7 +6,11 @@ import { IoIosCloudUpload, } from "react-icons/io"; import { twMerge } from "tailwind-merge"; -import { WorkspaceFile, getWorkspace, uploadFile } from "#/services/fileService"; +import { + WorkspaceFile, + getWorkspace, + uploadFile, +} from "#/services/fileService"; import IconButton from "../IconButton"; import ExplorerTree from "./ExplorerTree"; import { removeEmptyNodes } from "./utils"; diff --git a/frontend/src/components/modals/settings/SettingsModal.tsx b/frontend/src/components/modals/settings/SettingsModal.tsx index cf815a7f05..a5765eca9a 100644 --- a/frontend/src/components/modals/settings/SettingsModal.tsx +++ b/frontend/src/components/modals/settings/SettingsModal.tsx @@ -76,14 +76,14 @@ function SettingsModal({ isOpen, onOpenChange }: SettingsProps) { i18next.changeLanguage(settings.LANGUAGE); initializeAgent(settings); // reinitialize the agent with the new settings - const sensitiveKeys = ['LLM_API_KEY']; + const sensitiveKeys = ["LLM_API_KEY"]; Object.entries(updatedSettings).forEach(([key, value]) => { - if (!sensitiveKeys.includes(key)) { - toast.settingsChanged(`${key} set to "${value}"`); - } else { - toast.settingsChanged(`${key} has been updated securely.`); - } + if (!sensitiveKeys.includes(key)) { + toast.settingsChanged(`${key} set to "${value}"`); + } else { + toast.settingsChanged(`${key} has been updated securely.`); + } }); localStorage.setItem( diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_001.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_001.log index 1287212b6f..a33dcc0853 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_001.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_001.log @@ -28,9 +28,9 @@ edit : end_of_edit - replaces lines through (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run. -Whenever possible, execute the code for the user using or instead of providing it. The assistant's response should be concise, but do express their thoughts. Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. +IMPORTANT: Whenever possible, execute the code for the user using or instead of providing it. ---------- diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_002.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_002.log index f4ad1e93d9..5d18551a1b 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_002.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_002.log @@ -28,9 +28,9 @@ edit : end_of_edit - replaces lines through (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run. -Whenever possible, execute the code for the user using or instead of providing it. The assistant's response should be concise, but do express their thoughts. Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. +IMPORTANT: Whenever possible, execute the code for the user using or instead of providing it. ---------- @@ -216,7 +216,7 @@ Write a shell script 'hello.sh' that prints 'hello'. ---------- -Let's start by creating the shell script `hello.sh` that prints "hello". I'll write the script and save it to a file. +Sure, I'll create a shell script named `hello.sh` that prints "hello". Let's start by writing the script. echo "echo 'hello'" > hello.sh diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_003.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_003.log index eec72fab3c..b97024f588 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_003.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_003.log @@ -28,9 +28,9 @@ edit : end_of_edit - replaces lines through (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run. -Whenever possible, execute the code for the user using or instead of providing it. The assistant's response should be concise, but do express their thoughts. Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. +IMPORTANT: Whenever possible, execute the code for the user using or instead of providing it. ---------- @@ -216,7 +216,7 @@ Write a shell script 'hello.sh' that prints 'hello'. ---------- -Let's start by creating the shell script `hello.sh` that prints "hello". I'll write the script and save it to a file. +Sure, I'll create a shell script named `hello.sh` that prints "hello". Let's start by writing the script. echo "echo 'hello'" > hello.sh @@ -230,7 +230,7 @@ OBSERVATION: ---------- -The shell script `hello.sh` has been successfully created. Would you like to run the script to see the output, or is there anything else you'd like to do with it? +The shell script `hello.sh` has been successfully created. If you'd like, I can run the script to show you the output. Would you like me to proceed with executing the script? ---------- diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_004.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_004.log index 040ec399fb..0d25276e4d 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_004.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_004.log @@ -28,9 +28,9 @@ edit : end_of_edit - replaces lines through (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run. -Whenever possible, execute the code for the user using or instead of providing it. The assistant's response should be concise, but do express their thoughts. Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. +IMPORTANT: Whenever possible, execute the code for the user using or instead of providing it. ---------- @@ -216,7 +216,7 @@ Write a shell script 'hello.sh' that prints 'hello'. ---------- -Let's start by creating the shell script `hello.sh` that prints "hello". I'll write the script and save it to a file. +Sure, I'll create a shell script named `hello.sh` that prints "hello". Let's start by writing the script. echo "echo 'hello'" > hello.sh @@ -230,7 +230,7 @@ OBSERVATION: ---------- -The shell script `hello.sh` has been successfully created. Would you like to run the script to see the output, or is there anything else you'd like to do with it? +The shell script `hello.sh` has been successfully created. If you'd like, I can run the script to show you the output. Would you like me to proceed with executing the script? ---------- @@ -238,7 +238,7 @@ can you run it to make sure it is working? ---------- -Sure, let's run the script `hello.sh` to ensure it's working correctly. +Certainly! Let's run the `hello.sh` script to ensure it's working as expected. bash hello.sh diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_005.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_005.log deleted file mode 100644 index deed325508..0000000000 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_005.log +++ /dev/null @@ -1,259 +0,0 @@ - - ----------- - -A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. -The assistant can interact with an interactive Python (Jupyter Notebook) environment and receive the corresponding output when needed. The code should be enclosed using "" tag, for example: - -print("Hello World!") - -The assistant can execute bash commands on behalf of the user by wrapping them with and . -For example, you can list the files in the current directory by ls . -The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block. -The assistant can install Python packages through bash by pip install [package needed] and should always import packages and define variables before starting to use them. -The assistant should stop and provide an answer when they have already obtained the answer from the execution result. - - -Apart from the standard bash commands, you can also use the following special commands in environment: -open [] - opens the file at the given path in the editor. If line_number is provided, the window will be move to include that line -goto - moves the window to show -scroll_down - moves the window down {WINDOW} lines -scroll_up - moves the window down {WINDOW} lines -create - creates and opens a new file with the given name -search_dir [] - searches for search_term in all files in dir. If dir is not provided, searches in the current directory -search_file [] - searches for search_term in file. If file is not provided, searches in the current open file -find_file [] - finds all files with the given name in dir. If dir is not provided, searches in the current directory -edit : - -end_of_edit - replaces lines through (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. -Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run. - -Whenever possible, execute the code for the user using or instead of providing it. -The assistant's response should be concise, but do express their thoughts. -Try to include one of or in each of your responses, unless it is a direct answer to a question OR a message to the user. - - ----------- - -Here is an example of how you can interact with the environment for task solving: - ---- START OF EXAMPLE --- - -USER: Can you create a list of numbers from 1 to 10, and create a web page to display them at port 5000? - -ASSISTANT: -Sure! Let me write the Python code for starting a web server and save it to a file `app.py`: - -CODE=''' -from flask import Flask -app = Flask(__name__) - -@app.route('/') -def index(): - numbers = list(range(1, 11)) - return str(numbers) - -if __name__ == '__main__': - app.run(port=5000) -''' -with open('app.py', 'w') as f: - f.write(CODE) - - -USER: -Observation: -[Code executed successfully with no output] - -ASSISTANT: -I have created a Python file `app.py` that will display a list of numbers from 1 to 10 when you run it. Let me run the Python file for you: - -python3 app.py > server.log 2>&1 & - - -USER: -Observation: -[1] 121[1]+ Exit 1 python3 app.py > server.log 2>&1 - -ASSISTANT: Looks like the server is running with PID 121 then crashed. Let me check the server log: - -cat server.log - - -USER: -Observation: -Traceback (most recent call last): - File "/workspace/app.py", line 2, in - from flask import Flask -ModuleNotFoundError: No module named 'flask' - -ASSISTANT: -It seems that Flask is not installed. Let me install Flask for you: - -pip install flask - - -USER: -Observation: -Defaulting to user installation because normal site-packages is not writeable -Collecting flask - Using cached flask-3.0.3-py3-none-any.whl (101 kB) -Collecting blinker>=1.6.2 - Using cached blinker-1.7.0-py3-none-any.whl (13 kB) -Collecting Werkzeug>=3.0.0 - Using cached werkzeug-3.0.2-py3-none-any.whl (226 kB) -Collecting click>=8.1.3 - Using cached click-8.1.7-py3-none-any.whl (97 kB) -Collecting itsdangerous>=2.1.2 - Using cached itsdangerous-2.2.0-py3-none-any.whl (16 kB) -Requirement already satisfied: Jinja2>=3.1.2 in /home/opendevin/.local/lib/python3.10/site-packages (from flask) (3.1.3) -Requirement already satisfied: MarkupSafe>=2.0 in /home/opendevin/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5) -Installing collected packages: Werkzeug, itsdangerous, click, blinker, flask -Successfully installed Werkzeug-3.0.2 blinker-1.7.0 click-8.1.7 flask-3.0.3 itsdangerous-2.2.0 - -ASSISTANT: -Now that Flask is installed, let me run the Python file again: - -python3 app.py > server.log 2>&1 & - - -USER: -Observation: -[1] 124 - -ASSISTANT: -Let me check the server log again: - -cat server.log - - -USER: -Observation: -* Serving Flask app 'app' - * Debug mode: off -WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. - * Running on http://127.0.0.1:5000 -Press CTRL+C to quit - -ASSISTANT: -The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask! - -USER: Now kill the server, make it display the numbers in a table format. - -ASSISTANT: -Sure! Let me stop the server first: - -kill 124 - - -USER: -Observation: -[1]+ Terminated python3 app.py > server.log 2>&1 - -ASSISTANT: -The server has been stopped. Let me open the Python file and modify it. - -open app.py - - -USER: -[File: /workspace/app.py (11 lines total)] -1: -2:from flask import Flask -3:app = Flask(__name__) -4: -5:@app.route('/') -6:def index(): -7: numbers = list(range(1, 11)) -8: return str(numbers) -9: -10:if __name__ == '__main__': -11: app.run(port=5000) - -ASSISTANT: -I should edit the file to display the numbers in a table format. Let me do that for you: - - -edit 8:8 <' + ''.join([f'{i}' for i in numbers]) + '' -EOF - - -USER: -Observation: -[File: /workspace/app.py (11 lines total)] -1: -2:from flask import Flask -3:app = Flask(__name__) -4: -5:@app.route('/') -6:def index(): -7: numbers = list(range(1, 11)) -8: return '' + ''.join([f'' for i in numbers]) + '
{i}
' -9: -10:if __name__ == '__main__': -11: app.run(port=5000) -File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary. - -ASSISTANT: -The file has been updated. Let me run the Python file again with the new changes: - -python3 app.py > server.log 2>&1 & - - -USER: -Observation: -[1] 126 - -ASSISTANT: -The server is running on port 5000 with PID 126. You can access the list of numbers in a table format by visiting http://127.0.0.1:5000. Free free to let me know if you have any further requests! - ---- END OF EXAMPLE --- - - -NOW, LET'S START! - -Write a shell script 'hello.sh' that prints 'hello'. - ----------- - -Let's start by creating the shell script `hello.sh` that prints "hello". I'll write the script and save it to a file. - - -echo "echo 'hello'" > hello.sh - - ----------- - -OBSERVATION: - -[Command -1 finished with exit code 0]] - ----------- - -The shell script `hello.sh` has been successfully created. Would you like to run the script to see the output, or is there anything else you'd like to do with it? - ----------- - -can you run it to make sure it is working? - ----------- - -Sure, let's run the script `hello.sh` to ensure it's working correctly. - - -bash hello.sh - - ----------- - -OBSERVATION: -hello -[Command -1 finished with exit code 0]] - ----------- - -The script `hello.sh` is working correctly as it printed "hello". If you have any more tasks or need further modifications, feel free to let me know! - ----------- - -can you run it to make sure it is working? diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_001.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_001.log index 9a36dce55f..d37476a5d2 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_001.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_001.log @@ -1,4 +1,4 @@ -Let's start by creating the shell script `hello.sh` that prints "hello". I'll write the script and save it to a file. +Sure, I'll create a shell script named `hello.sh` that prints "hello". Let's start by writing the script. echo "echo 'hello'" > hello.sh diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_002.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_002.log index f7cb2b8edc..1d10fb6f51 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_002.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_002.log @@ -1 +1 @@ -The shell script `hello.sh` has been successfully created. Would you like to run the script to see the output, or is there anything else you'd like to do with it? +The shell script `hello.sh` has been successfully created. If you'd like, I can run the script to show you the output. Would you like me to proceed with executing the script? diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_003.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_003.log index c146b696e4..6d0b936aae 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_003.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_003.log @@ -1,4 +1,4 @@ -Sure, let's run the script `hello.sh` to ensure it's working correctly. +Certainly! Let's run the `hello.sh` script to ensure it's working as expected. bash hello.sh diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_004.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_004.log index c113aa6238..6961909c08 100644 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_004.log +++ b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_004.log @@ -1 +1 @@ -The script `hello.sh` is working correctly as it printed "hello". If you have any more tasks or need further modifications, feel free to let me know! +The script `hello.sh` is working correctly and prints "hello" as expected. If you have any more tasks or need further modifications, feel free to let me know! diff --git a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_005.log b/tests/integration/mock/CodeActAgent/test_write_simple_script/response_005.log deleted file mode 100644 index e8ff14a4b9..0000000000 --- a/tests/integration/mock/CodeActAgent/test_write_simple_script/response_005.log +++ /dev/null @@ -1 +0,0 @@ -The script `hello.sh` was just run and it successfully printed "hello". If you need any further assistance or have another task in mind, please let me know!