@cognizant-ai-lab/ui-common 1.5.0 → 1.6.0
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/dist/Theme/Theme.js +3 -3
- package/dist/components/AgentChat/ChatCommon/ChatCommon.d.ts +11 -1
- package/dist/components/AgentChat/ChatCommon/ChatCommon.js +284 -285
- package/dist/components/AgentChat/ChatCommon/ChatHistory.d.ts +1 -7
- package/dist/components/AgentChat/ChatCommon/ChatHistory.js +33 -22
- package/dist/components/AgentChat/ChatCommon/ControlButtons.js +2 -2
- package/dist/components/AgentChat/ChatCommon/Conversation.d.ts +13 -0
- package/dist/components/AgentChat/ChatCommon/Conversation.js +80 -0
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.d.ts +23 -0
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.js +11 -0
- package/dist/components/AgentChat/ChatCommon/FormattedMarkdown.js +5 -3
- package/dist/components/AgentChat/ChatCommon/SampleQueries.d.ts +3 -0
- package/dist/components/AgentChat/ChatCommon/SampleQueries.js +6 -3
- package/dist/components/AgentChat/ChatCommon/Thinking.d.ts +12 -0
- package/dist/components/AgentChat/ChatCommon/Thinking.js +51 -0
- package/dist/components/AgentChat/Common/LlmChatButton.d.ts +2 -2
- package/dist/components/AgentChat/Common/Types.d.ts +6 -5
- package/dist/components/AgentChat/Common/Types.js +5 -0
- package/dist/components/AgentChat/Common/Utils.d.ts +1 -1
- package/dist/components/AgentChat/Common/Utils.js +14 -9
- package/dist/components/Common/AccordionLite.d.ts +14 -0
- package/dist/components/Common/AccordionLite.js +25 -0
- package/dist/components/Common/ConfirmationModal.d.ts +1 -0
- package/dist/components/Common/ConfirmationModal.js +1 -1
- package/dist/components/Common/CustomerLogo.js +1 -1
- package/dist/components/Common/MUIAlert.d.ts +1 -0
- package/dist/components/Common/MUIAlert.js +3 -4
- package/dist/components/Common/Navbar.d.ts +2 -1
- package/dist/components/Common/Navbar.js +8 -4
- package/dist/components/Common/notification.d.ts +1 -1
- package/dist/components/Common/notification.js +17 -12
- package/dist/components/MultiAgentAccelerator/AgentFlow.d.ts +8 -0
- package/dist/components/MultiAgentAccelerator/AgentFlow.js +282 -82
- package/dist/components/MultiAgentAccelerator/AgentNode.d.ts +3 -1
- package/dist/components/MultiAgentAccelerator/AgentNode.js +64 -28
- package/dist/components/MultiAgentAccelerator/AgentNodePopup.d.ts +1 -4
- package/dist/components/MultiAgentAccelerator/AgentNodePopup.js +4 -5
- package/dist/components/MultiAgentAccelerator/GraphLayouts.js +19 -9
- package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.d.ts +2 -2
- package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +268 -60
- package/dist/components/MultiAgentAccelerator/Sidebar/AgentNetworkTreeItem.d.ts +1 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/AgentNetworkTreeItem.js +28 -12
- package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.d.ts +1 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.js +21 -5
- package/dist/components/MultiAgentAccelerator/Sidebar/TreeBuilder.d.ts +4 -3
- package/dist/components/MultiAgentAccelerator/Sidebar/TreeBuilder.js +8 -2
- package/dist/components/MultiAgentAccelerator/TemporaryNetworks.d.ts +19 -2
- package/dist/components/MultiAgentAccelerator/TemporaryNetworks.js +40 -5
- package/dist/components/MultiAgentAccelerator/ThoughtBubbleOverlay.js +27 -14
- package/dist/components/MultiAgentAccelerator/Tour/MainTourSteps.d.ts +7 -0
- package/dist/components/MultiAgentAccelerator/Tour/MainTourSteps.js +88 -0
- package/dist/components/MultiAgentAccelerator/const.d.ts +7 -10
- package/dist/components/MultiAgentAccelerator/const.js +9 -10
- package/dist/const.d.ts +5 -1
- package/dist/const.js +5 -2
- package/dist/controller/agent/Agent.d.ts +10 -0
- package/dist/controller/agent/Agent.js +17 -1
- package/dist/controller/llm/LlmChat.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/state/TemporaryNetworks.d.ts +5 -15
- package/dist/state/TemporaryNetworks.js +15 -34
- package/dist/state/Tour.d.ts +29 -0
- package/dist/state/Tour.js +22 -0
- package/dist/state/UserInfo.d.ts +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/Authentication.js +12 -3
- package/dist/utils/File.d.ts +7 -0
- package/dist/utils/File.js +14 -3
- package/dist/utils/text.js +2 -2
- package/dist/utils/title.js +1 -1
- package/dist/utils/zIndexLayers.js +3 -0
- package/package.json +15 -11
- package/dist/components/AgentChat/ChatCommon/AgentConnectivity.d.ts +0 -14
- package/dist/components/AgentChat/ChatCommon/AgentConnectivity.js +0 -23
- package/dist/components/AgentChat/ChatCommon/Greetings.d.ts +0 -1
- package/dist/components/AgentChat/ChatCommon/Greetings.js +0 -38
- package/dist/components/AgentChat/ChatCommon/UserQueryDisplay.d.ts +0 -7
- package/dist/components/AgentChat/ChatCommon/UserQueryDisplay.js +0 -32
- package/dist/components/Common/LlmChatOptionsButton.d.ts +0 -6
- package/dist/components/Common/LlmChatOptionsButton.js +0 -31
package/dist/Theme/Theme.js
CHANGED
|
@@ -48,9 +48,9 @@ export const isLightColor = (color) => {
|
|
|
48
48
|
// Remove # if present
|
|
49
49
|
const colorWithoutHash = hexColor.replace("#", "");
|
|
50
50
|
// Convert to RGB
|
|
51
|
-
const r = parseInt(colorWithoutHash.
|
|
52
|
-
const g = parseInt(colorWithoutHash.
|
|
53
|
-
const b = parseInt(colorWithoutHash.
|
|
51
|
+
const r = parseInt(colorWithoutHash.slice(0, 2), 16);
|
|
52
|
+
const g = parseInt(colorWithoutHash.slice(2, 4), 16);
|
|
53
|
+
const b = parseInt(colorWithoutHash.slice(4, 6), 16);
|
|
54
54
|
// Calculate relative luminance (perceived brightness)
|
|
55
55
|
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
56
56
|
// Return true if light (threshold 0.5)
|
|
@@ -59,7 +59,7 @@ export interface ChatCommonProps {
|
|
|
59
59
|
/**
|
|
60
60
|
* Optional greetings for specific agents to display
|
|
61
61
|
*/
|
|
62
|
-
readonly
|
|
62
|
+
readonly customAgentGreetings?: Partial<Record<CombinedAgentType, string>>;
|
|
63
63
|
/**
|
|
64
64
|
* Extra parameters to send to the server to be forwarded to the agent or used by the server.
|
|
65
65
|
* @note This is only used for legacy agents to aid in UI consolidation, only Neuro-san agents.
|
|
@@ -86,10 +86,20 @@ export interface ChatCommonProps {
|
|
|
86
86
|
* to re-supply data that lives outside the IndexedDB slyData store (e.g. localStorage).
|
|
87
87
|
*/
|
|
88
88
|
readonly extraSlyData?: Record<string, unknown>;
|
|
89
|
+
/**
|
|
90
|
+
* Optional description of the network to display in the UI.
|
|
91
|
+
*/
|
|
92
|
+
readonly networkDescription?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Sample queries for the current network that the user can "click to send"
|
|
95
|
+
*/
|
|
96
|
+
readonly sampleQueries?: string[];
|
|
89
97
|
}
|
|
90
98
|
export type ChatCommonHandle = {
|
|
91
99
|
handleStop: () => void;
|
|
100
|
+
handleClearChat: () => void;
|
|
92
101
|
};
|
|
102
|
+
export declare const MAX_TURNS = 50;
|
|
93
103
|
/**
|
|
94
104
|
* Common chat component for agent chat. This component is used by all agent chat components to provide a consistent
|
|
95
105
|
* experience for users when chatting with agents. It handles user input as well as displaying and nicely formatting
|