refact icon indicating copy to clipboard operation
refact copied to clipboard

ChatPage crash because of unexpected method call items

Open SinoReimu opened this issue 9 months ago • 1 comments

Hi team,

I found a ChatPage crash when I use refact

Code Revision: latest develop branch Reproduce Step:

  • use command "Help me pull a branch from develop and create a file ddd.txt then push MR"
  • Agent will generate a toolcall list like this Image
  • Then the page crash immediately and have to restart. (will also crash when click Resume unfinished method call).

According to console log, I found the root cause - Patch Confirmation Component use those logic to fetch "to be patched file", but it assume the patch action is always the first one (toolCalls[0].function.arguments) Image

But the previous check tells "a patch action could be in any position of this list"

  const isPatchConfirmation = commands.some((command) =>
    PATCH_LIKE_FUNCTIONS.includes(command),
  );

So the issues affects almost all multi-toolcall and make chat page crash (turn to blank). Please help fix it asap;

SinoReimu avatar Apr 05 '25 02:04 SinoReimu

Hi @SinoReimu. Thank you for reporting this issue. A fix has been identified and added to our development backlog.

Workaround Until the fix is deployed, you can avoid the crash by breaking complex tasks into separate requests:

  1. First request: Make file modifications
  2. Second request: Perform other operations

hazratisulton avatar Apr 09 '25 06:04 hazratisulton

The issue has been resolved. I am now closing this issue. If the problem persists or you have any other questions, please feel free to reopen it.

hazratisulton avatar Jul 05 '25 10:07 hazratisulton