@worktango/ai-assistant 0.0.1-bjarke-test-3 → 0.0.2-beta-gd1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -0
- package/backendTypes.ts +268 -0
- package/dist/{Absenteeism-DvDlSgYL.mjs → Absenteeism-CuAiko3K.mjs} +1 -1
- package/dist/{ActivityFeed-BeepdlWL.mjs → ActivityFeed-B5X9Mfzs.mjs} +1 -1
- package/dist/{AddUser-nzx2P0vg.mjs → AddUser-BubC1Bl4.mjs} +1 -1
- package/dist/{Admin-_h2lsrDG.mjs → Admin-Bmgrl4WC.mjs} +1 -1
- package/dist/{Admin-Ds3aK0fO.mjs → Admin-DqXQsgLG.mjs} +1 -1
- package/dist/{AiGeneral-ByRK4igb.mjs → AiGeneral-BsRIX0CM.mjs} +1 -1
- package/dist/{AiScoring-Do2UZAnB.mjs → AiScoring-H0QPuaNp.mjs} +1 -1
- package/dist/{AiText-C9jp0AgK.mjs → AiText-C2qpOSbA.mjs} +1 -1
- package/dist/{Anniversary-BampwfUG.mjs → Anniversary-qS0JDQno.mjs} +1 -1
- package/dist/{Appreciation-D6BFxczg.mjs → Appreciation-BMIRAaKV.mjs} +1 -1
- package/dist/{ArrowDown-C-GNuNP_.mjs → ArrowDown-Cir_11Ww.mjs} +1 -1
- package/dist/{ArrowLeft-noPrtPPZ.mjs → ArrowLeft-BAqK-dnx.mjs} +1 -1
- package/dist/{ArrowRight-C3_yJ7CM.mjs → ArrowRight-BPwQdxlE.mjs} +1 -1
- package/dist/{ArrowUp-CGjYGQgR.mjs → ArrowUp-DSYPXtix.mjs} +1 -1
- package/dist/{Attachment-D7nuEdI9.mjs → Attachment-D_89MWP-.mjs} +1 -1
- package/dist/{BeQuickDontHurry-nW7X0QTu.mjs → BeQuickDontHurry-Sdm5xWSX.mjs} +1 -1
- package/dist/{Birthday-C84wg7ie.mjs → Birthday-Cmij06yx.mjs} +1 -1
- package/dist/{BrandPromise-Dw9Jssor.mjs → BrandPromise-CX53V3fL.mjs} +1 -1
- package/dist/{BrandVision-D1URandK.mjs → BrandVision-DbY0Rl5r.mjs} +1 -1
- package/dist/{Calendar-6U-cTNjO.mjs → Calendar-B9Poro9L.mjs} +1 -1
- package/dist/{CaretDn-CIU8kV2l.mjs → CaretDn-DjPWxbY8.mjs} +1 -1
- package/dist/{CaretDown-DUc_jLHJ.mjs → CaretDown-DeKyH9kO.mjs} +1 -1
- package/dist/{CaretLeft-Dcwfilbb.mjs → CaretLeft-B113ZU-j.mjs} +1 -1
- package/dist/{CaretRight-m80sjTZ-.mjs → CaretRight-DM-6XyZF.mjs} +1 -1
- package/dist/{CaretUp-DQCwon3l.mjs → CaretUp-CYuaI2Bm.mjs} +1 -1
- package/dist/{ChallengeAccepted-BshD6z1T.mjs → ChallengeAccepted-1cTHTPo0.mjs} +1 -1
- package/dist/{CheckIn-DSPPtA6m.mjs → CheckIn-3Nfsk5oT.mjs} +1 -1
- package/dist/{CheckIns-_-w_JC6x.mjs → CheckIns-BLgmmnox.mjs} +1 -1
- package/dist/{CheckSeal-C8kV8uOa.mjs → CheckSeal-BphC125F.mjs} +1 -1
- package/dist/{Checkmark-tXfdkpX4.mjs → Checkmark-DKHU3qCJ.mjs} +1 -1
- package/dist/{Clock-xA-DNkZ5.mjs → Clock-NbUQnxYW.mjs} +1 -1
- package/dist/{Close-Cl2Eimvh.mjs → Close-BscvWpF4.mjs} +1 -1
- package/dist/{CloudDownload-t-N-HsPS.mjs → CloudDownload-DkQrhuWv.mjs} +1 -1
- package/dist/{Comment-Nt6lrl_T.mjs → Comment-CZk5Lk7d.mjs} +1 -1
- package/dist/{Comments-DcmKNwKG.mjs → Comments-D-Lz0XLl.mjs} +1 -1
- package/dist/{Connections-BpKArFk1.mjs → Connections-BEoj8G_O.mjs} +1 -1
- package/dist/{Copy-CTyLvT1w.mjs → Copy-B3pKItuB.mjs} +1 -1
- package/dist/{CustomQuestion-DA7XwX5G.mjs → CustomQuestion-D5WtxIAe.mjs} +1 -1
- package/dist/{CustomerSuccess-C5CI1WKJ.mjs → CustomerSuccess-Ctg9iAvH.mjs} +1 -1
- package/dist/{DatePicker-CLgV77Iu.mjs → DatePicker-BgYtdpM6.mjs} +1 -1
- package/dist/{Dot-BQOg2LyM.mjs → Dot-C12qCBJh.mjs} +1 -1
- package/dist/{Download-BfhU2Ixe.mjs → Download-Bi7AwcX_.mjs} +1 -1
- package/dist/{Drag-BpD_7IKB.mjs → Drag-D8uEUuyy.mjs} +1 -1
- package/dist/DragIndicator-vsZFDT1S.mjs +12 -0
- package/dist/{Earn-2ADPmirB.mjs → Earn-eoNxiFKF.mjs} +1 -1
- package/dist/{Email-D8LAzdYs.mjs → Email-CfdtKKpS.mjs} +1 -1
- package/dist/{EmojiDisplay-ZrhZvsLq.mjs → EmojiDisplay-DWeK3eWd.mjs} +2 -2
- package/dist/{EmojiPicker-amVvpVfq.mjs → EmojiPicker-BoDN-GVX.mjs} +2 -2
- package/dist/{EnpsSurvey-BHROvLq_.mjs → EnpsSurvey-1povxvGk.mjs} +1 -1
- package/dist/{Expired-C28rYMHU.mjs → Expired-kwpsq7dE.mjs} +1 -1
- package/dist/{Eye--GMWiATQ.mjs → Eye-B6z0dzgP.mjs} +1 -1
- package/dist/{Feedback-DISPKyuq.mjs → Feedback-CV-T1EA3.mjs} +1 -1
- package/dist/{Feedback-BYiHpadB.mjs → Feedback-Cb7jIXSH.mjs} +1 -1
- package/dist/{Filter-D_ZikGFn.mjs → Filter-8sxkwh1N.mjs} +1 -1
- package/dist/{Flag-B7TX8X7y.mjs → Flag-CntrQmRY.mjs} +1 -1
- package/dist/Giphy-MaNHdkAv.mjs +22 -0
- package/dist/{GoalCount-BixgQKe5.mjs → GoalCount-BY154kkv.mjs} +1 -1
- package/dist/{GoalPercent-CLIZdTPN.mjs → GoalPercent-BRzZG4Xj.mjs} +1 -1
- package/dist/{GoalTask-iRy5hxSf.mjs → GoalTask-Bbdxra-C.mjs} +1 -1
- package/dist/{GoalTask-DySOkfd9.mjs → GoalTask-CQQziW53.mjs} +1 -1
- package/dist/{Goals-C7Sf1mBu.mjs → Goals-HmCYQeMJ.mjs} +1 -1
- package/dist/{Goals-BFSzXjrH.mjs → Goals-Q3pIFD6u.mjs} +1 -1
- package/dist/{Growth-CPFT_O1W.mjs → Growth-DE39Oniv.mjs} +1 -1
- package/dist/{Hamburger-CLW6vijR.mjs → Hamburger-BHn5s95p.mjs} +1 -1
- package/dist/{Help-Cduq07Lc.mjs → Help-BcQQwdw7.mjs} +1 -1
- package/dist/{HighFive-BE4Gkbuh.mjs → HighFive-D8PsCd5X.mjs} +1 -1
- package/dist/{HighFive-B3f_p5et.mjs → HighFive-D_D4cpVC.mjs} +1 -1
- package/dist/{Home-Cn0oQOqk.mjs → Home-CI5tkvjJ.mjs} +1 -1
- package/dist/{Home-BfgUI8Kq.mjs → Home-toyH6nRq.mjs} +1 -1
- package/dist/{HorizontalLine-M-nqCDgX.mjs → HorizontalLine-DB7rYyci.mjs} +1 -1
- package/dist/{Hourglass-DTqGH30S.mjs → Hourglass-DxYMZPi1.mjs} +1 -1
- package/dist/Image-ConUoLpH.mjs +41 -0
- package/dist/{ImageFile-CCNMWJxV.mjs → ImageFile-Bz7J0mt7.mjs} +1 -1
- package/dist/{InGoodCompany-dkXuJmCX.mjs → InGoodCompany-DxXMCXkz.mjs} +1 -1
- package/dist/{Incentives-BezUk6nz.mjs → Incentives-DSX-kHnf.mjs} +1 -1
- package/dist/{Info-kHJtpdOI.mjs → Info-BVCb--pE.mjs} +1 -1
- package/dist/{Insights-BVBlg5Sp.mjs → Insights-DGtpV7vl.mjs} +1 -1
- package/dist/{Insights-VBlL9dnf.mjs → Insights-DHqGpH01.mjs} +1 -1
- package/dist/{Integrations-BDwxsD2i.mjs → Integrations-Ba3Lo9gy.mjs} +1 -1
- package/dist/{KazooLogo-dtj5Nlm-.mjs → KazooLogo-BT7YZMt2.mjs} +1 -1
- package/dist/{KnowYourAudience-k6qllSRl.mjs → KnowYourAudience-B_RlVbB2.mjs} +1 -1
- package/dist/{Launch-BNdp_Gz1.mjs → Launch-DyQpuj07.mjs} +1 -1
- package/dist/Link-BLWdkQvZ.mjs +43 -0
- package/dist/{LinkArrow-CrZBexRG.mjs → LinkArrow-CE3JoMD9.mjs} +1 -1
- package/dist/{Loading-CFJCspAl.mjs → Loading-CfksjkIK.mjs} +1 -1
- package/dist/{Lock-wfI6Jsi5.mjs → Lock-Do1k-9WN.mjs} +1 -1
- package/dist/{Management-J5cSHWS5.mjs → Management-CBYOk7gX.mjs} +1 -1
- package/dist/{MeatballMenu-CCQH7SKU.mjs → MeatballMenu-B4pnE2jx.mjs} +1 -1
- package/dist/MediaError-C5NtgYKI.mjs +40 -0
- package/dist/{Messages-BD1sYsYi.mjs → Messages-D9xpFBa2.mjs} +1 -1
- package/dist/{Microphone-GMYkZlQ8.mjs → Microphone-BxKhLspD.mjs} +1 -1
- package/dist/{Mobile-CfG_gMFH.mjs → Mobile-B27QajLf.mjs} +1 -1
- package/dist/{Nomination-BWedzuOQ.mjs → Nomination-pSgVJG6H.mjs} +1 -1
- package/dist/{NominationsAndAwards-D83jh7yE.mjs → NominationsAndAwards-FjoFycwm.mjs} +1 -1
- package/dist/{Notification-BWgbdEez.mjs → Notification-DTKKHOUU.mjs} +1 -1
- package/dist/{Okrs-GjB9rVzq.mjs → Okrs-Cx3DS3C9.mjs} +1 -1
- package/dist/{Pause-9-17_inQ.mjs → Pause-B5sFk5Rh.mjs} +1 -1
- package/dist/{PeerToPeer-WKhdvStu.mjs → PeerToPeer-QPdnKvGn.mjs} +1 -1
- package/dist/{Pencil-SK7OcUHQ.mjs → Pencil-BbmC1cJS.mjs} +1 -1
- package/dist/{People-DGjC0v8e.mjs → People-BxnU8Z05.mjs} +1 -1
- package/dist/{PerformanceManagement-ClSoeqhY.mjs → PerformanceManagement-BLZfPkTX.mjs} +1 -1
- package/dist/{Pin-1EDZDOp7.mjs → Pin-DeOFNuHd.mjs} +1 -1
- package/dist/{PinnedIconAward-Bul-2YRa.mjs → PinnedIconAward-BxgSnJf_.mjs} +1 -1
- package/dist/{PinnedIconBrightIdea-DYh__y5k.mjs → PinnedIconBrightIdea-BPkLUs1e.mjs} +1 -1
- package/dist/{PinnedIconBullseye-DIqtfvJU.mjs → PinnedIconBullseye-DxfWzALv.mjs} +1 -1
- package/dist/{PinnedIconChampagne-DRoPVI3x.mjs → PinnedIconChampagne-BajLXSTD.mjs} +1 -1
- package/dist/{PinnedIconCheer-COKqsRT0.mjs → PinnedIconCheer-CDXwPi5_.mjs} +1 -1
- package/dist/{PinnedIconCrown-dYdY9_dY.mjs → PinnedIconCrown-DW0xXG6F.mjs} +1 -1
- package/dist/{PinnedIconDiamond-ClsSmSsi.mjs → PinnedIconDiamond-BBexCsja.mjs} +1 -1
- package/dist/{PinnedIconHoleInOne-Dx_93qBn.mjs → PinnedIconHoleInOne-Bvd8LwZd.mjs} +1 -1
- package/dist/{PinnedIconMedal-CsWGZcxa.mjs → PinnedIconMedal-CNwdAQ6f.mjs} +1 -1
- package/dist/{PinnedIconMetrics-MOu3kO0B.mjs → PinnedIconMetrics-BGrgQYes.mjs} +1 -1
- package/dist/{PinnedIconPin-BdFpM7SZ.mjs → PinnedIconPin-C5rf2L5-.mjs} +1 -1
- package/dist/{PinnedIconRockAndRoll-Dbl5yCsD.mjs → PinnedIconRockAndRoll-BJr0GFBC.mjs} +1 -1
- package/dist/{PinnedIconRocket-Cg6cNUOS.mjs → PinnedIconRocket-D-mWFglo.mjs} +1 -1
- package/dist/{PinnedIconStrength-DCEOlDmx.mjs → PinnedIconStrength-C65sHChH.mjs} +1 -1
- package/dist/{PinnedIconTeddyBear-BzG1mIr5.mjs → PinnedIconTeddyBear-Dx6rjj0F.mjs} +1 -1
- package/dist/{PlatformLogo-CpBfNjvC.mjs → PlatformLogo-C8jT1pTg.mjs} +1 -1
- package/dist/{Plus-sM5aK4-z.mjs → Plus-yM1jlKOj.mjs} +1 -1
- package/dist/{Popper-NZtnc6Gg.mjs → Popper-BVVjK1ai.mjs} +118 -118
- package/dist/{PrivateEye-CIoowI1e.mjs → PrivateEye-CkBX7r_4.mjs} +1 -1
- package/dist/{PrivatePushPin-CbLCueMP.mjs → PrivatePushPin-Bp_WTQS6.mjs} +1 -1
- package/dist/{Processing-CeNkXjwM.mjs → Processing-CNd1Y61-.mjs} +1 -1
- package/dist/{Productivity-BIbb7_gO.mjs → Productivity-CSFF_TTn.mjs} +1 -1
- package/dist/{ProgressCircle-CYQOYv89.mjs → ProgressCircle-CLSKP2Gl.mjs} +1 -1
- package/dist/{PulseSurvey-dGKtxX2a.mjs → PulseSurvey-CsL6WZdI.mjs} +1 -1
- package/dist/{PushPin-CgVlH780.mjs → PushPin-Bu-auPnk.mjs} +1 -1
- package/dist/{QuotesLeft-CahHZswe.mjs → QuotesLeft-BWpNDBal.mjs} +1 -1
- package/dist/{QuotesRight-DDeOhcze.mjs → QuotesRight-BpBh5mG9.mjs} +1 -1
- package/dist/{Recognition-juGbsO1C.mjs → Recognition-4MknR18w.mjs} +1 -1
- package/dist/{Recognition-DeTXS3e4.mjs → Recognition-BI46J6ho.mjs} +1 -1
- package/dist/{Retention-YWFBNwu5.mjs → Retention-HYeKh30a.mjs} +1 -1
- package/dist/{Rewards-zvu3WQTJ.mjs → Rewards-C1aRZ0ot.mjs} +1 -1
- package/dist/{Rewards-CSREgsqf.mjs → Rewards-U4ogz8U4.mjs} +1 -1
- package/dist/{RewardsCatalog-BBZvDbaN.mjs → RewardsCatalog-gfuBQBZf.mjs} +1 -1
- package/dist/{Roadmap-QoqxHeq9.mjs → Roadmap-BlWzZybo.mjs} +1 -1
- package/dist/{Search-Dr6B8nPX.mjs → Search-CJKwg6fG.mjs} +1 -1
- package/dist/{Security-Dnk34AE3.mjs → Security-DG-tKQmP.mjs} +1 -1
- package/dist/{SendRecognition-B9f3JheW.mjs → SendRecognition-DYsixh4T.mjs} +1 -1
- package/dist/{ShareLink-BgAuSvVu.mjs → ShareLink-Guocx8fQ.mjs} +1 -1
- package/dist/{SidebarCollapse-B-g5lYUF.mjs → SidebarCollapse-BeAh_fr2.mjs} +1 -1
- package/dist/{Skill-bfXzX0OO.mjs → Skill-0jXs--Pa.mjs} +1 -1
- package/dist/{Skills-BHwZ86px.mjs → Skills--kXnMP25.mjs} +1 -1
- package/dist/Smiley-Cby6kWK-.mjs +84 -0
- package/dist/{Stop-HvJn2yyQ.mjs → Stop-Dsa1AnGS.mjs} +1 -1
- package/dist/{Survey-BoLKc5tg.mjs → Survey-Cizp4n_t.mjs} +1 -1
- package/dist/{Surveys-C7MM7CLQ.mjs → Surveys-Cu1FymdO.mjs} +1 -1
- package/dist/{SyncUps-Co3Vf5nB.mjs → SyncUps-D804GfQz.mjs} +1 -1
- package/dist/{Syncs-BFLA-2ox.mjs → Syncs-DQ-919jk.mjs} +1 -1
- package/dist/{TalentReview-BfWLrWd7.mjs → TalentReview-CiuvS5J3.mjs} +1 -1
- package/dist/{TalentReview-sojl7vER.mjs → TalentReview-f8Q0mOBN.mjs} +1 -1
- package/dist/{TalentReviewInsights-BoK8baqV.mjs → TalentReviewInsights-DgBVuH3k.mjs} +1 -1
- package/dist/{TaskCompleted-BSvzthMc.mjs → TaskCompleted-D5rrMYYp.mjs} +1 -1
- package/dist/{Team-DhEQbQZ3.mjs → Team-BncNuLPP.mjs} +1 -1
- package/dist/{Teams-Bb34mPGX.mjs → Teams-BRogz9Tn.mjs} +1 -1
- package/dist/{TextBold-BNAi6JSD.mjs → TextBold-DJ5W6YOb.mjs} +1 -1
- package/dist/{TextBulletList-CXXD4nov.mjs → TextBulletList-g-kVni4u.mjs} +1 -1
- package/dist/{TextInput-CnPaDa1e.mjs → TextInput-CzbxrQQV.mjs} +1 -1
- package/dist/{TextItalic-Dy2pXz_7.mjs → TextItalic-Bx9VLcRy.mjs} +1 -1
- package/dist/{TextNumberList-BPTOd6Wv.mjs → TextNumberList-BbbGvl-u.mjs} +1 -1
- package/dist/{TextUnderline-6Z2hYTjf.mjs → TextUnderline-CQkl5YOg.mjs} +1 -1
- package/dist/ThumbsDown-Dc1PkDCJ.mjs +46 -0
- package/dist/ThumbsUp-Bgu_lYD4.mjs +46 -0
- package/dist/{Toggle-tB0atYK6.mjs → Toggle-BXUhrGpw.mjs} +1 -1
- package/dist/{Translate-Cl9TSXYo.mjs → Translate-Bi7IGF68.mjs} +1 -1
- package/dist/{Trash-Ccz7A9-5.mjs → Trash-DWu72EZ6.mjs} +1 -1
- package/dist/{TrendDown-C6qipVvf.mjs → TrendDown-BC-9pZum.mjs} +1 -1
- package/dist/{TrendUp-DQA-LIpV.mjs → TrendUp-Dz-IKKdW.mjs} +1 -1
- package/dist/{Undo-BxHro2uM.mjs → Undo-CmGObnDk.mjs} +1 -1
- package/dist/{Unplugged-Cu2e_RWV.mjs → Unplugged-Be-cdep6.mjs} +1 -1
- package/dist/{UpDownCaret-BLFziyhp.mjs → UpDownCaret-BvKpox10.mjs} +1 -1
- package/dist/VerifiedCheckmark-DKolIbtV.mjs +20 -0
- package/dist/{VerticalLine-DnwUzHMP.mjs → VerticalLine-BivXZNlq.mjs} +1 -1
- package/dist/{Warning-joe9-uyg.mjs → Warning-BarF7LSj.mjs} +1 -1
- package/dist/{WarningNoOutline-CxC88kGe.mjs → WarningNoOutline-DWSpFbfu.mjs} +1 -1
- package/dist/{YesAnd-CWgHxvyP.mjs → YesAnd-C4WGIC0q.mjs} +1 -1
- package/dist/ai-assistant.css +1 -1
- package/dist/{emoji-ZgMDf36A.mjs → emoji-CQ3lkPBy.mjs} +1 -1
- package/dist/express.js +552 -38
- package/dist/{react-apexcharts.min-BMl_5WoH.mjs → react-apexcharts.min-B2cJmFLN.mjs} +1 -1
- package/dist/react.js +15 -0
- package/dist/react.umd.js +173 -174
- package/dist/{reactComponent-DZ74JZxo.mjs → reactComponent-2MdwkH_N.mjs} +18085 -17299
- package/express.d.ts +33 -0
- package/generated/apiHooks.tsx +5644 -0
- package/generated/sdk.ts +5119 -0
- package/generated/stitchedSdk.ts +1174 -0
- package/package.json +6 -3
- package/react.d.ts +97 -3
- package/sharedTypes.ts +19 -1
- package/dist/Giphy-Llm2CHKs.mjs +0 -24
- package/dist/Image-DSEmBtT-.mjs +0 -43
- package/dist/Link-CjTzrTiR.mjs +0 -25
- package/dist/Smiley-C6m6baVk.mjs +0 -45
- package/dist/react.es.js +0 -12
- package/express.js +0 -4
- package/react.js +0 -4
package/README.md
CHANGED
|
@@ -47,12 +47,50 @@ Also note that _we commit generated files_, since they are path agnostic and hav
|
|
|
47
47
|
|
|
48
48
|
```jsx
|
|
49
49
|
import { AiAssistant } from "@worktango/ai-assistant/react";
|
|
50
|
+
import "@worktango/ai-assistant/dist/ai-assistant.css";
|
|
50
51
|
|
|
51
52
|
function App() {
|
|
52
53
|
return (<AiAssistant />);
|
|
53
54
|
}
|
|
54
55
|
```
|
|
55
56
|
|
|
57
|
+
**Note:** You must import the CSS file to ensure components are styled correctly. This includes components like `GenAIRatingComponentApolloWrapped`.
|
|
58
|
+
|
|
59
|
+
### Using GenAIRatingComponentApolloWrapped
|
|
60
|
+
|
|
61
|
+
The `GenAIRatingComponentApolloWrapped` component allows users to rate AI-generated content (e.g., survey summaries, comments summaries). It can be used outside the AI Assistant context.
|
|
62
|
+
|
|
63
|
+
**Important:** You must configure the bearer token strategy before using this component. This is typically done once at your app's initialization:
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { config } from "@worktango/ai-assistant/react";
|
|
67
|
+
import { getAccessToken } from './your-auth-module';
|
|
68
|
+
|
|
69
|
+
// In your root component or app initialization
|
|
70
|
+
React.useEffect(() => {
|
|
71
|
+
config.setPulseBearerTokenStrategy(() => getAccessToken() ?? '');
|
|
72
|
+
}, []);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Once configured, you can use the component anywhere in your app:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { GenAIRatingComponentApolloWrapped } from "@worktango/ai-assistant/react";
|
|
79
|
+
import "@worktango/ai-assistant/dist/ai-assistant.css";
|
|
80
|
+
|
|
81
|
+
function MyComponent() {
|
|
82
|
+
return (
|
|
83
|
+
<GenAIRatingComponentApolloWrapped
|
|
84
|
+
responseType="SURVEY_SUMMARY"
|
|
85
|
+
responseId="123"
|
|
86
|
+
genAiMessage="This is the AI-generated summary..."
|
|
87
|
+
genAiMessageTimestamp="2026-01-28T12:00:00Z"
|
|
88
|
+
aiResponseRating={existingRating} // Optional: existing rating data
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
56
94
|
## Testing
|
|
57
95
|
|
|
58
96
|
To test whether a change might break the build when this application is deployed on another server, you can test it in this repository in the following ways:
|
|
@@ -61,6 +99,47 @@ To test whether a change might break the build when this application is deployed
|
|
|
61
99
|
|
|
62
100
|
If you just made UI changes, you can rename `packages/ai-assistant/react.ts` to `_react.ts`; and `react.public.js` to `react.js`. Then, run `yarn build:all` in this package. Once you do that, when you restart the development server, webpack will use the `react.js` file to load the component over at `/admin/ai-assistant`, and use the fully bundled React component to do so.
|
|
63
101
|
|
|
102
|
+
**Testing locally with pulse-web**
|
|
103
|
+
|
|
104
|
+
To test changes in pulse-web before publishing to npm, use `yarn link`:
|
|
105
|
+
|
|
106
|
+
1. **Register the package for linking in kazoo-web:**
|
|
107
|
+
```bash
|
|
108
|
+
cd /path/to/kazoo-web/packages/ai-assistant
|
|
109
|
+
yarn link
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This registers `@worktango/ai-assistant` globally for linking.
|
|
113
|
+
|
|
114
|
+
2. **Link the package in pulse-web:**
|
|
115
|
+
```bash
|
|
116
|
+
cd /path/to/pulse-web
|
|
117
|
+
yarn link @worktango/ai-assistant
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This creates a symlink from pulse-web's `node_modules` to your local kazoo-web package.
|
|
121
|
+
|
|
122
|
+
3. **Build the package after making changes:**
|
|
123
|
+
|
|
124
|
+
After any code changes in kazoo-web:
|
|
125
|
+
```bash
|
|
126
|
+
cd /path/to/kazoo-web/packages/ai-assistant
|
|
127
|
+
yarn build:all
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Restart your pulse-web dev server to pick up the changes.
|
|
131
|
+
|
|
132
|
+
4. **When done testing:**
|
|
133
|
+
|
|
134
|
+
Unlink the package in pulse-web:
|
|
135
|
+
```bash
|
|
136
|
+
cd /path/to/pulse-web
|
|
137
|
+
yarn unlink @worktango/ai-assistant
|
|
138
|
+
yarn install --force
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
This removes the symlink and reinstalls the published version from npm.
|
|
142
|
+
|
|
64
143
|
## Features
|
|
65
144
|
|
|
66
145
|
- Unified tool call API for all WorkTango apps
|
package/backendTypes.ts
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
// Don't import from the generated folder, as it is removed when we build and publish the package.
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
AppendMessageInput,
|
|
5
|
+
AppendMessageToConversationMutation,
|
|
6
|
+
ConversationInput,
|
|
7
|
+
CreateConversationInput,
|
|
8
|
+
DeleteConversationInput,
|
|
9
|
+
UpdateConversationTitleInput,
|
|
10
|
+
GetAConversationQuery,
|
|
11
|
+
GetAllConversationsQuery,
|
|
12
|
+
DeleteAiDocumentMutation,
|
|
13
|
+
UpdateAiDocumentMutation,
|
|
14
|
+
UploadAiDocumentMutation,
|
|
15
|
+
UpdateAiSettingsMutation,
|
|
16
|
+
GetAiSettingsQuery,
|
|
17
|
+
} from "./generated/apiHooks";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Context passed to callbacks containing both request and response data
|
|
21
|
+
*/
|
|
22
|
+
export interface CallbackContext<TRequest, TResponse> {
|
|
23
|
+
/**
|
|
24
|
+
* The original request details
|
|
25
|
+
*/
|
|
26
|
+
request: {
|
|
27
|
+
/**
|
|
28
|
+
* The full path of the request (e.g., "/ai-assistant?targetPath=/api")
|
|
29
|
+
*/
|
|
30
|
+
path: string;
|
|
31
|
+
/**
|
|
32
|
+
* The HTTP method (POST, GET, etc.)
|
|
33
|
+
*/
|
|
34
|
+
method: string;
|
|
35
|
+
/**
|
|
36
|
+
* The parsed request body
|
|
37
|
+
*/
|
|
38
|
+
body: TRequest;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The parsed response body from the proxied request
|
|
42
|
+
*/
|
|
43
|
+
response: TResponse;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* REST endpoint request/response types
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
export interface ChatRequest {
|
|
51
|
+
model?: "large" | "medium" | "small";
|
|
52
|
+
temperature?: number;
|
|
53
|
+
stream?: boolean;
|
|
54
|
+
maxTokens?: number;
|
|
55
|
+
messages: Array<{
|
|
56
|
+
role: "user" | "model" | "tool";
|
|
57
|
+
parts: Array<
|
|
58
|
+
| {
|
|
59
|
+
type: "text";
|
|
60
|
+
text: string;
|
|
61
|
+
}
|
|
62
|
+
| {
|
|
63
|
+
type: "toolCall";
|
|
64
|
+
toolName: string;
|
|
65
|
+
args: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
| {
|
|
68
|
+
type: "toolResult";
|
|
69
|
+
toolName: string;
|
|
70
|
+
result: unknown;
|
|
71
|
+
}
|
|
72
|
+
>;
|
|
73
|
+
name?: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ChatResponse {
|
|
78
|
+
role: "user" | "model" | "tool";
|
|
79
|
+
parts: Array<
|
|
80
|
+
| {
|
|
81
|
+
type: "text";
|
|
82
|
+
text: string;
|
|
83
|
+
}
|
|
84
|
+
| {
|
|
85
|
+
type: "toolCall";
|
|
86
|
+
toolName: string;
|
|
87
|
+
args: Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
| {
|
|
90
|
+
type: "toolResult";
|
|
91
|
+
toolName: string;
|
|
92
|
+
result: unknown;
|
|
93
|
+
}
|
|
94
|
+
>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface StructuredResponseRequest {
|
|
98
|
+
model?: "large" | "medium" | "small";
|
|
99
|
+
prompt: string;
|
|
100
|
+
schema: unknown;
|
|
101
|
+
temperature?: number;
|
|
102
|
+
maxTokens?: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type StructuredResponseResponse = unknown;
|
|
106
|
+
|
|
107
|
+
export interface TTSRequest {
|
|
108
|
+
text: string;
|
|
109
|
+
voice?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface TTSResponse {
|
|
113
|
+
synthesis: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface STTRequest {
|
|
117
|
+
audio: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface STTResponse {
|
|
121
|
+
transcription: Array<{
|
|
122
|
+
transcript: string;
|
|
123
|
+
confidence: number;
|
|
124
|
+
}>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* GraphQL request wrapper
|
|
129
|
+
*/
|
|
130
|
+
export interface GraphQLRequest<TVariables = unknown> {
|
|
131
|
+
operationName?: string;
|
|
132
|
+
query: string;
|
|
133
|
+
variables?: TVariables;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* GraphQL response wrapper with potential errors
|
|
138
|
+
*/
|
|
139
|
+
export interface GraphQLResponse<TData = unknown> {
|
|
140
|
+
data?: TData;
|
|
141
|
+
errors?: Array<{
|
|
142
|
+
message: string;
|
|
143
|
+
extensions?: Record<string, unknown>;
|
|
144
|
+
}>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Callbacks for REST endpoints
|
|
149
|
+
* Note: Keys are URL paths, not following camelCase convention intentionally
|
|
150
|
+
*/
|
|
151
|
+
export interface RestEndpointCallbacks {
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
153
|
+
"/api/api-ai-assistant/v1/chat"?: (
|
|
154
|
+
context: CallbackContext<ChatRequest, ChatResponse>
|
|
155
|
+
) => void | Promise<void>;
|
|
156
|
+
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
158
|
+
"/api/api-ai-assistant/v1/structured-response"?: (
|
|
159
|
+
context: CallbackContext<
|
|
160
|
+
StructuredResponseRequest,
|
|
161
|
+
StructuredResponseResponse
|
|
162
|
+
>
|
|
163
|
+
) => void | Promise<void>;
|
|
164
|
+
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
166
|
+
"/api/api-ai-assistant/v1/tts"?: (
|
|
167
|
+
context: CallbackContext<TTSRequest, TTSResponse>
|
|
168
|
+
) => void | Promise<void>;
|
|
169
|
+
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
171
|
+
"/api/api-ai-assistant/v1/stt"?: (
|
|
172
|
+
context: CallbackContext<STTRequest, STTResponse>
|
|
173
|
+
) => void | Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Callbacks for GraphQL operations
|
|
178
|
+
* Note: Keys match the GraphQL operation names (PascalCase), not the field names
|
|
179
|
+
*/
|
|
180
|
+
export interface GraphQLOperationCallbacks {
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
182
|
+
AppendMessageToConversation?: (
|
|
183
|
+
context: CallbackContext<
|
|
184
|
+
GraphQLRequest<{ input: AppendMessageInput }>,
|
|
185
|
+
GraphQLResponse<AppendMessageToConversationMutation>
|
|
186
|
+
>
|
|
187
|
+
) => void | Promise<void>;
|
|
188
|
+
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
190
|
+
GetAConversation?: (
|
|
191
|
+
context: CallbackContext<
|
|
192
|
+
GraphQLRequest<{ input: ConversationInput }>,
|
|
193
|
+
GraphQLResponse<GetAConversationQuery>
|
|
194
|
+
>
|
|
195
|
+
) => void | Promise<void>;
|
|
196
|
+
|
|
197
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
198
|
+
GetAllConversations?: (
|
|
199
|
+
context: CallbackContext<
|
|
200
|
+
GraphQLRequest<Record<string, never>>,
|
|
201
|
+
GraphQLResponse<GetAllConversationsQuery>
|
|
202
|
+
>
|
|
203
|
+
) => void | Promise<void>;
|
|
204
|
+
|
|
205
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
206
|
+
CreateConversation?: (
|
|
207
|
+
context: CallbackContext<
|
|
208
|
+
GraphQLRequest<{ input: CreateConversationInput }>,
|
|
209
|
+
GraphQLResponse
|
|
210
|
+
>
|
|
211
|
+
) => void | Promise<void>;
|
|
212
|
+
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
214
|
+
DeleteConversation?: (
|
|
215
|
+
context: CallbackContext<
|
|
216
|
+
GraphQLRequest<{ input: DeleteConversationInput }>,
|
|
217
|
+
GraphQLResponse
|
|
218
|
+
>
|
|
219
|
+
) => void | Promise<void>;
|
|
220
|
+
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
222
|
+
UpdateConversationTitle?: (
|
|
223
|
+
context: CallbackContext<
|
|
224
|
+
GraphQLRequest<{ input: UpdateConversationTitleInput }>,
|
|
225
|
+
GraphQLResponse
|
|
226
|
+
>
|
|
227
|
+
) => void | Promise<void>;
|
|
228
|
+
|
|
229
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
230
|
+
DeleteAiDocument?: (
|
|
231
|
+
context: CallbackContext<
|
|
232
|
+
GraphQLRequest<unknown>,
|
|
233
|
+
GraphQLResponse<DeleteAiDocumentMutation>
|
|
234
|
+
>
|
|
235
|
+
) => void | Promise<void>;
|
|
236
|
+
|
|
237
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
238
|
+
UpdateAiDocument?: (
|
|
239
|
+
context: CallbackContext<
|
|
240
|
+
GraphQLRequest<unknown>,
|
|
241
|
+
GraphQLResponse<UpdateAiDocumentMutation>
|
|
242
|
+
>
|
|
243
|
+
) => void | Promise<void>;
|
|
244
|
+
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
246
|
+
UploadAiDocument?: (
|
|
247
|
+
context: CallbackContext<
|
|
248
|
+
GraphQLRequest<unknown>,
|
|
249
|
+
GraphQLResponse<UploadAiDocumentMutation>
|
|
250
|
+
>
|
|
251
|
+
) => void | Promise<void>;
|
|
252
|
+
|
|
253
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
254
|
+
UpdateAiSettings?: (
|
|
255
|
+
context: CallbackContext<
|
|
256
|
+
GraphQLRequest<unknown>,
|
|
257
|
+
GraphQLResponse<UpdateAiSettingsMutation>
|
|
258
|
+
>
|
|
259
|
+
) => void | Promise<void>;
|
|
260
|
+
|
|
261
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
262
|
+
GetAiSettings?: (
|
|
263
|
+
context: CallbackContext<
|
|
264
|
+
GraphQLRequest<Record<string, never>>,
|
|
265
|
+
GraphQLResponse<GetAiSettingsQuery>
|
|
266
|
+
>
|
|
267
|
+
) => void | Promise<void>;
|
|
268
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as C } from "./reactComponent-
|
|
1
|
+
import { j as C } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
function l({ illustrationColor: t }) {
|
|
3
3
|
return /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
4
4
|
/* @__PURE__ */ C.jsx("title", { children: "Admin illustration" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./reactComponent-
|
|
1
|
+
import { j as r } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
const t = ({ variant: o }) => n[o] || n.regular, n = {
|
|
3
3
|
thin: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4
4
|
/* @__PURE__ */ r.jsx("path", { d: "M12 2L12 21", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./reactComponent-
|
|
1
|
+
import { j as r } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
const t = ({ variant: o }) => n[o] || n.regular, n = {
|
|
3
3
|
thin: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4
4
|
/* @__PURE__ */ r.jsx("path", { d: "M12 22L12 3", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./reactComponent-
|
|
1
|
+
import { j as r } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
const e = ({ color: t }) => /* @__PURE__ */ r.jsx("g", { children: /* @__PURE__ */ r.jsx("path", { d: "M9 13.5 0 4.5 18 4.5z", fill: t, stroke: "none" }) });
|
|
3
3
|
export {
|
|
4
4
|
e as caret_down
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./reactComponent-
|
|
1
|
+
import { j as e } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
const r = ({ variant: t }) => n[t], n = {
|
|
3
3
|
regular: /* @__PURE__ */ e.jsx("path", { vectorEffect: "non-scaling-stroke", d: "M21 3L8.08696 21L3 15.913" }),
|
|
4
4
|
thin: /* @__PURE__ */ e.jsx("path", { vectorEffect: "non-scaling-stroke", d: "M21 3L8.08696 21L3 15.913" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as s, f as z, c as K, b as N, a as k, e as I, C as ln, I as Z } from "./reactComponent-
|
|
1
|
+
import { j as s, f as z, c as K, b as N, a as k, e as I, C as ln, I as Z } from "./reactComponent-2MdwkH_N.mjs";
|
|
2
2
|
import B, { useMemo as P, useRef as J, useImperativeHandle as cn, useEffect as $, useCallback as E } from "react";
|
|
3
3
|
const pn = ["onCreate", "onDestroy"], H = [
|
|
4
4
|
"onChange",
|