mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
Merge pull request #1443 from CREDO23/feature-automations
[Feat] Automation V1 — Scheduled Agent Tasks, Created via Chat (HITL) or JSON
This commit is contained in:
commit
4dda02c06c
219 changed files with 13821 additions and 55 deletions
|
|
@ -140,16 +140,26 @@ export function Sidebar({
|
|||
const t = useTranslations("sidebar");
|
||||
const [openDropdownChatId, setOpenDropdownChatId] = useState<number | null>(null);
|
||||
|
||||
// Inbox and Documents are rendered explicitly right below New Chat. Pull
|
||||
// them out of the nav items list so they don't also appear in the bottom
|
||||
// NavSection. Documents is only present in navItems on mobile.
|
||||
// Inbox, Automations, and Documents are rendered explicitly right below
|
||||
// New Chat. Pull them out of the nav items list so they don't also appear
|
||||
// in the bottom NavSection. Documents is only present in navItems on
|
||||
// mobile; Automations is identified by URL suffix so the same code path
|
||||
// works across search spaces.
|
||||
const inboxItem = useMemo(() => navItems.find((item) => item.url === "#inbox"), [navItems]);
|
||||
const automationsItem = useMemo(
|
||||
() => navItems.find((item) => item.url.endsWith("/automations")),
|
||||
[navItems]
|
||||
);
|
||||
const documentsItem = useMemo(
|
||||
() => navItems.find((item) => item.url === "#documents"),
|
||||
[navItems]
|
||||
);
|
||||
const footerNavItems = useMemo(
|
||||
() => navItems.filter((item) => item.url !== "#inbox" && item.url !== "#documents"),
|
||||
() =>
|
||||
navItems.filter(
|
||||
(item) =>
|
||||
item.url !== "#inbox" && item.url !== "#documents" && !item.url.endsWith("/automations")
|
||||
),
|
||||
[navItems]
|
||||
);
|
||||
|
||||
|
|
@ -227,6 +237,16 @@ export function Sidebar({
|
|||
}
|
||||
/>
|
||||
)}
|
||||
{automationsItem && (
|
||||
<SidebarButton
|
||||
icon={automationsItem.icon}
|
||||
label={automationsItem.title}
|
||||
onClick={() => onNavItemClick?.(automationsItem)}
|
||||
isCollapsed={isCollapsed}
|
||||
isActive={automationsItem.isActive}
|
||||
tooltipContent={isCollapsed ? automationsItem.title : undefined}
|
||||
/>
|
||||
)}
|
||||
{documentsItem && (
|
||||
<SidebarButton
|
||||
icon={documentsItem.icon}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue