feat(contact-center): initial changes for implementing get suggested response feature#4952
Conversation
…responses feature
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f171b6631e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const eventName = context | ||
| ? AIAssistantEventName.ADD_SUGGESTIONS_EXTRA_CONTEXT | ||
| : AIAssistantEventName.GET_SUGGESTIONS; |
There was a problem hiding this comment.
Derive suggestion event from trimmed context
getSuggestedResponse() chooses ADD_SUGGESTIONS_EXTRA_CONTEXT based on the raw context value, but sends context?.trim() to the backend. If callers pass whitespace-only input (common from text fields), this emits the “add extra context” event with an empty context payload, which can be rejected or ignored by the AI service instead of issuing a normal GET_SUGGESTIONS request.
Useful? React with 👍 / 👎.
| case CC_EVENTS.POST_CALL_SUMMARY: | ||
| case CC_EVENTS.MID_CALL_SUMMARY: | ||
| break; |
There was a problem hiding this comment.
Emit summary RTD events instead of dropping them
This switch now explicitly swallows POST_CALL_SUMMARY and MID_CALL_SUMMARY RTD messages. Before this change, RTD payload types were re-emitted to the task, so these events would reach SDK consumers; after this commit they are silently discarded, which prevents any listener from receiving summary payloads even though these event constants were added to CC_EVENTS in the same change.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48f08b217c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| case CC_EVENTS.SUGGESTED_RESPONSE_ACKNOWLEDGE: | ||
| // TODO: Handling this event | ||
| break; |
There was a problem hiding this comment.
Emit suggested-response acknowledge events to tasks
CC_EVENTS.SUGGESTED_RESPONSE_ACKNOWLEDGE was added as a task event, but this switch currently swallows it instead of re-emitting on the task. In environments where clients wait for an acknowledge before updating UI/request state, those listeners will never fire, so consumers cannot observe the backend acknowledgment despite the event being part of the exported event surface.
Useful? React with 👍 / 👎.
COMPLETES #< INSERT LINK TO ISSUE >
This pull request addresses
Implementation for Get Suggestions feature
by making the following changes
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
Make sure to have followed the contributing guidelines before submitting.