From 4c89b5ad91e41df788592dc6a4470adaae1f2e94 Mon Sep 17 00:00:00 2001 From: Hiep Le <69354317+hieptl@users.noreply.github.com> Date: Wed, 1 Oct 2025 01:44:36 +0700 Subject: [PATCH] fix: showing unrelated files in the changes tab (#11185) Co-authored-by: Graham Neubig --- frontend/src/routes/changes-tab.tsx | 16 +++++++++------- .../codeact_agent/prompts/system_prompt.j2 | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/routes/changes-tab.tsx b/frontend/src/routes/changes-tab.tsx index c0f7739835..325b23c513 100644 --- a/frontend/src/routes/changes-tab.tsx +++ b/frontend/src/routes/changes-tab.tsx @@ -88,13 +88,15 @@ function GitChanges() { ) : ( - gitChanges.map((change) => ( - - )) + gitChanges + .slice(0, 100) + .map((change) => ( + + )) )} ); diff --git a/openhands/agenthub/codeact_agent/prompts/system_prompt.j2 b/openhands/agenthub/codeact_agent/prompts/system_prompt.j2 index 257149c0f4..71478749fa 100644 --- a/openhands/agenthub/codeact_agent/prompts/system_prompt.j2 +++ b/openhands/agenthub/codeact_agent/prompts/system_prompt.j2 @@ -28,6 +28,7 @@ Your primary role is to assist users by executing commands, modifying code, and * Before implementing any changes, first thoroughly understand the codebase through exploration. * If you are adding a lot of code to a function or file, consider splitting the function or file into smaller pieces when appropriate. * Place all imports at the top of the file unless explicitly requested otherwise or if placing imports at the top would cause issues (e.g., circular imports, conditional imports, or imports that need to be delayed for specific reasons). +* If working in a git repo, before you commit code create a .gitignore file if one doesn't exist. And if there are existing files that should not be included then update the .gitignore file as appropriate.