@agent-native/core 0.178.1 → 0.178.2-nightly-20260910214741
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/actions/create-generation-session.ts +2 -6
- package/corpus/templates/assets/actions/generate-image.ts +3 -12
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +87 -220
- package/corpus/templates/assets/server/lib/library-access.ts +23 -0
- 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/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/routes.d.ts +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.js +19 -3
- package/dist/file-upload/actions/upload-image.d.ts +3 -3
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- 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/server/agent-engine-api-key-route.d.ts +1 -1
- 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 +2 -2
- package/src/templates/chat/app/components/layout/Sidebar.tsx +57 -247
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
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="
|
|
2263
|
+
<IconLayoutSidebarLeftExpand className="size-4 rtl:-scale-x-100" />
|
|
2284
2264
|
) : (
|
|
2285
|
-
<IconLayoutSidebarLeftCollapse className="
|
|
2265
|
+
<IconLayoutSidebarLeftCollapse className="size-4 rtl:-scale-x-100" />
|
|
2286
2266
|
)}
|
|
2287
2267
|
</button>
|
|
2288
2268
|
</TooltipTrigger>
|
|
2289
|
-
<TooltipContent side="
|
|
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 ?
|
|
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
|
-
<
|
|
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="
|
|
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
|
-
<
|
|
2345
|
-
collapsed
|
|
2322
|
+
<AppSidebarFooter
|
|
2323
|
+
collapsed={true}
|
|
2324
|
+
collapsible={false}
|
|
2346
2325
|
feedback={footerFeedback}
|
|
2347
|
-
|
|
2348
|
-
|
|
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
|
-
<
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
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
|
|
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-
|
|
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-
|
|
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="
|
|
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-
|
|
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-
|
|
2427
|
-
: "text-
|
|
2399
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2400
|
+
: "text-primary hover:bg-accent/60",
|
|
2428
2401
|
)}
|
|
2429
2402
|
>
|
|
2430
|
-
<IconPlayerPlay className="
|
|
2431
|
-
|
|
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-
|
|
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-
|
|
2441
|
-
: "text-
|
|
2415
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2416
|
+
: "text-primary hover:bg-accent/60",
|
|
2442
2417
|
)}
|
|
2443
2418
|
>
|
|
2444
|
-
<IconHeartbeat className="
|
|
2445
|
-
|
|
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-
|
|
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-
|
|
2455
|
-
: "text-
|
|
2431
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2432
|
+
: "text-primary hover:bg-accent/60",
|
|
2456
2433
|
)}
|
|
2457
2434
|
>
|
|
2458
|
-
<IconActivity className="
|
|
2459
|
-
|
|
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-
|
|
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-
|
|
2469
|
-
: "text-
|
|
2447
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2448
|
+
: "text-primary hover:bg-accent/60",
|
|
2470
2449
|
)}
|
|
2471
2450
|
>
|
|
2472
|
-
<IconDatabase className="
|
|
2473
|
-
|
|
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-
|
|
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-
|
|
2483
|
-
: "text-
|
|
2463
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2464
|
+
: "text-primary hover:bg-accent/60",
|
|
2484
2465
|
)}
|
|
2485
2466
|
>
|
|
2486
|
-
<IconBook2 className="
|
|
2487
|
-
|
|
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-
|
|
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
|
|
2477
|
+
"group flex w-full min-w-0 items-center rounded transition-colors",
|
|
2495
2478
|
isAdhocActive
|
|
2496
|
-
? "
|
|
2497
|
-
: "text-
|
|
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-
|
|
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="
|
|
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
|
|
2677
|
-
<nav className="flex min-w-0 flex-col
|
|
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-
|
|
2669
|
+
"flex items-center gap-2 rounded px-2 py-1.5 text-xs transition-colors",
|
|
2687
2670
|
isActive
|
|
2688
|
-
? "bg-
|
|
2689
|
-
: "text-
|
|
2671
|
+
? "bg-primary/10 font-medium text-primary"
|
|
2672
|
+
: "text-primary hover:bg-accent/60",
|
|
2690
2673
|
)}
|
|
2691
2674
|
>
|
|
2692
|
-
<Icon className="
|
|
2693
|
-
<span className="truncate">
|
|
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
|
-
<
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
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
|
</>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
assertCanDraft,
|
|
16
16
|
assertCanUseAssets,
|
|
17
17
|
assertCanUseRuns,
|
|
18
|
+
draftProvenanceAccess,
|
|
18
19
|
draftScopeForLibrary,
|
|
19
20
|
} from "../server/lib/library-access.js";
|
|
20
21
|
import { serializeGenerationSession } from "./_helpers.js";
|
|
@@ -213,12 +214,7 @@ export default defineAction({
|
|
|
213
214
|
},
|
|
214
215
|
],
|
|
215
216
|
},
|
|
216
|
-
{
|
|
217
|
-
artifactAccess: {
|
|
218
|
-
resourceType: "asset-library",
|
|
219
|
-
resourceId: args.libraryId,
|
|
220
|
-
},
|
|
221
|
-
},
|
|
217
|
+
{ artifactAccess: draftProvenanceAccess(args.libraryId) },
|
|
222
218
|
);
|
|
223
219
|
return {
|
|
224
220
|
...serializeGenerationSession(session),
|
|
@@ -43,6 +43,7 @@ import { nowIso, parseJson, stringifyJson } from "../server/lib/json.js";
|
|
|
43
43
|
import {
|
|
44
44
|
assertCanDraft,
|
|
45
45
|
assertCanUseAssets,
|
|
46
|
+
draftProvenanceAccess,
|
|
46
47
|
draftScopeForLibrary,
|
|
47
48
|
} from "../server/lib/library-access.js";
|
|
48
49
|
import {
|
|
@@ -900,12 +901,7 @@ export default defineAction({
|
|
|
900
901
|
...creativeContextProvenance,
|
|
901
902
|
elementProvenance: elementProvenanceFor(runId),
|
|
902
903
|
},
|
|
903
|
-
{
|
|
904
|
-
artifactAccess: {
|
|
905
|
-
resourceType: "asset-library",
|
|
906
|
-
resourceId: args.libraryId,
|
|
907
|
-
},
|
|
908
|
-
},
|
|
904
|
+
{ artifactAccess: draftProvenanceAccess(args.libraryId) },
|
|
909
905
|
);
|
|
910
906
|
|
|
911
907
|
await upsertVariantSlot({
|
|
@@ -1074,12 +1070,7 @@ export default defineAction({
|
|
|
1074
1070
|
...creativeContextProvenance,
|
|
1075
1071
|
elementProvenance: elementProvenanceFor(asset.id),
|
|
1076
1072
|
},
|
|
1077
|
-
{
|
|
1078
|
-
artifactAccess: {
|
|
1079
|
-
resourceType: "asset-library",
|
|
1080
|
-
resourceId: args.libraryId,
|
|
1081
|
-
},
|
|
1082
|
-
},
|
|
1073
|
+
{ artifactAccess: draftProvenanceAccess(args.libraryId) },
|
|
1083
1074
|
);
|
|
1084
1075
|
if (session) {
|
|
1085
1076
|
const itemCreatedAt = nowIso();
|