@agentiffai/design 1.3.26 → 1.3.28
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/{Window-DyRP81dS.d.cts → Window-Dm_I5m8i.d.cts} +5 -7
- package/dist/{Window-DyRP81dS.d.ts → Window-Dm_I5m8i.d.ts} +5 -7
- package/dist/copilotkit/index.cjs +73 -43
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +2 -2
- package/dist/copilotkit/index.d.ts +2 -2
- package/dist/copilotkit/index.js +73 -43
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +1953 -656
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -2
- package/dist/index.d.ts +227 -2
- package/dist/index.js +1826 -541
- package/dist/index.js.map +1 -1
- package/dist/layout/index.cjs +74 -14
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.js +74 -14
- package/dist/layout/index.js.map +1 -1
- package/dist/workflow/index.cjs +88 -58
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.js +88 -58
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReportIssueCallback } from '../Window-
|
|
2
|
-
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-
|
|
1
|
+
import { R as ReportIssueCallback } from '../Window-Dm_I5m8i.cjs';
|
|
2
|
+
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-Dm_I5m8i.cjs';
|
|
3
3
|
import { RenderMessageProps, InputProps, UserMessageProps } from '@copilotkit/react-ui';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { ReactNode } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReportIssueCallback } from '../Window-
|
|
2
|
-
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-
|
|
1
|
+
import { R as ReportIssueCallback } from '../Window-Dm_I5m8i.js';
|
|
2
|
+
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-Dm_I5m8i.js';
|
|
3
3
|
import { RenderMessageProps, InputProps, UserMessageProps } from '@copilotkit/react-ui';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { ReactNode } from 'react';
|
package/dist/copilotkit/index.js
CHANGED
|
@@ -1492,10 +1492,7 @@ function stripToolCallMarkers(content) {
|
|
|
1492
1492
|
function extractToolCallNames(content) {
|
|
1493
1493
|
if (!content.includes("TOOL_CALL")) return [];
|
|
1494
1494
|
const names = /* @__PURE__ */ new Set();
|
|
1495
|
-
const patterns = [
|
|
1496
|
-
/<!--TOOL_CALL:([^:]+):/g,
|
|
1497
|
-
/__TOOL_CALL__:([^:]+):/g
|
|
1498
|
-
];
|
|
1495
|
+
const patterns = [/<!--TOOL_CALL:([^:]+):/g, /__TOOL_CALL__:([^:]+):/g];
|
|
1499
1496
|
for (const pattern of patterns) {
|
|
1500
1497
|
let match;
|
|
1501
1498
|
while ((match = pattern.exec(content)) !== null) {
|
|
@@ -1642,7 +1639,7 @@ var AssistantMessageAdapterBase = ({
|
|
|
1642
1639
|
return /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." });
|
|
1643
1640
|
}
|
|
1644
1641
|
const attachments = [];
|
|
1645
|
-
return /* @__PURE__ */ jsxs(
|
|
1642
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1646
1643
|
generativeUIOutput && /* @__PURE__ */ jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
1647
1644
|
content && /* @__PURE__ */ jsx(
|
|
1648
1645
|
AssistantMessage,
|
|
@@ -1703,7 +1700,7 @@ function createAssistantMessageAdapter(ThinkingIndicator, _ToolCallsComponent) {
|
|
|
1703
1700
|
ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." })
|
|
1704
1701
|
] });
|
|
1705
1702
|
}
|
|
1706
|
-
return /* @__PURE__ */ jsxs(
|
|
1703
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1707
1704
|
toolCallIndicators,
|
|
1708
1705
|
generativeUIOutput && /* @__PURE__ */ jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
1709
1706
|
content && /* @__PURE__ */ jsx(
|
|
@@ -1801,15 +1798,41 @@ function createAssistantMessageAdapterWithErrorReporting(onReportIssue, Thinking
|
|
|
1801
1798
|
if (showThinking) {
|
|
1802
1799
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1803
1800
|
toolCallNames.map((name) => /* @__PURE__ */ jsxs(ToolCallIndicator, { children: [
|
|
1804
|
-
/* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx(
|
|
1801
|
+
/* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx(
|
|
1802
|
+
"svg",
|
|
1803
|
+
{
|
|
1804
|
+
width: "14",
|
|
1805
|
+
height: "14",
|
|
1806
|
+
viewBox: "0 0 24 24",
|
|
1807
|
+
fill: "none",
|
|
1808
|
+
stroke: "currentColor",
|
|
1809
|
+
strokeWidth: "2",
|
|
1810
|
+
strokeLinecap: "round",
|
|
1811
|
+
strokeLinejoin: "round",
|
|
1812
|
+
children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" })
|
|
1813
|
+
}
|
|
1814
|
+
) }),
|
|
1805
1815
|
/* @__PURE__ */ jsx(ToolCallName, { children: formatToolName2(name) })
|
|
1806
1816
|
] }, name)),
|
|
1807
1817
|
ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." })
|
|
1808
1818
|
] });
|
|
1809
1819
|
}
|
|
1810
|
-
return /* @__PURE__ */ jsxs(
|
|
1820
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1811
1821
|
toolCallNames.map((name) => /* @__PURE__ */ jsxs(ToolCallIndicator, { children: [
|
|
1812
|
-
/* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx(
|
|
1822
|
+
/* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx(
|
|
1823
|
+
"svg",
|
|
1824
|
+
{
|
|
1825
|
+
width: "14",
|
|
1826
|
+
height: "14",
|
|
1827
|
+
viewBox: "0 0 24 24",
|
|
1828
|
+
fill: "none",
|
|
1829
|
+
stroke: "currentColor",
|
|
1830
|
+
strokeWidth: "2",
|
|
1831
|
+
strokeLinecap: "round",
|
|
1832
|
+
strokeLinejoin: "round",
|
|
1833
|
+
children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" })
|
|
1834
|
+
}
|
|
1835
|
+
) }),
|
|
1813
1836
|
/* @__PURE__ */ jsx(ToolCallName, { children: formatToolName2(name) })
|
|
1814
1837
|
] }, name)),
|
|
1815
1838
|
generativeUIOutput && /* @__PURE__ */ jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
@@ -2039,6 +2062,7 @@ var ChatInput = ({
|
|
|
2039
2062
|
InputField,
|
|
2040
2063
|
{
|
|
2041
2064
|
ref: inputRef,
|
|
2065
|
+
"data-testid": "chat-input",
|
|
2042
2066
|
"aria-label": ariaLabel,
|
|
2043
2067
|
placeholder,
|
|
2044
2068
|
onKeyDown: handleKeyDown,
|
|
@@ -2091,31 +2115,41 @@ var SubmitButtonComponent = ({
|
|
|
2091
2115
|
},
|
|
2092
2116
|
ref
|
|
2093
2117
|
);
|
|
2094
|
-
return /* @__PURE__ */ jsx(
|
|
2095
|
-
|
|
2118
|
+
return /* @__PURE__ */ jsx(
|
|
2119
|
+
SubmitButton,
|
|
2096
2120
|
{
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
"
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2121
|
+
...buttonProps,
|
|
2122
|
+
ref,
|
|
2123
|
+
"data-testid": "chat-send-button",
|
|
2124
|
+
disabled: isDisabled,
|
|
2125
|
+
title: ariaLabel,
|
|
2126
|
+
children: /* @__PURE__ */ jsxs(
|
|
2127
|
+
"svg",
|
|
2128
|
+
{
|
|
2129
|
+
width: "20",
|
|
2130
|
+
height: "20",
|
|
2131
|
+
viewBox: "0 0 20 20",
|
|
2132
|
+
fill: "none",
|
|
2133
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2134
|
+
role: "img",
|
|
2135
|
+
"aria-hidden": "true",
|
|
2136
|
+
children: [
|
|
2137
|
+
/* @__PURE__ */ jsx("title", { children: "Arrow Right Icon" }),
|
|
2138
|
+
/* @__PURE__ */ jsx(
|
|
2139
|
+
"path",
|
|
2140
|
+
{
|
|
2141
|
+
d: "M4 10H16M16 10L10 4M16 10L10 16",
|
|
2142
|
+
stroke: "currentColor",
|
|
2143
|
+
strokeWidth: "2",
|
|
2144
|
+
strokeLinecap: "round",
|
|
2145
|
+
strokeLinejoin: "round"
|
|
2146
|
+
}
|
|
2147
|
+
)
|
|
2148
|
+
]
|
|
2149
|
+
}
|
|
2150
|
+
)
|
|
2117
2151
|
}
|
|
2118
|
-
)
|
|
2152
|
+
);
|
|
2119
2153
|
};
|
|
2120
2154
|
ChatInput.displayName = "ChatInput";
|
|
2121
2155
|
var InputAdapter = ({
|
|
@@ -2317,15 +2351,12 @@ var UserMessageWrapper = styled9.div`
|
|
|
2317
2351
|
/* Performance optimization - isolate layout/paint */
|
|
2318
2352
|
contain: content;
|
|
2319
2353
|
`;
|
|
2320
|
-
var UserMessageAdapterBase = ({
|
|
2321
|
-
message,
|
|
2322
|
-
ImageRenderer
|
|
2323
|
-
}) => {
|
|
2354
|
+
var UserMessageAdapterBase = ({ message, ImageRenderer }) => {
|
|
2324
2355
|
if (message?.image) {
|
|
2325
2356
|
return /* @__PURE__ */ jsx(ImageRenderer, { image: message.image, content: message.content });
|
|
2326
2357
|
}
|
|
2327
2358
|
const content = message?.content || "";
|
|
2328
|
-
return /* @__PURE__ */ jsx(UserMessageWrapper, { children: /* @__PURE__ */ jsx(UserMessage, { children: content }) });
|
|
2359
|
+
return /* @__PURE__ */ jsx(UserMessageWrapper, { "data-testid": "chat-message", "data-message-role": "user", children: /* @__PURE__ */ jsx(UserMessage, { children: content }) });
|
|
2329
2360
|
};
|
|
2330
2361
|
var UserMessageAdapter = memo(UserMessageAdapterBase);
|
|
2331
2362
|
UserMessageAdapter.displayName = "UserMessageAdapter";
|
|
@@ -3432,19 +3463,18 @@ function CustomCopilotSidebar2({
|
|
|
3432
3463
|
ToolCallsComponent,
|
|
3433
3464
|
onReportIssue
|
|
3434
3465
|
}) {
|
|
3435
|
-
const HeaderAdapterWithClose = useMemo(
|
|
3436
|
-
() => createHeaderAdapter(onSetOpen),
|
|
3437
|
-
[onSetOpen]
|
|
3438
|
-
);
|
|
3466
|
+
const HeaderAdapterWithClose = useMemo(() => createHeaderAdapter(onSetOpen), [onSetOpen]);
|
|
3439
3467
|
const CustomButton = useMemo(
|
|
3440
3468
|
() => createButtonAdapter(disabled, disabledReason, onSetOpen),
|
|
3441
3469
|
[disabled, disabledReason, onSetOpen]
|
|
3442
3470
|
);
|
|
3443
3471
|
const AssistantMessageAdapterMemo = useMemo(
|
|
3444
|
-
() => onReportIssue ? createAssistantMessageAdapterWithErrorReporting(
|
|
3472
|
+
() => onReportIssue ? createAssistantMessageAdapterWithErrorReporting(
|
|
3473
|
+
onReportIssue,
|
|
3474
|
+
ThinkingIndicator) : ThinkingIndicator || ToolCallsComponent ? createAssistantMessageAdapter(ThinkingIndicator) : AssistantMessageAdapter,
|
|
3445
3475
|
[ThinkingIndicator, ToolCallsComponent, onReportIssue]
|
|
3446
3476
|
);
|
|
3447
|
-
return /* @__PURE__ */ jsxs(
|
|
3477
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "copilot-sidebar", children: [
|
|
3448
3478
|
/* @__PURE__ */ jsx(GlobalSidebarStyles2, {}),
|
|
3449
3479
|
/* @__PURE__ */ jsx(
|
|
3450
3480
|
CopilotSidebar,
|