Skip to content

Conversation

@doitundoit
Copy link

Summary

This PR improves the Lit client's robustness when handling agent response messages.

Changes

  • History fallback: Added fallback mechanism to retrieve agent messages from history when status.message.parts is empty
  • String-encoded JSON handling: Parse string-encoded JSON data parts that some agents may return
  • Debug logging: Added console.debug statements for better traceability during development

Affected file:

  • samples/client/lit/shell/client.ts

Verification

  • TypeScript build passes (npm run build:tsc)

Related

Split from #396 as requested by reviewer to keep commit scope narrow and targeted.

@google-cla
Copy link

google-cla bot commented Jan 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

- Add fallback mechanism to retrieve agent messages from history when status.message.parts is empty
- Handle string-encoded JSON data parts by parsing them
- Add debug logging (console.debug) for better traceability
@doitundoit doitundoit force-pushed the feat/lit-client-robustness branch from 730b139 to 9560b98 Compare January 3, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant