@agimon-ai/po-web-dashboard 0.0.0-alpha.64 → 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.
- package/dist/views.cjs +3 -0
- package/dist/views.d.mts +2 -1
- package/dist/views.mjs +2 -1
- package/dist/web/components/HomePage.cjs +80 -0
- package/dist/web/components/HomePage.cjs.map +1 -0
- package/dist/web/components/HomePage.d.mts +22 -0
- package/dist/web/components/HomePage.d.mts.map +1 -0
- package/dist/web/components/HomePage.mjs +79 -0
- package/dist/web/components/HomePage.mjs.map +1 -0
- package/dist/web/components/PluginPage.cjs +1 -1
- package/dist/web/components/PluginPage.mjs +1 -1
- package/dist/web/components/QrCode.cjs +1 -1
- package/dist/web/components/QrCode.mjs +1 -1
- package/dist/web/components/SessionMcp.cjs +1 -1
- package/dist/web/components/SessionMcp.mjs +1 -1
- package/dist/web/components/Story.fixture.cjs +1 -1
- package/dist/web/components/Story.fixture.mjs +1 -1
- package/dist/web/features/activity/ActivityDock.cjs +1 -1
- package/dist/web/features/activity/ActivityDock.mjs +1 -1
- package/dist/web/features/activity/ContextItemDialog.cjs +1 -1
- package/dist/web/features/activity/ContextItemDialog.mjs +1 -1
- package/dist/web/features/activity/ContextPanel.cjs +1 -1
- package/dist/web/features/activity/ContextPanel.mjs +1 -1
- package/dist/web/features/activity/DockTabs.cjs +9 -7
- package/dist/web/features/activity/DockTabs.cjs.map +1 -1
- package/dist/web/features/activity/DockTabs.d.mts +1 -1
- package/dist/web/features/activity/DockTabs.d.mts.map +1 -1
- package/dist/web/features/activity/DockTabs.mjs +9 -7
- package/dist/web/features/activity/DockTabs.mjs.map +1 -1
- package/dist/web/features/connection/RefusedCard.cjs +1 -1
- package/dist/web/features/connection/RefusedCard.mjs +1 -1
- package/dist/web/features/dialogs/DialogOverlay.cjs +1 -1
- package/dist/web/features/dialogs/DialogOverlay.mjs +1 -1
- package/dist/web/features/leader/CommandPalette.cjs +1 -1
- package/dist/web/features/leader/CommandPalette.mjs +1 -1
- package/dist/web/features/remote/DevProxyTargets.cjs +1 -1
- package/dist/web/features/remote/DevProxyTargets.mjs +1 -1
- package/dist/web/features/remote/PairedDeviceList.cjs +1 -1
- package/dist/web/features/remote/PairedDeviceList.mjs +1 -1
- package/dist/web/features/remote/PairingApprovalDialog.cjs +1 -1
- package/dist/web/features/remote/PairingApprovalDialog.mjs +1 -1
- package/dist/web/features/remote/RemoteAccessDialog.cjs +1 -1
- package/dist/web/features/remote/RemoteAccessDialog.mjs +1 -1
- package/dist/web/features/remote/RemoteAccessOptions.cjs +1 -1
- package/dist/web/features/remote/RemoteAccessOptions.mjs +1 -1
- package/dist/web/features/remote/RemoteAccessPairing.cjs +1 -1
- package/dist/web/features/remote/RemoteAccessPairing.mjs +1 -1
- package/dist/web/features/remote/TrustedDeviceList.cjs +1 -1
- package/dist/web/features/remote/TrustedDeviceList.mjs +1 -1
- package/dist/web/features/selection/SelectionBar.cjs +1 -1
- package/dist/web/features/selection/SelectionBar.mjs +1 -1
- package/dist/web/features/session/AgentLockPanel.cjs +1 -1
- package/dist/web/features/session/AgentLockPanel.mjs +1 -1
- package/dist/web/features/session/Composer.cjs +1 -1
- package/dist/web/features/session/Composer.mjs +1 -1
- package/dist/web/features/session/DormantPanel.cjs +1 -1
- package/dist/web/features/session/DormantPanel.mjs +1 -1
- package/dist/web/features/session/MentionPreviews.cjs +1 -1
- package/dist/web/features/session/MentionPreviews.mjs +1 -1
- package/dist/web/features/session/MessageMarkdown.cjs +1 -1
- package/dist/web/features/session/MessageMarkdown.mjs +1 -1
- package/dist/web/features/session/QueueSheet.cjs +1 -1
- package/dist/web/features/session/QueueSheet.mjs +1 -1
- package/dist/web/features/session/SessionActivity.cjs +1 -1
- package/dist/web/features/session/SessionActivity.mjs +1 -1
- package/dist/web/features/session/SessionTranscriptView.cjs +1 -1
- package/dist/web/features/session/SessionTranscriptView.mjs +1 -1
- package/dist/web/features/session/ThreadView.cjs +1 -1
- package/dist/web/features/session/ThreadView.mjs +1 -1
- package/dist/web/features/session/Timeline.cjs +1 -1
- package/dist/web/features/session/Timeline.mjs +1 -1
- package/dist/web/features/session/ToolCard.cjs +1 -1
- package/dist/web/features/session/ToolCard.mjs +1 -1
- package/dist/web/features/sessions/NewSessionDialog.cjs +1 -1
- package/dist/web/features/sessions/NewSessionDialog.mjs +1 -1
- package/dist/web/features/sessions/ResumeSessionDialog.cjs +1 -1
- package/dist/web/features/sessions/ResumeSessionDialog.mjs +1 -1
- package/dist/web/features/sessions/WelcomePanel.cjs +1 -1
- package/dist/web/features/sessions/WelcomePanel.mjs +1 -1
- package/dist/web/features/sessions/useSessionRail.cjs +7 -0
- package/dist/web/features/sessions/useSessionRail.cjs.map +1 -1
- package/dist/web/features/sessions/useSessionRail.d.mts.map +1 -1
- package/dist/web/features/sessions/useSessionRail.mjs +8 -1
- package/dist/web/features/sessions/useSessionRail.mjs.map +1 -1
- package/dist/web/features/settings/AppearanceSettings.cjs +1 -1
- package/dist/web/features/settings/AppearanceSettings.mjs +1 -1
- package/dist/web/features/settings/ContributedSettings.cjs +1 -1
- package/dist/web/features/settings/ContributedSettings.mjs +1 -1
- package/dist/web/features/settings/HostsSettings.cjs +1 -1
- package/dist/web/features/settings/HostsSettings.mjs +1 -1
- package/dist/web/features/settings/ImageSettings.cjs +1 -1
- package/dist/web/features/settings/ImageSettings.mjs +1 -1
- package/dist/web/features/settings/LoginFlowDialog.cjs +1 -1
- package/dist/web/features/settings/LoginFlowDialog.mjs +1 -1
- package/dist/web/features/settings/NotificationSettings.cjs +1 -1
- package/dist/web/features/settings/NotificationSettings.mjs +1 -1
- package/dist/web/features/settings/PluginSettings.cjs +1 -1
- package/dist/web/features/settings/PluginSettings.mjs +1 -1
- package/dist/web/features/settings/ProviderLogo.cjs +1 -1
- package/dist/web/features/settings/ProviderLogo.mjs +1 -1
- package/dist/web/features/settings/ProviderSettings.cjs +1 -1
- package/dist/web/features/settings/ProviderSettings.mjs +1 -1
- package/dist/web/features/settings/RemoteControlSettings.cjs +1 -1
- package/dist/web/features/settings/RemoteControlSettings.mjs +1 -1
- package/dist/web/features/settings/RepositoryInstructions.cjs +1 -1
- package/dist/web/features/settings/RepositoryInstructions.mjs +1 -1
- package/dist/web/features/settings/RepositorySettings.cjs +1 -1
- package/dist/web/features/settings/RepositorySettings.mjs +1 -1
- package/dist/web/features/settings/RepositoryWorkspace.cjs +1 -1
- package/dist/web/features/settings/RepositoryWorkspace.mjs +1 -1
- package/dist/web/features/settings/RunInContainerSection.cjs +1 -1
- package/dist/web/features/settings/RunInContainerSection.mjs +1 -1
- package/dist/web/features/settings/SessionMcpSettings.cjs +1 -1
- package/dist/web/features/settings/SessionMcpSettings.mjs +1 -1
- package/dist/web/features/settings/SettingsMenu.cjs +1 -1
- package/dist/web/features/settings/SettingsMenu.mjs +1 -1
- package/dist/web/features/settings/SettingsPanelHost.cjs +1 -1
- package/dist/web/features/settings/SettingsPanelHost.mjs +1 -1
- package/dist/web/features/settings/TemplateSettings.cjs +1 -1
- package/dist/web/features/settings/TemplateSettings.mjs +1 -1
- package/dist/web/features/settings/TunnelSettings.cjs +1 -1
- package/dist/web/features/settings/TunnelSettings.mjs +1 -1
- package/dist/web/features/status/TopBar.cjs +1 -1
- package/dist/web/features/status/TopBar.mjs +1 -1
- package/dist/web/lib/dashboardRoute.cjs +1 -1
- package/dist/web/lib/dashboardRoute.cjs.map +1 -1
- package/dist/web/lib/dashboardRoute.d.mts +2 -1
- package/dist/web/lib/dashboardRoute.d.mts.map +1 -1
- package/dist/web/lib/dashboardRoute.mjs +1 -1
- package/dist/web/lib/dashboardRoute.mjs.map +1 -1
- package/dist/web/lib/pluginRegistry.cjs +4 -1
- package/dist/web/lib/pluginRegistry.cjs.map +1 -1
- package/dist/web/lib/pluginRegistry.d.mts +4 -1
- package/dist/web/lib/pluginRegistry.d.mts.map +1 -1
- package/dist/web/lib/pluginRegistry.mjs +4 -1
- package/dist/web/lib/pluginRegistry.mjs.map +1 -1
- package/package.json +5 -5
package/dist/views.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_ToolRendererBoundary = require("./web/lib/ToolRendererBoundary.cjs");
|
|
3
|
+
const require_HomePage = require("./web/components/HomePage.cjs");
|
|
3
4
|
const require_MascotMark = require("./web/components/MascotMark.cjs");
|
|
4
5
|
const require_PluginPage = require("./web/components/PluginPage.cjs");
|
|
5
6
|
const require_PluginSurface = require("./web/components/PluginSurface.cjs");
|
|
@@ -67,6 +68,8 @@ exports.DevProxyTargets = require_DevProxyTargets.DevProxyTargets;
|
|
|
67
68
|
exports.DialogOverlay = require_DialogOverlay.DialogOverlay;
|
|
68
69
|
exports.DockTabs = require_DockTabs.DockTabs;
|
|
69
70
|
exports.DormantPanel = require_DormantPanel.DormantPanel;
|
|
71
|
+
exports.HomePage = require_HomePage.HomePage;
|
|
72
|
+
exports.HomeView = require_HomePage.HomeView;
|
|
70
73
|
exports.HostsSettings = require_HostsSettings.HostsSettings;
|
|
71
74
|
exports.ImageSettings = require_ImageSettings.ImageSettings;
|
|
72
75
|
exports.LoginFlowDialog = require_LoginFlowDialog.LoginFlowDialog;
|
package/dist/views.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ToolRendererBoundary } from "./web/lib/ToolRendererBoundary.mjs";
|
|
2
|
+
import { HomePage, HomeView, HomeViewProps } from "./web/components/HomePage.mjs";
|
|
2
3
|
import { MascotMark, MascotMarkProps } from "./web/components/MascotMark.mjs";
|
|
3
4
|
import { PluginPage } from "./web/components/PluginPage.mjs";
|
|
4
5
|
import { PluginSurface } from "./web/components/PluginSurface.mjs";
|
|
@@ -53,4 +54,4 @@ import { SettingsPanelHost } from "./web/features/settings/SettingsPanelHost.mjs
|
|
|
53
54
|
import { TemplateSettings } from "./web/features/settings/TemplateSettings.mjs";
|
|
54
55
|
import { TunnelSettings } from "./web/features/settings/TunnelSettings.mjs";
|
|
55
56
|
import { TopBar } from "./web/features/status/TopBar.mjs";
|
|
56
|
-
export { ActivityDock, AppearanceSettings, CockpitHost, CommandPalette, Composer, ComposerPrompt, ContextItemDialog, ContextItemDialogProps, ContextPanel, ContextPanelView, ContributedSettings, DevProxyTargets, DialogOverlay, DockFaceSnapshot, DockTabs, DormantPanel, HostsSettings, HostsSettingsProps, ImageSettings, LoginFlowDialog, METHOD_LABEL, MascotMark, MascotMarkProps, MentionPreviewAsset, MentionPreviews, MessageFileLinkHandler, MessageMarkdown, ModelPopup, NewSessionDialog, NotificationSettings, PairedDeviceList, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, QrCode, QrCodeProps, QueueSheet, RefusedCard, RemoteAccessDialog, RemoteAccessOptions, RemoteAccessPairing, RemoteControlSettings, RepositorySettings, RepositoryWorkspace, ResumeSessionDialog, SelectionBar, SessionActivity, SessionActivityView, SessionMcp, SessionMcpSettings, SessionMcpTools, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, TemplateSettings, ThreadView, Timeline, ToolCard, ToolRendererBoundary, TopBar, Transcript, TrustedDeviceList, TrustedDeviceListView, TrustedDeviceListViewProps, TunnelSettings, WelcomePanel, addComposerFiles, appearedFaces, hostKeyFor, isQuickTunnel, nestedToolCard, readComposerFiles, sessionActivity, useNewSessionActions, useSessionRail };
|
|
57
|
+
export { ActivityDock, AppearanceSettings, CockpitHost, CommandPalette, Composer, ComposerPrompt, ContextItemDialog, ContextItemDialogProps, ContextPanel, ContextPanelView, ContributedSettings, DevProxyTargets, DialogOverlay, DockFaceSnapshot, DockTabs, DormantPanel, HomePage, HomeView, HomeViewProps, HostsSettings, HostsSettingsProps, ImageSettings, LoginFlowDialog, METHOD_LABEL, MascotMark, MascotMarkProps, MentionPreviewAsset, MentionPreviews, MessageFileLinkHandler, MessageMarkdown, ModelPopup, NewSessionDialog, NotificationSettings, PairedDeviceList, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, QrCode, QrCodeProps, QueueSheet, RefusedCard, RemoteAccessDialog, RemoteAccessOptions, RemoteAccessPairing, RemoteControlSettings, RepositorySettings, RepositoryWorkspace, ResumeSessionDialog, SelectionBar, SessionActivity, SessionActivityView, SessionMcp, SessionMcpSettings, SessionMcpTools, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, TemplateSettings, ThreadView, Timeline, ToolCard, ToolRendererBoundary, TopBar, Transcript, TrustedDeviceList, TrustedDeviceListView, TrustedDeviceListViewProps, TunnelSettings, WelcomePanel, addComposerFiles, appearedFaces, hostKeyFor, isQuickTunnel, nestedToolCard, readComposerFiles, sessionActivity, useNewSessionActions, useSessionRail };
|
package/dist/views.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ToolRendererBoundary } from "./web/lib/ToolRendererBoundary.mjs";
|
|
2
|
+
import { HomePage, HomeView } from "./web/components/HomePage.mjs";
|
|
2
3
|
import { MascotMark } from "./web/components/MascotMark.mjs";
|
|
3
4
|
import { PluginPage } from "./web/components/PluginPage.mjs";
|
|
4
5
|
import { PluginSurface } from "./web/components/PluginSurface.mjs";
|
|
@@ -53,4 +54,4 @@ import { SettingsMenu } from "./web/features/settings/SettingsMenu.mjs";
|
|
|
53
54
|
import { RepositoryWorkspace } from "./web/features/settings/RepositoryWorkspace.mjs";
|
|
54
55
|
import { SettingsPanelHost } from "./web/features/settings/SettingsPanelHost.mjs";
|
|
55
56
|
import { TopBar } from "./web/features/status/TopBar.mjs";
|
|
56
|
-
export { ActivityDock, AppearanceSettings, CommandPalette, Composer, ComposerPrompt, ContextItemDialog, ContextPanel, ContextPanelView, ContributedSettings, DevProxyTargets, DialogOverlay, DockTabs, DormantPanel, HostsSettings, ImageSettings, LoginFlowDialog, METHOD_LABEL, MascotMark, MentionPreviewAsset, MentionPreviews, MessageMarkdown, ModelPopup, NewSessionDialog, NotificationSettings, PairedDeviceList, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, QrCode, QueueSheet, RefusedCard, RemoteAccessDialog, RemoteAccessOptions, RemoteAccessPairing, RemoteControlSettings, RepositorySettings, RepositoryWorkspace, ResumeSessionDialog, SelectionBar, SessionActivity, SessionMcp, SessionMcpSettings, SessionMcpTools, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, TemplateSettings, ThreadView, Timeline, ToolCard, ToolRendererBoundary, TopBar, Transcript, TrustedDeviceList, TrustedDeviceListView, TunnelSettings, WelcomePanel, addComposerFiles, appearedFaces, hostKeyFor, isQuickTunnel, nestedToolCard, readComposerFiles, sessionActivity, useNewSessionActions, useSessionRail };
|
|
57
|
+
export { ActivityDock, AppearanceSettings, CommandPalette, Composer, ComposerPrompt, ContextItemDialog, ContextPanel, ContextPanelView, ContributedSettings, DevProxyTargets, DialogOverlay, DockTabs, DormantPanel, HomePage, HomeView, HostsSettings, ImageSettings, LoginFlowDialog, METHOD_LABEL, MascotMark, MentionPreviewAsset, MentionPreviews, MessageMarkdown, ModelPopup, NewSessionDialog, NotificationSettings, PairedDeviceList, PairingApprovalDialog, PluginPage, PluginSettings, PluginSurface, ProviderSettings, QrCode, QueueSheet, RefusedCard, RemoteAccessDialog, RemoteAccessOptions, RemoteAccessPairing, RemoteControlSettings, RepositorySettings, RepositoryWorkspace, ResumeSessionDialog, SelectionBar, SessionActivity, SessionMcp, SessionMcpSettings, SessionMcpTools, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, TemplateSettings, ThreadView, Timeline, ToolCard, ToolRendererBoundary, TopBar, Transcript, TrustedDeviceList, TrustedDeviceListView, TunnelSettings, WelcomePanel, addComposerFiles, appearedFaces, hostKeyFor, isQuickTunnel, nestedToolCard, readComposerFiles, sessionActivity, useNewSessionActions, useSessionRail };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const require_pluginRegistry = require("../lib/pluginRegistry.cjs");
|
|
2
|
+
const require_ToolRendererBoundary = require("../lib/ToolRendererBoundary.cjs");
|
|
3
|
+
const require_usePluginSlotProps = require("../stores/usePluginSlotProps.cjs");
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
//#region src/web/components/HomePage.tsx
|
|
8
|
+
/** Home's frame: a 2/3 main column and a 1/3 side column on wide screens, stacked below that. */
|
|
9
|
+
function HomeView({ main, side, onShowSessions, navigationToggle = "mobile" }) {
|
|
10
|
+
const empty = main.length === 0 && side.length === 0;
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
12
|
+
"aria-label": "Home",
|
|
13
|
+
"data-testid": "home-page",
|
|
14
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text",
|
|
15
|
+
children: [onShowSessions ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16
|
+
className: `shrink-0 px-3 pt-2 ${navigationToggle === "mobile" ? "md:hidden" : ""}`,
|
|
17
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.Button, {
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "icon-md",
|
|
20
|
+
"data-testid": "mobile-sessions-open",
|
|
21
|
+
title: "Show sessions",
|
|
22
|
+
"aria-label": "Show sessions",
|
|
23
|
+
onClick: onShowSessions,
|
|
24
|
+
className: "text-po-dim",
|
|
25
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.FolderIcon, { className: "size-4" })
|
|
26
|
+
})
|
|
27
|
+
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
28
|
+
className: "mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8",
|
|
29
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
|
|
30
|
+
className: "text-2xl font-semibold text-po-hi",
|
|
31
|
+
children: "Home"
|
|
32
|
+
}), empty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.EmptyState, {
|
|
33
|
+
title: "Nothing on Home yet",
|
|
34
|
+
description: "Apps you add show up here."
|
|
35
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36
|
+
className: "grid grid-cols-1 items-start gap-4 xl:grid-cols-3",
|
|
37
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
38
|
+
"data-testid": "home-main",
|
|
39
|
+
className: `flex min-w-0 flex-col gap-4 ${side.length > 0 ? "xl:col-span-2" : "xl:col-span-3"}`,
|
|
40
|
+
children: main
|
|
41
|
+
}), side.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
42
|
+
"data-testid": "home-side",
|
|
43
|
+
className: "flex min-w-0 flex-col gap-4",
|
|
44
|
+
children: side
|
|
45
|
+
}) : null]
|
|
46
|
+
})]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The Home screen at `/`: every global plugin's `home-apps` card. A card asks for the narrow
|
|
52
|
+
* column with `data: { column: 'side' }`; each renders behind its own boundary.
|
|
53
|
+
*/
|
|
54
|
+
function HomePage({ onShowSessions, navigationToggle }) {
|
|
55
|
+
const props = require_usePluginSlotProps.usePluginSlotProps(null);
|
|
56
|
+
const main = [];
|
|
57
|
+
const side = [];
|
|
58
|
+
for (const fill of require_pluginRegistry.globalSlotFills(require_pluginRegistry.HOST_SLOTS.homeApps)) {
|
|
59
|
+
const component = fill.component;
|
|
60
|
+
if (component === void 0) continue;
|
|
61
|
+
const key = `${fill.pluginId}:${fill.id}`;
|
|
62
|
+
const card = (0, react.createElement)(require_ToolRendererBoundary.ToolRendererBoundary, {
|
|
63
|
+
key,
|
|
64
|
+
toolName: key,
|
|
65
|
+
children: (failed) => failed ? null : (0, react.createElement)(component, props)
|
|
66
|
+
});
|
|
67
|
+
(fill.data?.column === "side" ? side : main).push(card);
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HomeView, {
|
|
70
|
+
main,
|
|
71
|
+
side,
|
|
72
|
+
...onShowSessions === void 0 ? {} : { onShowSessions },
|
|
73
|
+
...navigationToggle === void 0 ? {} : { navigationToggle }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
exports.HomePage = HomePage;
|
|
78
|
+
exports.HomeView = HomeView;
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=HomePage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomePage.cjs","names":["Button","FolderIcon","EmptyState","usePluginSlotProps","globalSlotFills","HOST_SLOTS","createElement","ToolRendererBoundary"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport { globalSlotFills, HOST_SLOTS } from '../lib/pluginRegistry';\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\n\nexport interface HomeViewProps {\n /** Cards for the wide column, in slot order. */\n main: readonly ReactNode[];\n /** Cards for the narrow column; the column is left out when there are none. */\n side: readonly ReactNode[];\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** Home's frame: a 2/3 main column and a 1/3 side column on wide screens, stacked below that. */\nexport function HomeView({ main, side, onShowSessions, navigationToggle = 'mobile' }: HomeViewProps) {\n const empty = main.length === 0 && side.length === 0;\n return (\n <section\n aria-label=\"Home\"\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">Home</h1>\n {empty ? (\n <EmptyState title=\"Nothing on Home yet\" description=\"Apps you add show up here.\" />\n ) : (\n <div className=\"grid grid-cols-1 items-start gap-4 xl:grid-cols-3\">\n <div\n data-testid=\"home-main\"\n className={`flex min-w-0 flex-col gap-4 ${side.length > 0 ? 'xl:col-span-2' : 'xl:col-span-3'}`}\n >\n {main}\n </div>\n {side.length > 0 ? (\n <div data-testid=\"home-side\" className=\"flex min-w-0 flex-col gap-4\">\n {side}\n </div>\n ) : null}\n </div>\n )}\n </div>\n </section>\n );\n}\n\n/**\n * The Home screen at `/`: every global plugin's `home-apps` card. A card asks for the narrow\n * column with `data: { column: 'side' }`; each renders behind its own boundary.\n */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const main: ReactNode[] = [];\n const side: ReactNode[] = [];\n for (const fill of globalSlotFills(HOST_SLOTS.homeApps)) {\n const component = fill.component;\n if (component === undefined) continue;\n const key = `${fill.pluginId}:${fill.id}`;\n const card = createElement(ToolRendererBoundary, {\n key,\n toolName: key,\n children: (failed: boolean) => (failed ? null : createElement(component, props)),\n });\n const column = (fill.data as { column?: unknown } | undefined)?.column;\n (column === 'side' ? side : main).push(card);\n }\n return (\n <HomeView\n main={main}\n side={side}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgB,SAAS,EAAE,MAAM,MAAM,gBAAgB,mBAAmB,YAA2B;CACnG,MAAM,QAAQ,KAAK,WAAW,KAAK,KAAK,WAAW;CACnD,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EACE,cAAW;EACX,eAAY;EACZ,WAAU;EAHZ,UAAA,CAKG,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;GAClF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,6BAAAA,QAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAY;IACZ,OAAM;IACN,cAAW;IACX,SAAS;IACT,WAAU;IAEV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,YAAD,EAAY,WAAU,SAAU,CAAA;GAC1B,CAAA;EACL,CAAA,IACH,MACJ,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;IAAI,WAAU;IAAoC,UAAA;GAAQ,CAAA,GACzD,QACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,YAAD;IAAY,OAAM;IAAsB,aAAY;GAA8B,CAAA,IAElF,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KACE,eAAY;KACZ,WAAW,+BAA+B,KAAK,SAAS,IAAI,kBAAkB;KAE7E,UAAA;IACE,CAAA,GACJ,KAAK,SAAS,IACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,eAAY;KAAY,WAAU;KACpC,UAAA;IACE,CAAA,IACH,IACD;GAEJ,CAAA,CAAA;EACE,CAAA,CAAA;;AAEb;;;;;AAMA,SAAgB,SAAS,EACvB,gBACA,oBAIC;CACD,MAAM,QAAQC,2BAAAA,mBAAmB,IAAI;CACrC,MAAM,OAAoB,CAAC;CAC3B,MAAM,OAAoB,CAAC;CAC3B,KAAK,MAAM,QAAQC,uBAAAA,gBAAgBC,uBAAAA,WAAW,QAAQ,GAAG;EACvD,MAAM,YAAY,KAAK;EACvB,IAAI,cAAc,KAAA,GAAW;EAC7B,MAAM,MAAM,GAAG,KAAK,SAAS,GAAG,KAAK;EACrC,MAAM,QAAA,GAAOC,MAAAA,cAAAA,CAAcC,6BAAAA,sBAAsB;GAC/C;GACA,UAAU;GACV,WAAW,WAAqB,SAAS,QAAA,GAAOD,MAAAA,cAAAA,CAAc,WAAW,KAAK;EAChF,CAAC;EAED,CADgB,KAAK,MAA2C,WACpD,SAAS,OAAO,KAAA,CAAM,KAAK,IAAI;CAC7C;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACQ;EACA;EACN,GAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EAC1D,GAAK,qBAAqB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB;CAC/D,CAAA;AAEL"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/web/components/HomePage.d.ts
|
|
3
|
+
export interface HomeViewProps {
|
|
4
|
+
/** Cards for the wide column, in slot order. */
|
|
5
|
+
main: readonly ReactNode[];
|
|
6
|
+
/** Cards for the narrow column; the column is left out when there are none. */
|
|
7
|
+
side: readonly ReactNode[];
|
|
8
|
+
onShowSessions?: () => void;
|
|
9
|
+
navigationToggle?: 'mobile' | 'always';
|
|
10
|
+
}
|
|
11
|
+
/** Home's frame: a 2/3 main column and a 1/3 side column on wide screens, stacked below that. */
|
|
12
|
+
export declare function HomeView({ main, side, onShowSessions, navigationToggle }: HomeViewProps): import("react").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* The Home screen at `/`: every global plugin's `home-apps` card. A card asks for the narrow
|
|
15
|
+
* column with `data: { column: 'side' }`; each renders behind its own boundary.
|
|
16
|
+
*/
|
|
17
|
+
export declare function HomePage({ onShowSessions, navigationToggle }: {
|
|
18
|
+
onShowSessions?: () => void;
|
|
19
|
+
navigationToggle?: 'mobile' | 'always';
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
//# sourceMappingURL=HomePage.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomePage.d.mts","names":[],"sources":["../../../src/web/components/HomePage.tsx"],"mappings":";;iBAOiB;;EAEf,eAAe;;EAEf,eAAe;EACf;EACA;;;wBAIc,WAAW,MAAM,MAAM,gBAAgB,oBAA+B,gCAAa,IAAA;;;;;wBAmDnF,WACd,gBACA;EAEA;EACA;oBACD,IAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HOST_SLOTS, globalSlotFills } from "../lib/pluginRegistry.mjs";
|
|
2
|
+
import { ToolRendererBoundary } from "../lib/ToolRendererBoundary.mjs";
|
|
3
|
+
import { usePluginSlotProps } from "../stores/usePluginSlotProps.mjs";
|
|
4
|
+
import { createElement } from "react";
|
|
5
|
+
import { Button, EmptyState, FolderIcon } from "@agimon-ai/po-web-components";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/web/components/HomePage.tsx
|
|
8
|
+
/** Home's frame: a 2/3 main column and a 1/3 side column on wide screens, stacked below that. */
|
|
9
|
+
function HomeView({ main, side, onShowSessions, navigationToggle = "mobile" }) {
|
|
10
|
+
const empty = main.length === 0 && side.length === 0;
|
|
11
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
12
|
+
"aria-label": "Home",
|
|
13
|
+
"data-testid": "home-page",
|
|
14
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text",
|
|
15
|
+
children: [onShowSessions ? /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: `shrink-0 px-3 pt-2 ${navigationToggle === "mobile" ? "md:hidden" : ""}`,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "icon-md",
|
|
20
|
+
"data-testid": "mobile-sessions-open",
|
|
21
|
+
title: "Show sessions",
|
|
22
|
+
"aria-label": "Show sessions",
|
|
23
|
+
onClick: onShowSessions,
|
|
24
|
+
className: "text-po-dim",
|
|
25
|
+
children: /* @__PURE__ */ jsx(FolderIcon, { className: "size-4" })
|
|
26
|
+
})
|
|
27
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: "mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8",
|
|
29
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
30
|
+
className: "text-2xl font-semibold text-po-hi",
|
|
31
|
+
children: "Home"
|
|
32
|
+
}), empty ? /* @__PURE__ */ jsx(EmptyState, {
|
|
33
|
+
title: "Nothing on Home yet",
|
|
34
|
+
description: "Apps you add show up here."
|
|
35
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: "grid grid-cols-1 items-start gap-4 xl:grid-cols-3",
|
|
37
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
38
|
+
"data-testid": "home-main",
|
|
39
|
+
className: `flex min-w-0 flex-col gap-4 ${side.length > 0 ? "xl:col-span-2" : "xl:col-span-3"}`,
|
|
40
|
+
children: main
|
|
41
|
+
}), side.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
42
|
+
"data-testid": "home-side",
|
|
43
|
+
className: "flex min-w-0 flex-col gap-4",
|
|
44
|
+
children: side
|
|
45
|
+
}) : null]
|
|
46
|
+
})]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The Home screen at `/`: every global plugin's `home-apps` card. A card asks for the narrow
|
|
52
|
+
* column with `data: { column: 'side' }`; each renders behind its own boundary.
|
|
53
|
+
*/
|
|
54
|
+
function HomePage({ onShowSessions, navigationToggle }) {
|
|
55
|
+
const props = usePluginSlotProps(null);
|
|
56
|
+
const main = [];
|
|
57
|
+
const side = [];
|
|
58
|
+
for (const fill of globalSlotFills(HOST_SLOTS.homeApps)) {
|
|
59
|
+
const component = fill.component;
|
|
60
|
+
if (component === void 0) continue;
|
|
61
|
+
const key = `${fill.pluginId}:${fill.id}`;
|
|
62
|
+
const card = createElement(ToolRendererBoundary, {
|
|
63
|
+
key,
|
|
64
|
+
toolName: key,
|
|
65
|
+
children: (failed) => failed ? null : createElement(component, props)
|
|
66
|
+
});
|
|
67
|
+
(fill.data?.column === "side" ? side : main).push(card);
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ jsx(HomeView, {
|
|
70
|
+
main,
|
|
71
|
+
side,
|
|
72
|
+
...onShowSessions === void 0 ? {} : { onShowSessions },
|
|
73
|
+
...navigationToggle === void 0 ? {} : { navigationToggle }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { HomePage, HomeView };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=HomePage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomePage.mjs","names":[],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport { globalSlotFills, HOST_SLOTS } from '../lib/pluginRegistry';\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\n\nexport interface HomeViewProps {\n /** Cards for the wide column, in slot order. */\n main: readonly ReactNode[];\n /** Cards for the narrow column; the column is left out when there are none. */\n side: readonly ReactNode[];\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** Home's frame: a 2/3 main column and a 1/3 side column on wide screens, stacked below that. */\nexport function HomeView({ main, side, onShowSessions, navigationToggle = 'mobile' }: HomeViewProps) {\n const empty = main.length === 0 && side.length === 0;\n return (\n <section\n aria-label=\"Home\"\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">Home</h1>\n {empty ? (\n <EmptyState title=\"Nothing on Home yet\" description=\"Apps you add show up here.\" />\n ) : (\n <div className=\"grid grid-cols-1 items-start gap-4 xl:grid-cols-3\">\n <div\n data-testid=\"home-main\"\n className={`flex min-w-0 flex-col gap-4 ${side.length > 0 ? 'xl:col-span-2' : 'xl:col-span-3'}`}\n >\n {main}\n </div>\n {side.length > 0 ? (\n <div data-testid=\"home-side\" className=\"flex min-w-0 flex-col gap-4\">\n {side}\n </div>\n ) : null}\n </div>\n )}\n </div>\n </section>\n );\n}\n\n/**\n * The Home screen at `/`: every global plugin's `home-apps` card. A card asks for the narrow\n * column with `data: { column: 'side' }`; each renders behind its own boundary.\n */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const main: ReactNode[] = [];\n const side: ReactNode[] = [];\n for (const fill of globalSlotFills(HOST_SLOTS.homeApps)) {\n const component = fill.component;\n if (component === undefined) continue;\n const key = `${fill.pluginId}:${fill.id}`;\n const card = createElement(ToolRendererBoundary, {\n key,\n toolName: key,\n children: (failed: boolean) => (failed ? null : createElement(component, props)),\n });\n const column = (fill.data as { column?: unknown } | undefined)?.column;\n (column === 'side' ? side : main).push(card);\n }\n return (\n <HomeView\n main={main}\n side={side}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgB,SAAS,EAAE,MAAM,MAAM,gBAAgB,mBAAmB,YAA2B;CACnG,MAAM,QAAQ,KAAK,WAAW,KAAK,KAAK,WAAW;CACnD,OACE,qBAAC,WAAD;EACE,cAAW;EACX,eAAY;EACZ,WAAU;EAHZ,UAAA,CAKG,iBACC,oBAAC,OAAD;GAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;GAClF,UAAA,oBAAC,QAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAY;IACZ,OAAM;IACN,cAAW;IACX,SAAS;IACT,WAAU;IAEV,UAAA,oBAAC,YAAD,EAAY,WAAU,SAAU,CAAA;GAC1B,CAAA;EACL,CAAA,IACH,MACJ,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,MAAD;IAAI,WAAU;IAAoC,UAAA;GAAQ,CAAA,GACzD,QACC,oBAAC,YAAD;IAAY,OAAM;IAAsB,aAAY;GAA8B,CAAA,IAElF,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,oBAAC,OAAD;KACE,eAAY;KACZ,WAAW,+BAA+B,KAAK,SAAS,IAAI,kBAAkB;KAE7E,UAAA;IACE,CAAA,GACJ,KAAK,SAAS,IACb,oBAAC,OAAD;KAAK,eAAY;KAAY,WAAU;KACpC,UAAA;IACE,CAAA,IACH,IACD;GAEJ,CAAA,CAAA;EACE,CAAA,CAAA;;AAEb;;;;;AAMA,SAAgB,SAAS,EACvB,gBACA,oBAIC;CACD,MAAM,QAAQ,mBAAmB,IAAI;CACrC,MAAM,OAAoB,CAAC;CAC3B,MAAM,OAAoB,CAAC;CAC3B,KAAK,MAAM,QAAQ,gBAAgB,WAAW,QAAQ,GAAG;EACvD,MAAM,YAAY,KAAK;EACvB,IAAI,cAAc,KAAA,GAAW;EAC7B,MAAM,MAAM,GAAG,KAAK,SAAS,GAAG,KAAK;EACrC,MAAM,OAAO,cAAc,sBAAsB;GAC/C;GACA,UAAU;GACV,WAAW,WAAqB,SAAS,OAAO,cAAc,WAAW,KAAK;EAChF,CAAC;EAED,CADgB,KAAK,MAA2C,WACpD,SAAS,OAAO,KAAA,CAAM,KAAK,IAAI;CAC7C;CACA,OACE,oBAAC,UAAD;EACQ;EACA;EACN,GAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EAC1D,GAAK,qBAAqB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB;CAC/D,CAAA;AAEL"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_pluginRegistry = require("../lib/pluginRegistry.cjs");
|
|
2
2
|
const require_usePluginSlotProps = require("../stores/usePluginSlotProps.cjs");
|
|
3
3
|
let react = require("react");
|
|
4
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
4
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
//#region src/web/components/PluginPage.tsx
|
|
7
7
|
/**
|
|
8
8
|
* The plugin page at `/page/<pageId>`: the `page` fill with that id, filling the main
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HOST_SLOTS, slotFills } from "../lib/pluginRegistry.mjs";
|
|
2
2
|
import { usePluginSlotProps } from "../stores/usePluginSlotProps.mjs";
|
|
3
3
|
import { createElement } from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { Button, EmptyState, FolderIcon } from "@agimon-ai/po-web-components";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/web/components/PluginPage.tsx
|
|
7
7
|
/**
|
|
8
8
|
* The plugin page at `/page/<pageId>`: the `page` fill with that id, filling the main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_qrMatrix = require("../lib/qrMatrix.cjs");
|
|
2
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
2
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
//#region src/web/components/QrCode.tsx
|
|
5
5
|
/** Modules of white space a scanner needs around the code, per the QR spec. */
|
|
6
6
|
const QUIET_ZONE = 4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { qrMatrix } from "../lib/qrMatrix.mjs";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { cn } from "@agimon-ai/po-web-components";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/web/components/QrCode.tsx
|
|
5
5
|
/** Modules of white space a scanner needs around the code, per the QR spec. */
|
|
6
6
|
const QUIET_ZONE = 4;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_sessionMcpPrompt = require("../lib/sessionMcpPrompt.cjs");
|
|
2
2
|
let react = require("react");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/web/components/SessionMcp.tsx
|
|
6
6
|
const TONES = {
|
|
7
7
|
running: "running",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sessionMcpToolsPrompt } from "../lib/sessionMcpPrompt.mjs";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Button, CodeBlock, EmptyState, Input, SectionLabel, StatusBadge } from "@agimon-ai/po-web-components";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/web/components/SessionMcp.tsx
|
|
6
6
|
const TONES = {
|
|
7
7
|
running: "running",
|
|
@@ -7,8 +7,8 @@ const require_workspacesStore = require("../stores/workspacesStore.cjs");
|
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let _tanstack_react_router = require("@tanstack/react-router");
|
|
9
9
|
let _agimon_ai_po_web_components_theme = require("@agimon-ai/po-web-components/theme");
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
10
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
11
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
//#region src/web/components/Story.fixture.tsx
|
|
13
13
|
/** Only imported by stories. Unknown requests fail closed instead of reaching a real hub. */
|
|
14
14
|
function mockStoryRequests(responses = {}) {
|
|
@@ -7,8 +7,8 @@ import { workspacesStore } from "../stores/workspacesStore.mjs";
|
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { Outlet, RouterProvider, createMemoryHistory, createRootRoute, createRoute, createRouter } from "@tanstack/react-router";
|
|
9
9
|
import { builtinTheme, themeCssVariables } from "@agimon-ai/po-web-components/theme";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
import { TooltipProvider } from "@agimon-ai/po-web-components";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
//#region src/web/components/Story.fixture.tsx
|
|
13
13
|
/** Only imported by stories. Unknown requests fail closed instead of reaching a real hub. */
|
|
14
14
|
function mockStoryRequests(responses = {}) {
|
|
@@ -11,8 +11,8 @@ const require_ContextPanel = require("./ContextPanel.cjs");
|
|
|
11
11
|
const require_DockTabs = require("./DockTabs.cjs");
|
|
12
12
|
let react = require("react");
|
|
13
13
|
let _tanstack_react_store = require("@tanstack/react-store");
|
|
14
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
14
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
15
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
16
|
//#region src/web/features/activity/ActivityDock.tsx
|
|
17
17
|
/** How long a face that just appeared keeps its tint before it fades. */
|
|
18
18
|
const ATTENTION_MS = 2400;
|
|
@@ -11,8 +11,8 @@ import { ContextPanel } from "./ContextPanel.mjs";
|
|
|
11
11
|
import { DockTabs } from "./DockTabs.mjs";
|
|
12
12
|
import { useEffect, useRef, useState } from "react";
|
|
13
13
|
import { useStore } from "@tanstack/react-store";
|
|
14
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import { ActivityIcon, Button, ChevronRightIcon, CloseIcon, Kbd, LightbulbIcon, LoaderIcon, SparklesIcon } from "@agimon-ai/po-web-components";
|
|
15
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
//#region src/web/features/activity/ActivityDock.tsx
|
|
17
17
|
/** How long a face that just appeared keeps its tint before it fades. */
|
|
18
18
|
const ATTENTION_MS = 2400;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_contextDetailApi = require("../../lib/contextDetailApi.cjs");
|
|
2
2
|
let react = require("react");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/web/features/activity/ContextItemDialog.tsx
|
|
6
6
|
/**
|
|
7
7
|
* What one row of the composition actually is.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fetchContextItemDetail } from "../../lib/contextDetailApi.mjs";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, Panel, Spinner } from "@agimon-ai/po-web-components";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/web/features/activity/ContextItemDialog.tsx
|
|
6
6
|
/**
|
|
7
7
|
* What one row of the composition actually is.
|
|
@@ -6,8 +6,8 @@ const require_PluginSurface = require("../../components/PluginSurface.cjs");
|
|
|
6
6
|
const require_ContextItemDialog = require("./ContextItemDialog.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let _agimon_ai_po_core_contextApi = require("@agimon-ai/po-core/contextApi");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
9
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
11
|
//#region src/web/features/activity/ContextPanel.tsx
|
|
12
12
|
function tokens(value) {
|
|
13
13
|
return value === null ? "-" : `~${value.toLocaleString()}`;
|
|
@@ -6,8 +6,8 @@ import { PluginSurface } from "../../components/PluginSurface.mjs";
|
|
|
6
6
|
import { ContextItemDialog } from "./ContextItemDialog.mjs";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { CONTEXT_TOOL_WARNINGS_STATUS_KEY, parseContextToolWarnings } from "@agimon-ai/po-core/contextApi";
|
|
9
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { Button, ChevronRightIcon, EmptyState, Input, SearchIcon } from "@agimon-ai/po-web-components";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/web/features/activity/ContextPanel.tsx
|
|
12
12
|
function tokens(value) {
|
|
13
13
|
return value === null ? "-" : `~${value.toLocaleString()}`;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
let react = require("react");
|
|
2
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
2
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
//#region src/web/features/activity/DockTabs.tsx
|
|
5
|
-
const
|
|
5
|
+
const ACTIVITY_TAB = {
|
|
6
6
|
id: "activity",
|
|
7
7
|
label: "Activity",
|
|
8
8
|
icon: _agimon_ai_po_web_components.ActivityIcon
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
const CONTEXT_TAB = {
|
|
10
11
|
id: "context",
|
|
11
12
|
label: "Context",
|
|
12
13
|
icon: _agimon_ai_po_web_components.PuzzleIcon
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
14
|
+
};
|
|
15
|
+
/** Activity first, then MCP and the session's plugin-contributed faces, with Context always last. */
|
|
15
16
|
function DockTabs({ contributed = [], mcpEnabled = false, active, onSelect, badges = {}, attention = [] }) {
|
|
16
17
|
const tabs = [
|
|
17
|
-
|
|
18
|
+
ACTIVITY_TAB,
|
|
18
19
|
...mcpEnabled ? [{
|
|
19
20
|
id: "mcp",
|
|
20
21
|
label: "MCP",
|
|
@@ -24,7 +25,8 @@ function DockTabs({ contributed = [], mcpEnabled = false, active, onSelect, badg
|
|
|
24
25
|
id,
|
|
25
26
|
label,
|
|
26
27
|
icon
|
|
27
|
-
}))
|
|
28
|
+
})),
|
|
29
|
+
CONTEXT_TAB
|
|
28
30
|
];
|
|
29
31
|
const listRef = (0, react.useRef)(null);
|
|
30
32
|
const shown = attention.at(-1) ?? active;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockTabs.cjs","names":["ActivityIcon","PuzzleIcon","ServerIcon","useRef","Button","NavTabBadge"],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"sourcesContent":["import type { DockFaceContribution } from '@agimon-ai/po-core/web';\nimport { ActivityIcon, Button, NavTabBadge, PuzzleIcon, ServerIcon } from '@agimon-ai/po-web-components';\nimport { useEffect, useRef } from 'react';\n\nimport type { DockTab } from '../../stores/uiStore';\n\nconst
|
|
1
|
+
{"version":3,"file":"DockTabs.cjs","names":["ActivityIcon","PuzzleIcon","ServerIcon","useRef","Button","NavTabBadge"],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"sourcesContent":["import type { DockFaceContribution } from '@agimon-ai/po-core/web';\nimport { ActivityIcon, Button, NavTabBadge, PuzzleIcon, ServerIcon } from '@agimon-ai/po-web-components';\nimport { useEffect, useRef } from 'react';\n\nimport type { DockTab } from '../../stores/uiStore';\n\nconst ACTIVITY_TAB = { id: 'activity', label: 'Activity', icon: ActivityIcon } as const;\nconst CONTEXT_TAB = { id: 'context', label: 'Context', icon: PuzzleIcon } as const;\n\n/** Activity first, then MCP and the session's plugin-contributed faces, with Context always last. */\nexport function DockTabs({\n contributed = [],\n mcpEnabled = false,\n active,\n onSelect,\n badges = {},\n attention = [],\n}: {\n contributed?: readonly DockFaceContribution[];\n mcpEnabled?: boolean;\n /** The face on screen, which may be a fallback for the saved pick. */\n active: DockTab;\n /** The person picked a face. */\n onSelect: (tab: DockTab) => void;\n /** Items on a face that want the person's eye, such as unviewed files. Zero shows nothing. */\n badges?: Readonly<Record<string, number>>;\n /** Faces that just appeared; they announce themselves with a short tint instead of taking over. */\n attention?: readonly string[];\n}) {\n const tabs: (Pick<DockFaceContribution, 'label' | 'icon'> & { id: DockTab })[] = [\n ACTIVITY_TAB,\n ...(mcpEnabled ? [{ id: 'mcp', label: 'MCP', icon: ServerIcon }] : []),\n ...contributed.map(({ id, label, icon }) => ({ id, label, icon })),\n CONTEXT_TAB,\n ];\n const listRef = useRef<HTMLDivElement>(null);\n const shown = attention.at(-1) ?? active;\n // A face that just appeared, or the one picked, is scrolled into the strip so\n // its tint and underline are seen rather than clipped at the rail's edge.\n useEffect(() => {\n const list = listRef.current;\n const tab = Array.from(list?.querySelectorAll<HTMLElement>('[role=\"tab\"]') ?? []).find(\n (element) => element.dataset.testid === `dock-tab-${shown}`,\n );\n if (!list || !tab) return;\n // The list is the tabs' offset parent, so these are positions inside the strip.\n const left = tab.offsetLeft;\n const right = left + tab.offsetWidth;\n const target =\n left < list.scrollLeft\n ? left\n : right > list.scrollLeft + list.clientWidth\n ? right - list.clientWidth\n : list.scrollLeft;\n if (target === list.scrollLeft) return;\n const reduced = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches === true;\n list.scrollTo({ left: target, behavior: reduced ? 'auto' : 'smooth' });\n }, [shown]);\n\n return (\n <div\n ref={listRef}\n role=\"tablist\"\n aria-label=\"Dock view\"\n // The track is always there, so a face appearing never shifts the row; a\n // vertical wheel scrolls the strip sideways.\n onWheel={(event) => {\n if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) event.currentTarget.scrollLeft += event.deltaY;\n }}\n className=\"relative flex min-w-0 items-end gap-6 overflow-x-scroll overflow-y-hidden [scrollbar-width:thin]\"\n >\n {tabs.map((tab) => {\n const count = badges[tab.id] ?? 0;\n return (\n <Button\n key={tab.id}\n variant=\"ghost\"\n size=\"xs\"\n role=\"tab\"\n aria-selected={tab.id === active}\n // An icon tab names itself on hover and to assistive tech.\n aria-label={tab.icon ? tab.label : undefined}\n title={tab.icon ? tab.label : undefined}\n data-testid={`dock-tab-${tab.id}`}\n data-active={tab.id === active}\n data-attention={attention.includes(tab.id) || undefined}\n onClick={() => onSelect(tab.id)}\n className={`h-auto shrink-0 gap-1.5 rounded-none border-b-2 px-0 pb-3 text-base hover:bg-transparent ${\n tab.id === active\n ? 'border-po-green font-semibold text-po-hi'\n : 'border-transparent font-medium text-po-text hover:text-po-text'\n }`}\n >\n {/* The tint fades out through the transition when attention ends; reduced motion just removes it. */}\n <span\n className={`-mx-1.5 flex items-center rounded px-1.5 py-0.5 transition-colors duration-700 ${\n attention.includes(tab.id) ? 'bg-po-tint-green text-po-green' : ''\n }`}\n >\n {tab.icon ? <tab.icon className=\"size-5\" /> : tab.label}\n </span>\n {count > 0 ? (\n <>\n <NavTabBadge active aria-hidden>\n {count}\n </NavTabBadge>\n <span className=\"sr-only\">, {count} new</span>\n </>\n ) : null}\n </Button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;AAMA,MAAM,eAAe;CAAE,IAAI;CAAY,OAAO;CAAY,MAAMA,6BAAAA;AAAa;AAC7E,MAAM,cAAc;CAAE,IAAI;CAAW,OAAO;CAAW,MAAMC,6BAAAA;AAAW;;AAGxE,SAAgB,SAAS,EACvB,cAAc,CAAC,GACf,aAAa,OACb,QACA,UACA,SAAS,CAAC,GACV,YAAY,CAAC,KAYZ;CACD,MAAM,OAA2E;EAC/E;EACA,GAAI,aAAa,CAAC;GAAE,IAAI;GAAO,OAAO;GAAO,MAAMC,6BAAAA;EAAW,CAAC,IAAI,CAAC;EACpE,GAAG,YAAY,KAAK,EAAE,IAAI,OAAO,YAAY;GAAE;GAAI;GAAO;EAAK,EAAE;EACjE;CACF;CACA,MAAM,WAAA,GAAUC,MAAAA,OAAAA,CAAuB,IAAI;CAC3C,MAAM,QAAQ,UAAU,GAAG,EAAE,KAAK;CAGlC,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,MAAM,OAAO,QAAQ;EACrB,MAAM,MAAM,MAAM,KAAK,MAAM,iBAA8B,gBAAc,KAAK,CAAC,CAAC,CAAC,CAAC,MAC/E,YAAY,QAAQ,QAAQ,WAAW,YAAY,OACtD;EACA,IAAI,CAAC,QAAQ,CAAC,KAAK;EAEnB,MAAM,OAAO,IAAI;EACjB,MAAM,QAAQ,OAAO,IAAI;EACzB,MAAM,SACJ,OAAO,KAAK,aACR,OACA,QAAQ,KAAK,aAAa,KAAK,cAC7B,QAAQ,KAAK,cACb,KAAK;EACb,IAAI,WAAW,KAAK,YAAY;EAChC,MAAM,UAAU,WAAW,aAAa,kCAAkC,CAAC,CAAC,YAAY;EACxF,KAAK,SAAS;GAAE,MAAM;GAAQ,UAAU,UAAU,SAAS;EAAS,CAAC;CACvE,GAAG,CAAC,KAAK,CAAC;CAEV,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,KAAK;EACL,MAAK;EACL,cAAW;EAGX,UAAU,UAAU;GAClB,IAAI,KAAK,IAAI,MAAM,MAAM,IAAI,KAAK,IAAI,MAAM,MAAM,GAAG,MAAM,cAAc,cAAc,MAAM;EAC/F;EACA,WAAU;EAET,UAAA,KAAK,KAAK,QAAQ;GACjB,MAAM,QAAQ,OAAO,IAAI,OAAO;GAChC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,6BAAAA,QAAD;IAEE,SAAQ;IACR,MAAK;IACL,MAAK;IACL,iBAAe,IAAI,OAAO;IAE1B,cAAY,IAAI,OAAO,IAAI,QAAQ,KAAA;IACnC,OAAO,IAAI,OAAO,IAAI,QAAQ,KAAA;IAC9B,eAAa,YAAY,IAAI;IAC7B,eAAa,IAAI,OAAO;IACxB,kBAAgB,UAAU,SAAS,IAAI,EAAE,KAAK,KAAA;IAC9C,eAAe,SAAS,IAAI,EAAE;IAC9B,WAAW,4FACT,IAAI,OAAO,SACP,6CACA;IAhBR,UAAA,CAoBE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KACE,WAAW,kFACT,UAAU,SAAS,IAAI,EAAE,IAAI,mCAAmC;KAGjE,UAAA,IAAI,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,IAAI,MAAL,EAAU,WAAU,SAAU,CAAA,IAAI,IAAI;IAC9C,CAAA,GACL,QAAQ,IACP,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,aAAD;KAAa,QAAA;KAAO,eAAA;KACjB,UAAA;IACU,CAAA,GACb,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MAA0B;MAAG;MAAM;KAAU;IAC7C,CAAA,CAAA,EAAA,CAAA,IACA,IACE;GAlCD,GAAA,IAAI,EAkCH;EAEZ,CAAC;CACE,CAAA;AAET"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DockTab } from "../../stores/uiStore.mjs";
|
|
2
2
|
import { DockFaceContribution } from "@agimon-ai/po-core/web";
|
|
3
3
|
//#region src/web/features/activity/DockTabs.d.ts
|
|
4
|
-
/**
|
|
4
|
+
/** Activity first, then MCP and the session's plugin-contributed faces, with Context always last. */
|
|
5
5
|
export declare function DockTabs({ contributed, mcpEnabled, active, onSelect, badges, attention }: {
|
|
6
6
|
contributed?: readonly DockFaceContribution[];
|
|
7
7
|
mcpEnabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockTabs.d.mts","names":[],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"DockTabs.d.mts","names":[],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"mappings":";;;;wBAUgB,WACd,aACA,YACA,QACA,UACA,QACA;EAEA,uBAAuB;EACvB;;EAEA,QAAQ;;EAER,WAAW,KAAK;;EAEhB,SAAS,SAAS;;EAElB;oBACD,IAAA"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { ActivityIcon, Button, NavTabBadge, PuzzleIcon, ServerIcon } from "@agimon-ai/po-web-components";
|
|
3
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/web/features/activity/DockTabs.tsx
|
|
5
|
-
const
|
|
5
|
+
const ACTIVITY_TAB = {
|
|
6
6
|
id: "activity",
|
|
7
7
|
label: "Activity",
|
|
8
8
|
icon: ActivityIcon
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
const CONTEXT_TAB = {
|
|
10
11
|
id: "context",
|
|
11
12
|
label: "Context",
|
|
12
13
|
icon: PuzzleIcon
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
14
|
+
};
|
|
15
|
+
/** Activity first, then MCP and the session's plugin-contributed faces, with Context always last. */
|
|
15
16
|
function DockTabs({ contributed = [], mcpEnabled = false, active, onSelect, badges = {}, attention = [] }) {
|
|
16
17
|
const tabs = [
|
|
17
|
-
|
|
18
|
+
ACTIVITY_TAB,
|
|
18
19
|
...mcpEnabled ? [{
|
|
19
20
|
id: "mcp",
|
|
20
21
|
label: "MCP",
|
|
@@ -24,7 +25,8 @@ function DockTabs({ contributed = [], mcpEnabled = false, active, onSelect, badg
|
|
|
24
25
|
id,
|
|
25
26
|
label,
|
|
26
27
|
icon
|
|
27
|
-
}))
|
|
28
|
+
})),
|
|
29
|
+
CONTEXT_TAB
|
|
28
30
|
];
|
|
29
31
|
const listRef = useRef(null);
|
|
30
32
|
const shown = attention.at(-1) ?? active;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockTabs.mjs","names":[],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"sourcesContent":["import type { DockFaceContribution } from '@agimon-ai/po-core/web';\nimport { ActivityIcon, Button, NavTabBadge, PuzzleIcon, ServerIcon } from '@agimon-ai/po-web-components';\nimport { useEffect, useRef } from 'react';\n\nimport type { DockTab } from '../../stores/uiStore';\n\nconst
|
|
1
|
+
{"version":3,"file":"DockTabs.mjs","names":[],"sources":["../../../../src/web/features/activity/DockTabs.tsx"],"sourcesContent":["import type { DockFaceContribution } from '@agimon-ai/po-core/web';\nimport { ActivityIcon, Button, NavTabBadge, PuzzleIcon, ServerIcon } from '@agimon-ai/po-web-components';\nimport { useEffect, useRef } from 'react';\n\nimport type { DockTab } from '../../stores/uiStore';\n\nconst ACTIVITY_TAB = { id: 'activity', label: 'Activity', icon: ActivityIcon } as const;\nconst CONTEXT_TAB = { id: 'context', label: 'Context', icon: PuzzleIcon } as const;\n\n/** Activity first, then MCP and the session's plugin-contributed faces, with Context always last. */\nexport function DockTabs({\n contributed = [],\n mcpEnabled = false,\n active,\n onSelect,\n badges = {},\n attention = [],\n}: {\n contributed?: readonly DockFaceContribution[];\n mcpEnabled?: boolean;\n /** The face on screen, which may be a fallback for the saved pick. */\n active: DockTab;\n /** The person picked a face. */\n onSelect: (tab: DockTab) => void;\n /** Items on a face that want the person's eye, such as unviewed files. Zero shows nothing. */\n badges?: Readonly<Record<string, number>>;\n /** Faces that just appeared; they announce themselves with a short tint instead of taking over. */\n attention?: readonly string[];\n}) {\n const tabs: (Pick<DockFaceContribution, 'label' | 'icon'> & { id: DockTab })[] = [\n ACTIVITY_TAB,\n ...(mcpEnabled ? [{ id: 'mcp', label: 'MCP', icon: ServerIcon }] : []),\n ...contributed.map(({ id, label, icon }) => ({ id, label, icon })),\n CONTEXT_TAB,\n ];\n const listRef = useRef<HTMLDivElement>(null);\n const shown = attention.at(-1) ?? active;\n // A face that just appeared, or the one picked, is scrolled into the strip so\n // its tint and underline are seen rather than clipped at the rail's edge.\n useEffect(() => {\n const list = listRef.current;\n const tab = Array.from(list?.querySelectorAll<HTMLElement>('[role=\"tab\"]') ?? []).find(\n (element) => element.dataset.testid === `dock-tab-${shown}`,\n );\n if (!list || !tab) return;\n // The list is the tabs' offset parent, so these are positions inside the strip.\n const left = tab.offsetLeft;\n const right = left + tab.offsetWidth;\n const target =\n left < list.scrollLeft\n ? left\n : right > list.scrollLeft + list.clientWidth\n ? right - list.clientWidth\n : list.scrollLeft;\n if (target === list.scrollLeft) return;\n const reduced = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches === true;\n list.scrollTo({ left: target, behavior: reduced ? 'auto' : 'smooth' });\n }, [shown]);\n\n return (\n <div\n ref={listRef}\n role=\"tablist\"\n aria-label=\"Dock view\"\n // The track is always there, so a face appearing never shifts the row; a\n // vertical wheel scrolls the strip sideways.\n onWheel={(event) => {\n if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) event.currentTarget.scrollLeft += event.deltaY;\n }}\n className=\"relative flex min-w-0 items-end gap-6 overflow-x-scroll overflow-y-hidden [scrollbar-width:thin]\"\n >\n {tabs.map((tab) => {\n const count = badges[tab.id] ?? 0;\n return (\n <Button\n key={tab.id}\n variant=\"ghost\"\n size=\"xs\"\n role=\"tab\"\n aria-selected={tab.id === active}\n // An icon tab names itself on hover and to assistive tech.\n aria-label={tab.icon ? tab.label : undefined}\n title={tab.icon ? tab.label : undefined}\n data-testid={`dock-tab-${tab.id}`}\n data-active={tab.id === active}\n data-attention={attention.includes(tab.id) || undefined}\n onClick={() => onSelect(tab.id)}\n className={`h-auto shrink-0 gap-1.5 rounded-none border-b-2 px-0 pb-3 text-base hover:bg-transparent ${\n tab.id === active\n ? 'border-po-green font-semibold text-po-hi'\n : 'border-transparent font-medium text-po-text hover:text-po-text'\n }`}\n >\n {/* The tint fades out through the transition when attention ends; reduced motion just removes it. */}\n <span\n className={`-mx-1.5 flex items-center rounded px-1.5 py-0.5 transition-colors duration-700 ${\n attention.includes(tab.id) ? 'bg-po-tint-green text-po-green' : ''\n }`}\n >\n {tab.icon ? <tab.icon className=\"size-5\" /> : tab.label}\n </span>\n {count > 0 ? (\n <>\n <NavTabBadge active aria-hidden>\n {count}\n </NavTabBadge>\n <span className=\"sr-only\">, {count} new</span>\n </>\n ) : null}\n </Button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;AAMA,MAAM,eAAe;CAAE,IAAI;CAAY,OAAO;CAAY,MAAM;AAAa;AAC7E,MAAM,cAAc;CAAE,IAAI;CAAW,OAAO;CAAW,MAAM;AAAW;;AAGxE,SAAgB,SAAS,EACvB,cAAc,CAAC,GACf,aAAa,OACb,QACA,UACA,SAAS,CAAC,GACV,YAAY,CAAC,KAYZ;CACD,MAAM,OAA2E;EAC/E;EACA,GAAI,aAAa,CAAC;GAAE,IAAI;GAAO,OAAO;GAAO,MAAM;EAAW,CAAC,IAAI,CAAC;EACpE,GAAG,YAAY,KAAK,EAAE,IAAI,OAAO,YAAY;GAAE;GAAI;GAAO;EAAK,EAAE;EACjE;CACF;CACA,MAAM,UAAU,OAAuB,IAAI;CAC3C,MAAM,QAAQ,UAAU,GAAG,EAAE,KAAK;CAGlC,gBAAgB;EACd,MAAM,OAAO,QAAQ;EACrB,MAAM,MAAM,MAAM,KAAK,MAAM,iBAA8B,gBAAc,KAAK,CAAC,CAAC,CAAC,CAAC,MAC/E,YAAY,QAAQ,QAAQ,WAAW,YAAY,OACtD;EACA,IAAI,CAAC,QAAQ,CAAC,KAAK;EAEnB,MAAM,OAAO,IAAI;EACjB,MAAM,QAAQ,OAAO,IAAI;EACzB,MAAM,SACJ,OAAO,KAAK,aACR,OACA,QAAQ,KAAK,aAAa,KAAK,cAC7B,QAAQ,KAAK,cACb,KAAK;EACb,IAAI,WAAW,KAAK,YAAY;EAChC,MAAM,UAAU,WAAW,aAAa,kCAAkC,CAAC,CAAC,YAAY;EACxF,KAAK,SAAS;GAAE,MAAM;GAAQ,UAAU,UAAU,SAAS;EAAS,CAAC;CACvE,GAAG,CAAC,KAAK,CAAC;CAEV,OACE,oBAAC,OAAD;EACE,KAAK;EACL,MAAK;EACL,cAAW;EAGX,UAAU,UAAU;GAClB,IAAI,KAAK,IAAI,MAAM,MAAM,IAAI,KAAK,IAAI,MAAM,MAAM,GAAG,MAAM,cAAc,cAAc,MAAM;EAC/F;EACA,WAAU;EAET,UAAA,KAAK,KAAK,QAAQ;GACjB,MAAM,QAAQ,OAAO,IAAI,OAAO;GAChC,OACE,qBAAC,QAAD;IAEE,SAAQ;IACR,MAAK;IACL,MAAK;IACL,iBAAe,IAAI,OAAO;IAE1B,cAAY,IAAI,OAAO,IAAI,QAAQ,KAAA;IACnC,OAAO,IAAI,OAAO,IAAI,QAAQ,KAAA;IAC9B,eAAa,YAAY,IAAI;IAC7B,eAAa,IAAI,OAAO;IACxB,kBAAgB,UAAU,SAAS,IAAI,EAAE,KAAK,KAAA;IAC9C,eAAe,SAAS,IAAI,EAAE;IAC9B,WAAW,4FACT,IAAI,OAAO,SACP,6CACA;IAhBR,UAAA,CAoBE,oBAAC,QAAD;KACE,WAAW,kFACT,UAAU,SAAS,IAAI,EAAE,IAAI,mCAAmC;KAGjE,UAAA,IAAI,OAAO,oBAAC,IAAI,MAAL,EAAU,WAAU,SAAU,CAAA,IAAI,IAAI;IAC9C,CAAA,GACL,QAAQ,IACP,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,aAAD;KAAa,QAAA;KAAO,eAAA;KACjB,UAAA;IACU,CAAA,GACb,qBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MAA0B;MAAG;MAAM;KAAU;IAC7C,CAAA,CAAA,EAAA,CAAA,IACA,IACE;GAlCD,GAAA,IAAI,EAkCH;EAEZ,CAAC;CACE,CAAA;AAET"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_sessionSummary = require("../../lib/sessionSummary.cjs");
|
|
2
2
|
const require_sessionsStore = require("../../stores/sessionsStore.cjs");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let _agimon_ai_po_web_components = require("@agimon-ai/po-web-components");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/web/features/connection/RefusedCard.tsx
|
|
6
6
|
function Detail({ label, value }) {
|
|
7
7
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { abbreviateCwd } from "../../lib/sessionSummary.mjs";
|
|
2
2
|
import { useActiveSessionMeta } from "../../stores/sessionsStore.mjs";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, Spinner } from "@agimon-ai/po-web-components";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/web/features/connection/RefusedCard.tsx
|
|
6
6
|
function Detail({ label, value }) {
|
|
7
7
|
return /* @__PURE__ */ jsxs("div", {
|