@agimon-ai/po-template-advanced 0.0.0-alpha.63 → 0.0.0-alpha.65

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.
@@ -1,9 +1,9 @@
1
1
  import { defineWebPlugin, defineWebTemplate } from "@agimon-ai/po-core/web";
2
2
  import { DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, HOST_SLOTS, discoverWorkspaceAdmission, findTransientTab, pluginActivityGroups, refreshWebPluginCompositions, sessionsStore, setDockOpen, settingsSection, transientTabsStore, uiStore, updateWorkspaceAdmission, useActiveSession, useActiveSessionMeta, useDashboardRoute, useDashboardState, useNoSessions, usePluginSlotProps, useSessionMcp, useWebPluginRegistry, watchDashboardTranscript, webTabs, workspaceAdmissionStore, workspacesStore } from "@agimon-ai/po-web-dashboard";
3
- import { ActivityDock, AppearanceSettings, CommandPalette, Composer, ContributedSettings, DialogOverlay, ImageSettings, NotificationSettings, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, RefusedCard, RemoteAccessDialog, RemoteControlSettings, RepositoryWorkspace, SelectionBar, SessionActivity, SessionMcp, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, ThreadView, Timeline, TopBar, WelcomePanel, useSessionRail } from "@agimon-ai/po-web-dashboard/views";
3
+ import { ActivityDock, AppearanceSettings, CommandPalette, Composer, ContributedSettings, DialogOverlay, HomePage, ImageSettings, NotificationSettings, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, RefusedCard, RemoteAccessDialog, RemoteControlSettings, RepositoryWorkspace, SelectionBar, SessionActivity, SessionMcp, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, ThreadView, Timeline, TopBar, WelcomePanel, useSessionRail } from "@agimon-ai/po-web-dashboard/views";
4
4
  import { useStore } from "@tanstack/react-store";
5
5
  import { memo, useEffect, useId, useRef, useState } from "react";
6
- import { ActivityIcon, AlertIcon, ArrowLeftIcon, Avatar, AvatarFallback, AvatarImage, Badge, BranchIcon, Button, Checkbox, ChevronUpIcon, CloseIcon, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, EditIcon, FolderIcon, ForkIcon, GearIcon, Input, Kbd, KebabIcon, LiveDuration, LoaderIcon, NavTab, OptionRow, PlusIcon, ShieldIcon, Textarea, TrashIcon, UsersIcon, cn } from "@agimon-ai/po-web-components";
6
+ import { ActivityIcon, AlertIcon, ArrowLeftIcon, Avatar, AvatarFallback, AvatarImage, Badge, BranchIcon, Button, Checkbox, ChevronUpIcon, CloseIcon, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, EditIcon, FolderIcon, ForkIcon, GearIcon, HomeIcon, Input, Kbd, KebabIcon, LiveDuration, LoaderIcon, NavTab, OptionRow, PlusIcon, ShieldIcon, Textarea, TrashIcon, UsersIcon, cn } from "@agimon-ai/po-web-components";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Link, useNavigate } from "@tanstack/react-router";
9
9
  //#region src/extensions/(frontend)/template/_components/AdvancedFolderBrowser.tsx
@@ -1314,6 +1314,21 @@ function AdvancedRail({ rail, onClose }) {
1314
1314
  })]
1315
1315
  })]
1316
1316
  }),
1317
+ /* @__PURE__ */ jsx("div", {
1318
+ className: "px-3 pt-4",
1319
+ children: /* @__PURE__ */ jsxs(Button, {
1320
+ variant: "ghost",
1321
+ size: "lg",
1322
+ "data-testid": "home-open",
1323
+ "aria-current": rail.homeActive ? "page" : void 0,
1324
+ onClick: actions.openHome,
1325
+ className: rail.homeActive ? "w-full justify-start gap-2.5 border border-po-edge-green bg-po-tint-green px-2 text-po-hi" : "w-full justify-start gap-2.5 border border-transparent px-2 text-po-text",
1326
+ children: [/* @__PURE__ */ jsx(HomeIcon, {
1327
+ "aria-hidden": "true",
1328
+ className: rail.homeActive ? "size-5 text-po-green" : "size-5 text-po-dim"
1329
+ }), "Home"]
1330
+ })
1331
+ }),
1317
1332
  rail.pluginContent,
1318
1333
  /* @__PURE__ */ jsxs("div", {
1319
1334
  className: "flex items-center justify-between px-5 pt-4 pb-2",
@@ -1497,7 +1512,7 @@ function AdvancedConversation() {
1497
1512
  const dockOpen = useStore(uiStore, (state) => state.dockOpen);
1498
1513
  const [railOpen, setRailOpen] = useState(false);
1499
1514
  const [mobileActivityOpen, setMobileActivityOpen] = useState(false);
1500
- const { sessionId, tabId, pageId } = useDashboardRoute();
1515
+ const { kind, sessionId, tabId, pageId } = useDashboardRoute();
1501
1516
  const slotProps = usePluginSlotProps(sessionId ?? null);
1502
1517
  const sessionWorkspaceId = useStore(sessionsStore, (state) => sessionId === void 0 ? void 0 : state.byId[sessionId]?.summary.workspaceId);
1503
1518
  const selectedWorkspaceId = useStore(workspacesStore, (state) => state.selectedId);
@@ -1518,7 +1533,7 @@ function AdvancedConversation() {
1518
1533
  const transientTab = storedTransientTab === void 0 ? void 0 : pluginActivityGroups(sessionId ?? null).map((group) => group.transientTab?.()).find((candidate) => candidate?.id === storedTransientTab.id) ?? storedTransientTab;
1519
1534
  const tab = (tabId === void 0 ? void 0 : webTabs(sessionId ?? null).find((entry) => entry.id === tabId)) ?? transientTab;
1520
1535
  const composerContext = tab === transientTab ? transientTab?.composerContext : void 0;
1521
- const routeKey = `${sessionId ?? ""}\u0000${tabId ?? ""}\u0000${pageId ?? ""}`;
1536
+ const routeKey = `${kind}\u0000${sessionId ?? ""}\u0000${tabId ?? ""}\u0000${pageId ?? ""}`;
1522
1537
  const [lastRouteKey, setLastRouteKey] = useState(routeKey);
1523
1538
  if (lastRouteKey !== routeKey) {
1524
1539
  setLastRouteKey(routeKey);
@@ -1537,11 +1552,11 @@ function AdvancedConversation() {
1537
1552
  if (mobileActivityOpen) setMobileActivityOpen(false);
1538
1553
  else setDockOpen(false);
1539
1554
  };
1540
- const page = pageId === void 0 ? null : /* @__PURE__ */ jsx(PluginPage, {
1555
+ const page = pageId !== void 0 ? /* @__PURE__ */ jsx(PluginPage, {
1541
1556
  pageId,
1542
1557
  sessionId: null,
1543
1558
  onShowSessions: () => setRailOpen(true)
1544
- });
1559
+ }) : kind === "home" && !noSessions ? /* @__PURE__ */ jsx(HomePage, { onShowSessions: () => setRailOpen(true) }) : null;
1545
1560
  return /* @__PURE__ */ jsxs("div", {
1546
1561
  "data-testid": "cockpit",
1547
1562
  className: "h-full min-w-0 overflow-hidden",