@cognizant-ai-lab/ui-common 1.5.1 → 1.7.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/components/AgentChat/ChatCommon/ChatCommon.d.ts +16 -6
- package/dist/components/AgentChat/ChatCommon/ChatCommon.js +250 -166
- package/dist/components/AgentChat/ChatCommon/ChatHistory.d.ts +1 -7
- package/dist/components/AgentChat/ChatCommon/ChatHistory.js +33 -22
- package/dist/components/AgentChat/ChatCommon/Conversation.d.ts +3 -5
- package/dist/components/AgentChat/ChatCommon/Conversation.js +35 -57
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.d.ts +9 -5
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.js +3 -2
- 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 +13 -7
- package/dist/components/ChatBot/ChatBot.d.ts +0 -4
- package/dist/components/ChatBot/ChatBot.js +2 -2
- 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 -1
- package/dist/components/Common/CustomerLogo.js +1 -3
- package/dist/components/Common/MUIAlert.d.ts +1 -0
- package/dist/components/Common/MUIAlert.js +3 -4
- package/dist/components/MultiAgentAccelerator/AgentFlow.d.ts +1 -0
- package/dist/components/MultiAgentAccelerator/AgentFlow.js +154 -59
- package/dist/components/MultiAgentAccelerator/AgentNode.d.ts +1 -0
- package/dist/components/MultiAgentAccelerator/AgentNode.js +46 -45
- package/dist/components/MultiAgentAccelerator/GraphLayouts.js +12 -4
- package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +103 -24
- package/dist/components/Settings/ApiKeyInput.d.ts +16 -0
- package/dist/components/Settings/ApiKeyInput.js +70 -0
- package/dist/components/Settings/SettingsDialog.js +30 -3
- package/dist/controller/llm/Providers.d.ts +2 -0
- package/dist/controller/llm/Providers.js +41 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/state/Settings.d.ts +2 -0
- package/dist/state/Settings.js +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/components/AgentChat/ChatCommon/AgentConnectivity.d.ts +0 -14
- package/dist/components/AgentChat/ChatCommon/AgentConnectivity.js +0 -23
- package/dist/components/AgentChat/ChatCommon/AgentIntro.d.ts +0 -12
- package/dist/components/AgentChat/ChatCommon/AgentIntro.js +0 -19
- package/dist/components/AgentChat/ChatCommon/AgentMetadata.d.ts +0 -14
- package/dist/components/AgentChat/ChatCommon/AgentMetadata.js +0 -43
- package/dist/components/AgentChat/ChatCommon/Const.d.ts +0 -1
- package/dist/components/AgentChat/ChatCommon/Const.js +0 -2
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dispatch, Ref, SetStateAction } from "react";
|
|
2
|
+
import { LLMProvider } from "../../../state/Settings.js";
|
|
2
3
|
import { CombinedAgentType } from "../Common/Types.js";
|
|
3
4
|
export interface ChatCommonProps {
|
|
4
5
|
/**
|
|
@@ -9,10 +10,6 @@ export interface ChatCommonProps {
|
|
|
9
10
|
* The current username of the logged-in user. Used for fetching things from APIs mainly
|
|
10
11
|
*/
|
|
11
12
|
readonly currentUser: string;
|
|
12
|
-
/**
|
|
13
|
-
* Path to image for user avatar
|
|
14
|
-
*/
|
|
15
|
-
readonly userImage: string;
|
|
16
13
|
/**
|
|
17
14
|
* Function to set the state of the component to indicate whether we are awaiting a response from the LLM
|
|
18
15
|
*/
|
|
@@ -22,9 +19,9 @@ export interface ChatCommonProps {
|
|
|
22
19
|
*/
|
|
23
20
|
readonly isAwaitingLlm: boolean;
|
|
24
21
|
/**
|
|
25
|
-
* The
|
|
22
|
+
* The network to send the request to.
|
|
26
23
|
*/
|
|
27
|
-
readonly
|
|
24
|
+
readonly selectedNetwork: string | null;
|
|
28
25
|
/**
|
|
29
26
|
* Special endpoint for legacy agents since they do not have a single unified endpoint like Neuro-san agents.
|
|
30
27
|
*/
|
|
@@ -86,11 +83,24 @@ export interface ChatCommonProps {
|
|
|
86
83
|
* to re-supply data that lives outside the IndexedDB slyData store (e.g. localStorage).
|
|
87
84
|
*/
|
|
88
85
|
readonly extraSlyData?: Record<string, unknown>;
|
|
86
|
+
/**
|
|
87
|
+
* Optional description of the network to display in the UI.
|
|
88
|
+
*/
|
|
89
|
+
readonly networkDescription?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Sample queries for the current network that the user can "click to send"
|
|
92
|
+
*/
|
|
93
|
+
readonly sampleQueries?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Array of LLM providers for which API keys are required but missing. Only applies to BYOK networks.
|
|
96
|
+
*/
|
|
97
|
+
readonly missingApiKeys?: LLMProvider[];
|
|
89
98
|
}
|
|
90
99
|
export type ChatCommonHandle = {
|
|
91
100
|
handleStop: () => void;
|
|
92
101
|
handleClearChat: () => void;
|
|
93
102
|
};
|
|
103
|
+
export declare const MAX_TURNS = 50;
|
|
94
104
|
/**
|
|
95
105
|
* Common chat component for agent chat. This component is used by all agent chat components to provide a consistent
|
|
96
106
|
* experience for users when chatting with agents. It handles user input as well as displaying and nicely formatting
|