@gooddata/sdk-ui-gen-ai 11.52.0 → 11.53.0-alpha.1
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/NOTICE +59 -9
- package/esm/components/ConfigContext.d.ts +1 -0
- package/esm/components/ConfigContext.d.ts.map +1 -1
- package/esm/components/GenAIChat.d.ts.map +1 -1
- package/esm/components/GenAIChat.js +2 -2
- package/esm/components/GenAiStore.d.ts +9 -0
- package/esm/components/GenAiStore.d.ts.map +1 -1
- package/esm/components/GenAiStore.js +2 -1
- package/esm/components/intelligence/GenAiInteractionIntelligence.d.ts +21 -0
- package/esm/components/intelligence/GenAiInteractionIntelligence.d.ts.map +1 -0
- package/esm/components/intelligence/GenAiInteractionIntelligence.js +57 -0
- package/esm/components/intelligence/InteractionIntelligenceTrigger.d.ts +15 -0
- package/esm/components/intelligence/InteractionIntelligenceTrigger.d.ts.map +1 -0
- package/esm/components/intelligence/InteractionIntelligenceTrigger.js +19 -0
- package/esm/components/intelligence/data/categoryDetailRows.d.ts +12 -0
- package/esm/components/intelligence/data/categoryDetailRows.d.ts.map +1 -0
- package/esm/components/intelligence/data/categoryDetailRows.js +206 -0
- package/esm/components/intelligence/data/constants.d.ts +22 -0
- package/esm/components/intelligence/data/constants.d.ts.map +1 -0
- package/esm/components/intelligence/data/constants.js +27 -0
- package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.d.ts +23 -0
- package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.d.ts.map +1 -0
- package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.js +109 -0
- package/esm/components/intelligence/data/mergeDetailRows.d.ts +15 -0
- package/esm/components/intelligence/data/mergeDetailRows.d.ts.map +1 -0
- package/esm/components/intelligence/data/mergeDetailRows.js +91 -0
- package/esm/components/intelligence/data/timeline.d.ts +18 -0
- package/esm/components/intelligence/data/timeline.d.ts.map +1 -0
- package/esm/components/intelligence/data/timeline.js +40 -0
- package/esm/components/intelligence/data/types.d.ts +159 -0
- package/esm/components/intelligence/data/types.d.ts.map +1 -0
- package/esm/components/intelligence/data/types.js +2 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceData.d.ts +9 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceData.d.ts.map +1 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceData.js +20 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceTotals.d.ts +9 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceTotals.d.ts.map +1 -0
- package/esm/components/intelligence/data/useInteractionIntelligenceTotals.js +20 -0
- package/esm/components/intelligence/detail/DetailRowValue.d.ts +10 -0
- package/esm/components/intelligence/detail/DetailRowValue.d.ts.map +1 -0
- package/esm/components/intelligence/detail/DetailRowValue.js +23 -0
- package/esm/components/intelligence/detail/IntelligenceCategoryDetail.d.ts +17 -0
- package/esm/components/intelligence/detail/IntelligenceCategoryDetail.d.ts.map +1 -0
- package/esm/components/intelligence/detail/IntelligenceCategoryDetail.js +21 -0
- package/esm/components/intelligence/detail/IntelligenceDetailHeader.d.ts +12 -0
- package/esm/components/intelligence/detail/IntelligenceDetailHeader.d.ts.map +1 -0
- package/esm/components/intelligence/detail/IntelligenceDetailHeader.js +19 -0
- package/esm/components/intelligence/detail/IntelligenceDetailRows.d.ts +11 -0
- package/esm/components/intelligence/detail/IntelligenceDetailRows.d.ts.map +1 -0
- package/esm/components/intelligence/detail/IntelligenceDetailRows.js +16 -0
- package/esm/components/intelligence/detail/IntelligenceStepCarousel.d.ts +12 -0
- package/esm/components/intelligence/detail/IntelligenceStepCarousel.d.ts.map +1 -0
- package/esm/components/intelligence/detail/IntelligenceStepCarousel.js +21 -0
- package/esm/components/intelligence/format/formatDuration.d.ts +23 -0
- package/esm/components/intelligence/format/formatDuration.d.ts.map +1 -0
- package/esm/components/intelligence/format/formatDuration.js +38 -0
- package/esm/components/intelligence/format/formatTokens.d.ts +8 -0
- package/esm/components/intelligence/format/formatTokens.d.ts.map +1 -0
- package/esm/components/intelligence/format/formatTokens.js +10 -0
- package/esm/components/intelligence/format/resolveMessage.d.ts +9 -0
- package/esm/components/intelligence/format/resolveMessage.d.ts.map +1 -0
- package/esm/components/intelligence/format/resolveMessage.js +10 -0
- package/esm/components/intelligence/intelligenceBem.d.ts +7 -0
- package/esm/components/intelligence/intelligenceBem.d.ts.map +1 -0
- package/esm/components/intelligence/intelligenceBem.js +8 -0
- package/esm/components/intelligence/panel/IconCircle.d.ts +10 -0
- package/esm/components/intelligence/panel/IconCircle.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IconCircle.js +12 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryList.d.ts +13 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryList.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryList.js +10 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryRow.d.ts +14 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryRow.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceCategoryRow.js +19 -0
- package/esm/components/intelligence/panel/IntelligenceDurationTokens.d.ts +12 -0
- package/esm/components/intelligence/panel/IntelligenceDurationTokens.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceDurationTokens.js +19 -0
- package/esm/components/intelligence/panel/IntelligenceFooter.d.ts +10 -0
- package/esm/components/intelligence/panel/IntelligenceFooter.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceFooter.js +20 -0
- package/esm/components/intelligence/panel/IntelligenceHeader.d.ts +8 -0
- package/esm/components/intelligence/panel/IntelligenceHeader.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceHeader.js +15 -0
- package/esm/components/intelligence/panel/IntelligenceStepTooltip.d.ts +12 -0
- package/esm/components/intelligence/panel/IntelligenceStepTooltip.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceStepTooltip.js +18 -0
- package/esm/components/intelligence/panel/IntelligenceTimeline.d.ts +15 -0
- package/esm/components/intelligence/panel/IntelligenceTimeline.d.ts.map +1 -0
- package/esm/components/intelligence/panel/IntelligenceTimeline.js +16 -0
- package/esm/components/intelligence/panel/TimelineBar.d.ts +19 -0
- package/esm/components/intelligence/panel/TimelineBar.d.ts.map +1 -0
- package/esm/components/intelligence/panel/TimelineBar.js +34 -0
- package/esm/components/messages/AssistantItem.d.ts.map +1 -1
- package/esm/components/messages/AssistantItem.js +15 -1
- package/esm/components/messages/AssistantItemFeedback.d.ts +6 -1
- package/esm/components/messages/AssistantItemFeedback.d.ts.map +1 -1
- package/esm/components/messages/AssistantItemFeedback.js +9 -2
- package/esm/components/messages/ConversationItemContents.d.ts.map +1 -1
- package/esm/components/messages/ConversationItemContents.js +1 -1
- package/esm/components/messages/conversationContents/ConversationDashboardContent.d.ts +2 -1
- package/esm/components/messages/conversationContents/ConversationDashboardContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationDashboardContent.js +3 -2
- package/esm/context/dashboard.d.ts +2 -2
- package/esm/context/dashboard.d.ts.map +1 -1
- package/esm/context/dashboard.js +5 -2
- package/esm/hooks/useGenAIStore.d.ts +1 -0
- package/esm/hooks/useGenAIStore.d.ts.map +1 -1
- package/esm/hooks/useGenAIStore.js +3 -3
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +184 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.js +184 -0
- package/esm/sdk-ui-gen-ai.d.ts +37 -0
- package/esm/store/chatWindow/chatWindowSelectors.d.ts +2 -0
- package/esm/store/chatWindow/chatWindowSelectors.d.ts.map +1 -1
- package/esm/store/chatWindow/chatWindowSelectors.js +5 -0
- package/esm/store/chatWindow/chatWindowSlice.d.ts +7 -1
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/chatWindow/chatWindowSlice.js +3 -1
- package/esm/store/messages/messagesSelectors.d.ts +6 -0
- package/esm/store/messages/messagesSelectors.d.ts.map +1 -1
- package/esm/store/messages/messagesSelectors.js +9 -0
- package/esm/store/messages/messagesSlice.d.ts +11 -3
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.js +34 -1
- package/esm/store/sideEffects/onUserMessage.d.ts.map +1 -1
- package/esm/store/sideEffects/onUserMessage.js +40 -6
- package/esm/store/store.d.ts +1 -1
- package/esm/store/store.d.ts.map +1 -1
- package/esm/store/store.js +2 -2
- package/esm/types.d.ts +33 -1
- package/esm/types.d.ts.map +1 -1
- package/package.json +20 -20
- package/styles/css/intelligence.css +302 -0
- package/styles/css/intelligence.css.map +1 -0
- package/styles/css/main.css +306 -1
- package/styles/css/main.css.map +1 -1
- package/styles/css/messages.css +5 -1
- package/styles/css/messages.css.map +1 -1
- package/styles/scss/intelligence.scss +330 -0
- package/styles/scss/main.scss +1 -0
- package/styles/scss/messages.scss +10 -1
|
@@ -781,6 +781,190 @@ export const en_US = {
|
|
|
781
781
|
"text": "m",
|
|
782
782
|
"crowdinContext": "Unit of time in minutes"
|
|
783
783
|
},
|
|
784
|
+
"gd.gen-ai.interactionIntelligence.duration.seconds": {
|
|
785
|
+
"text": "{seconds}s",
|
|
786
|
+
"crowdinContext": "Duration in seconds shown next to an Interaction Intelligence step, e.g. '0.2s'"
|
|
787
|
+
},
|
|
788
|
+
"gd.gen-ai.interactionIntelligence.duration.minutes": {
|
|
789
|
+
"text": "{minutes}m",
|
|
790
|
+
"crowdinContext": "Duration in whole minutes shown next to an Interaction Intelligence step, e.g. '1m'"
|
|
791
|
+
},
|
|
792
|
+
"gd.gen-ai.interactionIntelligence.duration.minutesAndSeconds": {
|
|
793
|
+
"text": "{minutes}m {seconds}s",
|
|
794
|
+
"crowdinContext": "Duration in minutes and seconds shown next to an Interaction Intelligence step, e.g. '1m 5s'"
|
|
795
|
+
},
|
|
796
|
+
"gd.gen-ai.interactionIntelligence.explain": {
|
|
797
|
+
"text": "Explain",
|
|
798
|
+
"crowdinContext": "Label of the button that opens the Interaction Intelligence panel for an assistant message"
|
|
799
|
+
},
|
|
800
|
+
"gd.gen-ai.interactionIntelligence.title": {
|
|
801
|
+
"text": "Behind this answer",
|
|
802
|
+
"crowdinContext": "Title of the Interaction Intelligence panel"
|
|
803
|
+
},
|
|
804
|
+
"gd.gen-ai.interactionIntelligence.close": {
|
|
805
|
+
"text": "Close",
|
|
806
|
+
"crowdinContext": "Accessible label for the button that closes the Interaction Intelligence panel"
|
|
807
|
+
},
|
|
808
|
+
"gd.gen-ai.interactionIntelligence.back": {
|
|
809
|
+
"text": "Back",
|
|
810
|
+
"crowdinContext": "Accessible label for the button that returns from a category's detail to the Interaction Intelligence list"
|
|
811
|
+
},
|
|
812
|
+
"gd.gen-ai.interactionIntelligence.footer.traceId.label": {
|
|
813
|
+
"text": "Trace ID:",
|
|
814
|
+
"crowdinContext": "Label preceding the backend trace id of the response, at the bottom of the Interaction Intelligence panel. Also the tooltip's hover/focus trigger"
|
|
815
|
+
},
|
|
816
|
+
"gd.gen-ai.interactionIntelligence.footer.traceId.tooltip": {
|
|
817
|
+
"text": "Trace ID helps us identify, investigate, and resolve issues as quickly as possible. If you decide to contact our support team, provide us with this ID.",
|
|
818
|
+
"crowdinContext": "Tooltip explaining what the Trace ID is for, shown on hover/focus of the '?' icon next to the Trace ID label"
|
|
819
|
+
},
|
|
820
|
+
"gd.gen-ai.interactionIntelligence.summary.tokens": {
|
|
821
|
+
"text": "{count, plural, one {{formattedCount} token} other {{formattedCount} tokens}}",
|
|
822
|
+
"crowdinContext": "Count of tokens used in the Interaction Intelligence summary, e.g. '4K tokens'. {count} drives singular/plural selection; {formattedCount} is the already-formatted (possibly compact, e.g. '4K') number to display — do not reformat it."
|
|
823
|
+
},
|
|
824
|
+
"gd.gen-ai.interactionIntelligence.pager": {
|
|
825
|
+
"text": "<b>{current}</b> of {total}",
|
|
826
|
+
"crowdinContext": "Pager shown at the bottom of a category's detail view, e.g. '2 of 7' with the current number in bold. The <b></b> tags must stay around the {current} placeholder."
|
|
827
|
+
},
|
|
828
|
+
"gd.gen-ai.interactionIntelligence.pager.previous": {
|
|
829
|
+
"text": "Previous activity",
|
|
830
|
+
"crowdinContext": "Accessible label for the button that moves to the previous category in the Interaction Intelligence detail view"
|
|
831
|
+
},
|
|
832
|
+
"gd.gen-ai.interactionIntelligence.pager.next": {
|
|
833
|
+
"text": "Next activity",
|
|
834
|
+
"crowdinContext": "Accessible label for the button that moves to the next category in the Interaction Intelligence detail view"
|
|
835
|
+
},
|
|
836
|
+
"gd.gen-ai.interactionIntelligence.detail.andMore": {
|
|
837
|
+
"text": "... and {count} more",
|
|
838
|
+
"crowdinContext": "Truncation line shown under a list in the Interaction Intelligence detail view when not every item is listed, e.g. '... and 97 more'"
|
|
839
|
+
},
|
|
840
|
+
"gd.gen-ai.interactionIntelligence.tooltip.activity": {
|
|
841
|
+
"text": "Activity",
|
|
842
|
+
"crowdinContext": "Eyebrow label (shown uppercase) above the list of activities that ran within a hovered Interaction Intelligence timeline tile"
|
|
843
|
+
},
|
|
844
|
+
"gd.gen-ai.interactionIntelligence.category.applyMemory": {
|
|
845
|
+
"text": "Apply memory",
|
|
846
|
+
"crowdinContext": "Interaction Intelligence category title for the apply-memory category"
|
|
847
|
+
},
|
|
848
|
+
"gd.gen-ai.interactionIntelligence.category.catalogSearch": {
|
|
849
|
+
"text": "Catalogue search",
|
|
850
|
+
"crowdinContext": "Interaction Intelligence category title for a catalog search category"
|
|
851
|
+
},
|
|
852
|
+
"gd.gen-ai.interactionIntelligence.category.knowledgeSearch": {
|
|
853
|
+
"text": "Knowledge search",
|
|
854
|
+
"crowdinContext": "Interaction Intelligence category title for a knowledge search category"
|
|
855
|
+
},
|
|
856
|
+
"gd.gen-ai.interactionIntelligence.category.skillRouting": {
|
|
857
|
+
"text": "Skill routing",
|
|
858
|
+
"crowdinContext": "Interaction Intelligence category title for a skill routing category"
|
|
859
|
+
},
|
|
860
|
+
"gd.gen-ai.interactionIntelligence.category.metricQuery": {
|
|
861
|
+
"text": "Metric query",
|
|
862
|
+
"crowdinContext": "Interaction Intelligence category title for the metric query category"
|
|
863
|
+
},
|
|
864
|
+
"gd.gen-ai.interactionIntelligence.category.composeAnswer": {
|
|
865
|
+
"text": "Compose answer",
|
|
866
|
+
"crowdinContext": "Interaction Intelligence category title for the answer-composing category"
|
|
867
|
+
},
|
|
868
|
+
"gd.gen-ai.interactionIntelligence.excerpt.found": {
|
|
869
|
+
"text": "{count, plural, one {# found} other {# found}}",
|
|
870
|
+
"crowdinContext": "Excerpt shown on a category's list row summarizing how many catalog objects a search found, e.g. '2 found'"
|
|
871
|
+
},
|
|
872
|
+
"gd.gen-ai.interactionIntelligence.excerpt.used": {
|
|
873
|
+
"text": "{count, plural, one {# used} other {# used}}",
|
|
874
|
+
"crowdinContext": "Excerpt shown on a category's list row summarizing how many catalog matches were used, e.g. '1 used'"
|
|
875
|
+
},
|
|
876
|
+
"gd.gen-ai.interactionIntelligence.excerpt.documents": {
|
|
877
|
+
"text": "{count, plural, one {# document} other {# documents}}",
|
|
878
|
+
"crowdinContext": "Excerpt shown on a category's list row summarizing how many documents a knowledge search returned, e.g. '2 documents'"
|
|
879
|
+
},
|
|
880
|
+
"gd.gen-ai.interactionIntelligence.excerpt.activated": {
|
|
881
|
+
"text": "{count, plural, one {# activated} other {# activated}}",
|
|
882
|
+
"crowdinContext": "Excerpt shown on a category's list row summarizing how many skills were activated by routing, e.g. '2 activated'"
|
|
883
|
+
},
|
|
884
|
+
"gd.gen-ai.interactionIntelligence.detail.query": {
|
|
885
|
+
"text": "Query",
|
|
886
|
+
"crowdinContext": "Interaction Intelligence detail row label for the search keywords/question a category used"
|
|
887
|
+
},
|
|
888
|
+
"gd.gen-ai.interactionIntelligence.detail.documents": {
|
|
889
|
+
"text": "Documents",
|
|
890
|
+
"crowdinContext": "Interaction Intelligence detail row label listing the documents a knowledge search returned"
|
|
891
|
+
},
|
|
892
|
+
"gd.gen-ai.interactionIntelligence.detail.bestMatch": {
|
|
893
|
+
"text": "Best match",
|
|
894
|
+
"crowdinContext": "Interaction Intelligence detail row label for a knowledge search's best-matching result"
|
|
895
|
+
},
|
|
896
|
+
"gd.gen-ai.interactionIntelligence.detail.available": {
|
|
897
|
+
"text": "Available",
|
|
898
|
+
"crowdinContext": "Interaction Intelligence detail row label listing the skills available for routing"
|
|
899
|
+
},
|
|
900
|
+
"gd.gen-ai.interactionIntelligence.detail.activated": {
|
|
901
|
+
"text": "Activated",
|
|
902
|
+
"crowdinContext": "Interaction Intelligence detail row label listing the skills activated by routing"
|
|
903
|
+
},
|
|
904
|
+
"gd.gen-ai.interactionIntelligence.detail.output": {
|
|
905
|
+
"text": "Output",
|
|
906
|
+
"crowdinContext": "Interaction Intelligence detail row label for the type of output the turn produced"
|
|
907
|
+
},
|
|
908
|
+
"gd.gen-ai.interactionIntelligence.detail.model": {
|
|
909
|
+
"text": "Model",
|
|
910
|
+
"crowdinContext": "Interaction Intelligence detail row label for the model that composed the answer"
|
|
911
|
+
},
|
|
912
|
+
"gd.gen-ai.interactionIntelligence.detail.suggestedActions": {
|
|
913
|
+
"text": "Suggested actions",
|
|
914
|
+
"crowdinContext": "Interaction Intelligence detail row label for follow-up actions suggested with the answer"
|
|
915
|
+
},
|
|
916
|
+
"gd.gen-ai.interactionIntelligence.detail.searched": {
|
|
917
|
+
"text": "Searched",
|
|
918
|
+
"crowdinContext": "Interaction Intelligence detail row label listing the catalog types a search requested"
|
|
919
|
+
},
|
|
920
|
+
"gd.gen-ai.interactionIntelligence.detail.found": {
|
|
921
|
+
"text": "Found",
|
|
922
|
+
"crowdinContext": "Interaction Intelligence detail row label for the catalog objects a search found, grouped by type"
|
|
923
|
+
},
|
|
924
|
+
"gd.gen-ai.interactionIntelligence.detail.used": {
|
|
925
|
+
"text": "Used",
|
|
926
|
+
"crowdinContext": "Interaction Intelligence detail row label for the catalog matches actually used"
|
|
927
|
+
},
|
|
928
|
+
"gd.gen-ai.interactionIntelligence.detail.skillsCount": {
|
|
929
|
+
"text": "{count, plural, one {# skill} other {# skills}}",
|
|
930
|
+
"crowdinContext": "Count line above the 'Available' skills list in the Interaction Intelligence detail view, e.g. '4 skills'"
|
|
931
|
+
},
|
|
932
|
+
"gd.gen-ai.interactionIntelligence.detail.foundGroup": {
|
|
933
|
+
"text": "{count} {objectType}",
|
|
934
|
+
"crowdinContext": "Count line above one group of catalog objects a search found, e.g. '2 metric'. {objectType} is a catalog type name coming from the backend (e.g. 'metric', 'fact') and is not translated."
|
|
935
|
+
},
|
|
936
|
+
"gd.gen-ai.interactionIntelligence.detail.matchScore": {
|
|
937
|
+
"text": "({percent}% match)",
|
|
938
|
+
"crowdinContext": "Relevance score shown dimmed after a matched item in the Interaction Intelligence detail view, e.g. '(89% match)'"
|
|
939
|
+
},
|
|
940
|
+
"gd.gen-ai.interactionIntelligence.detail.output.text": {
|
|
941
|
+
"text": "Text answer",
|
|
942
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced a plain text answer"
|
|
943
|
+
},
|
|
944
|
+
"gd.gen-ai.interactionIntelligence.detail.output.visualization": {
|
|
945
|
+
"text": "Visualization",
|
|
946
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced a visualization"
|
|
947
|
+
},
|
|
948
|
+
"gd.gen-ai.interactionIntelligence.detail.output.dashboard": {
|
|
949
|
+
"text": "Dashboard",
|
|
950
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced a dashboard"
|
|
951
|
+
},
|
|
952
|
+
"gd.gen-ai.interactionIntelligence.detail.output.keyDriverAnalysis": {
|
|
953
|
+
"text": "Key driver analysis",
|
|
954
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced a key driver analysis"
|
|
955
|
+
},
|
|
956
|
+
"gd.gen-ai.interactionIntelligence.detail.output.whatIf": {
|
|
957
|
+
"text": "What-if scenario",
|
|
958
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced a what-if scenario"
|
|
959
|
+
},
|
|
960
|
+
"gd.gen-ai.interactionIntelligence.detail.output.searchResults": {
|
|
961
|
+
"text": "Search results",
|
|
962
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced search results"
|
|
963
|
+
},
|
|
964
|
+
"gd.gen-ai.interactionIntelligence.detail.output.alertProposal": {
|
|
965
|
+
"text": "Alert proposal",
|
|
966
|
+
"crowdinContext": "Interaction Intelligence 'Output' row value when the turn produced an alert proposal"
|
|
967
|
+
},
|
|
784
968
|
"drill.kda.from": {
|
|
785
969
|
"text": "from",
|
|
786
970
|
"crowdinContext": "Key driver analysis drill from label, must be lowercase"
|
package/esm/sdk-ui-gen-ai.d.ts
CHANGED
|
@@ -507,6 +507,14 @@ export declare type GenAIConversationsProps = Omit<GenAiStoreProps, "children">
|
|
|
507
507
|
className?: string;
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
+
/**
|
|
511
|
+
* The Interaction Intelligence panel: a single timeline of the processing steps behind one
|
|
512
|
+
* assistant response, with a list view and a per-category detail view. Loads its own data on
|
|
513
|
+
* mount and owns which view/category is currently shown.
|
|
514
|
+
* @public
|
|
515
|
+
*/
|
|
516
|
+
export declare function GenAiInteractionIntelligence({ responseId, onClose, initialMode, initialCategory }: IGenAiInteractionIntelligenceProps): JSX.Element | null;
|
|
517
|
+
|
|
510
518
|
/**
|
|
511
519
|
* Provides the Gen AI store to the application.
|
|
512
520
|
* @public
|
|
@@ -595,6 +603,15 @@ export declare type GenAiStoreProps = {
|
|
|
595
603
|
* @internal
|
|
596
604
|
*/
|
|
597
605
|
isPreview?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Enables the Interaction Intelligence panel on assistant messages. Agent builder
|
|
608
|
+
* passes `true`; regular assistants leave this off. Also requires
|
|
609
|
+
* `settings.enableGenAiInteractionIntelligence` to be enabled — both must be true for the
|
|
610
|
+
* panel to be usable.
|
|
611
|
+
*
|
|
612
|
+
* @internal
|
|
613
|
+
*/
|
|
614
|
+
allowInteractionIntelligence?: boolean;
|
|
598
615
|
};
|
|
599
616
|
|
|
600
617
|
/**
|
|
@@ -668,6 +685,19 @@ export declare type IChatConversationSystemContent = {
|
|
|
668
685
|
type: "system";
|
|
669
686
|
};
|
|
670
687
|
|
|
688
|
+
/**
|
|
689
|
+
* Props for the {@link GenAiInteractionIntelligence} component.
|
|
690
|
+
* @public
|
|
691
|
+
*/
|
|
692
|
+
export declare interface IGenAiInteractionIntelligenceProps {
|
|
693
|
+
responseId: string;
|
|
694
|
+
onClose: () => void;
|
|
695
|
+
/** Lets a consumer render directly into a specific category's detail view. */
|
|
696
|
+
initialMode?: InteractionIntelligenceMode;
|
|
697
|
+
/** Category id to open when `initialMode === "detail"`. Falls back to list mode if unknown. */
|
|
698
|
+
initialCategory?: string;
|
|
699
|
+
}
|
|
700
|
+
|
|
671
701
|
/**
|
|
672
702
|
* @beta
|
|
673
703
|
*/
|
|
@@ -695,6 +725,12 @@ export declare interface ILandingTitleProps {
|
|
|
695
725
|
children: ReactNode;
|
|
696
726
|
}
|
|
697
727
|
|
|
728
|
+
/**
|
|
729
|
+
* The modes the panel can render: the full list/timeline view or a single category's detail view.
|
|
730
|
+
* @public
|
|
731
|
+
*/
|
|
732
|
+
export declare type InteractionIntelligenceMode = "list" | "detail";
|
|
733
|
+
|
|
698
734
|
/**
|
|
699
735
|
* Type guard for the ChatAgentChangeEvent.
|
|
700
736
|
* @public
|
|
@@ -861,6 +897,7 @@ export declare type LinkHandlerEvent = {
|
|
|
861
897
|
preventDefault: () => void;
|
|
862
898
|
section?: "ai";
|
|
863
899
|
dashboard?: IDashboard;
|
|
900
|
+
insights?: IInsight[];
|
|
864
901
|
dashboardStatus?: "saved" | "draft";
|
|
865
902
|
visualization?: IInsight;
|
|
866
903
|
visualizationStatus?: "saved" | "draft";
|
|
@@ -12,6 +12,8 @@ export declare const agentSwitchingEnabledSelector: (state: RootState) => boolea
|
|
|
12
12
|
export declare const contextSetupEnabledSelector: (state: RootState) => boolean;
|
|
13
13
|
export declare const reasoningEffortEnabledSelector: (state: RootState) => boolean;
|
|
14
14
|
export declare const agentSwitchingActiveSelector: (state: RootState) => boolean;
|
|
15
|
+
export declare const allowInteractionIntelligenceSelector: (state: RootState) => boolean;
|
|
16
|
+
export declare const interactionIntelligenceEnabledSelector: (state: RootState) => boolean;
|
|
15
17
|
export declare const objectTypesSelector: (state: RootState) => GenAIObjectType[] | undefined;
|
|
16
18
|
export declare const allowedRelationshipTypesSelector: (state: RootState) => IAllowedRelationshipType[] | undefined;
|
|
17
19
|
export declare const tagsSelector: (state: RootState) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatWindowSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,eAAO,MAAM,cAAc,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGlD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,aAAa,GAAG,SAGxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,sBAAsB,GAAG,SAG7E,CAAC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AAM,oCAAoC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGxE,CAAC;AAKF,eAAO,MAAM,sCAAsC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAK1E,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,EAAE,GAAG,SAG3E,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,wBAAwB,EAAE,GAAG,SACZ,CAAC;AAEvF,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK;IAC7C,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAMpC,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,WAAW,EAKnE,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,cAAc,GAAG,SAG9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,GAAG,SAGhF,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG9E,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAe5D,CAAC"}
|
|
@@ -16,6 +16,11 @@ export const reasoningEffortEnabledSelector = createSelector(settingsSelector, (
|
|
|
16
16
|
// mode: the assistant is pinned to the single preview agent being built, so the switcher stays
|
|
17
17
|
// hidden and the legacy input is used.
|
|
18
18
|
export const agentSwitchingActiveSelector = createSelector(agentSwitchingEnabledSelector, isPreviewSelector, (agentSwitchingEnabled, isPreview) => agentSwitchingEnabled && !isPreview);
|
|
19
|
+
export const allowInteractionIntelligenceSelector = createSelector(chatWindowSliceSelector, (state) => state.allowInteractionIntelligence === true);
|
|
20
|
+
// Whether the Interaction Intelligence panel is enabled in the current chat context.
|
|
21
|
+
// Requires both the plug-in instance to allow it (agent builder passes `allowInteractionIntelligence`)
|
|
22
|
+
// and the workspace-level feature flag to be on.
|
|
23
|
+
export const interactionIntelligenceEnabledSelector = createSelector(allowInteractionIntelligenceSelector, settingsSelector, (allowInteractionIntelligence, settings) => allowInteractionIntelligence && settings?.["enableGenAiInteractionIntelligence"] === true);
|
|
19
24
|
export const objectTypesSelector = createSelector(chatWindowSliceSelector, (state) => state.objectTypes);
|
|
20
25
|
export const allowedRelationshipTypesSelector = createSelector(chatWindowSliceSelector, (state) => state.allowedRelationshipTypes);
|
|
21
26
|
export const tagsSelector = createSelector(chatWindowSliceSelector, (state) => {
|
|
@@ -61,10 +61,16 @@ type ChatWindowSliceState = {
|
|
|
61
61
|
* is pinned to that single agent, so agent switching is not applicable.
|
|
62
62
|
*/
|
|
63
63
|
isPreview?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the plug-in instance allows the Interaction Intelligence panel. Combined with
|
|
66
|
+
* `settings.enableGenAiInteractionIntelligence` — both must be true for the panel to show.
|
|
67
|
+
*/
|
|
68
|
+
allowInteractionIntelligence?: boolean;
|
|
64
69
|
};
|
|
65
70
|
export declare const chatWindowSliceName = "chatWindow";
|
|
66
|
-
export declare const getInitialChatWindowState: ({ isPreview, }?: {
|
|
71
|
+
export declare const getInitialChatWindowState: ({ isPreview, allowInteractionIntelligence, }?: {
|
|
67
72
|
isPreview?: boolean | undefined;
|
|
73
|
+
allowInteractionIntelligence?: boolean | undefined;
|
|
68
74
|
}) => ChatWindowSliceState;
|
|
69
75
|
export declare const chatWindowSliceReducer: Reducer<ChatWindowSliceState>;
|
|
70
76
|
export declare const setOpenAction: import("@reduxjs/toolkit").ActionCreatorWithPayload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AAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAoBhD,eAAO,MAAM,yBAAyB;;;0BAUpC,CAAC;AA0IH,eAAO,MAAM,sBAAsB,EAAE,OAAO,CAAC,oBAAoB,CAA2B,CAAC;AAC7F,eAAO,MACH,aAAa;;gCACb,gBAAgB;;mCAChB,qBAAqB;;wCACrB,iBAAiB;;oCACjB,qBAAqB;;wCACrB,0BAA0B;;6CAC1B,mCAAmC;;sDACnC,oBAAoB;;uCACpB,aAAa;;;gCACb,sBAAsB,+HACtB,iCAAiC;;oDACjC,0BAA0B;;;;;;;;6CAC1B,yBAAyB;;4CACzB,4BAA4B;;+CAC5B,kBAAkB;;;AAClB;;;GAGG;AACH,mBAAmB;;;AACnB;;GAEG;AACH,2BAA2B;;;AAC3B;;GAEG;AACH,oBAAoB;;;qCACG,CAAC"}
|
|
@@ -20,10 +20,12 @@ const initialState = {
|
|
|
20
20
|
active: undefined,
|
|
21
21
|
},
|
|
22
22
|
isPreview: undefined,
|
|
23
|
+
allowInteractionIntelligence: undefined,
|
|
23
24
|
};
|
|
24
|
-
export const getInitialChatWindowState = ({ isPreview, } = {}) => ({
|
|
25
|
+
export const getInitialChatWindowState = ({ isPreview, allowInteractionIntelligence, } = {}) => ({
|
|
25
26
|
...initialState,
|
|
26
27
|
isPreview,
|
|
28
|
+
allowInteractionIntelligence,
|
|
27
29
|
});
|
|
28
30
|
const chatWindowSlice = createSlice({
|
|
29
31
|
name: chatWindowSliceName,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type GenAIChatEffort } from "@gooddata/sdk-model";
|
|
2
2
|
import { type IChatConversationLocal, type IChatConversationLocalItem, type Message } from "../../model.js";
|
|
3
|
+
import { type IChatConversationResponseTrace } from "../../types.js";
|
|
3
4
|
import { type RootState } from "../types.js";
|
|
4
5
|
export declare const messagesSelector: (state: RootState) => Message[];
|
|
5
6
|
export declare const loadedSelector: (state: RootState) => boolean;
|
|
@@ -15,6 +16,11 @@ export declare const globalErrorSelector: (state: RootState) => Record<string, u
|
|
|
15
16
|
export declare const threadIdSelector: (state: RootState) => string | undefined;
|
|
16
17
|
export declare const conversationMessagesSelector: (state: RootState) => IChatConversationLocalItem[];
|
|
17
18
|
export declare const conversationMessagesByIdSelector: (state: RootState, conversationId?: string) => IChatConversationLocalItem[];
|
|
19
|
+
/**
|
|
20
|
+
* The "Interaction Intelligence" trace of one response of the current conversation. Empty until the
|
|
21
|
+
* turn's steps have streamed in.
|
|
22
|
+
*/
|
|
23
|
+
export declare const interactionTraceByResponseIdSelector: (state: RootState, responseId: string) => IChatConversationResponseTrace;
|
|
18
24
|
export declare const conversationSelector: (state: RootState) => IChatConversationLocal | undefined;
|
|
19
25
|
export declare const selectedAgentIdSelector: (state: RootState) => string | undefined;
|
|
20
26
|
export declare const selectedEffortSelector: (state: RootState) => GenAIChatEffort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,0BAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,EAG3D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM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AC,KAAK,EAAE,SAAS,KAAK,OAG/D,CAAC"}
|
|
@@ -35,6 +35,15 @@ export const conversationMessagesByIdSelector = createSelector([messagesSliceSel
|
|
|
35
35
|
}
|
|
36
36
|
return data.order.map((id) => data.items[id]);
|
|
37
37
|
});
|
|
38
|
+
const EMPTY_TRACE = { steps: [], detailsByStepId: {} };
|
|
39
|
+
/**
|
|
40
|
+
* The "Interaction Intelligence" trace of one response of the current conversation. Empty until the
|
|
41
|
+
* turn's steps have streamed in.
|
|
42
|
+
*/
|
|
43
|
+
export const interactionTraceByResponseIdSelector = createSelector([messagesSliceSelector, (_state, responseId) => responseId], (state, responseId) => {
|
|
44
|
+
const data = state.conversationsData[state.currentConversation?.localId ?? ""];
|
|
45
|
+
return data?.interactionTrace?.[responseId] ?? EMPTY_TRACE;
|
|
46
|
+
});
|
|
38
47
|
export const conversationSelector = createSelector(messagesSliceSelector, (state) => state.currentConversation);
|
|
39
48
|
export const selectedAgentIdSelector = createSelector(messagesSliceSelector, (state) => state.selectedAgentId);
|
|
40
49
|
export const selectedEffortSelector = createSelector(messagesSliceSelector, (state) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type IChatConversationInteractionStep, type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import { type GenAIChatEffort, type GenAIChatInteractionUserFeedback } from "@gooddata/sdk-model";
|
|
4
4
|
import { type AssistantMessage, type Contents, type GenAIAgent, type IChatConversationErrorContent, type IChatConversationLocal, type IChatConversationLocalContent, type IChatConversationLocalItem, type Message, type UserMessage } from "../../model.js";
|
|
5
|
-
import { type StoredConversation } from "../../types.js";
|
|
5
|
+
import { type IChatConversationTracedAction, type StoredConversation } from "../../types.js";
|
|
6
6
|
type MessagesSliceState = {
|
|
7
7
|
/**
|
|
8
8
|
* A verbose mode defines how much information is shown in the chat.
|
|
@@ -174,7 +174,15 @@ export declare const loadThreadAction: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
174
174
|
}, "messages/saveVisualisationRenderStatusSuccessAction">, visualizationErrorAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
175
175
|
errorType: "BAD_REQUEST" | "CANCELLED" | "CLUSTERING_NOT_RECEIVED" | "DATA_TOO_LARGE_TO_COMPUTE" | "DATA_TOO_LARGE_TO_DISPLAY" | "DYNAMIC_SCRIPT_LOAD_ERROR" | "FORECAST_NOT_RECEIVED" | "GEO_AREA_MISSING" | "GEO_LOCATION_MISSING" | "GEO_MAPBOX_TOKEN_MISSING" | "HEADERS_TOO_LARGE" | "NEGATIVE_VALUES" | "NOT_FOUND" | "NO_DATA" | "PROTECTED_REPORT" | "RESULT_CACHE_MISSING" | "TIMEOUT_ERROR" | "UNAUTHORIZED" | "UNKNOWN_ERROR" | "VISUALIZATION_CLASS_UNKNOWN";
|
|
176
176
|
errorMessage?: string | undefined;
|
|
177
|
-
}, "messages/visualizationErrorAction">,
|
|
177
|
+
}, "messages/visualizationErrorAction">, appendInteractionStepAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
178
|
+
conversationId: string;
|
|
179
|
+
step: IChatConversationInteractionStep;
|
|
180
|
+
}, "messages/appendInteractionStepAction">, appendTracedActionAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
181
|
+
conversationId: string;
|
|
182
|
+
responseId: string;
|
|
183
|
+
stepId: string;
|
|
184
|
+
action: IChatConversationTracedAction;
|
|
185
|
+
}, "messages/appendTracedActionAction">, applyPendingAgentSwitchAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
178
186
|
conversationLocalId: string;
|
|
179
187
|
beforeItemLocalId?: string | undefined;
|
|
180
188
|
}, "messages/applyPendingAgentSwitchAction">, revertAgentSwitchAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,KAAK,gCAAgC,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC9G,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAKlG,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAE/B,KAAK,OAAO,EACZ,KAAK,WAAW,EAQnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EAC1B,MAAM,gBAAgB,CAAC;AASxB,KAAK,kBAAkB,GAAG;IACtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;IAE1E;;OAEG;IACH,aAAa,EAAE,sBAAsB,EAAE,GAAG,SAAS,CAAC;IACpD;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IA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AAuB;;;;wCACvB,eAAe;;gCACf,qBAAqB;;;sCACrB,4BAA4B;;;6CAC5B,4BAA4B;;;;6CAC5B,wBAAwB;;;yCACxB,+BAA+B;;;gDAC/B,+BAA+B;;;;gDAC/B,wBAAwB;;yCACxB,6BAA6B;;8CAC7B,+BAA+B;;gDAC/B,+BAA+B;;;;AAC/B;;GAEG;AACH,sBAAsB;;;;;AACtB;;GAEG;AACH,uBAAuB;;;AACvB;;GAEG;AACH,4BAA4B;;;AAC5B;;GAEG;AACH,0BAA0B;AAC1B;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,gBAAgB,wHACK,CAAC"}
|
|
@@ -92,6 +92,14 @@ const setConversationInProgress = (state, inProgress, localConversationId) => {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
+
const getResponseTrace = (state, conversationId, responseId) => {
|
|
96
|
+
const data = getConversationData(state.conversationsData, conversationId);
|
|
97
|
+
if (!data) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const trace = (data.interactionTrace ??= {});
|
|
101
|
+
return (trace[responseId] ??= { steps: [], detailsByStepId: {} });
|
|
102
|
+
};
|
|
95
103
|
const getAssistantMessageStrict = (state, assistantMessageId, conversationId) => {
|
|
96
104
|
if (state.currentConversation) {
|
|
97
105
|
const data = getConversationData(state.conversationsData, conversationId);
|
|
@@ -537,6 +545,31 @@ const messagesSlice = createSlice({
|
|
|
537
545
|
state.selectedEffort = payload.effort;
|
|
538
546
|
}
|
|
539
547
|
},
|
|
548
|
+
appendInteractionStepAction: (state, { payload, }) => {
|
|
549
|
+
const trace = getResponseTrace(state, payload.conversationId, payload.step.responseId);
|
|
550
|
+
if (!trace) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
// Defensive: a redelivered step must not be counted twice.
|
|
554
|
+
if (trace.steps.some((step) => step.stepId === payload.step.stepId)) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
trace.steps.push(payload.step);
|
|
558
|
+
if (trace.traceId === undefined) {
|
|
559
|
+
trace.traceId = payload.step.traceId;
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
appendTracedActionAction: (state, { payload, }) => {
|
|
563
|
+
const trace = getResponseTrace(state, payload.conversationId, payload.responseId);
|
|
564
|
+
if (!trace) {
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
const actions = (trace.detailsByStepId[payload.stepId] ??= []);
|
|
568
|
+
if (actions.some((action) => action.itemId === payload.action.itemId)) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
actions.push(payload.action);
|
|
572
|
+
},
|
|
540
573
|
applyPendingAgentSwitchAction: (state, { payload }) => {
|
|
541
574
|
const data = state.conversationsData[payload.conversationLocalId];
|
|
542
575
|
if (!data?.pendingAgentSwitch) {
|
|
@@ -886,7 +919,7 @@ const messagesSlice = createSlice({
|
|
|
886
919
|
});
|
|
887
920
|
const errorToObject = (error) => Object.fromEntries(Object.getOwnPropertyNames(error).map((key) => [key, error[key]]));
|
|
888
921
|
export const messagesSliceReducer = messagesSlice.reducer;
|
|
889
|
-
export const { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, loadConversationsSuccessAction, loadConversationSuccessAction, restoreCachedMessagesAction, clearThreadErrorAction, clearThreadSuccessAction, clearConversationSuccessAction, evaluateConversationTitleAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, evaluateMessageCompleteAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, clearConversationLoadingAction, setUserFeedback, setUserFeedbackError, clearUserFeedbackError, saveVisualizationAction, savedVisualizationAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, saveVisualisationRenderStatusAction, saveVisualisationRenderStatusSuccessAction, visualizationErrorAction, applyPendingAgentSwitchAction, revertAgentSwitchAction, setAgentsAction, pinConversationAction, pinConversationSuccessAction, pinConversationFailureAction, renameConversationAction, renameConversationSuccessAction, renameConversationFailureAction, deleteConversationAction, deleteConversationStartAction, deleteConversationSuccessAction, deleteConversationFailureAction,
|
|
922
|
+
export const { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, loadConversationsSuccessAction, loadConversationSuccessAction, restoreCachedMessagesAction, clearThreadErrorAction, clearThreadSuccessAction, clearConversationSuccessAction, evaluateConversationTitleAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, evaluateMessageCompleteAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, clearConversationLoadingAction, setUserFeedback, setUserFeedbackError, clearUserFeedbackError, saveVisualizationAction, savedVisualizationAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, saveVisualisationRenderStatusAction, saveVisualisationRenderStatusSuccessAction, visualizationErrorAction, appendInteractionStepAction, appendTracedActionAction, applyPendingAgentSwitchAction, revertAgentSwitchAction, setAgentsAction, pinConversationAction, pinConversationSuccessAction, pinConversationFailureAction, renameConversationAction, renameConversationSuccessAction, renameConversationFailureAction, deleteConversationAction, deleteConversationStartAction, deleteConversationSuccessAction, deleteConversationFailureAction,
|
|
890
923
|
/**
|
|
891
924
|
* @public
|
|
892
925
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EAWzB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAOlC,MAAM,gBAAgB,CAAC;AAkBxB,OAAO,EASH,KAAK,gBAAgB,EAGxB,MAAM,8BAA8B,CAAC;AAOtC;;;GAGG;AACH,wBAAiB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oJAmB9E"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { call, cancel, cancelled, getContext, put, select } from "redux-saga/effects";
|
|
3
|
-
import { isChatConversationError, isChatConversationItem, } from "@gooddata/sdk-backend-spi";
|
|
3
|
+
import { isChatConversationError, isChatConversationInteractionStep, isChatConversationItem, } from "@gooddata/sdk-backend-spi";
|
|
4
4
|
import { isChatConversationLocalItem, isTextContents, isUserMessage, makeAssistantItem, makeAssistantMessage, } from "../../model.js";
|
|
5
5
|
import { generateTitleFromQuestion } from "../../utils.js";
|
|
6
6
|
import { agentSwitchingActiveSelector, allowedRelationshipTypesSelector, objectTypesSelector, settingsSelector, tagsSelector, userContextSelector, } from "../chatWindow/chatWindowSelectors.js";
|
|
7
7
|
import { conversationEffortSelector, conversationMessagesByIdSelector, conversationSelector, messagesSelector, pendingAgentSwitchSelector, selectedAgentIdSelector, } from "../messages/messagesSelectors.js";
|
|
8
|
-
import { applyPendingAgentSwitchAction, evaluateMessageAction, evaluateMessageCompleteAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, revertAgentSwitchAction, setCurrentConversationAction, } from "../messages/messagesSlice.js";
|
|
8
|
+
import { appendInteractionStepAction, appendTracedActionAction, applyPendingAgentSwitchAction, evaluateMessageAction, evaluateMessageCompleteAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, revertAgentSwitchAction, setCurrentConversationAction, } from "../messages/messagesSlice.js";
|
|
9
9
|
import { processContents } from "./converters/interactionsToMessages.js";
|
|
10
10
|
import { convertToLocalContent } from "./converters/toLocalContent.js";
|
|
11
11
|
import { notifyDefinitionReceived } from "./onDefinitionReceivedTrigger.js";
|
|
@@ -333,6 +333,8 @@ function* evaluateUserConversationMessage(conversation, userMessage, assistantMe
|
|
|
333
333
|
let currentUserMessage = userMessage;
|
|
334
334
|
let currentAssistantMessage = assistantMessage;
|
|
335
335
|
let currentInteractionId = undefined;
|
|
336
|
+
// Tool names by callId, so a toolResult's trace detail can name the tool that produced it.
|
|
337
|
+
const toolNamesByCallId = new Map();
|
|
336
338
|
let queryBuilder = preparedChatThread
|
|
337
339
|
.withSearchLimit(Number(settings?.["aiChatSearchLimit"]) || 10)
|
|
338
340
|
.withObjectTypes(objectTypes)
|
|
@@ -350,16 +352,22 @@ function* evaluateUserConversationMessage(conversation, userMessage, assistantMe
|
|
|
350
352
|
queryBuilder = queryBuilder.withUserContext(context);
|
|
351
353
|
}
|
|
352
354
|
try {
|
|
353
|
-
const results = yield call([
|
|
354
|
-
queryBuilder,
|
|
355
|
-
queryBuilder.stream,
|
|
356
|
-
]);
|
|
355
|
+
const results = yield call([queryBuilder, queryBuilder.stream]);
|
|
357
356
|
reader = results.getReader();
|
|
358
357
|
while (true) {
|
|
359
358
|
const { value, done, } = yield call([reader, reader.read]);
|
|
360
359
|
if (done) {
|
|
361
360
|
break;
|
|
362
361
|
}
|
|
362
|
+
// Interaction steps are the "Interaction Intelligence" trace, not messages — they carry the
|
|
363
|
+
// turn's timing and spend and never touch the assistant's content.
|
|
364
|
+
if (value && isChatConversationInteractionStep(value)) {
|
|
365
|
+
yield put(appendInteractionStepAction({
|
|
366
|
+
conversationId: conversation.localId,
|
|
367
|
+
step: value,
|
|
368
|
+
}));
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
363
371
|
if (value) {
|
|
364
372
|
if (isChatConversationItem(value)) {
|
|
365
373
|
// Special case, when we have current user message
|
|
@@ -380,6 +388,32 @@ function* evaluateUserConversationMessage(conversation, userMessage, assistantMe
|
|
|
380
388
|
if (value.role === "user" || value.role === "system") {
|
|
381
389
|
continue;
|
|
382
390
|
}
|
|
391
|
+
// Remember each tool call's name so the matching toolResult — which carries
|
|
392
|
+
// only its callId — can be attributed to the tool that produced it.
|
|
393
|
+
if (value.content.type === "toolCall") {
|
|
394
|
+
toolNamesByCallId.set(value.content.callId, value.content.name);
|
|
395
|
+
}
|
|
396
|
+
// Every tool result that belongs to a step is part of the "Interaction Intelligence"
|
|
397
|
+
// trace, whether or not it carried a `detail` — one without a body still names
|
|
398
|
+
// its step after the tool that ran, so the step's time is accounted for.
|
|
399
|
+
// Captured aside; the item itself still flows on.
|
|
400
|
+
if ((value.detail || value.content.type === "toolResult") &&
|
|
401
|
+
value.stepId &&
|
|
402
|
+
value.responseId) {
|
|
403
|
+
yield put(appendTracedActionAction({
|
|
404
|
+
conversationId: conversation.localId,
|
|
405
|
+
responseId: value.responseId,
|
|
406
|
+
stepId: value.stepId,
|
|
407
|
+
action: {
|
|
408
|
+
itemId: value.id,
|
|
409
|
+
createdAt: value.createdAt,
|
|
410
|
+
toolName: value.content.type === "toolResult"
|
|
411
|
+
? toolNamesByCallId.get(value.content.callId)
|
|
412
|
+
: undefined,
|
|
413
|
+
detail: value.detail,
|
|
414
|
+
},
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
383
417
|
const chunkInteractionId = value.id;
|
|
384
418
|
// If we see a NEW interaction ID, create a new assistant message
|
|
385
419
|
if (chunkInteractionId &&
|
package/esm/store/store.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
2
2
|
import { type EventDispatcher } from "./events.js";
|
|
3
3
|
import { type OptionsDispatcher } from "./options.js";
|
|
4
|
-
export declare const getStore: (backend: IAnalyticalBackend, workspace: string, eventDispatcher: EventDispatcher, optionsDispatcher: OptionsDispatcher, isPreview: boolean | undefined) => import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
4
|
+
export declare const getStore: (backend: IAnalyticalBackend, workspace: string, eventDispatcher: EventDispatcher, optionsDispatcher: OptionsDispatcher, isPreview: boolean | undefined, allowInteractionIntelligence: boolean | undefined) => import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
5
5
|
//# sourceMappingURL=store.d.ts.map
|
package/esm/store/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store/store.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAOpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAStD,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store/store.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAOpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAStD,eAAO,MAAM,QAAQ,mRAyCpB,CAAC"}
|
package/esm/store/store.js
CHANGED
|
@@ -10,7 +10,7 @@ import { rootSaga } from "./sideEffects/index.js";
|
|
|
10
10
|
// In ESM, default exports of CJS modules are wrapped in default properties instead of being exposed directly.
|
|
11
11
|
// https://github.com/microsoft/TypeScript/issues/52086#issuecomment-1385978414
|
|
12
12
|
const createSagaMiddleware = defaultImport(defaultReduxSaga);
|
|
13
|
-
export const getStore = (backend, workspace, eventDispatcher, optionsDispatcher, isPreview) => {
|
|
13
|
+
export const getStore = (backend, workspace, eventDispatcher, optionsDispatcher, isPreview, allowInteractionIntelligence) => {
|
|
14
14
|
const sagaMiddleware = createSagaMiddleware({
|
|
15
15
|
context: {
|
|
16
16
|
backend,
|
|
@@ -26,7 +26,7 @@ export const getStore = (backend, workspace, eventDispatcher, optionsDispatcher,
|
|
|
26
26
|
[chatWindowSliceName]: chatWindowSliceReducer,
|
|
27
27
|
},
|
|
28
28
|
preloadedState: {
|
|
29
|
-
[chatWindowSliceName]: getInitialChatWindowState({ isPreview }),
|
|
29
|
+
[chatWindowSliceName]: getInitialChatWindowState({ isPreview, allowInteractionIntelligence }),
|
|
30
30
|
},
|
|
31
31
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
32
32
|
serializableCheck: {
|