@agent-native/core 0.120.2 → 0.120.3
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/README.md +3 -3
- package/corpus/core/CHANGELOG.md +20 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/context-xray-local.ts +1 -1
- package/corpus/core/src/cli/index.ts +63 -18
- package/corpus/core/src/cli/skills.ts +5 -0
- package/corpus/core/src/cli/telemetry.ts +118 -1
- package/corpus/core/src/client/AgentPanel.tsx +10 -0
- package/corpus/core/src/client/CommandMenu.tsx +13 -1
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/corpus/core/src/client/analytics.ts +13 -0
- package/corpus/core/src/client/error-capture.ts +6 -1
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +12 -5
- package/corpus/core/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/corpus/core/src/client/navigation/index.ts +2 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +14 -32
- package/corpus/core/src/client/settings/ExtensionsSettingsContent.tsx +1 -1
- package/corpus/core/src/extensions/theme.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +2 -0
- package/corpus/core/src/server/core-routes-plugin.ts +10 -1
- package/corpus/core/src/server/framework-request-handler.ts +17 -26
- package/corpus/core/src/styles/agent-native.css +13 -0
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/corpus/core/src/templates/chat/app/global.css +1 -1
- package/corpus/core/src/templates/default/app/global.css +1 -1
- package/corpus/core/src/tracking/error-capture.ts +151 -0
- package/corpus/core/src/tracking/index.ts +5 -0
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -4
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +41 -9
- package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +2 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +28 -14
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +152 -124
- package/corpus/templates/analytics/app/global.css +5 -5
- package/corpus/templates/analytics/app/lib/dashboard-report-capture.ts +42 -0
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +3 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +162 -51
- package/corpus/templates/analytics/app/root.tsx +28 -0
- package/corpus/templates/analytics/changelog/2026-07-24-analytics-charts-now-explain-slow-loads-and-offer-a-direct-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-daily-dashboard-emails-now-load-signed-reports-more-reliably.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-manage-agent-is-clearly-marked-as-a-link-to-its-dedicated-pa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -1
- package/corpus/templates/analytics/server/db/schema.ts +5 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +21 -0
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +11 -0
- package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +54 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +235 -26
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +4 -1
- package/corpus/templates/analytics/server/plugins/db.ts +9 -0
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +1 -1
- package/corpus/templates/assets/app/components/asset/AssetPreviewDialog.tsx +376 -0
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +14 -4
- package/corpus/templates/assets/app/components/layout/Layout.tsx +5 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +118 -74
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +10 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +99 -10
- package/corpus/templates/assets/app/routes/library.tsx +21 -198
- package/corpus/templates/assets/changelog/2026-07-21-unified-asset-preview-click-any-asset-to-open-one-preview-wi.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +76 -43
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +67 -52
- package/corpus/templates/calendar/app/global.css +1 -1
- package/corpus/templates/calendar/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/corpus/templates/chat/app/global.css +1 -1
- package/corpus/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +65 -31
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +16 -1
- package/corpus/templates/clips/app/global.css +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +55 -12
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +6 -5
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -7
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -5
- package/corpus/templates/clips/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/clips/server/plugins/db.ts +113 -68
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +66 -42
- package/corpus/templates/content/app/global.css +1 -1
- package/corpus/templates/content/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +65 -30
- package/corpus/templates/design/app/entry.client.tsx +14 -1
- package/corpus/templates/design/app/global.css +1 -1
- package/corpus/templates/design/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/design/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/dispatch/app/global.css +1 -1
- package/corpus/templates/dispatch/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +72 -37
- package/corpus/templates/forms/app/global.css +1 -1
- package/corpus/templates/forms/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-forms-sidebar-actions-now-keep-search-language-feedback-and-.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/macros/app/components/DailyProgress.tsx +5 -5
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
- package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
- package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +56 -29
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -2
- package/corpus/templates/macros/app/components/ui/card.tsx +1 -1
- package/corpus/templates/macros/app/global.css +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +1 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +4 -7
- package/corpus/templates/macros/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +125 -37
- package/corpus/templates/mail/app/global.css +1 -1
- package/corpus/templates/mail/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +90 -60
- package/corpus/templates/plan/app/global.css +1 -1
- package/corpus/templates/plan/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +69 -32
- package/corpus/templates/slides/app/global.css +1 -1
- package/corpus/templates/slides/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/tasks/app/global.css +1 -1
- package/corpus/templates/tasks/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/toolkit/CHANGELOG.md +8 -0
- package/corpus/toolkit/README.md +8 -1
- package/corpus/toolkit/agent-native.eject.json +1 -1
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/app-shell/index.ts +1 -0
- package/corpus/toolkit/src/app-shell/sidebar-footer-actions.tsx +48 -0
- package/corpus/toolkit/src/chat-history.css +52 -1
- package/corpus/toolkit/src/design-system/default-adapter.tsx +1 -1
- package/corpus/toolkit/src/ui/button.tsx +1 -2
- package/corpus/toolkit/src/ui/card.tsx +1 -1
- package/corpus/toolkit/src/ui/table.tsx +4 -11
- package/dist/cli/context-xray-local.js +1 -1
- package/dist/cli/context-xray-local.js.map +1 -1
- package/dist/cli/index.js +56 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +5 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/telemetry.d.ts +7 -0
- package/dist/cli/telemetry.d.ts.map +1 -1
- package/dist/cli/telemetry.js +91 -1
- package/dist/cli/telemetry.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +7 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +2 -0
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +12 -1
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.d.ts +4 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +8 -4
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +7 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +8 -1
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +2 -2
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js.map +1 -1
- package/dist/client/navigation/index.d.ts +1 -1
- package/dist/client/navigation/index.d.ts.map +1 -1
- package/dist/client/navigation/index.js +1 -1
- package/dist/client/navigation/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +9 -13
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/settings/ExtensionsSettingsContent.js +1 -1
- package/dist/client/settings/ExtensionsSettingsContent.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/extensions/theme.js +1 -1
- package/dist/extensions/theme.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/provider-api/actions/provider-api.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +8 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +17 -27
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/styles/agent-native.css +13 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/dist/templates/chat/app/global.css +1 -1
- package/dist/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/dist/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/dist/templates/default/app/global.css +1 -1
- package/dist/tracking/error-capture.d.ts +14 -0
- package/dist/tracking/error-capture.d.ts.map +1 -0
- package/dist/tracking/error-capture.js +113 -0
- package/dist/tracking/error-capture.js.map +1 -0
- package/dist/tracking/index.d.ts +1 -0
- package/dist/tracking/index.d.ts.map +1 -1
- package/dist/tracking/index.js +1 -0
- package/dist/tracking/index.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/context-xray-local.ts +1 -1
- package/src/cli/index.ts +63 -18
- package/src/cli/skills.ts +5 -0
- package/src/cli/telemetry.ts +118 -1
- package/src/client/AgentPanel.tsx +10 -0
- package/src/client/CommandMenu.tsx +13 -1
- package/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/src/client/analytics.ts +13 -0
- package/src/client/error-capture.ts +6 -1
- package/src/client/extensions/ExtensionsListPage.tsx +12 -5
- package/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/src/client/navigation/index.ts +2 -0
- package/src/client/org/OrgSwitcher.tsx +14 -32
- package/src/client/settings/ExtensionsSettingsContent.tsx +1 -1
- package/src/extensions/theme.ts +1 -1
- package/src/localization/default-messages.ts +2 -0
- package/src/server/core-routes-plugin.ts +10 -1
- package/src/server/framework-request-handler.ts +17 -26
- package/src/styles/agent-native.css +13 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +78 -45
- package/src/templates/chat/app/global.css +1 -1
- package/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/src/templates/default/app/global.css +1 -1
- package/src/tracking/error-capture.ts +151 -0
- package/src/tracking/index.ts +5 -0
|
@@ -34,8 +34,6 @@ import {
|
|
|
34
34
|
IconArrowUpRight,
|
|
35
35
|
IconCheck,
|
|
36
36
|
IconChevronDown,
|
|
37
|
-
IconChevronLeft,
|
|
38
|
-
IconChevronRight,
|
|
39
37
|
IconClipboard,
|
|
40
38
|
IconLibraryPhoto,
|
|
41
39
|
IconPhotoPlus,
|
|
@@ -60,16 +58,10 @@ import {
|
|
|
60
58
|
} from "react-router";
|
|
61
59
|
import { toast } from "sonner";
|
|
62
60
|
|
|
61
|
+
import { AssetPreviewDialog as SharedAssetPreviewDialog } from "@/components/asset/AssetPreviewDialog";
|
|
63
62
|
import { LibraryPresetGrid } from "@/components/library/LibraryPresetGrid";
|
|
64
63
|
import { Badge } from "@/components/ui/badge";
|
|
65
64
|
import { Button } from "@/components/ui/button";
|
|
66
|
-
import {
|
|
67
|
-
Dialog,
|
|
68
|
-
DialogContent,
|
|
69
|
-
DialogDescription,
|
|
70
|
-
DialogTitle,
|
|
71
|
-
DialogClose,
|
|
72
|
-
} from "@/components/ui/dialog";
|
|
73
65
|
import { Input } from "@/components/ui/input";
|
|
74
66
|
import {
|
|
75
67
|
Popover,
|
|
@@ -165,6 +157,12 @@ type Asset = {
|
|
|
165
157
|
downloadUrl?: string;
|
|
166
158
|
embedUrl?: string;
|
|
167
159
|
embedPath?: string;
|
|
160
|
+
folderId?: string | null;
|
|
161
|
+
category?: string | null;
|
|
162
|
+
model?: string | null;
|
|
163
|
+
aspectRatio?: string | null;
|
|
164
|
+
durationSeconds?: number | null;
|
|
165
|
+
metadata?: Record<string, unknown> | null;
|
|
168
166
|
libraryTitle?: string | null;
|
|
169
167
|
lineage?: {
|
|
170
168
|
label?: string | null;
|
|
@@ -829,7 +827,7 @@ function AssetOverlayImage({ asset }: { asset: Asset }) {
|
|
|
829
827
|
src={source}
|
|
830
828
|
crossOrigin={isCrossOriginPreview(source) ? "anonymous" : undefined}
|
|
831
829
|
alt={asset.altText ?? asset.title ?? ""}
|
|
832
|
-
className="max-h-[
|
|
830
|
+
className="max-h-[72vh] max-w-full rounded-lg object-contain"
|
|
833
831
|
onError={() =>
|
|
834
832
|
setSourceIndex((index) =>
|
|
835
833
|
index + 1 < sources.length ? index + 1 : index,
|
|
@@ -1542,98 +1540,15 @@ function AssetPreviewDialog({
|
|
|
1542
1540
|
assets: Asset[];
|
|
1543
1541
|
onAssetChange: (asset: Asset | null) => void;
|
|
1544
1542
|
}) {
|
|
1545
|
-
const t = useT();
|
|
1546
1543
|
return (
|
|
1547
|
-
<
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
const previewIndex = assets.findIndex(
|
|
1556
|
-
(candidate) => candidate.id === asset.id,
|
|
1557
|
-
);
|
|
1558
|
-
const hasPrev = previewIndex > 0;
|
|
1559
|
-
const hasNext = previewIndex >= 0 && previewIndex < assets.length - 1;
|
|
1560
|
-
const showPreviousAsset = () => {
|
|
1561
|
-
if (hasPrev) onAssetChange(assets[previewIndex - 1]);
|
|
1562
|
-
};
|
|
1563
|
-
const showNextAsset = () => {
|
|
1564
|
-
if (hasNext) onAssetChange(assets[previewIndex + 1]);
|
|
1565
|
-
};
|
|
1566
|
-
return (
|
|
1567
|
-
<DialogContent
|
|
1568
|
-
hideClose
|
|
1569
|
-
onKeyDown={(event) => {
|
|
1570
|
-
if (event.key === "ArrowLeft") showPreviousAsset();
|
|
1571
|
-
if (event.key === "ArrowRight") showNextAsset();
|
|
1572
|
-
}}
|
|
1573
|
-
className="max-w-4xl border-0 bg-transparent p-0 shadow-none"
|
|
1574
|
-
>
|
|
1575
|
-
<DialogTitle className="sr-only">
|
|
1576
|
-
{assetDisplayTitle(asset)}
|
|
1577
|
-
</DialogTitle>
|
|
1578
|
-
<DialogDescription className="sr-only">
|
|
1579
|
-
{t("library.fullSizePreview", {
|
|
1580
|
-
title: assetDisplayTitle(asset),
|
|
1581
|
-
})}
|
|
1582
|
-
</DialogDescription>
|
|
1583
|
-
<div className="relative">
|
|
1584
|
-
<div className="absolute right-2 top-2 z-10 flex items-center gap-2">
|
|
1585
|
-
<Button asChild variant="outline" size="sm">
|
|
1586
|
-
<Link to={`/asset/${encodeURIComponent(asset.id)}`}>
|
|
1587
|
-
{t("library.viewDetails")}
|
|
1588
|
-
</Link>
|
|
1589
|
-
</Button>
|
|
1590
|
-
<DialogClose
|
|
1591
|
-
aria-label={t("library.closePreview")}
|
|
1592
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
1593
|
-
>
|
|
1594
|
-
<IconX className="h-5 w-5" />
|
|
1595
|
-
</DialogClose>
|
|
1596
|
-
</div>
|
|
1597
|
-
{asset.mediaType === "video" ||
|
|
1598
|
-
asset.mimeType?.startsWith("video/") ? (
|
|
1599
|
-
<video
|
|
1600
|
-
src={asset.previewUrl ?? asset.downloadUrl ?? asset.url}
|
|
1601
|
-
poster={asset.thumbnailUrl}
|
|
1602
|
-
controls
|
|
1603
|
-
autoPlay
|
|
1604
|
-
playsInline
|
|
1605
|
-
className="max-h-[85vh] w-full rounded-lg bg-black object-contain"
|
|
1606
|
-
/>
|
|
1607
|
-
) : (
|
|
1608
|
-
<AssetOverlayImage asset={asset} />
|
|
1609
|
-
)}
|
|
1610
|
-
</div>
|
|
1611
|
-
{(hasPrev || hasNext) && (
|
|
1612
|
-
<div className="mt-5 flex justify-center gap-2">
|
|
1613
|
-
<button
|
|
1614
|
-
type="button"
|
|
1615
|
-
aria-label={t("library.previousImage")}
|
|
1616
|
-
onClick={showPreviousAsset}
|
|
1617
|
-
disabled={!hasPrev}
|
|
1618
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:cursor-not-allowed disabled:opacity-40"
|
|
1619
|
-
>
|
|
1620
|
-
<IconChevronLeft className="h-5 w-5" />
|
|
1621
|
-
</button>
|
|
1622
|
-
<button
|
|
1623
|
-
type="button"
|
|
1624
|
-
aria-label={t("library.nextImage")}
|
|
1625
|
-
onClick={showNextAsset}
|
|
1626
|
-
disabled={!hasNext}
|
|
1627
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:cursor-not-allowed disabled:opacity-40"
|
|
1628
|
-
>
|
|
1629
|
-
<IconChevronRight className="h-5 w-5" />
|
|
1630
|
-
</button>
|
|
1631
|
-
</div>
|
|
1632
|
-
)}
|
|
1633
|
-
</DialogContent>
|
|
1634
|
-
);
|
|
1635
|
-
})()}
|
|
1636
|
-
</Dialog>
|
|
1544
|
+
<SharedAssetPreviewDialog
|
|
1545
|
+
asset={asset}
|
|
1546
|
+
assets={assets}
|
|
1547
|
+
onAssetChange={(next) => onAssetChange(next as Asset | null)}
|
|
1548
|
+
renderImage={(previewAsset) => (
|
|
1549
|
+
<AssetOverlayImage asset={previewAsset as Asset} />
|
|
1550
|
+
)}
|
|
1551
|
+
/>
|
|
1637
1552
|
);
|
|
1638
1553
|
}
|
|
1639
1554
|
|
|
@@ -3487,103 +3402,11 @@ export function AssetPickerSurface() {
|
|
|
3487
3402
|
)}
|
|
3488
3403
|
</main>
|
|
3489
3404
|
|
|
3490
|
-
<
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
>
|
|
3496
|
-
{previewAsset &&
|
|
3497
|
-
(() => {
|
|
3498
|
-
const previewIndex = assets.findIndex(
|
|
3499
|
-
(asset) => asset.id === previewAsset.id,
|
|
3500
|
-
);
|
|
3501
|
-
const hasPrev = previewIndex > 0;
|
|
3502
|
-
const hasNext =
|
|
3503
|
-
previewIndex >= 0 && previewIndex < assets.length - 1;
|
|
3504
|
-
const showPreviousAsset = () => {
|
|
3505
|
-
if (hasPrev) setPreviewAsset(assets[previewIndex - 1]);
|
|
3506
|
-
};
|
|
3507
|
-
const showNextAsset = () => {
|
|
3508
|
-
if (hasNext) setPreviewAsset(assets[previewIndex + 1]);
|
|
3509
|
-
};
|
|
3510
|
-
return (
|
|
3511
|
-
<DialogContent
|
|
3512
|
-
hideClose
|
|
3513
|
-
onKeyDown={(event) => {
|
|
3514
|
-
if (event.key === "ArrowLeft") showPreviousAsset();
|
|
3515
|
-
if (event.key === "ArrowRight") showNextAsset();
|
|
3516
|
-
}}
|
|
3517
|
-
className="max-w-4xl border-0 bg-transparent p-0 shadow-none"
|
|
3518
|
-
>
|
|
3519
|
-
<DialogTitle className="sr-only">
|
|
3520
|
-
{assetDisplayTitle(previewAsset)}
|
|
3521
|
-
</DialogTitle>
|
|
3522
|
-
<DialogDescription className="sr-only">
|
|
3523
|
-
{t("library.fullSizePreview", {
|
|
3524
|
-
title: assetDisplayTitle(previewAsset),
|
|
3525
|
-
})}
|
|
3526
|
-
</DialogDescription>
|
|
3527
|
-
<div className="relative">
|
|
3528
|
-
<div className="absolute right-2 top-2 z-10 flex items-center gap-2">
|
|
3529
|
-
<Button asChild variant="outline" size="sm">
|
|
3530
|
-
<Link
|
|
3531
|
-
to={`/asset/${encodeURIComponent(previewAsset.id)}`}
|
|
3532
|
-
>
|
|
3533
|
-
{t("library.viewDetails")}
|
|
3534
|
-
</Link>
|
|
3535
|
-
</Button>
|
|
3536
|
-
<DialogClose
|
|
3537
|
-
aria-label={t("library.closePreview")}
|
|
3538
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
3539
|
-
>
|
|
3540
|
-
<IconX className="h-5 w-5" />
|
|
3541
|
-
</DialogClose>
|
|
3542
|
-
</div>
|
|
3543
|
-
{previewAsset.mediaType === "video" ||
|
|
3544
|
-
previewAsset.mimeType?.startsWith("video/") ? (
|
|
3545
|
-
<video
|
|
3546
|
-
src={
|
|
3547
|
-
previewAsset.previewUrl ??
|
|
3548
|
-
previewAsset.downloadUrl ??
|
|
3549
|
-
previewAsset.url
|
|
3550
|
-
}
|
|
3551
|
-
poster={previewAsset.thumbnailUrl}
|
|
3552
|
-
controls
|
|
3553
|
-
autoPlay
|
|
3554
|
-
playsInline
|
|
3555
|
-
className="max-h-[85vh] w-full rounded-lg bg-black object-contain"
|
|
3556
|
-
/>
|
|
3557
|
-
) : (
|
|
3558
|
-
<AssetOverlayImage asset={previewAsset} />
|
|
3559
|
-
)}
|
|
3560
|
-
</div>
|
|
3561
|
-
{(hasPrev || hasNext) && (
|
|
3562
|
-
<div className="mt-5 flex justify-center gap-2">
|
|
3563
|
-
<button
|
|
3564
|
-
type="button"
|
|
3565
|
-
aria-label={t("library.previousImage")}
|
|
3566
|
-
onClick={showPreviousAsset}
|
|
3567
|
-
disabled={!hasPrev}
|
|
3568
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:cursor-not-allowed disabled:opacity-40"
|
|
3569
|
-
>
|
|
3570
|
-
<IconChevronLeft className="h-5 w-5" />
|
|
3571
|
-
</button>
|
|
3572
|
-
<button
|
|
3573
|
-
type="button"
|
|
3574
|
-
aria-label={t("library.nextImage")}
|
|
3575
|
-
onClick={showNextAsset}
|
|
3576
|
-
disabled={!hasNext}
|
|
3577
|
-
className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/60 text-white transition hover:bg-black/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:cursor-not-allowed disabled:opacity-40"
|
|
3578
|
-
>
|
|
3579
|
-
<IconChevronRight className="h-5 w-5" />
|
|
3580
|
-
</button>
|
|
3581
|
-
</div>
|
|
3582
|
-
)}
|
|
3583
|
-
</DialogContent>
|
|
3584
|
-
);
|
|
3585
|
-
})()}
|
|
3586
|
-
</Dialog>
|
|
3405
|
+
<AssetPreviewDialog
|
|
3406
|
+
asset={previewAsset}
|
|
3407
|
+
assets={assets}
|
|
3408
|
+
onAssetChange={setPreviewAsset}
|
|
3409
|
+
/>
|
|
3587
3410
|
</div>
|
|
3588
3411
|
);
|
|
3589
3412
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: improved
|
|
3
|
+
date: 2026-07-21
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Unified asset preview: clicking an asset anywhere (create drafts, library, brand kits, generated candidates) now opens one side-panel preview with the image, a details panel, and next/previous navigation instead of a separate page
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSidebar,
|
|
3
3
|
focusAgentChat,
|
|
4
|
+
isAgentChatHomeHandoffActive,
|
|
4
5
|
navigateWithAgentChatViewTransition,
|
|
5
6
|
useAgentChatHomeHandoff,
|
|
6
7
|
useAgentChatHomeHandoffLinks,
|
|
@@ -44,6 +45,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
44
45
|
activePath: location.pathname,
|
|
45
46
|
enabled: !isAskRoute,
|
|
46
47
|
});
|
|
48
|
+
const chatHomeHandoffPending = isAgentChatHomeHandoffActive("brain");
|
|
47
49
|
useAgentChatHomeHandoffLinks({
|
|
48
50
|
storageKey: "brain",
|
|
49
51
|
chatPath: "/",
|
|
@@ -129,6 +131,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
129
131
|
<AgentSidebar
|
|
130
132
|
position="right"
|
|
131
133
|
chatViewTransition
|
|
134
|
+
chatViewTransitionHandoff={chatHomeHandoffPending}
|
|
132
135
|
storageKey="brain"
|
|
133
136
|
browserTabId={TAB_ID}
|
|
134
137
|
openOnChatRunning={chatHomeHandoffActive}
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
} from "@agent-native/core/client/agent-chat";
|
|
6
6
|
import { appPath } from "@agent-native/core/client/api-path";
|
|
7
7
|
import { DevDatabaseLink } from "@agent-native/core/client/db-admin";
|
|
8
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
8
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
9
|
+
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
9
10
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
10
11
|
import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
12
|
+
import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
|
|
11
13
|
import {
|
|
12
14
|
ChatHistoryRail,
|
|
13
15
|
type ChatHistoryItem,
|
|
@@ -15,6 +17,7 @@ import {
|
|
|
15
17
|
import {
|
|
16
18
|
IconLayoutSidebarLeftCollapse,
|
|
17
19
|
IconLayoutSidebarLeftExpand,
|
|
20
|
+
IconSearch,
|
|
18
21
|
} from "@tabler/icons-react";
|
|
19
22
|
import { useEffect, useMemo } from "react";
|
|
20
23
|
import { Link, NavLink, useLocation, useNavigate } from "react-router";
|
|
@@ -86,7 +89,7 @@ function persistedActiveThreadId() {
|
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
function BrainChatsSection() {
|
|
92
|
+
function BrainChatsSection({ open }: { open: boolean }) {
|
|
90
93
|
const navigate = useNavigate();
|
|
91
94
|
const t = useT();
|
|
92
95
|
const {
|
|
@@ -181,38 +184,44 @@ function BrainChatsSection() {
|
|
|
181
184
|
}
|
|
182
185
|
|
|
183
186
|
return (
|
|
184
|
-
<div
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
187
|
+
<div
|
|
188
|
+
className="an-chat-history-rail__collapse"
|
|
189
|
+
data-state={open ? "open" : "closed"}
|
|
190
|
+
aria-hidden={!open}
|
|
191
|
+
>
|
|
192
|
+
<div className="ms-4">
|
|
193
|
+
<ChatHistoryRail
|
|
194
|
+
items={chatItems}
|
|
195
|
+
activeId={activeThreadId}
|
|
196
|
+
onSelect={openThread}
|
|
197
|
+
onNewChat={() => void handleNewChat()}
|
|
198
|
+
railLabels={{
|
|
199
|
+
newChat: t("chat.newChat"),
|
|
200
|
+
showMore: t("chat.chats"),
|
|
201
|
+
showLess: t("chat.chats"),
|
|
202
|
+
}}
|
|
203
|
+
previewCount={5}
|
|
204
|
+
expandedCount={15}
|
|
205
|
+
onTogglePin={(threadId) => {
|
|
206
|
+
const thread = visibleThreads.find((item) => item.id === threadId);
|
|
207
|
+
if (thread) void pinThread(threadId, !thread.pinnedAt);
|
|
208
|
+
}}
|
|
209
|
+
onRename={handleRenameThread}
|
|
210
|
+
renameMaxLength={160}
|
|
211
|
+
onDelete={(threadId) => void handleArchiveThread(threadId)}
|
|
212
|
+
labels={{
|
|
213
|
+
options: (item) =>
|
|
214
|
+
t("chat.optionsFor", { title: item.titleText ?? "" }),
|
|
215
|
+
renameInput: (item) =>
|
|
216
|
+
t("chat.renameThread", { title: item.titleText ?? "" }),
|
|
217
|
+
rename: t("chat.renameChat"),
|
|
218
|
+
pin: t("chat.pinChat"),
|
|
219
|
+
unpin: t("chat.unpinChat"),
|
|
220
|
+
delete: t("chat.archiveChat"),
|
|
221
|
+
}}
|
|
222
|
+
className="min-w-0"
|
|
223
|
+
/>
|
|
224
|
+
</div>
|
|
216
225
|
</div>
|
|
217
226
|
);
|
|
218
227
|
}
|
|
@@ -262,6 +271,31 @@ export function Sidebar({
|
|
|
262
271
|
</TooltipContent>
|
|
263
272
|
</Tooltip>
|
|
264
273
|
) : null;
|
|
274
|
+
const searchButton = (
|
|
275
|
+
<Tooltip>
|
|
276
|
+
<TooltipTrigger asChild>
|
|
277
|
+
<button
|
|
278
|
+
type="button"
|
|
279
|
+
onClick={openCommandMenu}
|
|
280
|
+
aria-label={t("navigation.search")}
|
|
281
|
+
className="flex size-8 items-center justify-center rounded-md text-sidebar-foreground/65 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
282
|
+
>
|
|
283
|
+
<IconSearch className="size-4" />
|
|
284
|
+
</button>
|
|
285
|
+
</TooltipTrigger>
|
|
286
|
+
<TooltipContent side="right">{t("navigation.search")}</TooltipContent>
|
|
287
|
+
</Tooltip>
|
|
288
|
+
);
|
|
289
|
+
const translateButton = (
|
|
290
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
291
|
+
);
|
|
292
|
+
const feedbackButton = (
|
|
293
|
+
<FeedbackButton
|
|
294
|
+
variant={collapsed ? "icon" : "sidebar"}
|
|
295
|
+
side="right"
|
|
296
|
+
className={collapsed ? "h-8 w-8" : "min-w-0"}
|
|
297
|
+
/>
|
|
298
|
+
);
|
|
265
299
|
|
|
266
300
|
return (
|
|
267
301
|
<aside
|
|
@@ -360,7 +394,7 @@ export function Sidebar({
|
|
|
360
394
|
link
|
|
361
395
|
)}
|
|
362
396
|
{!collapsed && item.view === "ask" && isAskRoute ? (
|
|
363
|
-
<BrainChatsSection />
|
|
397
|
+
<BrainChatsSection open />
|
|
364
398
|
) : null}
|
|
365
399
|
</div>
|
|
366
400
|
);
|
|
@@ -408,16 +442,15 @@ export function Sidebar({
|
|
|
408
442
|
{!collapsed ? (
|
|
409
443
|
<div className="px-3 py-2">
|
|
410
444
|
<DevDatabaseLink />
|
|
411
|
-
<div className="flex items-center justify-end gap-1">
|
|
412
|
-
<FeedbackButton className="min-w-0 flex-1" side="right" />
|
|
413
|
-
{collapseButton}
|
|
414
|
-
</div>
|
|
415
445
|
</div>
|
|
416
446
|
) : null}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
447
|
+
<SidebarFooterActions
|
|
448
|
+
collapsed={collapsed}
|
|
449
|
+
feedback={feedbackButton}
|
|
450
|
+
translate={translateButton}
|
|
451
|
+
search={searchButton}
|
|
452
|
+
collapse={collapseButton}
|
|
453
|
+
/>
|
|
421
454
|
</div>
|
|
422
455
|
</aside>
|
|
423
456
|
);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { appPath } from "@agent-native/core/client/api-path";
|
|
2
2
|
import { DevDatabaseLink } from "@agent-native/core/client/db-admin";
|
|
3
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
4
|
+
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
4
5
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
5
6
|
import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
7
|
+
import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
|
|
6
8
|
import {
|
|
7
9
|
IconHierarchy2,
|
|
8
10
|
IconCalendar,
|
|
@@ -22,6 +24,7 @@ import {
|
|
|
22
24
|
IconEyeOff,
|
|
23
25
|
IconLayoutSidebarLeftCollapse,
|
|
24
26
|
IconLayoutSidebarLeftExpand,
|
|
27
|
+
IconSearch,
|
|
25
28
|
} from "@tabler/icons-react";
|
|
26
29
|
import {
|
|
27
30
|
startOfMonth,
|
|
@@ -703,6 +706,61 @@ export function Sidebar({
|
|
|
703
706
|
onClose();
|
|
704
707
|
}
|
|
705
708
|
|
|
709
|
+
const collapseButton = onCollapsedChange ? (
|
|
710
|
+
<Tooltip>
|
|
711
|
+
<TooltipTrigger asChild>
|
|
712
|
+
<Button
|
|
713
|
+
type="button"
|
|
714
|
+
variant="ghost"
|
|
715
|
+
size="icon"
|
|
716
|
+
className="h-8 w-8 shrink-0 text-muted-foreground"
|
|
717
|
+
onClick={() => onCollapsedChange(!collapsed)}
|
|
718
|
+
aria-label={
|
|
719
|
+
collapsed
|
|
720
|
+
? t("sidebar.expandSidebar")
|
|
721
|
+
: t("sidebar.collapseSidebar")
|
|
722
|
+
}
|
|
723
|
+
>
|
|
724
|
+
{collapsed ? (
|
|
725
|
+
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
726
|
+
) : (
|
|
727
|
+
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
728
|
+
)}
|
|
729
|
+
</Button>
|
|
730
|
+
</TooltipTrigger>
|
|
731
|
+
<TooltipContent side="top">
|
|
732
|
+
{collapsed ? t("sidebar.expandSidebar") : t("sidebar.collapseSidebar")}
|
|
733
|
+
</TooltipContent>
|
|
734
|
+
</Tooltip>
|
|
735
|
+
) : null;
|
|
736
|
+
const searchButton = (
|
|
737
|
+
<Tooltip>
|
|
738
|
+
<TooltipTrigger asChild>
|
|
739
|
+
<Button
|
|
740
|
+
type="button"
|
|
741
|
+
variant="ghost"
|
|
742
|
+
size="icon"
|
|
743
|
+
className="h-8 w-8 text-muted-foreground"
|
|
744
|
+
onClick={openCommandMenu}
|
|
745
|
+
aria-label={t("root.commandSearch")}
|
|
746
|
+
>
|
|
747
|
+
<IconSearch className="h-4 w-4" />
|
|
748
|
+
</Button>
|
|
749
|
+
</TooltipTrigger>
|
|
750
|
+
<TooltipContent side="top">{t("root.commandSearch")}</TooltipContent>
|
|
751
|
+
</Tooltip>
|
|
752
|
+
);
|
|
753
|
+
const translateButton = (
|
|
754
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
755
|
+
);
|
|
756
|
+
const feedbackButton = (
|
|
757
|
+
<FeedbackButton
|
|
758
|
+
variant={collapsed ? "icon" : "sidebar"}
|
|
759
|
+
side="right"
|
|
760
|
+
className={collapsed ? "h-8 w-8" : "min-w-0"}
|
|
761
|
+
/>
|
|
762
|
+
);
|
|
763
|
+
|
|
706
764
|
return (
|
|
707
765
|
<>
|
|
708
766
|
{/* Mobile overlay */}
|
|
@@ -728,25 +786,7 @@ export function Sidebar({
|
|
|
728
786
|
collapsed ? "px-1" : "px-4",
|
|
729
787
|
)}
|
|
730
788
|
>
|
|
731
|
-
{collapsed &&
|
|
732
|
-
<Tooltip>
|
|
733
|
-
<TooltipTrigger asChild>
|
|
734
|
-
<Button
|
|
735
|
-
type="button"
|
|
736
|
-
variant="ghost"
|
|
737
|
-
size="icon"
|
|
738
|
-
className="h-10 w-10 shrink-0 text-muted-foreground"
|
|
739
|
-
onClick={() => onCollapsedChange(false)}
|
|
740
|
-
aria-label={t("sidebar.expandSidebar")}
|
|
741
|
-
>
|
|
742
|
-
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
743
|
-
</Button>
|
|
744
|
-
</TooltipTrigger>
|
|
745
|
-
<TooltipContent side="right">
|
|
746
|
-
{t("sidebar.expandSidebar")}
|
|
747
|
-
</TooltipContent>
|
|
748
|
-
</Tooltip>
|
|
749
|
-
) : (
|
|
789
|
+
{!collapsed && (
|
|
750
790
|
<>
|
|
751
791
|
<Link
|
|
752
792
|
to="/"
|
|
@@ -769,35 +809,6 @@ export function Sidebar({
|
|
|
769
809
|
{t("navigation.brand")}
|
|
770
810
|
</span>
|
|
771
811
|
</Link>
|
|
772
|
-
{onCollapsedChange ? (
|
|
773
|
-
<Tooltip>
|
|
774
|
-
<TooltipTrigger asChild>
|
|
775
|
-
<Button
|
|
776
|
-
type="button"
|
|
777
|
-
variant="ghost"
|
|
778
|
-
size="icon"
|
|
779
|
-
className="h-8 w-8 shrink-0 text-muted-foreground"
|
|
780
|
-
onClick={() => onCollapsedChange(!collapsed)}
|
|
781
|
-
aria-label={
|
|
782
|
-
collapsed
|
|
783
|
-
? t("sidebar.expandSidebar")
|
|
784
|
-
: t("sidebar.collapseSidebar")
|
|
785
|
-
}
|
|
786
|
-
>
|
|
787
|
-
{collapsed ? (
|
|
788
|
-
<IconLayoutSidebarLeftExpand className="h-4 w-4 rtl:-scale-x-100" />
|
|
789
|
-
) : (
|
|
790
|
-
<IconLayoutSidebarLeftCollapse className="h-4 w-4 rtl:-scale-x-100" />
|
|
791
|
-
)}
|
|
792
|
-
</Button>
|
|
793
|
-
</TooltipTrigger>
|
|
794
|
-
<TooltipContent side="right">
|
|
795
|
-
{collapsed
|
|
796
|
-
? t("sidebar.expandSidebar")
|
|
797
|
-
: t("sidebar.collapseSidebar")}
|
|
798
|
-
</TooltipContent>
|
|
799
|
-
</Tooltip>
|
|
800
|
-
) : null}
|
|
801
812
|
</>
|
|
802
813
|
)}
|
|
803
814
|
</div>
|
|
@@ -1173,9 +1184,6 @@ export function Sidebar({
|
|
|
1173
1184
|
|
|
1174
1185
|
<div className="flex items-center gap-1 px-1.5 py-1.5">
|
|
1175
1186
|
<DevDatabaseLink />
|
|
1176
|
-
<div className="min-w-0 flex-1">
|
|
1177
|
-
<FeedbackButton className="px-3 py-2" />
|
|
1178
|
-
</div>
|
|
1179
1187
|
<Tooltip>
|
|
1180
1188
|
<TooltipTrigger asChild>
|
|
1181
1189
|
<Button
|
|
@@ -1202,6 +1210,13 @@ export function Sidebar({
|
|
|
1202
1210
|
</div>
|
|
1203
1211
|
</div>
|
|
1204
1212
|
) : null}
|
|
1213
|
+
<SidebarFooterActions
|
|
1214
|
+
collapsed={collapsed}
|
|
1215
|
+
feedback={feedbackButton}
|
|
1216
|
+
translate={translateButton}
|
|
1217
|
+
search={searchButton}
|
|
1218
|
+
collapse={collapseButton}
|
|
1219
|
+
/>
|
|
1205
1220
|
</aside>
|
|
1206
1221
|
</>
|
|
1207
1222
|
);
|