@docyrus/ui-pro-ai-assistant 0.5.7 → 0.5.8
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/components/input-area.d.ts +1 -0
- package/dist/index.js +50 -58
- package/dist/index.js.map +1 -1
- package/dist/views/chat-panel.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5522,7 +5522,8 @@ var AIInputArea = ({
|
|
|
5522
5522
|
hideFooter = false,
|
|
5523
5523
|
tenantAiProjectId,
|
|
5524
5524
|
initialModelId,
|
|
5525
|
-
initialFeatures
|
|
5525
|
+
initialFeatures,
|
|
5526
|
+
onManageMemories
|
|
5526
5527
|
}) => {
|
|
5527
5528
|
const { t } = useAssistantTranslation();
|
|
5528
5529
|
const apiClient = useApiClient();
|
|
@@ -6237,20 +6238,38 @@ var AIInputArea = ({
|
|
|
6237
6238
|
),
|
|
6238
6239
|
!hideFooter && /* @__PURE__ */ jsxs("div", { className: "relative mt-2 flex items-center px-1", children: [
|
|
6239
6240
|
footerText && /* @__PURE__ */ jsx("span", { className: "flex-1 text-center text-xs text-muted-foreground", children: footerText }),
|
|
6240
|
-
/* @__PURE__ */ jsxs(
|
|
6241
|
-
/* @__PURE__ */
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
}
|
|
6252
|
-
|
|
6253
|
-
|
|
6241
|
+
/* @__PURE__ */ jsxs(DropdownMenu$1, { children: [
|
|
6242
|
+
/* @__PURE__ */ jsxs(Tooltip$2, { children: [
|
|
6243
|
+
/* @__PURE__ */ jsx(TooltipTrigger$1, { asChild: true, children: /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
6244
|
+
Button,
|
|
6245
|
+
{
|
|
6246
|
+
type: "button",
|
|
6247
|
+
variant: "ghost",
|
|
6248
|
+
size: "icon",
|
|
6249
|
+
className: "absolute right-0 h-6 w-6 text-muted-foreground",
|
|
6250
|
+
children: /* @__PURE__ */ jsx(BrainCircuit, { className: "h-3.5 w-3.5" })
|
|
6251
|
+
}
|
|
6252
|
+
) }) }),
|
|
6253
|
+
/* @__PURE__ */ jsx(TooltipContent$1, { side: "top", children: t("tools.extract_memories") })
|
|
6254
|
+
] }),
|
|
6255
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", side: "top", className: "w-60", children: [
|
|
6256
|
+
/* @__PURE__ */ jsx(
|
|
6257
|
+
DropdownMenuItem,
|
|
6258
|
+
{
|
|
6259
|
+
disabled: !threadId || !hasMessages,
|
|
6260
|
+
onClick: handleExtractMemories,
|
|
6261
|
+
children: "Extract Memories from Session"
|
|
6262
|
+
}
|
|
6263
|
+
),
|
|
6264
|
+
/* @__PURE__ */ jsx(
|
|
6265
|
+
DropdownMenuItem,
|
|
6266
|
+
{
|
|
6267
|
+
disabled: !onManageMemories,
|
|
6268
|
+
onClick: () => onManageMemories?.(),
|
|
6269
|
+
children: "Manage Memories"
|
|
6270
|
+
}
|
|
6271
|
+
)
|
|
6272
|
+
] })
|
|
6254
6273
|
] })
|
|
6255
6274
|
] }),
|
|
6256
6275
|
/* @__PURE__ */ jsx(
|
|
@@ -14875,7 +14894,8 @@ function ChatPanel({
|
|
|
14875
14894
|
threadId,
|
|
14876
14895
|
initialModelId,
|
|
14877
14896
|
initialFeatures,
|
|
14878
|
-
subagents
|
|
14897
|
+
subagents,
|
|
14898
|
+
onManageMemories
|
|
14879
14899
|
}) {
|
|
14880
14900
|
const renderInputArea = (hideFooter = false) => /* @__PURE__ */ jsx(
|
|
14881
14901
|
AIInputArea,
|
|
@@ -14907,7 +14927,8 @@ function ChatPanel({
|
|
|
14907
14927
|
hasMessages: messages.length > 0,
|
|
14908
14928
|
hideFooter,
|
|
14909
14929
|
initialModelId,
|
|
14910
|
-
initialFeatures
|
|
14930
|
+
initialFeatures,
|
|
14931
|
+
onManageMemories
|
|
14911
14932
|
}
|
|
14912
14933
|
);
|
|
14913
14934
|
const isWelcome = showWelcome && messages.length === 0;
|
|
@@ -30332,21 +30353,7 @@ var AssistantView = ({ ref, ...props }) => {
|
|
|
30332
30353
|
children: /* @__PURE__ */ jsx(PanelLeft, { className: "w-4 h-4" })
|
|
30333
30354
|
}
|
|
30334
30355
|
),
|
|
30335
|
-
|
|
30336
|
-
Button,
|
|
30337
|
-
{
|
|
30338
|
-
variant: "ghost",
|
|
30339
|
-
size: "icon",
|
|
30340
|
-
onClick: () => onTabChange(activeTab === 4 ? 0 : 4),
|
|
30341
|
-
className: cn(
|
|
30342
|
-
"h-8 w-8 text-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
30343
|
-
activeTab === 4 && "bg-background text-foreground shadow"
|
|
30344
|
-
),
|
|
30345
|
-
title: t("tabs.memories"),
|
|
30346
|
-
children: /* @__PURE__ */ jsx(Brain, { className: "w-4 h-4" })
|
|
30347
|
-
}
|
|
30348
|
-
),
|
|
30349
|
-
isFullscreen && onNewChat && /* @__PURE__ */ jsx(
|
|
30356
|
+
onNewChat && /* @__PURE__ */ jsx(
|
|
30350
30357
|
Button,
|
|
30351
30358
|
{
|
|
30352
30359
|
variant: "ghost",
|
|
@@ -30397,32 +30404,16 @@ var AssistantView = ({ ref, ...props }) => {
|
|
|
30397
30404
|
isSidebarOpen ? "w-72" : "w-0"
|
|
30398
30405
|
),
|
|
30399
30406
|
children: /* @__PURE__ */ jsxs("div", { className: "w-72 h-full flex flex-col relative", children: [
|
|
30400
|
-
isSidebarOpen && /* @__PURE__ */
|
|
30401
|
-
|
|
30402
|
-
|
|
30403
|
-
|
|
30404
|
-
|
|
30405
|
-
|
|
30406
|
-
|
|
30407
|
-
|
|
30408
|
-
|
|
30409
|
-
|
|
30410
|
-
),
|
|
30411
|
-
onTabChange && /* @__PURE__ */ jsx(
|
|
30412
|
-
Button,
|
|
30413
|
-
{
|
|
30414
|
-
variant: "ghost",
|
|
30415
|
-
size: "icon",
|
|
30416
|
-
onClick: () => onTabChange(activeTab === 4 ? 0 : 4),
|
|
30417
|
-
className: cn(
|
|
30418
|
-
"h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
30419
|
-
activeTab === 4 && "bg-accent text-accent-foreground"
|
|
30420
|
-
),
|
|
30421
|
-
title: t("tabs.memories"),
|
|
30422
|
-
children: /* @__PURE__ */ jsx(Brain, { className: "w-4 h-4" })
|
|
30423
|
-
}
|
|
30424
|
-
)
|
|
30425
|
-
] }),
|
|
30407
|
+
isSidebarOpen && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2 z-10 flex flex-col gap-1", children: onToggleSidebar && /* @__PURE__ */ jsx(
|
|
30408
|
+
Button,
|
|
30409
|
+
{
|
|
30410
|
+
variant: "ghost",
|
|
30411
|
+
size: "icon",
|
|
30412
|
+
onClick: onToggleSidebar,
|
|
30413
|
+
className: "h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
30414
|
+
children: /* @__PURE__ */ jsx(PanelLeft, { className: "w-4 h-4" })
|
|
30415
|
+
}
|
|
30416
|
+
) }),
|
|
30426
30417
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-4 flex flex-col min-h-0 overflow-hidden", children: [
|
|
30427
30418
|
!showHeader && agentSelectorElement && /* @__PURE__ */ jsx("div", { className: "mb-3 shrink-0", children: agentSelectorElement }),
|
|
30428
30419
|
renderSidebar(false)
|
|
@@ -30539,6 +30530,7 @@ var AssistantView = ({ ref, ...props }) => {
|
|
|
30539
30530
|
initialModelId: commonProps.initialModelId,
|
|
30540
30531
|
initialFeatures: commonProps.initialFeatures,
|
|
30541
30532
|
subagents: commonProps.subagents,
|
|
30533
|
+
onManageMemories: onTabChange ? () => onTabChange(4) : void 0,
|
|
30542
30534
|
compactToolbar: !isFullscreen
|
|
30543
30535
|
}
|
|
30544
30536
|
)
|