@agentiffai/design 0.1.12 → 0.1.13
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/copilotkit/index.cjs +32 -12
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +23 -2
- package/dist/copilotkit/index.d.ts +23 -2
- package/dist/copilotkit/index.js +32 -12
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +44 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1213,6 +1213,10 @@ var AssistantMessageBase = ({
|
|
|
1213
1213
|
};
|
|
1214
1214
|
var AssistantMessage = react.memo(AssistantMessageBase);
|
|
1215
1215
|
AssistantMessage.displayName = "AssistantMessage";
|
|
1216
|
+
var GenerativeUIContainer = styled4__default.default.div`
|
|
1217
|
+
margin-top: ${tokens.spacing.sm};
|
|
1218
|
+
margin-bottom: ${tokens.spacing.sm};
|
|
1219
|
+
`;
|
|
1216
1220
|
var AssistantMessageAdapterBase = ({
|
|
1217
1221
|
message,
|
|
1218
1222
|
isLoading,
|
|
@@ -1230,18 +1234,30 @@ var AssistantMessageAdapterBase = ({
|
|
|
1230
1234
|
return /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." });
|
|
1231
1235
|
}
|
|
1232
1236
|
const content = message?.content || "";
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
{
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
isStreaming: isGenerating,
|
|
1241
|
-
attachments,
|
|
1242
|
-
enableMarkdown: true
|
|
1237
|
+
let generativeUIOutput = null;
|
|
1238
|
+
const msgWithUI = message;
|
|
1239
|
+
if (msgWithUI && typeof msgWithUI.generativeUI === "function") {
|
|
1240
|
+
try {
|
|
1241
|
+
generativeUIOutput = msgWithUI.generativeUI();
|
|
1242
|
+
} catch (e) {
|
|
1243
|
+
console.warn("[AssistantMessageAdapter] Error rendering generativeUI:", e);
|
|
1243
1244
|
}
|
|
1244
|
-
|
|
1245
|
+
}
|
|
1246
|
+
const attachments = [];
|
|
1247
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1248
|
+
generativeUIOutput && /* @__PURE__ */ jsxRuntime.jsx(GenerativeUIContainer, { children: generativeUIOutput }),
|
|
1249
|
+
content && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1250
|
+
AssistantMessage,
|
|
1251
|
+
{
|
|
1252
|
+
content,
|
|
1253
|
+
avatarInitials: "AI",
|
|
1254
|
+
isLoading: false,
|
|
1255
|
+
isStreaming: isGenerating,
|
|
1256
|
+
attachments,
|
|
1257
|
+
enableMarkdown: true
|
|
1258
|
+
}
|
|
1259
|
+
)
|
|
1260
|
+
] });
|
|
1245
1261
|
};
|
|
1246
1262
|
var AssistantMessageAdapter = react.memo(AssistantMessageAdapterBase);
|
|
1247
1263
|
AssistantMessageAdapter.displayName = "AssistantMessageAdapter";
|
|
@@ -2689,7 +2705,9 @@ function CustomCopilotSidebar2({
|
|
|
2689
2705
|
instructions,
|
|
2690
2706
|
className,
|
|
2691
2707
|
disabled = false,
|
|
2692
|
-
disabledReason = "Start a free trial to enable AI chat"
|
|
2708
|
+
disabledReason = "Start a free trial to enable AI chat",
|
|
2709
|
+
onError,
|
|
2710
|
+
renderError
|
|
2693
2711
|
}) {
|
|
2694
2712
|
const HeaderAdapterWithClose = (_props) => {
|
|
2695
2713
|
const { setOpen } = reactUi.useChatContext();
|
|
@@ -2759,6 +2777,8 @@ function CustomCopilotSidebar2({
|
|
|
2759
2777
|
clickOutsideToClose: true,
|
|
2760
2778
|
hitEscapeToClose: true,
|
|
2761
2779
|
onSetOpen,
|
|
2780
|
+
onError,
|
|
2781
|
+
renderError,
|
|
2762
2782
|
className,
|
|
2763
2783
|
children
|
|
2764
2784
|
}
|