@cognizant-ai-lab/ui-common 1.4.2 → 1.5.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 (67) hide show
  1. package/dist/components/AgentChat/ChatCommon/AgentConnectivity.d.ts +14 -0
  2. package/dist/components/AgentChat/ChatCommon/AgentConnectivity.js +23 -0
  3. package/dist/components/AgentChat/{ChatCommon.d.ts → ChatCommon/ChatCommon.d.ts} +8 -4
  4. package/dist/components/AgentChat/{ChatCommon.js → ChatCommon/ChatCommon.js} +318 -307
  5. package/dist/components/AgentChat/ChatCommon/ChatHistory.d.ts +17 -0
  6. package/dist/components/AgentChat/ChatCommon/ChatHistory.js +27 -0
  7. package/dist/components/AgentChat/{ControlButtons.d.ts → ChatCommon/ControlButtons.d.ts} +1 -1
  8. package/dist/components/AgentChat/ChatCommon/ControlButtons.js +26 -0
  9. package/dist/components/AgentChat/{FormattedMarkdown.js → ChatCommon/FormattedMarkdown.js} +1 -1
  10. package/dist/components/AgentChat/ChatCommon/SampleQueries.d.ts +16 -0
  11. package/dist/components/AgentChat/ChatCommon/SampleQueries.js +29 -0
  12. package/dist/components/AgentChat/{SendButton.js → ChatCommon/SendButton.js} +1 -1
  13. package/dist/components/AgentChat/ChatCommon/UserQueryDisplay.d.ts +7 -0
  14. package/dist/components/AgentChat/{UserQueryDisplay.js → ChatCommon/UserQueryDisplay.js} +4 -3
  15. package/dist/components/AgentChat/{LlmChatButton.d.ts → Common/LlmChatButton.d.ts} +2 -2
  16. package/dist/components/AgentChat/{Utils.d.ts → Common/Utils.d.ts} +1 -1
  17. package/dist/components/AgentChat/{Utils.js → Common/Utils.js} +2 -1
  18. package/dist/components/AgentChat/VoiceChat/MicrophoneButton.js +1 -1
  19. package/dist/components/ChatBot/ChatBot.js +2 -2
  20. package/dist/components/Common/CustomerLogo.js +1 -1
  21. package/dist/components/Common/LlmChatOptionsButton.d.ts +1 -1
  22. package/dist/components/Common/MUIDialog.d.ts +1 -0
  23. package/dist/components/Common/MUIDialog.js +2 -2
  24. package/dist/components/MultiAgentAccelerator/AgentCounts.d.ts +2 -2
  25. package/dist/components/MultiAgentAccelerator/AgentFlow.d.ts +13 -1
  26. package/dist/components/MultiAgentAccelerator/AgentFlow.js +193 -20
  27. package/dist/components/MultiAgentAccelerator/AgentNetworkDesigner.d.ts +10 -0
  28. package/dist/components/MultiAgentAccelerator/AgentNetworkDesigner.js +20 -0
  29. package/dist/components/MultiAgentAccelerator/AgentNode.d.ts +1 -0
  30. package/dist/components/MultiAgentAccelerator/AgentNode.js +9 -4
  31. package/dist/components/MultiAgentAccelerator/AgentNodePopup.d.ts +33 -0
  32. package/dist/components/MultiAgentAccelerator/AgentNodePopup.js +81 -0
  33. package/dist/components/MultiAgentAccelerator/GraphLayouts.d.ts +4 -4
  34. package/dist/components/MultiAgentAccelerator/GraphLayouts.js +12 -8
  35. package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.d.ts +1 -0
  36. package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +101 -44
  37. package/dist/components/MultiAgentAccelerator/Sidebar/AgentNetworkTreeItem.js +4 -4
  38. package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.d.ts +1 -0
  39. package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.js +29 -23
  40. package/dist/components/MultiAgentAccelerator/Sidebar/TreeBuilder.js +1 -1
  41. package/dist/components/MultiAgentAccelerator/TemporaryNetworks.d.ts +14 -0
  42. package/dist/components/MultiAgentAccelerator/TemporaryNetworks.js +26 -1
  43. package/dist/components/MultiAgentAccelerator/ThoughtBubbleOverlay.js +8 -7
  44. package/dist/components/MultiAgentAccelerator/const.d.ts +24 -0
  45. package/dist/components/MultiAgentAccelerator/const.js +19 -0
  46. package/dist/controller/llm/LlmChat.js +1 -1
  47. package/dist/index.d.ts +8 -7
  48. package/dist/index.js +8 -7
  49. package/dist/state/ChatHistory.d.ts +50 -0
  50. package/dist/state/ChatHistory.js +98 -0
  51. package/dist/state/IndexedDBStorage.d.ts +14 -0
  52. package/dist/state/IndexedDBStorage.js +65 -0
  53. package/dist/state/TemporaryNetworks.d.ts +23 -0
  54. package/dist/state/TemporaryNetworks.js +43 -0
  55. package/dist/tsconfig.build.tsbuildinfo +1 -1
  56. package/package.json +8 -2
  57. package/dist/components/AgentChat/ControlButtons.js +0 -26
  58. package/dist/components/AgentChat/UserQueryDisplay.d.ts +0 -5
  59. /package/dist/components/AgentChat/{FormattedMarkdown.d.ts → ChatCommon/FormattedMarkdown.d.ts} +0 -0
  60. /package/dist/components/AgentChat/{Greetings.d.ts → ChatCommon/Greetings.d.ts} +0 -0
  61. /package/dist/components/AgentChat/{Greetings.js → ChatCommon/Greetings.js} +0 -0
  62. /package/dist/components/AgentChat/{SendButton.d.ts → ChatCommon/SendButton.d.ts} +0 -0
  63. /package/dist/components/AgentChat/{SyntaxHighlighterThemes.d.ts → ChatCommon/SyntaxHighlighterThemes.d.ts} +0 -0
  64. /package/dist/components/AgentChat/{SyntaxHighlighterThemes.js → ChatCommon/SyntaxHighlighterThemes.js} +0 -0
  65. /package/dist/components/AgentChat/{LlmChatButton.js → Common/LlmChatButton.js} +0 -0
  66. /package/dist/components/AgentChat/{Types.d.ts → Common/Types.d.ts} +0 -0
  67. /package/dist/components/AgentChat/{Types.js → Common/Types.js} +0 -0
@@ -0,0 +1,17 @@
1
+ import { BaseMessage } from "@langchain/core/messages";
2
+ import { FC } from "react";
3
+ interface ChatHistoryProps {
4
+ readonly agentDisplayName: string;
5
+ readonly agentImage: string;
6
+ readonly chatHistoryKey: string;
7
+ readonly currentUser: string;
8
+ readonly id: string;
9
+ readonly messages: BaseMessage[];
10
+ readonly targetAgent: string;
11
+ readonly userImage: string;
12
+ }
13
+ /**
14
+ * Component for displaying chat history from previous interactions with the agent.
15
+ */
16
+ export declare const ChatHistory: FC<ChatHistoryProps>;
17
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { UserQueryDisplay } from "./UserQueryDisplay.js";
3
+ import { ChatMessageType } from "../../../generated/neuro-san/NeuroSanClient.js";
4
+ import { hashString } from "../../../utils/text.js";
5
+ import { MUIAccordion } from "../../Common/MUIAccordion.js";
6
+ // #endregion: Types
7
+ /**
8
+ * Component for displaying chat history from previous interactions with the agent.
9
+ */
10
+ export const ChatHistory = ({ agentDisplayName, agentImage, chatHistoryKey, currentUser, id, messages, targetAgent, userImage, }) => (_jsx(MUIAccordion, { id: id, sx: { marginBottom: "2rem", marginTop: "1rem" }, items: [
11
+ {
12
+ title: "Chat History",
13
+ content: messages.map((message) => {
14
+ const itemKey = hashString(message.text + message.type + message.id);
15
+ if (message.type.toUpperCase() === ChatMessageType.HUMAN) {
16
+ return (_jsx(UserQueryDisplay, { sx: { opacity: 0.5 }, title: currentUser, userImage: userImage, userQuery: message.text }, itemKey));
17
+ }
18
+ else if (message.type.toUpperCase() === ChatMessageType.AI) {
19
+ return (_jsx(UserQueryDisplay, { sx: { opacity: 0.5 }, title: targetAgent, userImage: agentImage, userQuery: `${agentDisplayName}: ${message.text}` }, itemKey));
20
+ }
21
+ else {
22
+ console.warn(`Unrecognized message type in chat history: ${message.type}`);
23
+ return null;
24
+ }
25
+ }),
26
+ },
27
+ ] }, chatHistoryKey));
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  interface ControlButtonsProps {
3
- clearChatOnClickCallback: () => void;
3
+ handleClearChat: () => void;
4
4
  enableClearChatButton: boolean;
5
5
  isAwaitingLlm: boolean;
6
6
  handleSend: (query: string) => void;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ Copyright 2025 Cognizant Technology Solutions Corp, www.cognizant.com.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ */
17
+ import DeleteOutline from "@mui/icons-material/DeleteOutline";
18
+ import Loop from "@mui/icons-material/Loop";
19
+ import StopCircle from "@mui/icons-material/StopCircle";
20
+ import { SmallLlmChatButton } from "../Common/LlmChatButton.js";
21
+ // #endregion: Types
22
+ /**
23
+ * Generate the Control Buttons for a chat window.
24
+ * @returns A fragment containing the Control Buttons.
25
+ */
26
+ export const ControlButtons = ({ handleClearChat, enableClearChatButton, isAwaitingLlm, handleSend, handleStop, previousUserQuery, shouldEnableRegenerateButton, }) => (_jsxs(_Fragment, { children: [!isAwaitingLlm && (_jsx(SmallLlmChatButton, { "aria-label": "Clear Chat", disabled: !enableClearChatButton, id: "clear-chat-button", onClick: handleClearChat, posBottom: 8, posRight: 65, children: _jsx(DeleteOutline, { fontSize: "small", id: "stop-button-icon", sx: { color: "var(--bs-white)" } }) })), isAwaitingLlm && (_jsx(SmallLlmChatButton, { "aria-label": "Stop", disabled: !isAwaitingLlm, id: "stop-output-button", onClick: () => handleStop(), posBottom: 8, posRight: 23, children: _jsx(StopCircle, { fontSize: "small", id: "stop-button-icon", sx: { color: "var(--bs-white)" } }) })), !isAwaitingLlm && (_jsx(SmallLlmChatButton, { "aria-label": "Regenerate", disabled: !shouldEnableRegenerateButton, id: "regenerate-output-button", onClick: () => handleSend(previousUserQuery), posBottom: 8, posRight: 23, children: _jsx(Loop, { fontSize: "small", id: "generate-icon", sx: { color: "var(--bs-white)" } }) }))] }));
@@ -19,7 +19,7 @@ import ReactMarkdown from "react-markdown";
19
19
  import SyntaxHighlighter from "react-syntax-highlighter";
20
20
  import rehypeRaw from "rehype-raw";
21
21
  import rehypeSlug from "rehype-slug";
22
- import { hashString } from "../../utils/text.js";
22
+ import { hashString } from "../../../utils/text.js";
23
23
  /**
24
24
  * Format the output to ensure that text nodes are formatted as Markdown but other nodes are passed along as-is.
25
25
  *
@@ -0,0 +1,16 @@
1
+ import { FC } from "react";
2
+ export declare const MAX_SAMPLE_QUERIES = 5;
3
+ export declare const QUERY_TRUNCATE_LENGTH = 80;
4
+ interface SampleQueriesProps {
5
+ readonly disabled: boolean;
6
+ readonly handleSend: (query: string) => void;
7
+ readonly sampleQueries: string[];
8
+ }
9
+ /**
10
+ * Render sample queries as clickable chips. Agents may or may not have sample queries defined.
11
+ * @param sampleQueries The sample queries to render (from "connectivity" API)
12
+ * @returns A ReactNode representing the sample queries as clickable chips. If a user clicks a chip, it will
13
+ * send the query to the agent.
14
+ */
15
+ export declare const SampleQueries: FC<SampleQueriesProps>;
16
+ export {};
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Box from "@mui/material/Box";
3
+ import Chip from "@mui/material/Chip";
4
+ import Tooltip from "@mui/material/Tooltip";
5
+ import { hashString } from "../../../utils/text.js";
6
+ // Maximum number of sample queries to show
7
+ export const MAX_SAMPLE_QUERIES = 5;
8
+ // Maximum length of query to show in sample query chips
9
+ export const QUERY_TRUNCATE_LENGTH = 80;
10
+ /**
11
+ * Render sample queries as clickable chips. Agents may or may not have sample queries defined.
12
+ * @param sampleQueries The sample queries to render (from "connectivity" API)
13
+ * @returns A ReactNode representing the sample queries as clickable chips. If a user clicks a chip, it will
14
+ * send the query to the agent.
15
+ */
16
+ export const SampleQueries = ({ disabled, handleSend, sampleQueries }) => sampleQueries?.length > 0 ? (_jsx(Box, { id: "sample-queries-box", sx: { marginTop: "2rem", marginBottom: "1rem" }, children: sampleQueries.slice(0, MAX_SAMPLE_QUERIES).map((query) => {
17
+ const hashedQuery = hashString(query);
18
+ return (_jsx(Tooltip, { title: `Click to send query: "${query}"`, children: _jsx(Chip, { disabled: disabled, label: query.length > QUERY_TRUNCATE_LENGTH
19
+ ? `${query.slice(0, QUERY_TRUNCATE_LENGTH)}...`
20
+ : query, onClick: async () => {
21
+ handleSend(query);
22
+ }, sx: {
23
+ color: "var(--bs-white)",
24
+ marginRight: "1rem",
25
+ marginBottom: "1rem",
26
+ backgroundColor: "var(--bs-accent1-medium)",
27
+ "&:hover": { backgroundColor: "var(--bs-accent1-dark)" },
28
+ } }) }, `tooltip-${hashedQuery}`));
29
+ }) })) : null;
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  */
17
17
  import SendIcon from "@mui/icons-material/Send";
18
- import { LlmChatButton } from "./LlmChatButton.js";
18
+ import { LlmChatButton } from "../Common/LlmChatButton.js";
19
19
  // #endregion: Types
20
20
  /**
21
21
  * Generate the Send Button for a chat window.
@@ -0,0 +1,7 @@
1
+ import { SxProps } from "@mui/material/styles";
2
+ export declare const UserQueryDisplay: ({ sx, userQuery, title, userImage, }: {
3
+ sx?: SxProps;
4
+ userQuery: string;
5
+ title: string;
6
+ userImage: string;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -14,8 +14,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  */
17
+ import Box from "@mui/material/Box";
17
18
  import { styled } from "@mui/material/styles";
18
- import { DEFAULT_USER_IMAGE } from "../../const.js";
19
+ import { DEFAULT_USER_IMAGE } from "../../../const.js";
19
20
  // #region: Styled Components
20
21
  const UserQueryContainer = styled("div")(({ theme }) => ({
21
22
  backgroundColor: theme.palette.background.paper,
@@ -26,6 +27,6 @@ const UserQueryContainer = styled("div")(({ theme }) => ({
26
27
  padding: "10px",
27
28
  }));
28
29
  // #endregion: Styled Components
29
- export const UserQueryDisplay = ({ userQuery, title, userImage, }) => {
30
- return (_jsx("div", { id: "user-query-div", style: { marginBottom: "1rem" }, children: _jsxs(UserQueryContainer, { id: "user-query-container", children: [_jsx("img", { id: "user-query-image", src: userImage || DEFAULT_USER_IMAGE, width: 30, height: 30, title: title, alt: "", role: "img" }), _jsx("span", { id: "user-query", style: { marginLeft: "0.625rem", marginTop: "0.125rem" }, children: userQuery })] }) }));
30
+ export const UserQueryDisplay = ({ sx, userQuery, title, userImage, }) => {
31
+ return (_jsx(Box, { id: "user-query-div", sx: [{ marginBottom: "1rem" }, ...(Array.isArray(sx) ? sx : [sx])], children: _jsxs(UserQueryContainer, { id: "user-query-container", children: [_jsx("img", { id: "user-query-image", src: userImage || DEFAULT_USER_IMAGE, width: 30, height: 30, title: title, alt: "", role: "img", style: { alignSelf: "center" } }), _jsx("span", { id: "user-query", style: { marginLeft: "0.625rem", marginTop: "0.125rem" }, children: userQuery })] }) }));
31
32
  };
@@ -3,6 +3,6 @@ type LLMChatGroupConfigBtnProps = {
3
3
  posRight?: number;
4
4
  posBottom?: number;
5
5
  };
6
- export declare const LlmChatButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
7
- export declare const SmallLlmChatButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
6
+ export declare const LlmChatButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "children" | "sx" | "variant" | "color" | "disabled" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "size" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
7
+ export declare const SmallLlmChatButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "children" | "sx" | "variant" | "color" | "disabled" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "size" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
8
8
  export {};
@@ -1,4 +1,4 @@
1
- import { ChatMessage, ChatMessageType } from "../../generated/neuro-san/NeuroSanClient.js";
1
+ import { ChatMessage, ChatMessageType } from "../../../generated/neuro-san/NeuroSanClient.js";
2
2
  export declare const KNOWN_MESSAGE_TYPES: ChatMessageType[];
3
3
  export declare const KNOWN_MESSAGE_TYPES_FOR_PLASMA: ChatMessageType[];
4
4
  export declare const chatMessageFromChunk: (chunk: string) => ChatMessage | null;
@@ -15,12 +15,13 @@ limitations under the License.
15
15
  */
16
16
  import capitalize from "lodash-es/capitalize.js";
17
17
  import startCase from "lodash-es/startCase.js";
18
- import { ChatMessageType } from "../../generated/neuro-san/NeuroSanClient.js";
18
+ import { ChatMessageType } from "../../../generated/neuro-san/NeuroSanClient.js";
19
19
  // We ignore any messages that are not of these types
20
20
  export const KNOWN_MESSAGE_TYPES = [
21
21
  ChatMessageType.AI,
22
22
  ChatMessageType.AGENT,
23
23
  ChatMessageType.AGENT_FRAMEWORK,
24
+ ChatMessageType.AGENT_PROGRESS,
24
25
  ChatMessageType.HUMAN,
25
26
  ChatMessageType.SYSTEM,
26
27
  ];
@@ -17,8 +17,8 @@ limitations under the License.
17
17
  import MicNoneIcon from "@mui/icons-material/MicNone";
18
18
  import MicOffIcon from "@mui/icons-material/MicOff";
19
19
  import Tooltip from "@mui/material/Tooltip";
20
- import { LlmChatButton } from "../LlmChatButton.js";
21
20
  import { checkSpeechSupport, toggleListening } from "./VoiceChat.js";
21
+ import { LlmChatButton } from "../Common/LlmChatButton.js";
22
22
  // #endregion: Types
23
23
  /**
24
24
  * Microphone button component for voice input functionality.
@@ -23,8 +23,8 @@ import { CHATBOT_ENDPOINT } from "../../controller/llm/endpoints.js";
23
23
  import { isDarkMode } from "../../Theme/Theme.js";
24
24
  import { useAuthentication } from "../../utils/Authentication.js";
25
25
  import { getZIndex } from "../../utils/zIndexLayers.js";
26
- import { ChatCommon } from "../AgentChat/ChatCommon.js";
27
- import { LegacyAgentType } from "../AgentChat/Types.js";
26
+ import { ChatCommon } from "../AgentChat/ChatCommon/ChatCommon.js";
27
+ import { LegacyAgentType } from "../AgentChat/Common/Types.js";
28
28
  /**
29
29
  * Site-wide Chatbot component.
30
30
  */
@@ -41,7 +41,7 @@ export const CustomerLogo = ({ fallbackElement, logoServiceToken }) => {
41
41
  }
42
42
  // "auto": use logo.dev service
43
43
  const logoUrl = logoServiceToken && customer?.trim().length > 0
44
- ? `https://img.logo.dev/name/${encodeURIComponent(customer)}?token=${logoServiceToken}&theme=light&format=png&size=75`
44
+ ? `https://img.logo.dev/name/${encodeURIComponent(customer)}?token=${logoServiceToken}&theme=dark&format=png&size=75`
45
45
  : null;
46
46
  return logoUrl ? (
47
47
  // eslint-disable-next-line @next/next/no-img-element
@@ -2,5 +2,5 @@ type LLMChatGroupConfigBtnProps = {
2
2
  enabled?: boolean;
3
3
  posRight?: number;
4
4
  };
5
- export declare const LlmChatOptionsButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
5
+ export declare const LlmChatOptionsButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "className" | "style" | "classes" | "children" | "sx" | "variant" | "color" | "disabled" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "size" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & LLMChatGroupConfigBtnProps, {}, {}>;
6
6
  export {};
@@ -5,6 +5,7 @@ interface MUIDialogProps {
5
5
  className?: string;
6
6
  closeable?: boolean;
7
7
  contentSx?: SxProps;
8
+ dialogSx?: SxProps;
8
9
  footer?: ReactJSX.Element;
9
10
  id: string;
10
11
  isOpen: boolean;
@@ -31,9 +31,9 @@ const StyledDialogTitle = styled(DialogTitle)({
31
31
  whiteSpace: "nowrap",
32
32
  });
33
33
  // #endregion: Types
34
- export const MUIDialog = ({ children, className, closeable = true, contentSx, footer, id, isOpen, onClose, paperProps, title, }) => (_jsxs(Dialog, { "data-testid": id, id: id, onClose: onClose, open: isOpen, className: className, slotProps: {
34
+ export const MUIDialog = ({ children, className, closeable = true, contentSx, dialogSx, footer, id, isOpen, onClose, paperProps, title, }) => (_jsxs(Dialog, { "data-testid": id, id: id, onClose: onClose, open: isOpen, className: className, slotProps: {
35
35
  paper: { sx: paperProps },
36
- }, children: [_jsx(StyledDialogTitle, { id: `${id}-title`, children: title }), closeable && (_jsx(IconButton, { "aria-label": "close", id: `${id}-close-icon-btn`, onClick: onClose, sx: {
36
+ }, sx: dialogSx, children: [_jsx(StyledDialogTitle, { id: `${id}-title`, children: title }), closeable && (_jsx(IconButton, { "aria-label": "close", id: `${id}-close-icon-btn`, onClick: onClose, sx: {
37
37
  position: "absolute",
38
38
  right: 8,
39
39
  top: 8,
@@ -1,4 +1,4 @@
1
- import { Origin } from "../../generated/neuro-san/NeuroSanClient.js";
1
+ import { Origin as NSOrigin } from "../../generated/neuro-san/NeuroSanClient.js";
2
2
  /**
3
3
  * Given a map of agent counts and a list of origins, return an updated map of agent counts that includes the
4
4
  * counts from the origins.
@@ -9,4 +9,4 @@ import { Origin } from "../../generated/neuro-san/NeuroSanClient.js";
9
9
  * already in the map, it will be added with a count of 1. If it is already in the map, its count will be
10
10
  * incremented by 1.
11
11
  */
12
- export declare const getUpdatedAgentCounts: (agentCountsMap: Map<string, number>, origins: readonly Origin[]) => Map<string, number>;
12
+ export declare const getUpdatedAgentCounts: (agentCountsMap: Map<string, number>, origins: readonly NSOrigin[]) => Map<string, number>;
@@ -8,14 +8,26 @@ export interface AgentFlowProps {
8
8
  readonly agentIconSuggestions?: AgentIconSuggestions;
9
9
  readonly agentsInNetwork: ConnectivityInfo[];
10
10
  readonly currentConversations?: AgentConversation[] | null;
11
+ readonly currentUser?: string;
11
12
  readonly id: string;
12
13
  readonly isAwaitingLlm?: boolean;
14
+ readonly isAgentNetworkDesignerMode?: boolean;
13
15
  readonly isStreaming?: boolean;
16
+ readonly isSelectedNetworkTemporary?: boolean;
17
+ /** The history key for the currently selected network (used to scope sly_data reads/writes per network). */
18
+ readonly networkId?: string;
19
+ readonly neuroSanURL?: string;
20
+ /**
21
+ * Called after a popup save triggers a new network reservation that replaces the currently viewed network.
22
+ * @param oldNetworkId The agent_name of the network that was replaced.
23
+ * @param newNetworkId The agent_name of the replacement network to navigate to.
24
+ */
25
+ readonly onNetworkReplaced?: (oldNetworkId: string, newNetworkId: string) => void;
14
26
  readonly thoughtBubbleEdges: Map<string, {
15
27
  edge: ThoughtBubbleEdgeShape;
16
28
  timestamp: number;
17
29
  }>;
18
- readonly setThoughtBubbleEdges: Dispatch<SetStateAction<Map<string, {
30
+ readonly setThoughtBubbleEdges?: Dispatch<SetStateAction<Map<string, {
19
31
  edge: ThoughtBubbleEdgeShape;
20
32
  timestamp: number;
21
33
  }>>>;