Skip to content

Commit

Permalink
Fix pr #5181: Fix issue #5179: [frontend]: Push to Github button shou…
Browse files Browse the repository at this point in the history
…ld only push branch, but not creating a PR
  • Loading branch information
openhands-agent committed Nov 25, 2024
1 parent 7733d0f commit c3978b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
46 changes: 21 additions & 25 deletions frontend/src/components/chat-interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,31 +175,27 @@ export function ChatInterface() {
curAgentState === AgentState.FINISHED) && (
<div className="flex flex-col gap-2 mb-2">
{gitHubToken ? (
<div className="flex flex-row gap-2">
<div className="flex-1">
<SuggestionItem
suggestion={{
label: "Push to GitHub",
value:
"Please push the changes to a remote branch on GitHub, but do NOT create a pull request.",
}}
onClick={(value) => {
handleSendMessage(value, []);
}}
/>
</div>
<div className="flex-1">
<SuggestionItem
suggestion={{
label: "Push & Create PR",
value:
"Please push the changes to GitHub and open a pull request.",
}}
onClick={(value) => {
handleSendMessage(value, []);
}}
/>
</div>
<div className="flex flex-col gap-2">
<SuggestionItem
suggestion={{
label: "Push to GitHub Branch",
value:
"Please push the changes to a remote branch on GitHub, but do NOT create a pull request.",
}}
onClick={(value) => {
handleSendMessage(value, []);
}}
/>
<SuggestionItem
suggestion={{
label: "Push & Create Pull Request",
value:
"Please push the changes to GitHub and open a pull request.",
}}
onClick={(value) => {
handleSendMessage(value, []);
}}
/>
</div>
) : (
<SuggestionItem
Expand Down
2 changes: 1 addition & 1 deletion openhands/runtime/utils/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_remote_startup_command(
'-20', # Highest priority
'sh',
'-c',
f'echo -1000 > /proc/self/oom_score_adj && exec {cmd_str}'
f'echo -1000 > /proc/self/oom_score_adj && exec {cmd_str}',
]
else:
# If not root, run with normal priority
Expand Down

0 comments on commit c3978b4

Please sign in to comment.