Skip to content

Fix assistant UI state selectors - #106

Draft
amirgholipour wants to merge 1 commit into
aws-samples:mainfrom
amirgholipour:agent/ui-state-selector-compatibility
Draft

Fix assistant UI state selectors#106
amirgholipour wants to merge 1 commit into
aws-samples:mainfrom
amirgholipour:agent/ui-state-selector-compatibility

Conversation

@amirgholipour

Copy link
Copy Markdown

What changed

  • Update the assistant message renderer to use explicit useAuiState selectors.
  • Subscribe only to the message status and content fields used by the component.

Why this change is proposed

The current UI dependency expects a selector when reading assistant state. Calling the hook without one can fail during rendering or streaming after the dependency update already present on upstream main.

The fix follows the current state API and narrows subscriptions to the fields that actually drive the message view.

Benefits

  • Restores stable assistant-message rendering with the current dependency version.
  • Preserves streaming status, text, and reasoning display.
  • Avoids unnecessary rerenders caused by subscribing to the entire store.
  • Changes only the affected current-UI component.

Validation

  • Verified the current production UI build completes with pnpm.
  • Exercised streaming assistant output in the integrated UI.
  • Reviewed the one-file diff against the current upstream main.

Authored by Saeed Kasmani (amirgholipour).

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