Skip to content

feat(ai-assistant): implement AIAssistant widget and add suggested response feature#712

Open
lego0110 wants to merge 2 commits into
webex:task-refactorfrom
lego0110:suggRes-task-refactor
Open

feat(ai-assistant): implement AIAssistant widget and add suggested response feature#712
lego0110 wants to merge 2 commits into
webex:task-refactorfrom
lego0110:suggRes-task-refactor

Conversation

@lego0110

Copy link
Copy Markdown

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-8037

This pull request addresses

-Create a new independent Widget: AIAssistant under which Suggested Response will be one of the features.
-Read Adaptive Card payloads and render them as received from the event.
-UI has to be created as per the attached Figma design: https://www.figma.com/design/xAoUT1dZl1VyqwkqfeqF5j/Phase-B-Widgets?node-id=8015-146438&p=f&t=YJEmQCDOaG3uiDL7-0

by making the following changes

  • New @webex/cc-ai-assistant package: launcher + panel chrome, hook, observer-wrapped widget, unit tests
  • AIAssistant presentational components in cc-components: Launcher, Panel (Header, MinimizedBar), SuggestedResponse, ContextInput, AdaptiveCardRenderer
  • Store: SUGGESTED_RESPONSE per-task listener, suggestedResponses per-interaction array, feature-flag walker, sendSuggestionFeedback actions
  • cc-widgets: re-export AIAssistant + register widget-cc-ai-assistant
  • Sample app: aiAssistant toggle + host-owned fullscreen demo

Follow-up Actions: AI Assistant telemetry — SDK divergence resolution

SUGGESTED_RESPONSES_USER_ACTION (like / dislike / copy) takes a different code path from GET_SUGGESTIONS / ADD_SUGGESTIONS_EXTRA_CONTEXT. Same endpoint, same envelope, different implementation.

  • GET_SUGGESTIONS and ADD_SUGGESTIONS_EXTRA_CONTEXT are sent through the typed SDK path: cc.apiAIAssistant.getSuggestedResponse(...).
  • SUGGESTED_RESPONSES_USER_ACTION is sent from storeEventsWrapper.sendSuggestionFeedback using cc.webex.request(...).

Why: the SDK's apiAIAssistant.sendEvent() types action as TranscriptAction = 'START' | 'STOP'; there's no parameter for userAction: { actionType, actionId }, so we can't route this event through the typed API.

Action items:

  1. File SDK feature request for a typed apiAIAssistant.sendSuggestionUserAction(params) method.
  2. Follow-up action once shipped: replace sendSuggestionFeedback with the SDK call; delete resolveAiAssistantBaseUrl, the two @ts-expect-error casts, and the env map.
Screenshot 2026-06-26 at 12 36 48 PM

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Codex
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@lego0110 lego0110 requested a review from a team as a code owner June 29, 2026 11:23
@aws-amplify-us-east-2

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-712.d1b38q61t1z947.amplifyapp.com

@riteshfyi riteshfyi added validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets and removed validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets labels Jun 30, 2026
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.

2 participants