Skip to content

Commit

Permalink
fix: Update error message format to include content, type, sender and…
Browse files Browse the repository at this point in the history
… timestamp
  • Loading branch information
openhands-agent committed Feb 5, 2025
1 parent 1a451e8 commit d85efda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/routes/_oh.app/hooks/use-handle-ws-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export const useHandleWSEvents = () => {
addErrorMessage({
id: event.extras?.error_id,
message: event.message,
content: event.message,
type: "error",
sender: "assistant",
timestamp: new Date().toISOString(),
}),
);
}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/services/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ export function handleAssistantMessage(message: Record<string, unknown>) {
store.dispatch(
addErrorMessage({
message: "Unknown message type received",
content: "Unknown message type received",
type: "error",
sender: "assistant",
timestamp: new Date().toISOString(),
}),
);
}
Expand Down

0 comments on commit d85efda

Please sign in to comment.