@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
|
@@ -36,13 +36,11 @@ type ErrorCategory = 'Network' | 'Auth' | 'OAuth' | 'Workflow' | 'Unknown';
|
|
|
36
36
|
/**
|
|
37
37
|
* Callback for reporting issues from chat
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}): void;
|
|
45
|
-
}
|
|
39
|
+
type ReportIssueCallback = (context: {
|
|
40
|
+
errorCategory?: ErrorCategory;
|
|
41
|
+
correlationId?: string;
|
|
42
|
+
chatSnippet?: string;
|
|
43
|
+
}) => void;
|
|
46
44
|
declare const AssistantMessageAdapter: React__default.NamedExoticComponent<AssistantMessageProps$1>;
|
|
47
45
|
|
|
48
46
|
type ActionVariant = 'primary' | 'secondary' | 'icon';
|
|
@@ -36,13 +36,11 @@ type ErrorCategory = 'Network' | 'Auth' | 'OAuth' | 'Workflow' | 'Unknown';
|
|
|
36
36
|
/**
|
|
37
37
|
* Callback for reporting issues from chat
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}): void;
|
|
45
|
-
}
|
|
39
|
+
type ReportIssueCallback = (context: {
|
|
40
|
+
errorCategory?: ErrorCategory;
|
|
41
|
+
correlationId?: string;
|
|
42
|
+
chatSnippet?: string;
|
|
43
|
+
}) => void;
|
|
46
44
|
declare const AssistantMessageAdapter: React__default.NamedExoticComponent<AssistantMessageProps$1>;
|
|
47
45
|
|
|
48
46
|
type ActionVariant = 'primary' | 'secondary' | 'icon';
|
|
@@ -1499,10 +1499,7 @@ function stripToolCallMarkers(content) {
|
|
|
1499
1499
|
function extractToolCallNames(content) {
|
|
1500
1500
|
if (!content.includes("TOOL_CALL")) return [];
|
|
1501
1501
|
const names = /* @__PURE__ */ new Set();
|
|
1502
|
-
const patterns = [
|
|
1503
|
-
/<!--TOOL_CALL:([^:]+):/g,
|
|
1504
|
-
/__TOOL_CALL__:([^:]+):/g
|
|
1505
|
-
];
|
|
1502
|
+
const patterns = [/<!--TOOL_CALL:([^:]+):/g, /__TOOL_CALL__:([^:]+):/g];
|
|
1506
1503
|
for (const pattern of patterns) {
|
|
1507
1504
|
let match;
|
|
1508
1505
|
while ((match = pattern.exec(content)) !== null) {
|
|
@@ -1649,7 +1646,7 @@ var AssistantMessageAdapterBase = ({
|
|
|
1649
1646
|
return /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." });
|
|
1650
1647
|
}
|
|
1651
1648
|
const attachments = [];
|
|
1652
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1649
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1653
1650
|
generativeUIOutput && /* @__PURE__ */ jsxRuntime.jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
1654
1651
|
content && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1655
1652
|
AssistantMessage,
|
|
@@ -1710,7 +1707,7 @@ function createAssistantMessageAdapter(ThinkingIndicator, _ToolCallsComponent) {
|
|
|
1710
1707
|
ThinkingIndicator ? /* @__PURE__ */ jsxRuntime.jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." })
|
|
1711
1708
|
] });
|
|
1712
1709
|
}
|
|
1713
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1710
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1714
1711
|
toolCallIndicators,
|
|
1715
1712
|
generativeUIOutput && /* @__PURE__ */ jsxRuntime.jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
1716
1713
|
content && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1808,15 +1805,41 @@ function createAssistantMessageAdapterWithErrorReporting(onReportIssue, Thinking
|
|
|
1808
1805
|
if (showThinking) {
|
|
1809
1806
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1810
1807
|
toolCallNames.map((name) => /* @__PURE__ */ jsxRuntime.jsxs(ToolCallIndicator, { children: [
|
|
1811
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolCallIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1808
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolCallIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1809
|
+
"svg",
|
|
1810
|
+
{
|
|
1811
|
+
width: "14",
|
|
1812
|
+
height: "14",
|
|
1813
|
+
viewBox: "0 0 24 24",
|
|
1814
|
+
fill: "none",
|
|
1815
|
+
stroke: "currentColor",
|
|
1816
|
+
strokeWidth: "2",
|
|
1817
|
+
strokeLinecap: "round",
|
|
1818
|
+
strokeLinejoin: "round",
|
|
1819
|
+
children: /* @__PURE__ */ jsxRuntime.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" })
|
|
1820
|
+
}
|
|
1821
|
+
) }),
|
|
1812
1822
|
/* @__PURE__ */ jsxRuntime.jsx(ToolCallName, { children: formatToolName2(name) })
|
|
1813
1823
|
] }, name)),
|
|
1814
1824
|
ThinkingIndicator ? /* @__PURE__ */ jsxRuntime.jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." })
|
|
1815
1825
|
] });
|
|
1816
1826
|
}
|
|
1817
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1827
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "chat-message", "data-message-role": "assistant", children: [
|
|
1818
1828
|
toolCallNames.map((name) => /* @__PURE__ */ jsxRuntime.jsxs(ToolCallIndicator, { children: [
|
|
1819
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolCallIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1829
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolCallIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1830
|
+
"svg",
|
|
1831
|
+
{
|
|
1832
|
+
width: "14",
|
|
1833
|
+
height: "14",
|
|
1834
|
+
viewBox: "0 0 24 24",
|
|
1835
|
+
fill: "none",
|
|
1836
|
+
stroke: "currentColor",
|
|
1837
|
+
strokeWidth: "2",
|
|
1838
|
+
strokeLinecap: "round",
|
|
1839
|
+
strokeLinejoin: "round",
|
|
1840
|
+
children: /* @__PURE__ */ jsxRuntime.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" })
|
|
1841
|
+
}
|
|
1842
|
+
) }),
|
|
1820
1843
|
/* @__PURE__ */ jsxRuntime.jsx(ToolCallName, { children: formatToolName2(name) })
|
|
1821
1844
|
] }, name)),
|
|
1822
1845
|
generativeUIOutput && /* @__PURE__ */ jsxRuntime.jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
@@ -2046,6 +2069,7 @@ var ChatInput = ({
|
|
|
2046
2069
|
InputField,
|
|
2047
2070
|
{
|
|
2048
2071
|
ref: inputRef,
|
|
2072
|
+
"data-testid": "chat-input",
|
|
2049
2073
|
"aria-label": ariaLabel,
|
|
2050
2074
|
placeholder,
|
|
2051
2075
|
onKeyDown: handleKeyDown,
|
|
@@ -2098,31 +2122,41 @@ var SubmitButtonComponent = ({
|
|
|
2098
2122
|
},
|
|
2099
2123
|
ref
|
|
2100
2124
|
);
|
|
2101
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2102
|
-
|
|
2125
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2126
|
+
SubmitButton,
|
|
2103
2127
|
{
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
"
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2128
|
+
...buttonProps,
|
|
2129
|
+
ref,
|
|
2130
|
+
"data-testid": "chat-send-button",
|
|
2131
|
+
disabled: isDisabled,
|
|
2132
|
+
title: ariaLabel,
|
|
2133
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2134
|
+
"svg",
|
|
2135
|
+
{
|
|
2136
|
+
width: "20",
|
|
2137
|
+
height: "20",
|
|
2138
|
+
viewBox: "0 0 20 20",
|
|
2139
|
+
fill: "none",
|
|
2140
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2141
|
+
role: "img",
|
|
2142
|
+
"aria-hidden": "true",
|
|
2143
|
+
children: [
|
|
2144
|
+
/* @__PURE__ */ jsxRuntime.jsx("title", { children: "Arrow Right Icon" }),
|
|
2145
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2146
|
+
"path",
|
|
2147
|
+
{
|
|
2148
|
+
d: "M4 10H16M16 10L10 4M16 10L10 16",
|
|
2149
|
+
stroke: "currentColor",
|
|
2150
|
+
strokeWidth: "2",
|
|
2151
|
+
strokeLinecap: "round",
|
|
2152
|
+
strokeLinejoin: "round"
|
|
2153
|
+
}
|
|
2154
|
+
)
|
|
2155
|
+
]
|
|
2156
|
+
}
|
|
2157
|
+
)
|
|
2124
2158
|
}
|
|
2125
|
-
)
|
|
2159
|
+
);
|
|
2126
2160
|
};
|
|
2127
2161
|
ChatInput.displayName = "ChatInput";
|
|
2128
2162
|
var InputAdapter = ({
|
|
@@ -2324,15 +2358,12 @@ var UserMessageWrapper = styled9__default.default.div`
|
|
|
2324
2358
|
/* Performance optimization - isolate layout/paint */
|
|
2325
2359
|
contain: content;
|
|
2326
2360
|
`;
|
|
2327
|
-
var UserMessageAdapterBase = ({
|
|
2328
|
-
message,
|
|
2329
|
-
ImageRenderer
|
|
2330
|
-
}) => {
|
|
2361
|
+
var UserMessageAdapterBase = ({ message, ImageRenderer }) => {
|
|
2331
2362
|
if (message?.image) {
|
|
2332
2363
|
return /* @__PURE__ */ jsxRuntime.jsx(ImageRenderer, { image: message.image, content: message.content });
|
|
2333
2364
|
}
|
|
2334
2365
|
const content = message?.content || "";
|
|
2335
|
-
return /* @__PURE__ */ jsxRuntime.jsx(UserMessageWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(UserMessage, { children: content }) });
|
|
2366
|
+
return /* @__PURE__ */ jsxRuntime.jsx(UserMessageWrapper, { "data-testid": "chat-message", "data-message-role": "user", children: /* @__PURE__ */ jsxRuntime.jsx(UserMessage, { children: content }) });
|
|
2336
2367
|
};
|
|
2337
2368
|
var UserMessageAdapter = React.memo(UserMessageAdapterBase);
|
|
2338
2369
|
UserMessageAdapter.displayName = "UserMessageAdapter";
|
|
@@ -3439,19 +3470,18 @@ function CustomCopilotSidebar2({
|
|
|
3439
3470
|
ToolCallsComponent,
|
|
3440
3471
|
onReportIssue
|
|
3441
3472
|
}) {
|
|
3442
|
-
const HeaderAdapterWithClose = React.useMemo(
|
|
3443
|
-
() => createHeaderAdapter(onSetOpen),
|
|
3444
|
-
[onSetOpen]
|
|
3445
|
-
);
|
|
3473
|
+
const HeaderAdapterWithClose = React.useMemo(() => createHeaderAdapter(onSetOpen), [onSetOpen]);
|
|
3446
3474
|
const CustomButton = React.useMemo(
|
|
3447
3475
|
() => createButtonAdapter(disabled, disabledReason, onSetOpen),
|
|
3448
3476
|
[disabled, disabledReason, onSetOpen]
|
|
3449
3477
|
);
|
|
3450
3478
|
const AssistantMessageAdapterMemo = React.useMemo(
|
|
3451
|
-
() => onReportIssue ? createAssistantMessageAdapterWithErrorReporting(
|
|
3479
|
+
() => onReportIssue ? createAssistantMessageAdapterWithErrorReporting(
|
|
3480
|
+
onReportIssue,
|
|
3481
|
+
ThinkingIndicator) : ThinkingIndicator || ToolCallsComponent ? createAssistantMessageAdapter(ThinkingIndicator) : AssistantMessageAdapter,
|
|
3452
3482
|
[ThinkingIndicator, ToolCallsComponent, onReportIssue]
|
|
3453
3483
|
);
|
|
3454
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3484
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "copilot-sidebar", children: [
|
|
3455
3485
|
/* @__PURE__ */ jsxRuntime.jsx(GlobalSidebarStyles2, {}),
|
|
3456
3486
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3457
3487
|
reactUi.CopilotSidebar,
|