@agent-native/core 0.178.1 → 0.178.2-nightly-20260910195009
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/corpus/templates/analytics/app/components/layout/Sidebar.tsx +108 -121
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +87 -220
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +83 -221
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +324 -460
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +57 -247
- package/corpus/templates/clips/app/components/library/library-layout.tsx +15 -48
- package/corpus/templates/clips/changelog/2026-09-10-open-mcp-connections-in-new-tabs.md +1 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +84 -94
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
- package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +108 -296
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +55 -212
- package/corpus/templates/factory/app/components/layout/Sidebar.tsx +72 -260
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +143 -362
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +64 -159
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +152 -165
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +82 -207
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +61 -234
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +73 -225
- package/dist/automation/index.d.ts +1 -1
- package/dist/client/EnvironmentBadge.d.ts +7 -4
- package/dist/client/EnvironmentBadge.js +26 -18
- package/dist/client/FeedbackButton.js +23 -8
- package/dist/client/app-providers.js +1 -1
- package/dist/client/auth/AuthPage.js +0 -38
- package/dist/client/components/icons/AgentNativeIcon.js +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/ui/AppSidebar.d.ts +15 -0
- package/dist/client/ui/AppSidebar.js +34 -0
- package/dist/client/ui/index.d.ts +1 -0
- package/dist/client/ui/index.js +1 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.js +19 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
- package/dist/provider-api/actions/provider-api.d.ts +15 -15
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/beta-opt-out-html.js +2 -2
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +57 -247
- package/dist/vite/client.js +4 -1
- package/docs/content/template-clips-anonymous-intake.mdx +7 -5
- package/docs/content/template-clips-developers.mdx +1 -1
- package/package.json +3 -3
- package/src/templates/chat/app/components/layout/Sidebar.tsx +57 -247
|
@@ -7,10 +7,12 @@ import {
|
|
|
7
7
|
useActionQuery,
|
|
8
8
|
} from "@agent-native/core/client/hooks";
|
|
9
9
|
import { useT } from "@agent-native/core/client/i18n";
|
|
10
|
-
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
11
10
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import {
|
|
12
|
+
AppSidebarFooter,
|
|
13
|
+
AppSidebarHeader,
|
|
14
|
+
FeedbackButton,
|
|
15
|
+
} from "@agent-native/core/client/ui";
|
|
14
16
|
import type {
|
|
15
17
|
ContentDatabaseItem,
|
|
16
18
|
ContentDatabasePersonalViewOverrides,
|
|
@@ -25,7 +27,6 @@ import {
|
|
|
25
27
|
IconArrowsSort,
|
|
26
28
|
IconPlus,
|
|
27
29
|
IconRestore,
|
|
28
|
-
IconSearch,
|
|
29
30
|
IconSettings,
|
|
30
31
|
IconPin,
|
|
31
32
|
IconTrashX,
|
|
@@ -1884,14 +1885,14 @@ export function DocumentSidebar({
|
|
|
1884
1885
|
<Link
|
|
1885
1886
|
to="/settings"
|
|
1886
1887
|
className={cn(
|
|
1887
|
-
"flex
|
|
1888
|
+
"flex w-full items-center gap-2 rounded px-2 py-1.5 text-xs",
|
|
1888
1889
|
settingsActive
|
|
1889
|
-
? "bg-
|
|
1890
|
-
: "text-
|
|
1890
|
+
? "bg-primary/10 font-medium text-primary"
|
|
1891
|
+
: "text-primary hover:bg-accent/60",
|
|
1891
1892
|
)}
|
|
1892
1893
|
>
|
|
1893
|
-
<IconSettings
|
|
1894
|
-
<span className="min-w-0 flex-1 truncate text-start">
|
|
1894
|
+
<IconSettings className="size-4 shrink-0 text-primary" />
|
|
1895
|
+
<span className="min-w-0 flex-1 truncate text-start text-primary">
|
|
1895
1896
|
{t("navigation.settings")}
|
|
1896
1897
|
</span>
|
|
1897
1898
|
</Link>
|
|
@@ -1918,49 +1919,9 @@ export function DocumentSidebar({
|
|
|
1918
1919
|
</TooltipContent>
|
|
1919
1920
|
</Tooltip>
|
|
1920
1921
|
);
|
|
1921
|
-
const searchButton = (
|
|
1922
|
-
<Tooltip>
|
|
1923
|
-
<TooltipTrigger asChild>
|
|
1924
|
-
<button
|
|
1925
|
-
type="button"
|
|
1926
|
-
aria-label={t("sidebar.search")}
|
|
1927
|
-
className="flex size-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground"
|
|
1928
|
-
onClick={openCommandMenu}
|
|
1929
|
-
>
|
|
1930
|
-
<IconSearch size={16} />
|
|
1931
|
-
</button>
|
|
1932
|
-
</TooltipTrigger>
|
|
1933
|
-
<TooltipContent side="right">{t("sidebar.search")}</TooltipContent>
|
|
1934
|
-
</Tooltip>
|
|
1935
|
-
);
|
|
1936
1922
|
const feedbackButton = (
|
|
1937
|
-
<FeedbackButton
|
|
1938
|
-
variant={collapsed ? "icon" : "sidebar"}
|
|
1939
|
-
side="right"
|
|
1940
|
-
className={collapsed ? "size-8" : "h-8 min-w-0"}
|
|
1941
|
-
/>
|
|
1942
|
-
);
|
|
1943
|
-
const brandButton = (isCollapsed: boolean) => (
|
|
1944
|
-
<button
|
|
1945
|
-
type="button"
|
|
1946
|
-
onClick={onToggleCollapsed}
|
|
1947
|
-
aria-label={isCollapsed ? t("sidebar.expand") : t("sidebar.collapse")}
|
|
1948
|
-
className={cn(
|
|
1949
|
-
"flex items-center gap-2 rounded outline-none text-foreground transition-colors hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring",
|
|
1950
|
-
isCollapsed ? "size-8 justify-center" : "min-w-0 text-start",
|
|
1951
|
-
)}
|
|
1952
|
-
data-sidebar-brand-toggle
|
|
1953
|
-
>
|
|
1954
|
-
<AgentNativeIcon
|
|
1955
|
-
aria-hidden="true"
|
|
1956
|
-
className="h-3.5 w-6 shrink-0 text-foreground"
|
|
1957
|
-
/>
|
|
1958
|
-
{!isCollapsed && (
|
|
1959
|
-
<span className="text-base font-semibold tracking-tight">Content</span>
|
|
1960
|
-
)}
|
|
1961
|
-
</button>
|
|
1923
|
+
<FeedbackButton variant={collapsed ? "icon" : "sidebar"} side="right" />
|
|
1962
1924
|
);
|
|
1963
|
-
|
|
1964
1925
|
const toggleSection = (id: SidebarSectionId) => {
|
|
1965
1926
|
setStoredCollapsedSections((current) => {
|
|
1966
1927
|
const normalized = normalizeCollapsedSections(current);
|
|
@@ -2348,33 +2309,46 @@ export function DocumentSidebar({
|
|
|
2348
2309
|
|
|
2349
2310
|
if (collapsed) {
|
|
2350
2311
|
return (
|
|
2351
|
-
<div className="agent-layout-left-drawer flex h-full w-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2312
|
+
<div className="agent-layout-left-drawer flex h-full w-14 flex-col items-center border-e border-border bg-sidebar transition-[width] duration-200 ease-out">
|
|
2313
|
+
<AppSidebarHeader
|
|
2314
|
+
brandName="Content"
|
|
2315
|
+
brandHref="/home"
|
|
2355
2316
|
collapsed
|
|
2356
|
-
|
|
2357
|
-
search={searchButton}
|
|
2358
|
-
collapse={collapseButton}
|
|
2359
|
-
className="mt-auto"
|
|
2317
|
+
onBrandClick={onToggleCollapsed}
|
|
2360
2318
|
/>
|
|
2361
|
-
<
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2319
|
+
<div className="flex flex-col items-center gap-1 px-2 py-3">
|
|
2320
|
+
{renderCollapsedNewButton()}
|
|
2321
|
+
</div>
|
|
2322
|
+
<div className="mt-auto shrink-0 w-full">
|
|
2323
|
+
<AppSidebarFooter
|
|
2324
|
+
collapsed
|
|
2325
|
+
collapsible={false}
|
|
2326
|
+
feedback={feedbackButton}
|
|
2327
|
+
orgSwitcher={
|
|
2328
|
+
<OrgSwitcher
|
|
2329
|
+
compact
|
|
2330
|
+
reserveSpace
|
|
2331
|
+
className="!size-9 !p-0 [&>svg]:!size-4 !bg-transparent !text-primary hover:!bg-accent/60 hover:!text-primary"
|
|
2332
|
+
/>
|
|
2333
|
+
}
|
|
2334
|
+
footerExtras={
|
|
2335
|
+
<>
|
|
2336
|
+
{isCodeMode ? <DevDatabaseLink /> : null}
|
|
2337
|
+
<Tooltip>
|
|
2338
|
+
<TooltipTrigger asChild>
|
|
2339
|
+
<Link to="/settings" aria-label={t("navigation.settings")}>
|
|
2340
|
+
<IconSettings className="size-4" />
|
|
2341
|
+
</Link>
|
|
2342
|
+
</TooltipTrigger>
|
|
2343
|
+
<TooltipContent side="right">
|
|
2344
|
+
{t("navigation.settings")}
|
|
2345
|
+
</TooltipContent>
|
|
2346
|
+
</Tooltip>
|
|
2347
|
+
{collapseButton}
|
|
2348
|
+
</>
|
|
2349
|
+
}
|
|
2350
|
+
/>
|
|
2351
|
+
</div>
|
|
2378
2352
|
</div>
|
|
2379
2353
|
);
|
|
2380
2354
|
}
|
|
@@ -2389,9 +2363,12 @@ export function DocumentSidebar({
|
|
|
2389
2363
|
style={width === undefined ? undefined : { width, flexShrink: 0 }}
|
|
2390
2364
|
>
|
|
2391
2365
|
{/* Header */}
|
|
2392
|
-
<
|
|
2393
|
-
|
|
2394
|
-
|
|
2366
|
+
<AppSidebarHeader
|
|
2367
|
+
brandName="Content"
|
|
2368
|
+
brandHref="/home"
|
|
2369
|
+
collapsed={false}
|
|
2370
|
+
onBrandClick={onToggleCollapsed}
|
|
2371
|
+
/>
|
|
2395
2372
|
|
|
2396
2373
|
<ScrollArea className="min-h-0 flex-1 [&_[data-radix-scroll-area-viewport]]:!overflow-x-hidden">
|
|
2397
2374
|
<div className="w-full min-w-0 py-2 pe-2">
|
|
@@ -2509,8 +2486,8 @@ export function DocumentSidebar({
|
|
|
2509
2486
|
</div>
|
|
2510
2487
|
</ScrollArea>
|
|
2511
2488
|
|
|
2512
|
-
<div className="shrink-0 px-
|
|
2513
|
-
<div className="space-y-
|
|
2489
|
+
<div className="shrink-0 border-t border-border/70 px-2 pt-3">
|
|
2490
|
+
<div className="space-y-0.5">{renderSettingsNavButton()}</div>
|
|
2514
2491
|
</div>
|
|
2515
2492
|
|
|
2516
2493
|
<div className="shrink-0">
|
|
@@ -2527,20 +2504,33 @@ export function DocumentSidebar({
|
|
|
2527
2504
|
/>
|
|
2528
2505
|
</div>
|
|
2529
2506
|
|
|
2530
|
-
<
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2507
|
+
<AppSidebarFooter
|
|
2508
|
+
collapsed={false}
|
|
2509
|
+
collapsible={false}
|
|
2510
|
+
feedback={feedbackButton}
|
|
2511
|
+
orgSwitcher={
|
|
2512
|
+
<OrgSwitcher
|
|
2513
|
+
reserveSpace
|
|
2514
|
+
className="min-w-0 flex-1 !bg-transparent !text-primary hover:!bg-accent/60 hover:!text-primary"
|
|
2515
|
+
/>
|
|
2516
|
+
}
|
|
2517
|
+
footerExtras={
|
|
2518
|
+
<>
|
|
2519
|
+
{isCodeMode ? <DevDatabaseLink /> : null}
|
|
2520
|
+
<Tooltip>
|
|
2521
|
+
<TooltipTrigger asChild>
|
|
2522
|
+
<Link to="/settings" aria-label={t("navigation.settings")}>
|
|
2523
|
+
<IconSettings className="size-4" />
|
|
2524
|
+
</Link>
|
|
2525
|
+
</TooltipTrigger>
|
|
2526
|
+
<TooltipContent side="right">
|
|
2527
|
+
{t("navigation.settings")}
|
|
2528
|
+
</TooltipContent>
|
|
2529
|
+
</Tooltip>
|
|
2530
|
+
{collapseButton}
|
|
2531
|
+
</>
|
|
2532
|
+
}
|
|
2533
|
+
/>
|
|
2544
2534
|
|
|
2545
2535
|
{/* Resize handle */}
|
|
2546
2536
|
{onResize && width !== undefined && (
|
|
@@ -113,7 +113,7 @@ export function CrmLayout({ children }: { children: React.ReactNode }) {
|
|
|
113
113
|
<CrmSidebar />
|
|
114
114
|
</div>
|
|
115
115
|
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
|
|
116
|
-
<SheetContent side="left" className="w-
|
|
116
|
+
<SheetContent side="left" className="w-[260px] p-0">
|
|
117
117
|
<SheetTitle className="sr-only">
|
|
118
118
|
{t("navigation.navigation")}
|
|
119
119
|
</SheetTitle>
|