-
Notifications
You must be signed in to change notification settings - Fork 64
docs(cc-widgets): add AI documentation - AGENTS.md and ARCHITECTURE.md #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
| | `@webex/cc-task` → CallControlCAD | `CallControlCAD` | `widget-cc-call-control-cad` | `onHoldResume`, `onEnd`, `onWrapUp`, `onRecordingToggle` | | ||
| | `@webex/cc-task` → OutdialCall | `OutdialCall` | `widget-cc-outdial-call` | None (uses store) | | ||
|
|
||
| ### File Structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File Structure should be placed before widget mapping and since we have package structure also so they should be together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
| ### Purpose | ||
|
|
||
| CC Widgets serves as the main entry point and bundle for contact center widgets. It: | ||
| - **Aggregates all widgets** from individual packages into a single bundle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanding the statement to say all widgets to actually name them in bracket next to it. Or saying Aggregates each widget module/package(station-logn, user-state etc) from individual packages into a single bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
|
||
| ### Purpose | ||
|
|
||
| CC Widgets serves as the main entry point and bundle for contact center widgets. It: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are already talking about how CC widgets is a combine dsingle bundle for each of the widgets so here we can just that it's the main entry point for contact center widgets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| ### Key Capabilities | ||
|
|
||
| - **Dual Export System**: Import as React components or use as Web Components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we are mentioning the same things in purpose and key capabilities but just in different words. Purpose shuld be more on high level I guess that why was this package created and in kep capabilities we can list down more in detail on what all the package does
| initCC(); | ||
|
|
||
| // Add event listeners | ||
| const loginWidget = document.querySelector('widget-cc-station-login'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we suggesting to do this and from which perspective we have listen like this ? I cannot find any reference for this code
|
|
||
| --- | ||
|
|
||
| ## Dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel dependencies and available widgets list should come before the usecases or examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
|
||
| ### 1. React Bundle (`dist/index.js`) | ||
|
|
||
| ```typescript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do these points have to be inside the code block and as commented lines ? Does it read better like this ? It's not an actual code line so could be just mentioned as plain bullet points
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt it was unecessary, Ive removed it
| | **React Bundle** | `src/index.ts` | Re-exports React widgets | `dist/index.js` | React applications | | ||
| | **Web Components** | `src/wc.ts` | r2wc wrappers + registration | `dist/wc.js` | HTML/vanilla JS/other frameworks | | ||
|
|
||
| ### Widget Mapping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information seems repetetive between Agents.md and Architecture.md file. Under available widgets we are telling the same as separate sections and here in form of table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we have information about the props as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, il remove this section from the agents.md
|
|
||
| ### React Export Flow | ||
|
|
||
| ```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a parse error in this diagram: Parse error on line 3:
...t Packages" SL[@webex/cc-station when I try to display its rich diff to preview the page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting Guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list seem to be specific defined list for issues seen. But would there be a general troubleshooting guidelines, then only we should have this heading and we should those general rules under that. Else Just saying Common Issue and their Solution as heading then listing those down is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have used this heading in all the docs, I would say lets test this out, if it doesnt work well i.e agents is unable to resolve issues then we can update this heading and add more context
COMPLETES N/A - Documentation Enhancement
This pull request addresses
Adding AI-optimized documentation for the cc-widgets package to help AI assistants understand the Web Component wrappers using r2wc.
by making the following changes
packages/contact-center/cc-widgets/ai-docs/AGENTS.md- Usage documentation and custom element registrationpackages/contact-center/cc-widgets/ai-docs/ARCHITECTURE.md- Technical r2wc implementation detailsChange Type
The following scenarios were tested
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.