diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ab3e4adea..6a0849d24d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,7 +77,7 @@ git push origin my_branch ### 6. Open a Pull Request -* On Github, go to the page of your forked repository, and create a Pull Request: +* On GitHub, go to the page of your forked repository, and create a Pull Request: - Click on `Branches` - Click on the `...` beside your branch and click on `New pull request` - Set `base repository` to `OpenDevin/OpenDevin` @@ -96,7 +96,7 @@ As described [here](https://github.com/commitizen/conventional-commit-types/blob - `feat`: A new feature - `fix`: A bug fix - `docs`: Documentation only changes -- `style`: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc) +- `style`: Changes that do not affect the meaning of the code (white space, formatting, missing semicolons, etc.) - `refactor`: A code change that neither fixes a bug nor adds a feature - `perf`: A code change that improves performance - `test`: Adding missing tests or correcting existing tests diff --git a/Makefile b/Makefile index 6b0f81c4ee..f2c4eca929 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FRONTEND_PORT = 3001 DEFAULT_WORKSPACE_DIR = "./workspace" DEFAULT_MODEL = "gpt-4o" CONFIG_FILE = config.toml -PRECOMMIT_CONFIG_PATH = "./dev_config/python/.pre-commit-config.yaml" +PRE_COMMIT_CONFIG_PATH = "./dev_config/python/.pre-commit-config.yaml" PYTHON_VERSION = 3.11 # ANSI color codes @@ -28,7 +28,7 @@ ifeq ($(INSTALL_DOCKER),) endif @$(MAKE) -s install-python-dependencies @$(MAKE) -s install-frontend-dependencies - @$(MAKE) -s install-precommit-hooks + @$(MAKE) -s install-pre-commit-hooks @$(MAKE) -s build-frontend @echo "$(GREEN)Build completed successfully.$(RESET)" @@ -169,15 +169,15 @@ install-frontend-dependencies: npm run make-i18n @echo "$(GREEN)Frontend dependencies installed successfully.$(RESET)" -install-precommit-hooks: +install-pre-commit-hooks: @echo "$(YELLOW)Installing pre-commit hooks...$(RESET)" @git config --unset-all core.hooksPath || true - @poetry run pre-commit install --config $(PRECOMMIT_CONFIG_PATH) + @poetry run pre-commit install --config $(PRE_COMMIT_CONFIG_PATH) @echo "$(GREEN)Pre-commit hooks installed successfully.$(RESET)" lint-backend: @echo "$(YELLOW)Running linters...$(RESET)" - @poetry run pre-commit run --files opendevin/**/* agenthub/**/* evaluation/**/* --show-diff-on-failure --config $(PRECOMMIT_CONFIG_PATH) + @poetry run pre-commit run --files opendevin/**/* agenthub/**/* evaluation/**/* --show-diff-on-failure --config $(PRE_COMMIT_CONFIG_PATH) lint-frontend: @echo "$(YELLOW)Running linters for frontend...$(RESET)" @@ -319,4 +319,4 @@ help: @echo " $(GREEN)help$(RESET) - Display this help message, providing information on available targets." # Phony targets -.PHONY: build check-dependencies check-python check-npm check-docker check-poetry pull-docker-image install-python-dependencies install-frontend-dependencies install-precommit-hooks lint start-backend start-frontend run run-wsl setup-config setup-config-prompts help +.PHONY: build check-dependencies check-python check-npm check-docker check-poetry pull-docker-image install-python-dependencies install-frontend-dependencies install-pre-commit-hooks lint start-backend start-frontend run run-wsl setup-config setup-config-prompts help diff --git a/agenthub/browsing_agent/response_parser.py b/agenthub/browsing_agent/response_parser.py index 7c9deefd65..a784d6668d 100644 --- a/agenthub/browsing_agent/response_parser.py +++ b/agenthub/browsing_agent/response_parser.py @@ -9,10 +9,9 @@ from opendevin.events.action import ( class BrowsingResponseParser(ResponseParser): - def __init__( - self, - ): + def __init__(self): # Need to pay attention to the item order in self.action_parsers + super().__init__() self.action_parsers = [BrowsingActionParserMessage()] self.default_parser = BrowsingActionParserBrowseInteractive() diff --git a/agenthub/codeact_agent/action_parser.py b/agenthub/codeact_agent/action_parser.py index a855f06bd4..f901b0f8ea 100644 --- a/agenthub/codeact_agent/action_parser.py +++ b/agenthub/codeact_agent/action_parser.py @@ -21,10 +21,9 @@ class CodeActResponseParser(ResponseParser): - AgentFinishAction() - end the interaction """ - def __init__( - self, - ): + def __init__(self): # Need pay attention to the item order in self.action_parsers + super().__init__() self.action_parsers = [ CodeActActionParserFinish(), CodeActActionParserCmdRun(), @@ -33,7 +32,7 @@ class CodeActResponseParser(ResponseParser): ] self.default_parser = CodeActActionParserMessage() - def parse(self, response: str) -> Action: + def parse(self, response) -> Action: action_str = self.parse_response(response) return self.parse_action(action_str) diff --git a/agenthub/codeact_agent/codeact_agent.py b/agenthub/codeact_agent/codeact_agent.py index bdb675ad37..a796670468 100644 --- a/agenthub/codeact_agent/codeact_agent.py +++ b/agenthub/codeact_agent/codeact_agent.py @@ -136,8 +136,8 @@ class CodeActAgent(Agent): sandbox_plugins: list[PluginRequirement] = [ # NOTE: AgentSkillsRequirement need to go before JupyterRequirement, since - # AgentSkillsRequirement provides a lot of Python functions - # and it need to be initialized before Jupyter for Jupyter to use those functions. + # AgentSkillsRequirement provides a lot of Python functions, + # and it needs to be initialized before Jupyter for Jupyter to use those functions. AgentSkillsRequirement(), JupyterRequirement(), ] diff --git a/agenthub/codeact_swe_agent/README.md b/agenthub/codeact_swe_agent/README.md index 114eed7ec3..b52031a037 100644 --- a/agenthub/codeact_swe_agent/README.md +++ b/agenthub/codeact_swe_agent/README.md @@ -2,6 +2,6 @@ This agent is an adaptation of the original [SWE Agent](https://swe-agent.com/) based on CodeAct using the `agentskills` library of OpenDevin. -Its intended use is **solving Github issues**. +Its intended use is **solving GitHub issues**. -It removes web-browsing and Github capability from the original CodeAct agent to avoid confusion to the agent. +It removes web-browsing and GitHub capability from the original CodeAct agent to avoid confusion to the agent. diff --git a/agenthub/codeact_swe_agent/codeact_swe_agent.py b/agenthub/codeact_swe_agent/codeact_swe_agent.py index b9967c93a0..2d898cb3f4 100644 --- a/agenthub/codeact_swe_agent/codeact_swe_agent.py +++ b/agenthub/codeact_swe_agent/codeact_swe_agent.py @@ -93,8 +93,8 @@ class CodeActSWEAgent(Agent): sandbox_plugins: list[PluginRequirement] = [ # NOTE: AgentSkillsRequirement need to go before JupyterRequirement, since - # AgentSkillsRequirement provides a lot of Python functions - # and it need to be initialized before Jupyter for Jupyter to use those functions. + # AgentSkillsRequirement provides a lot of Python functions, + # and it needs to be initialized before Jupyter for Jupyter to use those functions. AgentSkillsRequirement(), JupyterRequirement(), ] diff --git a/agenthub/codeact_swe_agent/response_parser.py b/agenthub/codeact_swe_agent/response_parser.py index 22f7f3a95d..c9661d1809 100644 --- a/agenthub/codeact_swe_agent/response_parser.py +++ b/agenthub/codeact_swe_agent/response_parser.py @@ -17,10 +17,9 @@ class CodeActSWEResponseParser(ResponseParser): - AgentFinishAction() - end the interaction """ - def __init__( - self, - ): + def __init__(self): # Need pay attention to the item order in self.action_parsers + super().__init__() self.action_parsers = [ CodeActSWEActionParserFinish(), CodeActSWEActionParserCmdRun(), diff --git a/agenthub/monologue_agent/response_parser.py b/agenthub/monologue_agent/response_parser.py index 943a06e9c0..8cedf6e3ee 100644 --- a/agenthub/monologue_agent/response_parser.py +++ b/agenthub/monologue_agent/response_parser.py @@ -7,10 +7,8 @@ from opendevin.events.serialization.action import action_from_dict class MonologueResponseParser(ResponseParser): - def __init__( - self, - ): - pass + def __init__(self): + super().__init__() def parse(self, response: str) -> Action: action_str = self.parse_response(response) diff --git a/opendevin/controller/action_parser.py b/opendevin/controller/action_parser.py index 6ff5f025a9..2ebcf4fe11 100644 --- a/opendevin/controller/action_parser.py +++ b/opendevin/controller/action_parser.py @@ -57,7 +57,7 @@ class ResponseParser(ABC): class ActionParser(ABC): """ - This abstract base class is an general interface for an action parser dedicated to + This abstract base class is a general interface for an action parser dedicated to parsing the action from the action str from the LLM. """ diff --git a/opendevin/controller/agent_controller.py b/opendevin/controller/agent_controller.py index 64f235740d..735120f43d 100644 --- a/opendevin/controller/agent_controller.py +++ b/opendevin/controller/agent_controller.py @@ -3,7 +3,7 @@ import traceback from typing import Optional, Type from opendevin.controller.agent import Agent -from opendevin.controller.state.state import TRAFFIC_CONTROL_STATE, State +from opendevin.controller.state.state import State, TrafficControlState from opendevin.core.config import config from opendevin.core.exceptions import ( LLMMalformedActionError, @@ -108,7 +108,6 @@ class AgentController: self.state.iteration += 1 async def update_state_after_step(self): - self.state.updated_info = [] # update metrics especially for cost self.state.metrics = self.agent.llm.metrics @@ -129,7 +128,6 @@ class AgentController: if isinstance(action, NullAction) and isinstance(observation, NullObservation): return self.state.history.append((action, observation)) - self.state.updated_info.append((action, observation)) async def _start_step_loop(self): logger.info(f'[Agent Controller {self.id}] Starting step loop...') @@ -204,10 +202,10 @@ class AgentController: if ( self.state.agent_state == AgentState.PAUSED and new_state == AgentState.RUNNING - and self.state.traffic_control_state == TRAFFIC_CONTROL_STATE.THROTTLING + and self.state.traffic_control_state == TrafficControlState.THROTTLING ): # user intends to interrupt traffic control and let the task resume temporarily - self.state.traffic_control_state = TRAFFIC_CONTROL_STATE.PAUSED + self.state.traffic_control_state = TrafficControlState.PAUSED self.state.agent_state = new_state if new_state == AgentState.STOPPED or new_state == AgentState.ERROR: @@ -312,13 +310,13 @@ class AgentController: ) if self.state.iteration >= self.state.max_iterations: - if self.state.traffic_control_state == TRAFFIC_CONTROL_STATE.PAUSED: + if self.state.traffic_control_state == TrafficControlState.PAUSED: logger.info( 'Hitting traffic control, temporarily resume upon user request' ) - self.state.traffic_control_state = TRAFFIC_CONTROL_STATE.NORMAL + self.state.traffic_control_state = TrafficControlState.NORMAL else: - self.state.traffic_control_state = TRAFFIC_CONTROL_STATE.THROTTLING + self.state.traffic_control_state = TrafficControlState.THROTTLING await self.report_error( f'Agent reached maximum number of iterations, task paused. {TRAFFIC_CONTROL_REMINDER}' ) @@ -327,13 +325,13 @@ class AgentController: elif self.max_budget_per_task is not None: current_cost = self.state.metrics.accumulated_cost if current_cost > self.max_budget_per_task: - if self.state.traffic_control_state == TRAFFIC_CONTROL_STATE.PAUSED: + if self.state.traffic_control_state == TrafficControlState.PAUSED: logger.info( 'Hitting traffic control, temporarily resume upon user request' ) - self.state.traffic_control_state = TRAFFIC_CONTROL_STATE.NORMAL + self.state.traffic_control_state = TrafficControlState.NORMAL else: - self.state.traffic_control_state = TRAFFIC_CONTROL_STATE.THROTTLING + self.state.traffic_control_state = TrafficControlState.THROTTLING await self.report_error( f'Task budget exceeded. Current cost: {current_cost:.2f}, Max budget: {self.max_budget_per_task:.2f}, task paused. {TRAFFIC_CONTROL_REMINDER}' ) diff --git a/opendevin/controller/state/state.py b/opendevin/controller/state/state.py index 010a502213..618e1f78ac 100644 --- a/opendevin/controller/state/state.py +++ b/opendevin/controller/state/state.py @@ -18,7 +18,7 @@ from opendevin.events.observation import ( from opendevin.storage import get_file_store -class TRAFFIC_CONTROL_STATE(str, Enum): +class TrafficControlState(str, Enum): # default state, no rate limiting NORMAL = 'normal' @@ -44,13 +44,12 @@ class State: max_iterations: int = 100 background_commands_obs: list[CmdOutputObservation] = field(default_factory=list) history: list[tuple[Action, Observation]] = field(default_factory=list) - updated_info: list[tuple[Action, Observation]] = field(default_factory=list) inputs: dict = field(default_factory=dict) outputs: dict = field(default_factory=dict) last_error: str | None = None agent_state: AgentState = AgentState.LOADING resume_state: AgentState | None = None - traffic_control_state: TRAFFIC_CONTROL_STATE = TRAFFIC_CONTROL_STATE.NORMAL + traffic_control_state: TrafficControlState = TrafficControlState.NORMAL metrics: Metrics = Metrics() # root agent has level 0, and every delegate increases the level by one delegate_level: int = 0 diff --git a/opendevin/controller/state/task.py b/opendevin/controller/state/task.py index 29b38969a6..dab63a495b 100644 --- a/opendevin/controller/state/task.py +++ b/opendevin/controller/state/task.py @@ -29,7 +29,7 @@ class Task: parent: 'Task', goal: str, state: str = OPEN_STATE, - subtasks: list = [], # noqa: B006 + subtasks=None, # noqa: B006 ): """Initializes a new instance of the Task class. @@ -39,6 +39,8 @@ class Task: state: The initial state of the task. subtasks: A list of subtasks associated with this task. """ + if subtasks is None: + subtasks = [] if parent.id: self.id = parent.id + '.' + str(len(parent.subtasks)) else: diff --git a/opendevin/core/metrics.py b/opendevin/core/metrics.py index 7b45cf0b87..b474ae49b2 100644 --- a/opendevin/core/metrics.py +++ b/opendevin/core/metrics.py @@ -1,7 +1,7 @@ class Metrics: """ Metrics class can record various metrics during running and evaluation. - Currently we define the following metrics: + Currently, we define the following metrics: accumulated_cost: the total cost (USD $) of the current LLM. """ diff --git a/opendevin/events/event.py b/opendevin/events/event.py index 6e050eb02c..a36f584a4c 100644 --- a/opendevin/events/event.py +++ b/opendevin/events/event.py @@ -13,29 +13,29 @@ class Event: @property def message(self) -> str | None: if hasattr(self, '_message'): - return self._message # type: ignore [attr-defined] + return self._message # type: ignore[attr-defined] return '' @property def id(self) -> int | None: if hasattr(self, '_id'): - return self._id # type: ignore [attr-defined] + return self._id # type: ignore[attr-defined] return -1 @property def timestamp(self) -> datetime.datetime | None: if hasattr(self, '_timestamp'): - return self._timestamp # type: ignore [attr-defined] + return self._timestamp # type: ignore[attr-defined] return None @property def source(self) -> EventSource | None: if hasattr(self, '_source'): - return self._source # type: ignore [attr-defined] + return self._source # type: ignore[attr-defined] return None @property def cause(self) -> int | None: if hasattr(self, '_cause'): - return self._cause # type: ignore [attr-defined] + return self._cause # type: ignore[attr-defined] return None diff --git a/opendevin/events/stream.py b/opendevin/events/stream.py index 21c563a053..3b7f8ba4a6 100644 --- a/opendevin/events/stream.py +++ b/opendevin/events/stream.py @@ -97,10 +97,10 @@ class EventStream: async def add_event(self, event: Event, source: EventSource): logger.debug(f'Adding event {event} from {source}') async with self._lock: - event._id = self._cur_id # type: ignore [attr-defined] + event._id = self._cur_id # type: ignore[attr-defined] self._cur_id += 1 - event._timestamp = datetime.now() # type: ignore [attr-defined] - event._source = source # type: ignore [attr-defined] + event._timestamp = datetime.now() # type: ignore[attr-defined] + event._source = source # type: ignore[attr-defined] data = event_to_dict(event) if event.id is not None: self._file_store.write( diff --git a/opendevin/llm/llm.py b/opendevin/llm/llm.py index d2390508fa..021bc9c2fd 100644 --- a/opendevin/llm/llm.py +++ b/opendevin/llm/llm.py @@ -177,7 +177,7 @@ class LLM: f'{retry_state.outcome.exception()}. Attempt #{retry_state.attempt_number} | You can customize these settings in the configuration.', exc_info=False, ) - return True + return None @retry( reraise=True, @@ -276,7 +276,7 @@ class LLM: Add the current cost into total cost in metrics. Args: - response (list): A response from a model invocation. + response: A response from a model invocation. Returns: number: The cost of the response. diff --git a/opendevin/memory/memory.py b/opendevin/memory/memory.py index 09bb28b76b..d10b875b55 100644 --- a/opendevin/memory/memory.py +++ b/opendevin/memory/memory.py @@ -39,7 +39,7 @@ def attempt_on_error(retry_state): f'{retry_state.outcome.exception()}. Attempt #{retry_state.attempt_number} | You can customize these settings in the configuration.', exc_info=False, ) - return True + return None @retry( diff --git a/opendevin/runtime/plugins/agent_skills/README.md b/opendevin/runtime/plugins/agent_skills/README.md index 0ed57d6730..312d5ef6d4 100644 --- a/opendevin/runtime/plugins/agent_skills/README.md +++ b/opendevin/runtime/plugins/agent_skills/README.md @@ -5,7 +5,7 @@ This folder implements a skill/tool set `agentskills` for OpenDevin. It is intended to be used by the agent **inside sandbox**. The skill set will be exposed as a `pip` package that can be installed as a plugin inside the sandbox. -The skill set can contains a bunch of wrapped tools for agent ([many examples here](https://github.com/OpenDevin/OpenDevin/pull/1914)), for example: +The skill set can contain a bunch of wrapped tools for agent ([many examples here](https://github.com/OpenDevin/OpenDevin/pull/1914)), for example: - Audio/Video to text (these are a temporary solution, and we should switch to multimodal models when they are sufficiently cheap - PDF to text - etc. diff --git a/opendevin/runtime/plugins/agent_skills/__init__.py b/opendevin/runtime/plugins/agent_skills/__init__.py index 4456512062..1df5a3046b 100644 --- a/opendevin/runtime/plugins/agent_skills/__init__.py +++ b/opendevin/runtime/plugins/agent_skills/__init__.py @@ -10,7 +10,7 @@ class AgentSkillsRequirement(PluginRequirement): name: str = 'agent_skills' host_src: str = os.path.dirname( os.path.abspath(__file__) - ) # The directory of this file (opendevin/runtime/plugins/jupyter) + ) # The directory of this file (opendevin/runtime/plugins/agent_skills) sandbox_dest: str = '/opendevin/plugins/agent_skills' bash_script_path: str = 'setup.sh' documentation: str = DOCUMENTATION diff --git a/opendevin/runtime/plugins/agent_skills/agentskills.py b/opendevin/runtime/plugins/agent_skills/agentskills.py index b902d52848..7a15c0e70f 100644 --- a/opendevin/runtime/plugins/agent_skills/agentskills.py +++ b/opendevin/runtime/plugins/agent_skills/agentskills.py @@ -167,7 +167,7 @@ def _lint_file(file_path: str) -> tuple[Optional[str], Optional[int]]: return None, None -def _print_window(file_path, targeted_line, WINDOW, return_str=False): +def _print_window(file_path, targeted_line, window, return_str=False): global CURRENT_LINE _check_current_file(file_path) with open(file_path) as file: @@ -182,7 +182,7 @@ def _print_window(file_path, targeted_line, WINDOW, return_str=False): # cover edge cases CURRENT_LINE = _clamp(targeted_line, 1, total_lines) - half_window = max(1, WINDOW // 2) + half_window = max(1, window // 2) # Ensure at least one line above and below the targeted line start = max(1, CURRENT_LINE - half_window) @@ -190,9 +190,9 @@ def _print_window(file_path, targeted_line, WINDOW, return_str=False): # Adjust start and end to ensure at least one line above and below if start == 1: - end = min(total_lines, start + WINDOW - 1) + end = min(total_lines, start + window - 1) if end == total_lines: - start = max(1, end - WINDOW + 1) + start = max(1, end - window + 1) output = '' @@ -214,10 +214,10 @@ def _print_window(file_path, targeted_line, WINDOW, return_str=False): print(output) -def _cur_file_header(CURRENT_FILE, total_lines) -> str: - if not CURRENT_FILE: +def _cur_file_header(current_file, total_lines) -> str: + if not current_file: return '' - return f'[File: {os.path.abspath(CURRENT_FILE)} ({total_lines} lines total)]\n' + return f'[File: {os.path.abspath(current_file)} ({total_lines} lines total)]\n' @update_pwd_decorator @@ -230,7 +230,7 @@ def open_file( to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. """ diff --git a/opendevin/runtime/plugins/mixin.py b/opendevin/runtime/plugins/mixin.py index ada16e2473..3fc4430851 100644 --- a/opendevin/runtime/plugins/mixin.py +++ b/opendevin/runtime/plugins/mixin.py @@ -44,6 +44,10 @@ class PluginMixin: # clean-up ~/.bashrc and touch ~/.bashrc exit_code, output = self.execute('rm -f ~/.bashrc && touch ~/.bashrc') + if exit_code != 0: + logger.warning( + f'Failed to clean-up ~/.bashrc with exit code {exit_code} and output: {output}' + ) for requirement in requirements: # source bashrc file when plugin loads diff --git a/opendevin/server/listen.py b/opendevin/server/listen.py index e0ab17de6d..53c664eb51 100644 --- a/opendevin/server/listen.py +++ b/opendevin/server/listen.py @@ -253,7 +253,6 @@ async def websocket_endpoint(websocket: WebSocket): """ await websocket.accept() - session = None if websocket.query_params.get('token'): token = websocket.query_params.get('token') sid = get_sid_from_token(token) diff --git a/opendevin/server/session/__init__.py b/opendevin/server/session/__init__.py index 391952d6aa..1a12e9c64f 100644 --- a/opendevin/server/session/__init__.py +++ b/opendevin/server/session/__init__.py @@ -3,4 +3,4 @@ from .session import Session session_manager = SessionManager() -__all__ = ['Session', 'SessionManager', 'session_manager', 'message_stack'] +__all__ = ['Session', 'SessionManager', 'session_manager'] diff --git a/opendevin/server/session/agent.py b/opendevin/server/session/agent.py index 14f189329b..14daa67f92 100644 --- a/opendevin/server/session/agent.py +++ b/opendevin/server/session/agent.py @@ -75,7 +75,7 @@ class AgentSession: """Creates an AgentController instance. Args: - start_event: The start event data (optional). + start_event: The start event data. """ if self.controller is not None: raise Exception('Controller already created') diff --git a/tests/integration/README.md b/tests/integration/README.md index c83027c605..67983c3329 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -51,7 +51,7 @@ of agents with real LLMs are stored under `mock/AgentName/TestName` folders. ## Run Integration Tests -Take a look at `run-integration-tests.yml` (in the `.github` folder) to learn +Take a look at `ghcr.yml` (in the `.github/workflow` folder) to learn how integration tests are launched in a CI environment. You can also simply run: ```bash diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3fcc51de2e..13717db325 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -70,7 +70,7 @@ def get_mock_response(test_name: str, messages: str, id: int) -> str: folders under mock folder. If prompt_{id}.log matches, then the mock response we're looking for is at response_{id}.log. - Note: we filter out all non alpha-numerical characters, otherwise we would + Note: we filter out all non-alphanumerical characters, otherwise we would see surprising mismatches caused by linters and minor discrepancies between different platforms. @@ -81,7 +81,6 @@ def get_mock_response(test_name: str, messages: str, id: int) -> str: we start from the end of the file, but again, that is unnecessary and only makes test code harder to understand. """ - mock_dir = os.path.join(script_dir, 'mock', os.environ.get('AGENT'), test_name) prompt = filter_out_symbols(messages) mock_dir = os.path.join(script_dir, 'mock', os.environ.get('AGENT'), test_name) prompt_file_path = os.path.join(mock_dir, f'prompt_{"{0:03}".format(id)}.log') diff --git a/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_001.log b/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_001.log index 59b47a0e0f..ad873c6669 100644 --- a/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_001.log +++ b/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_001.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_005.log b/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_005.log index 02910aac1e..411cf6e886 100644 --- a/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_005.log +++ b/tests/integration/mock/CodeActAgent/test_browse_internet/prompt_005.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_edits/prompt_001.log b/tests/integration/mock/CodeActAgent/test_edits/prompt_001.log index ce19dd7141..bae02a64bf 100644 --- a/tests/integration/mock/CodeActAgent/test_edits/prompt_001.log +++ b/tests/integration/mock/CodeActAgent/test_edits/prompt_001.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. @@ -386,4 +386,4 @@ NOW, LET'S START! Fix typos in bad.txt. Do not ask me for confirmation at any point. -ENVIRONMENT REMINDER: You have 9 turns left to complete the task. +ENVIRONMENT REMINDER: You have 9 turns left to complete the task. \ No newline at end of file diff --git a/tests/integration/mock/CodeActAgent/test_edits/prompt_002.log b/tests/integration/mock/CodeActAgent/test_edits/prompt_002.log index 4af96c7858..ccc46aa5b1 100644 --- a/tests/integration/mock/CodeActAgent/test_edits/prompt_002.log +++ b/tests/integration/mock/CodeActAgent/test_edits/prompt_002.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. @@ -403,4 +403,4 @@ OBSERVATION: 4|Enjoy! -ENVIRONMENT REMINDER: You have 8 turns left to complete the task. +ENVIRONMENT REMINDER: You have 8 turns left to complete the task. \ No newline at end of file diff --git a/tests/integration/mock/CodeActAgent/test_edits/prompt_003.log b/tests/integration/mock/CodeActAgent/test_edits/prompt_003.log index 8c96f4422d..47e5e62470 100644 --- a/tests/integration/mock/CodeActAgent/test_edits/prompt_003.log +++ b/tests/integration/mock/CodeActAgent/test_edits/prompt_003.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. @@ -425,4 +425,4 @@ OBSERVATION: [File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.] -ENVIRONMENT REMINDER: You have 7 turns left to complete the task. +ENVIRONMENT REMINDER: You have 7 turns left to complete the task. \ No newline at end of file diff --git a/tests/integration/mock/CodeActAgent/test_ipython/prompt_001.log b/tests/integration/mock/CodeActAgent/test_ipython/prompt_001.log index d7204631fc..277db8eb7a 100644 --- a/tests/integration/mock/CodeActAgent/test_ipython/prompt_001.log +++ b/tests/integration/mock/CodeActAgent/test_ipython/prompt_001.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log b/tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log index 41aaa9caef..d0e5856ea1 100644 --- a/tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log +++ b/tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_001.log b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_001.log index 735db41662..9651939a83 100644 --- a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_001.log +++ b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_001.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_002.log b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_002.log index 7097af68af..fab576da1b 100644 --- a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_002.log +++ b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_002.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_003.log b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_003.log index 673a7b1884..5fefd7fcbb 100644 --- a/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_003.log +++ b/tests/integration/mock/CodeActAgent/test_ipython_module/prompt_003.log @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. 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 4436dd7659..e65d0b7caf 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 @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. 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 4e5e2b2ebd..01df439768 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 @@ -30,7 +30,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_001.log b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_001.log index 2203fea9ca..5b867618cb 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_001.log +++ b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_001.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_002.log b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_002.log index 1087433409..80a4ebcae6 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_002.log +++ b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_002.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. @@ -594,11 +594,11 @@ open_file('bad.txt') ---------- OBSERVATION: -[File: /workspace/bad.txt (4 lines total)] -1|This is a stupid typoo. -2|Really? -3|No mor typos! -4|Enjoy! +[File: /workspace/bad.txt (4 lines total)] +1|This is a stupid typoo. +2|Really? +3|No mor typos! +4|Enjoy! ENVIRONMENT REMINDER: You have 8 turns left to complete the task. diff --git a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_003.log b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_003.log index 06dbe37151..07007f8ea4 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_003.log +++ b/tests/integration/mock/CodeActSWEAgent/test_edits/prompt_003.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. @@ -594,11 +594,11 @@ open_file('bad.txt') ---------- OBSERVATION: -[File: /workspace/bad.txt (4 lines total)] -1|This is a stupid typoo. -2|Really? -3|No mor typos! -4|Enjoy! +[File: /workspace/bad.txt (4 lines total)] +1|This is a stupid typoo. +2|Really? +3|No mor typos! +4|Enjoy! ---------- @@ -617,18 +617,18 @@ edit_file('bad.txt', 'No mor typos!', 'No more typos!') ---------- OBSERVATION: -[File: /workspace/bad.txt (4 lines total after edit)] -1|This is a stupid typo. -2|Really? -3|No mor typos! -4|Enjoy! -[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.] -[File: /workspace/bad.txt (4 lines total after edit)] -1|This is a stupid typo. -2|Really? -3|No more typos! -4|Enjoy! -[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.] +[File: /workspace/bad.txt (4 lines total after edit)] +1|This is a stupid typo. +2|Really? +3|No mor typos! +4|Enjoy! +[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.] +[File: /workspace/bad.txt (4 lines total after edit)] +1|This is a stupid typo. +2|Really? +3|No more typos! +4|Enjoy! +[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.] ENVIRONMENT REMINDER: You have 7 turns left to complete the task. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_001.log b/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_001.log index 6f288f818e..2d7b61d0db 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_001.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_001.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_002.log b/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_002.log index f3e81941fb..4495603380 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_002.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython/prompt_002.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_001.log b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_001.log index 7a3f7b5be0..54d100590c 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_001.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_001.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_002.log b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_002.log index ee7b87f308..0bd4a55a99 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_002.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_002.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_003.log b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_003.log index af2e0f2049..64f310e338 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_003.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_003.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_004.log b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_004.log index b882817800..5cbe7c6f2b 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_004.log +++ b/tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_004.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_001.log b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_001.log index 9144d1de34..fb06250eac 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_001.log +++ b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_001.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_002.log b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_002.log index 852a26fed4..54a00e4799 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_002.log +++ b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_002.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_003.log b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_003.log index 41341a7187..3e39aed335 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_003.log +++ b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_003.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100. diff --git a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_004.log b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_004.log index ecfe114205..a6684f3abc 100644 --- a/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_004.log +++ b/tests/integration/mock/CodeActSWEAgent/test_write_simple_script/prompt_004.log @@ -18,7 +18,7 @@ open_file(path: str, line_number: int | None = 1, context_lines: int | None = 10 It only shows the first 100 lines by default! Max `context_lines` supported is 2000, use `scroll up/down` to view the file if you want to see more. Args: - path: str: The path to the file to open, preferredly absolute path. + path: str: The path to the file to open, preferred absolute path. line_number: int | None = 1: The line number to move to. Defaults to 1. context_lines: int | None = 100: Only shows this number of lines in the context window (usually from line 1), with line_number as the center (if possible). Defaults to 100.