@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.
Files changed (48) hide show
  1. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +108 -121
  2. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +87 -220
  3. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +83 -221
  4. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +324 -460
  5. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +57 -247
  6. package/corpus/templates/clips/app/components/library/library-layout.tsx +15 -48
  7. package/corpus/templates/clips/changelog/2026-09-10-open-mcp-connections-in-new-tabs.md +1 -0
  8. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +84 -94
  9. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
  10. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +108 -296
  11. package/corpus/templates/design/app/components/layout/Sidebar.tsx +55 -212
  12. package/corpus/templates/factory/app/components/layout/Sidebar.tsx +72 -260
  13. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +143 -362
  14. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +64 -159
  15. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +152 -165
  16. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +82 -207
  17. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +61 -234
  18. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +73 -225
  19. package/dist/automation/index.d.ts +1 -1
  20. package/dist/client/EnvironmentBadge.d.ts +7 -4
  21. package/dist/client/EnvironmentBadge.js +26 -18
  22. package/dist/client/FeedbackButton.js +23 -8
  23. package/dist/client/app-providers.js +1 -1
  24. package/dist/client/auth/AuthPage.js +0 -38
  25. package/dist/client/components/icons/AgentNativeIcon.js +1 -1
  26. package/dist/client/index.d.ts +1 -0
  27. package/dist/client/index.js +1 -0
  28. package/dist/client/ui/AppSidebar.d.ts +15 -0
  29. package/dist/client/ui/AppSidebar.js +34 -0
  30. package/dist/client/ui/index.d.ts +1 -0
  31. package/dist/client/ui/index.js +1 -0
  32. package/dist/collab/awareness.d.ts +2 -2
  33. package/dist/collab/struct-routes.d.ts +1 -1
  34. package/dist/config.d.ts +4 -0
  35. package/dist/config.js +19 -3
  36. package/dist/progress/routes.d.ts +1 -1
  37. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  38. package/dist/provider-api/actions/provider-api.d.ts +15 -15
  39. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  40. package/dist/resources/handlers.d.ts +1 -1
  41. package/dist/secrets/routes.d.ts +9 -9
  42. package/dist/server/beta-opt-out-html.js +2 -2
  43. package/dist/templates/chat/app/components/layout/Sidebar.tsx +57 -247
  44. package/dist/vite/client.js +4 -1
  45. package/docs/content/template-clips-anonymous-intake.mdx +7 -5
  46. package/docs/content/template-clips-developers.mdx +1 -1
  47. package/package.json +3 -3
  48. package/src/templates/chat/app/components/layout/Sidebar.tsx +57 -247
@@ -1,4 +1,7 @@
1
- import { AgentNativeIcon } from "@agent-native/core/client/ui";
1
+ import {
2
+ AppSidebarFooter,
3
+ AppSidebarHeader,
4
+ } from "@agent-native/core/client/ui";
2
5
  import {
3
6
  IconChartBar,
4
7
  IconChevronDown,
@@ -12,7 +15,6 @@ import {
12
15
  IconGripVertical,
13
16
  IconBook2,
14
17
  IconDatabase,
15
- IconSearch,
16
18
  IconArchive,
17
19
  IconActivity,
18
20
  IconHeartbeat,
@@ -52,7 +54,7 @@ import {
52
54
  type DashboardVisibility,
53
55
  type DashboardVisibilityFilter,
54
56
  } from "@/lib/dashboard-visibility";
55
- import { cn, shortcutModifierLabel } from "@/lib/utils";
57
+ import { cn } from "@/lib/utils";
56
58
  import {
57
59
  dashboards,
58
60
  hideDashboard,
@@ -99,10 +101,8 @@ import {
99
101
  useChangeVersions,
100
102
  } from "@agent-native/core/client/hooks";
101
103
  import { useT } from "@agent-native/core/client/i18n";
102
- import { openCommandMenu } from "@agent-native/core/client/navigation";
103
104
  import { OrgSwitcher } from "@agent-native/core/client/org";
104
105
  import { FeedbackButton } from "@agent-native/core/client/ui";
105
- import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
106
106
  import {
107
107
  ChatHistoryRail,
108
108
  type ChatHistoryItem,
@@ -137,7 +137,6 @@ import {
137
137
  Tooltip,
138
138
  TooltipTrigger,
139
139
  TooltipContent,
140
- TooltipProvider,
141
140
  } from "@/components/ui/tooltip";
142
141
  import {
143
142
  useDashboardViews,
@@ -2247,25 +2246,6 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2247
2246
  },
2248
2247
  ];
2249
2248
 
2250
- const footerSearch = (
2251
- <Tooltip>
2252
- <TooltipTrigger asChild>
2253
- <button
2254
- type="button"
2255
- onClick={openCommandMenu}
2256
- aria-label={t("sidebar.search")}
2257
- className="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-sidebar-accent/50 hover:text-foreground"
2258
- >
2259
- <IconSearch className="h-4 w-4" />
2260
- </button>
2261
- </TooltipTrigger>
2262
- <TooltipContent side="top">
2263
- {t("sidebar.searchShortcut", {
2264
- shortcut: `${shortcutModifierLabel()} K`,
2265
- })}
2266
- </TooltipContent>
2267
- </Tooltip>
2268
- );
2269
2249
  const footerCollapse = !mobile ? (
2270
2250
  <Tooltip>
2271
2251
  <TooltipTrigger asChild>
@@ -2277,16 +2257,16 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2277
2257
  ? t("sidebar.expandSidebar")
2278
2258
  : t("sidebar.collapseSidebar")
2279
2259
  }
2280
- className="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-sidebar-accent/50 hover:text-foreground"
2260
+ className="flex size-9 shrink-0 items-center justify-center rounded-md bg-transparent text-primary hover:bg-accent/60 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
2281
2261
  >
2282
2262
  {effectiveCollapsed ? (
2283
- <IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
2263
+ <IconLayoutSidebarLeftExpand className="size-4 rtl:-scale-x-100" />
2284
2264
  ) : (
2285
- <IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
2265
+ <IconLayoutSidebarLeftCollapse className="size-4 rtl:-scale-x-100" />
2286
2266
  )}
2287
2267
  </button>
2288
2268
  </TooltipTrigger>
2289
- <TooltipContent side="top">
2269
+ <TooltipContent side="right">
2290
2270
  {effectiveCollapsed
2291
2271
  ? t("sidebar.expandSidebar")
2292
2272
  : t("sidebar.collapseSidebar")}
@@ -2297,7 +2277,6 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2297
2277
  <FeedbackButton
2298
2278
  variant={effectiveCollapsed ? "icon" : "sidebar"}
2299
2279
  side="right"
2300
- className={effectiveCollapsed ? "h-8 w-8" : "min-w-0"}
2301
2280
  />
2302
2281
  );
2303
2282
 
@@ -2305,7 +2284,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2305
2284
  <div
2306
2285
  className="relative flex h-full min-w-0 flex-col overflow-hidden border-r border-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-out"
2307
2286
  style={
2308
- mobile ? undefined : { width: effectiveCollapsed ? 48 : sidebarWidth }
2287
+ mobile ? undefined : { width: effectiveCollapsed ? 56 : sidebarWidth }
2309
2288
  }
2310
2289
  >
2311
2290
  {!mobile && !effectiveCollapsed && (
@@ -2316,7 +2295,12 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2316
2295
  )}
2317
2296
  {effectiveCollapsed ? (
2318
2297
  <>
2319
- <nav className="flex min-h-0 flex-1 flex-col items-center gap-0.5 overflow-y-auto px-1 py-2">
2298
+ <AppSidebarHeader
2299
+ brandName={t("navigation.brand")}
2300
+ brandHref="/home"
2301
+ collapsed={true}
2302
+ />
2303
+ <nav className="flex min-h-0 flex-1 flex-col items-center gap-1 overflow-y-auto px-2 py-3">
2320
2304
  {collapsedNavItems.map((item) => {
2321
2305
  const Icon = item.icon;
2322
2306
  return (
@@ -2326,14 +2310,8 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2326
2310
  to={item.href}
2327
2311
  onClick={item.onClick}
2328
2312
  aria-label={item.label}
2329
- className={cn(
2330
- "flex h-9 w-9 items-center justify-center rounded-md transition-colors",
2331
- item.active
2332
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2333
- : "text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground",
2334
- )}
2335
2313
  >
2336
- <Icon className="h-4 w-4" />
2314
+ <Icon className="size-4 text-primary" />
2337
2315
  </Link>
2338
2316
  </TooltipTrigger>
2339
2317
  <TooltipContent side="right">{item.label}</TooltipContent>
@@ -2341,48 +2319,43 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2341
2319
  );
2342
2320
  })}
2343
2321
  </nav>
2344
- <SidebarFooterActions
2345
- collapsed
2322
+ <AppSidebarFooter
2323
+ collapsed={true}
2324
+ collapsible={false}
2346
2325
  feedback={footerFeedback}
2347
- search={footerSearch}
2348
- collapse={footerCollapse}
2326
+ orgSwitcher={
2327
+ <OrgSwitcher
2328
+ compact
2329
+ className="!size-9 !p-0 [&>svg]:!size-4 !bg-transparent !text-primary hover:!bg-accent/60 hover:!text-primary"
2330
+ />
2331
+ }
2332
+ footerExtras={
2333
+ <>
2334
+ <DevDatabaseLink />
2335
+ {footerCollapse}
2336
+ </>
2337
+ }
2349
2338
  />
2350
2339
  </>
2351
2340
  ) : (
2352
2341
  <>
2353
- <div className="flex h-12 shrink-0 items-center border-b border-border px-4">
2354
- <Link
2355
- to="/home"
2356
- className="flex min-w-0 flex-1 items-center gap-2 font-semibold"
2357
- >
2358
- <AgentNativeIcon
2359
- aria-hidden="true"
2360
- className="h-[17px] w-[30px] shrink-0 text-sidebar-foreground"
2361
- />
2362
- <span className="text-lg font-bold tracking-tight">
2363
- {t("navigation.brand")}
2364
- </span>
2365
- </Link>
2366
- </div>
2342
+ <AppSidebarHeader
2343
+ brandName={t("navigation.brand")}
2344
+ brandHref="/home"
2345
+ collapsed={false}
2346
+ />
2367
2347
  <div className="flex min-h-0 flex-1 flex-col overflow-hidden py-2">
2368
- <nav className="min-h-0 min-w-0 flex flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto px-2 text-sm font-medium">
2348
+ <nav className="min-h-0 min-w-0 flex flex-1 flex-col space-y-0.5 overflow-x-hidden overflow-y-auto px-2 py-3">
2369
2349
  {/* Ask section */}
2370
- <div className="order-1 group/section min-w-0 space-y-1">
2371
- <div
2372
- className={cn(
2373
- "flex w-full min-w-0 items-center rounded-lg transition-colors hover:text-primary",
2374
- isAskRoute
2375
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2376
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2377
- )}
2378
- >
2350
+ <div className="order-1 group/section min-w-0 space-y-0.5">
2351
+ <div>
2379
2352
  <Link
2380
2353
  to="/ask"
2381
2354
  onClick={handleAskClick}
2382
- className="flex min-w-0 flex-1 items-center gap-3 px-3 py-2"
2355
+ className="flex min-w-0 flex-1 items-center gap-2 px-2 py-1.5 text-xs text-primary"
2383
2356
  >
2384
- <IconMessageCircle className="h-4 w-4 shrink-0" />
2385
- <span className="min-w-0 flex-1 truncate">
2357
+ <IconMessageCircle className="size-4 shrink-0 text-primary" />
2358
+ <span className="min-w-0 flex-1 truncate text-primary">
2386
2359
  {t("navigation.ask")}
2387
2360
  </span>
2388
2361
  </Link>
@@ -2421,88 +2394,98 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2421
2394
  <Link
2422
2395
  to="/sessions"
2423
2396
  className={cn(
2424
- "order-4 flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2397
+ "order-4 flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2425
2398
  location.pathname.startsWith("/sessions")
2426
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2427
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2399
+ ? "bg-primary/10 font-medium text-primary"
2400
+ : "text-primary hover:bg-accent/60",
2428
2401
  )}
2429
2402
  >
2430
- <IconPlayerPlay className="h-4 w-4" />
2431
- {t("navigation.sessions")}
2403
+ <IconPlayerPlay className="size-4 shrink-0 text-primary" />
2404
+ <span className="truncate text-primary">
2405
+ {t("navigation.sessions")}
2406
+ </span>
2432
2407
  </Link>
2433
2408
 
2434
2409
  {/* Monitoring link */}
2435
2410
  <Link
2436
2411
  to="/monitoring"
2437
2412
  className={cn(
2438
- "order-5 flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2413
+ "order-5 flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2439
2414
  location.pathname.startsWith("/monitoring")
2440
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2441
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2415
+ ? "bg-primary/10 font-medium text-primary"
2416
+ : "text-primary hover:bg-accent/60",
2442
2417
  )}
2443
2418
  >
2444
- <IconHeartbeat className="h-4 w-4" />
2445
- {t("navigation.monitoring")}
2419
+ <IconHeartbeat className="size-4 shrink-0 text-primary" />
2420
+ <span className="truncate text-primary">
2421
+ {t("navigation.monitoring")}
2422
+ </span>
2446
2423
  </Link>
2447
2424
 
2448
2425
  {/* Agents link */}
2449
2426
  <Link
2450
2427
  to="/agents"
2451
2428
  className={cn(
2452
- "order-6 flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2429
+ "order-6 flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2453
2430
  location.pathname.startsWith("/agents")
2454
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2455
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2431
+ ? "bg-primary/10 font-medium text-primary"
2432
+ : "text-primary hover:bg-accent/60",
2456
2433
  )}
2457
2434
  >
2458
- <IconActivity className="h-4 w-4" />
2459
- {t("navigation.agents")}
2435
+ <IconActivity className="size-4 shrink-0 text-primary" />
2436
+ <span className="truncate text-primary">
2437
+ {t("navigation.agents")}
2438
+ </span>
2460
2439
  </Link>
2461
2440
 
2462
2441
  {/* Data Sources link */}
2463
2442
  <Link
2464
2443
  to="/data-sources"
2465
2444
  className={cn(
2466
- "order-7 flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2445
+ "order-7 flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2467
2446
  location.pathname === "/data-sources"
2468
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2469
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2447
+ ? "bg-primary/10 font-medium text-primary"
2448
+ : "text-primary hover:bg-accent/60",
2470
2449
  )}
2471
2450
  >
2472
- <IconDatabase className="h-4 w-4" />
2473
- {t("navigation.dataSources")}
2451
+ <IconDatabase className="size-4 shrink-0 text-primary" />
2452
+ <span className="truncate text-primary">
2453
+ {t("navigation.dataSources")}
2454
+ </span>
2474
2455
  </Link>
2475
2456
 
2476
2457
  {/* Data Dictionary link */}
2477
2458
  <Link
2478
2459
  to="/data-dictionary"
2479
2460
  className={cn(
2480
- "order-8 flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2461
+ "order-8 flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2481
2462
  location.pathname.startsWith("/data-dictionary")
2482
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2483
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2463
+ ? "bg-primary/10 font-medium text-primary"
2464
+ : "text-primary hover:bg-accent/60",
2484
2465
  )}
2485
2466
  >
2486
- <IconBook2 className="h-4 w-4" />
2487
- {t("navigation.dataDictionary")}
2467
+ <IconBook2 className="size-4 shrink-0 text-primary" />
2468
+ <span className="truncate text-primary">
2469
+ {t("navigation.dataDictionary")}
2470
+ </span>
2488
2471
  </Link>
2489
2472
 
2490
2473
  {/* Dashboards section */}
2491
- <div className="order-2 group/section min-w-0 space-y-1">
2474
+ <div className="order-2 group/section min-w-0 space-y-0.5">
2492
2475
  <div
2493
2476
  className={cn(
2494
- "flex w-full min-w-0 items-center rounded-lg transition-colors hover:text-primary",
2477
+ "group flex w-full min-w-0 items-center rounded transition-colors",
2495
2478
  isAdhocActive
2496
- ? "text-sidebar-accent-foreground"
2497
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2479
+ ? "bg-primary/10 font-medium text-primary"
2480
+ : "text-primary hover:bg-accent/60",
2498
2481
  )}
2499
2482
  >
2500
2483
  <Link
2501
2484
  to="/dashboards"
2502
- className="flex min-w-0 flex-1 items-center gap-3 px-3 py-2 text-start"
2485
+ className="flex min-w-0 flex-1 items-center gap-2 px-2 py-1.5 text-start text-xs text-primary"
2503
2486
  >
2504
- <IconChartBar className="h-4 w-4 shrink-0" />
2505
- <span className="min-w-0 flex-1 truncate">
2487
+ <IconChartBar className="size-4 shrink-0 text-primary" />
2488
+ <span className="min-w-0 flex-1 truncate text-primary">
2506
2489
  {t("navigation.dashboards")}
2507
2490
  </span>
2508
2491
  </Link>
@@ -2673,8 +2656,8 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2673
2656
  </div>
2674
2657
  </nav>
2675
2658
 
2676
- <div className="shrink-0 min-w-0 px-2 pt-2 text-sm font-medium">
2677
- <nav className="flex min-w-0 flex-col gap-1 pb-1">
2659
+ <div className="mt-3 shrink-0 min-w-0 space-y-0.5 border-t border-border/70 px-2 pt-3">
2660
+ <nav className="flex min-w-0 flex-col space-y-0.5">
2678
2661
  {bottomItems.map((item) => {
2679
2662
  const Icon = item.icon;
2680
2663
  const isActive = location.pathname === item.href;
@@ -2683,31 +2666,35 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2683
2666
  key={item.href}
2684
2667
  to={item.href}
2685
2668
  className={cn(
2686
- "flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:text-primary",
2669
+ "flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
2687
2670
  isActive
2688
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
2689
- : "text-muted-foreground hover:bg-sidebar-accent/50",
2671
+ ? "bg-primary/10 font-medium text-primary"
2672
+ : "text-primary hover:bg-accent/60",
2690
2673
  )}
2691
2674
  >
2692
- <Icon className="h-4 w-4" />
2693
- <span className="truncate">{t(item.labelKey)}</span>
2675
+ <Icon className="size-4 shrink-0 text-primary" />
2676
+ <span className="truncate text-primary">
2677
+ {t(item.labelKey)}
2678
+ </span>
2694
2679
  </Link>
2695
2680
  );
2696
2681
  })}
2697
2682
  </nav>
2698
2683
 
2699
- <div className="space-y-2 pt-2">
2700
- <OrgSwitcher />
2701
- <DevDatabaseLink />
2702
- <TooltipProvider delayDuration={200}>
2703
- <SidebarFooterActions
2704
- feedback={footerFeedback}
2705
- search={footerSearch}
2706
- collapse={footerCollapse}
2707
- className="px-0 py-0"
2708
- />
2709
- </TooltipProvider>
2710
- </div>
2684
+ <AppSidebarFooter
2685
+ collapsed={false}
2686
+ collapsible={false}
2687
+ feedback={footerFeedback}
2688
+ orgSwitcher={
2689
+ <OrgSwitcher className="min-w-0 flex-1 !bg-transparent !text-primary hover:!bg-accent/60 hover:!text-primary" />
2690
+ }
2691
+ footerExtras={
2692
+ <>
2693
+ <DevDatabaseLink />
2694
+ {footerCollapse}
2695
+ </>
2696
+ }
2697
+ />
2711
2698
  </div>
2712
2699
  </div>
2713
2700
  </>