π OpenHands: AI-Driven Development
misc: tweak frontend prompt to prevent agent push to a different branch & update app prompt (#7357)
Xingyao Wange4ccd4057dcc
diff --git a/frontend/src/components/features/chat/action-suggestions.tsx b/frontend/src/components/features/chat/action-suggestions.tsxindex ec0917e49e..020835645b 100644--- a/frontend/src/components/features/chat/action-suggestions.tsx+++ b/frontend/src/components/features/chat/action-suggestions.tsx@@ -40,7 +40,7 @@ export function ActionSuggestions({suggestion={{label: "Push to Branch",value:- "Please push the changes to a remote branch on GitHub, but do NOT create a pull request.",+ "Please push the changes to a remote branch on GitHub, but do NOT create a pull request. Please use the exact SAME branch name as the one you are currently on.",}}onClick={(value) => {posthog.capture("push_to_branch_button_clicked");@@ -51,7 +51,7 @@ export function ActionSuggestions({suggestion={{label: "Push & Create PR",value:- "Please push the changes to GitHub and open a pull request.",+ "Please push the changes to GitHub and open a pull request. Please use the exact SAME branch name as the one you are currently on.",}}onClick={(value) => {posthog.capture("create_pr_button_clicked");diff --git a/openhands/agenthub/codeact_agent/prompts/additional_info.j2 b/openhands/agenthub/codeact_agent/prompts/additional_info.j2index 902800b48d..f7e7ff9495 100644--- a/openhands/agenthub/codeact_agent/prompts/additional_info.j2+++ b/openhands/agenthub/codeact_agent/prompts/additional_info.j2@@ -19,7 +19,7 @@ each of which has a corresponding port:When starting a web server, use the corresponding ports. You should alsoset any options to allow iframes and CORS requests, and allow the server tobe accessed from any host (e.g. 0.0.0.0).-For example, if you are using vite.config.js, you should set server.host to 0.0.0.0, server.port to the port assigned to you, and allowedHosts to ['*'].+For example, if you are using vite.config.js, you should set server.host to 0.0.0.0, server.port to the port assigned to you, and allowedHosts to the host assigned to you.{% endif %}{% if runtime_info.additional_agent_instructions %}{{ runtime_info.additional_agent_instructions }}