Skip to content

Commit

Permalink
disable comment stripping and simplify state machine
Browse files Browse the repository at this point in the history
  • Loading branch information
Domiii committed Dec 9, 2024
1 parent 30b7eab commit 50b3864
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
12 changes: 1 addition & 11 deletions openhands/controller/agent_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,7 @@ async def _handle_message_action(self, action: MessageAction) -> None:
# Tell the agent to stop analyzing and start editing:
self.state.replay_phase = ReplayDebuggingPhase.Edit
self.event_stream.add_event(
MessageAction(
content='Implement the changes, then wait for user confirmation.'
),
EventSource.USER,
)
elif self.state.replay_phase == ReplayDebuggingPhase.Edit:
self.state.replay_phase = ReplayDebuggingPhase.Normal
self.event_stream.add_event(
MessageAction(
content='Double check your changes and publish a PR without waiting for user confirmation.'
),
MessageAction(content='Implement the changes.'),
EventSource.USER,
)
else:
Expand Down
4 changes: 2 additions & 2 deletions openhands/resolver/resolve_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ async def complete_runtime(
if not isinstance(obs, CmdOutputObservation) or obs.exit_code != 0:
raise RuntimeError(f'Failed to git add. Observation: {obs}')

base_git_patch = await get_git_patch(runtime, base_commit)
strip_replay_comments(base_git_patch)
# base_git_patch = await get_git_patch(runtime, base_commit)
# strip_replay_comments(base_git_patch)

git_patch = await get_git_patch(runtime, base_commit)

Expand Down

0 comments on commit 50b3864

Please sign in to comment.