@docyrus/ui-pro-ai-assistant 0.4.9 → 0.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.
- package/dist/index.js +17 -9
- package/dist/index.js.map +1 -1
- package/dist/styles.css +50 -45
- package/dist/views/projects-panel.d.ts +1 -0
- package/dist/views/sidebar-content.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -30659,7 +30659,7 @@ var AssistantProjectDetailView = ({
|
|
|
30659
30659
|
showToolbar: true
|
|
30660
30660
|
}
|
|
30661
30661
|
) }),
|
|
30662
|
-
/* @__PURE__ */ jsx("div", { className: "mt-
|
|
30662
|
+
/* @__PURE__ */ jsx("div", { className: "mt-8", children: /* @__PURE__ */ jsxs(Tabs$1, { value: activeTab, onValueChange: setActiveTab, className: "w-full", children: [
|
|
30663
30663
|
/* @__PURE__ */ jsxs(TabsList$1, { className: "grid w-full grid-cols-3", children: [
|
|
30664
30664
|
/* @__PURE__ */ jsx(TabsTrigger$1, { value: "sessions", children: t("tabs.sessions") }),
|
|
30665
30665
|
/* @__PURE__ */ jsx(TabsTrigger$1, { value: "works", children: t("tabs.works") }),
|
|
@@ -30794,6 +30794,7 @@ var AssistantProjectsPanel = ({
|
|
|
30794
30794
|
onEditProject,
|
|
30795
30795
|
onDeleteProject,
|
|
30796
30796
|
compact = false,
|
|
30797
|
+
sidebarOffset = false,
|
|
30797
30798
|
t
|
|
30798
30799
|
}) => {
|
|
30799
30800
|
const filtered = projects.filter((p) => {
|
|
@@ -30801,10 +30802,10 @@ var AssistantProjectsPanel = ({
|
|
|
30801
30802
|
const q = searchQuery.toLowerCase();
|
|
30802
30803
|
return p.name.toLowerCase().includes(q) || p.description && p.description.toLowerCase().includes(q);
|
|
30803
30804
|
});
|
|
30804
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
30805
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
30805
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-y-auto p-6", children: [
|
|
30806
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between mb-6", sidebarOffset && "ml-6"), children: [
|
|
30806
30807
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
30807
|
-
/* @__PURE__ */ jsx("h1", { className:
|
|
30808
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold ps-2 truncate", children: t("sections.projects") }),
|
|
30808
30809
|
!compact && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground ps-2", children: t("descriptions.manage_projects") })
|
|
30809
30810
|
] }),
|
|
30810
30811
|
/* @__PURE__ */ jsxs(Button, { size: "sm", onClick: onNewProject, className: "shrink-0", children: [
|
|
@@ -30812,7 +30813,7 @@ var AssistantProjectsPanel = ({
|
|
|
30812
30813
|
!compact && t("buttons.new_project")
|
|
30813
30814
|
] })
|
|
30814
30815
|
] }),
|
|
30815
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
30816
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-4 mb-6", children: /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
|
|
30816
30817
|
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground w-4 h-4" }),
|
|
30817
30818
|
/* @__PURE__ */ jsx(
|
|
30818
30819
|
Input,
|
|
@@ -31039,11 +31040,13 @@ var SidebarContent = ({
|
|
|
31039
31040
|
onShowMoreProjects,
|
|
31040
31041
|
onNewProject,
|
|
31041
31042
|
onToggleSidebar,
|
|
31043
|
+
supportWorkCanvas = true,
|
|
31042
31044
|
t
|
|
31043
31045
|
}) => {
|
|
31044
|
-
const [
|
|
31046
|
+
const [storedListType, setActiveListType] = useState("sessions");
|
|
31047
|
+
const activeListType = !supportWorkCanvas && storedListType === "works" ? "sessions" : storedListType;
|
|
31045
31048
|
const [openMenuId, setOpenMenuId] = useState(null);
|
|
31046
|
-
const navItems = [{ id: 1, label: t("tabs.sessions"), icon: MessageSquare }, { id: 3, label: t("tabs.works"), icon: NotebookText }];
|
|
31049
|
+
const navItems = [{ id: 1, label: t("tabs.sessions"), icon: MessageSquare }, ...supportWorkCanvas ? [{ id: 3, label: t("tabs.works"), icon: NotebookText }] : []];
|
|
31047
31050
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
31048
31051
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-px", children: [
|
|
31049
31052
|
/* @__PURE__ */ jsx(
|
|
@@ -31115,7 +31118,7 @@ var SidebarContent = ({
|
|
|
31115
31118
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col mt-4 flex-1 min-h-0", children: [
|
|
31116
31119
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-start px-2 py-1.5 shrink-0", children: [
|
|
31117
31120
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase tracking-tight text-muted-foreground", children: t("sections.recents") }),
|
|
31118
|
-
/* @__PURE__ */ jsxs(DropdownMenu$1, { children: [
|
|
31121
|
+
supportWorkCanvas ? /* @__PURE__ */ jsxs(DropdownMenu$1, { children: [
|
|
31119
31122
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
31120
31123
|
Button,
|
|
31121
31124
|
{
|
|
@@ -31158,7 +31161,7 @@ var SidebarContent = ({
|
|
|
31158
31161
|
}
|
|
31159
31162
|
)
|
|
31160
31163
|
] })
|
|
31161
|
-
] })
|
|
31164
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "ml-1 px-1 py-0 text-xs font-semibold uppercase tracking-tight text-muted-foreground", children: `${t("tabs.sessions")} (${sessions.length})` })
|
|
31162
31165
|
] }),
|
|
31163
31166
|
/* @__PURE__ */ jsx(
|
|
31164
31167
|
"div",
|
|
@@ -31507,6 +31510,9 @@ var DocyAssistant = ({
|
|
|
31507
31510
|
};
|
|
31508
31511
|
const [activeAgentId, setActiveAgentId] = useState(resolveInitialAgentId);
|
|
31509
31512
|
const [deploymentId, setDeploymentId] = useState(resolveInitialDeploymentId);
|
|
31513
|
+
const isBaseAgent = !deploymentId && !!tenantAiAgentId;
|
|
31514
|
+
const { capabilities: agentCapabilities } = useDeploymentData(deploymentId || activeAgentId, supportMultiModels, isBaseAgent);
|
|
31515
|
+
const effectiveSupportWorkCanvas = agentCapabilities ? agentCapabilities.supportWorkCanvas : supportWorkCanvas;
|
|
31510
31516
|
const title = titleProp || "DocyAssistant";
|
|
31511
31517
|
const description = descriptionProp || t("descriptions.default");
|
|
31512
31518
|
const placeholder = placeholderProp || t("placeholders.type_message");
|
|
@@ -32025,6 +32031,7 @@ var DocyAssistant = ({
|
|
|
32025
32031
|
projectActions.setView("create");
|
|
32026
32032
|
},
|
|
32027
32033
|
onToggleSidebar: isFloating && !uiState.isExpanded ? () => uiActions.setSidebarOpen(false) : void 0,
|
|
32034
|
+
supportWorkCanvas: effectiveSupportWorkCanvas,
|
|
32028
32035
|
t
|
|
32029
32036
|
}
|
|
32030
32037
|
);
|
|
@@ -32312,6 +32319,7 @@ var DocyAssistant = ({
|
|
|
32312
32319
|
projectActions.setDeleteDialogOpen(true);
|
|
32313
32320
|
},
|
|
32314
32321
|
compact: enableNavDropdown,
|
|
32322
|
+
sidebarOffset: !uiState.isSidebarOpen && enableSidebar,
|
|
32315
32323
|
t
|
|
32316
32324
|
}
|
|
32317
32325
|
),
|