fix(frontend): Fix actionHasObservationPair function to correctly identify pairs (#8661)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
This commit is contained in:
sp.wack 2025-05-24 13:39:37 +04:00 committed by GitHub
parent b838ea0427
commit edc43ca60d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -48,12 +48,11 @@ export function EventMessage({
);
}
if (
hasObservationPair &&
isOpenHandsAction(event) &&
hasThoughtProperty(event.args)
) {
return <ChatMessage type="agent" message={event.args.thought} />;
if (hasObservationPair && isOpenHandsAction(event)) {
if (hasThoughtProperty(event.args)) {
return <ChatMessage type="agent" message={event.args.thought} />;
}
return null;
}
if (isFinishAction(event)) {

View File

@ -49,7 +49,7 @@ export const Messages: React.FC<MessagesProps> = React.memo(
return false;
},
[messages],
[],
);
return (