Skip to content

Conversation

Gaojianli
Copy link
Contributor

  1. The status enum for status_updateshould be status-update
  2. The final args is missing in NewTaskStatusUpdateEvent
  3. The MarshalJSON is using a pointer receiver, while will casue this function not be called. The SSE json data is wrong(the right screenshot):
    image

@Gaojianli Gaojianli requested a review from a team as a code owner June 24, 2025 09:37
Copy link

github-actions bot commented Jun 24, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Gaojianli
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Gaojianli
Copy link
Contributor Author

The test failed... but i have no idea how to fix it

@hyprh
Copy link
Contributor

hyprh commented Jun 24, 2025

The test failed... but i have no idea how to fix it

Hi, you could try keep the pointer receiver of unmarshal, I think it should be work.

func (r *StreamingMessageEvent) UnmarshalJSON(data []byte) error { -> func (r StreamingMessageEvent) UnmarshalJSON(data []byte) error {

@Gaojianli
Copy link
Contributor Author

@hyprh
Copy link
Contributor

hyprh commented Jun 25, 2025

The test failed because of the TaskEvent https://github.com/Gaojianli/trpc-a2a-go/blob/45472e83f76beeb62a9503139da3e7b1e73a422b/server/server.go#L769-L771

I think a temporary solution is add Event interface to TaskEvent, and handle TaskEvent in sendSSEEvent manually.

We will try to remove StreamingTask and TaskEvent in further version.

image image

@hyprh
Copy link
Contributor

hyprh commented Jun 25, 2025

Would you mind submitting this modification for us? Or let's get this CR approved first and then we fix it later.

@Gaojianli
Copy link
Contributor Author

Would you mind submitting this modification for us? Or let's get this CR approved first and then we fix it later.

OK, please merge this.

@WineChord WineChord merged commit 8cdd4cd into trpc-group:main Jun 25, 2025
3 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants