@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.
Files changed (57) hide show
  1. package/dist/components/AgentChat/ChatCommon/ChatCommon.d.ts +16 -6
  2. package/dist/components/AgentChat/ChatCommon/ChatCommon.js +250 -166
  3. package/dist/components/AgentChat/ChatCommon/ChatHistory.d.ts +1 -7
  4. package/dist/components/AgentChat/ChatCommon/ChatHistory.js +33 -22
  5. package/dist/components/AgentChat/ChatCommon/Conversation.d.ts +3 -5
  6. package/dist/components/AgentChat/ChatCommon/Conversation.js +35 -57
  7. package/dist/components/AgentChat/ChatCommon/ConversationTurn.d.ts +9 -5
  8. package/dist/components/AgentChat/ChatCommon/ConversationTurn.js +3 -2
  9. package/dist/components/AgentChat/ChatCommon/FormattedMarkdown.js +5 -3
  10. package/dist/components/AgentChat/ChatCommon/SampleQueries.d.ts +3 -0
  11. package/dist/components/AgentChat/ChatCommon/SampleQueries.js +6 -3
  12. package/dist/components/AgentChat/ChatCommon/Thinking.d.ts +12 -0
  13. package/dist/components/AgentChat/ChatCommon/Thinking.js +51 -0
  14. package/dist/components/AgentChat/Common/LlmChatButton.d.ts +2 -2
  15. package/dist/components/AgentChat/Common/Types.d.ts +6 -5
  16. package/dist/components/AgentChat/Common/Types.js +5 -0
  17. package/dist/components/AgentChat/Common/Utils.d.ts +1 -1
  18. package/dist/components/AgentChat/Common/Utils.js +13 -7
  19. package/dist/components/ChatBot/ChatBot.d.ts +0 -4
  20. package/dist/components/ChatBot/ChatBot.js +2 -2
  21. package/dist/components/Common/AccordionLite.d.ts +14 -0
  22. package/dist/components/Common/AccordionLite.js +25 -0
  23. package/dist/components/Common/ConfirmationModal.d.ts +1 -1
  24. package/dist/components/Common/CustomerLogo.js +1 -3
  25. package/dist/components/Common/MUIAlert.d.ts +1 -0
  26. package/dist/components/Common/MUIAlert.js +3 -4
  27. package/dist/components/MultiAgentAccelerator/AgentFlow.d.ts +1 -0
  28. package/dist/components/MultiAgentAccelerator/AgentFlow.js +154 -59
  29. package/dist/components/MultiAgentAccelerator/AgentNode.d.ts +1 -0
  30. package/dist/components/MultiAgentAccelerator/AgentNode.js +46 -45
  31. package/dist/components/MultiAgentAccelerator/GraphLayouts.js +12 -4
  32. package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +103 -24
  33. package/dist/components/Settings/ApiKeyInput.d.ts +16 -0
  34. package/dist/components/Settings/ApiKeyInput.js +70 -0
  35. package/dist/components/Settings/SettingsDialog.js +30 -3
  36. package/dist/controller/llm/Providers.d.ts +2 -0
  37. package/dist/controller/llm/Providers.js +41 -0
  38. package/dist/index.d.ts +0 -1
  39. package/dist/index.js +0 -1
  40. package/dist/state/Settings.d.ts +2 -0
  41. package/dist/state/Settings.js +1 -0
  42. package/dist/tsconfig.build.tsbuildinfo +1 -1
  43. package/package.json +2 -2
  44. package/dist/components/AgentChat/ChatCommon/AgentConnectivity.d.ts +0 -14
  45. package/dist/components/AgentChat/ChatCommon/AgentConnectivity.js +0 -23
  46. package/dist/components/AgentChat/ChatCommon/AgentIntro.d.ts +0 -12
  47. package/dist/components/AgentChat/ChatCommon/AgentIntro.js +0 -19
  48. package/dist/components/AgentChat/ChatCommon/AgentMetadata.d.ts +0 -14
  49. package/dist/components/AgentChat/ChatCommon/AgentMetadata.js +0 -43
  50. package/dist/components/AgentChat/ChatCommon/Const.d.ts +0 -1
  51. package/dist/components/AgentChat/ChatCommon/Const.js +0 -2
  52. package/dist/components/AgentChat/ChatCommon/Greetings.d.ts +0 -1
  53. package/dist/components/AgentChat/ChatCommon/Greetings.js +0 -38
  54. package/dist/components/AgentChat/ChatCommon/UserQueryDisplay.d.ts +0 -7
  55. package/dist/components/AgentChat/ChatCommon/UserQueryDisplay.js +0 -32
  56. package/dist/components/Common/LlmChatOptionsButton.d.ts +0 -6
  57. 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 agent to send the request to.
22
+ * The network to send the request to.
26
23
  */
27
- readonly targetAgent: string;
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