@burdenoff/microfe-headshotmarketing 2026.1205.1 → 2026.1206.1
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/generated/global-types.d.ts +3589 -380
- package/dist/generated/wspace-operations.d.ts +101 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +61782 -2332
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/EntityTagPicker.js +29 -28
- package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.js +264 -263
- package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
- package/dist/headshotmarketing/components/QueryStateBoundary.js +31 -22
- package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +3 -3
- package/dist/headshotmarketing/components/Toast.js.map +1 -1
- package/dist/headshotmarketing/components/TrackedLinksPanel.js +97 -96
- package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -1
- package/dist/headshotmarketing/hooks/useAssetUpload.js +41 -40
- package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
- package/dist/headshotmarketing/pages/HomePage.js +6 -6
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js +47 -46
- package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +66 -65
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +273 -272
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +3 -3
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +125 -124
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +33 -32
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +108 -107
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +65 -60
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +4 -4
- package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +287 -286
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +59 -54
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +96 -95
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ai/AiDecisionCard.js +5 -5
- package/dist/headshotmarketing/pages/ai/AiDecisionCard.js.map +1 -1
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +179 -178
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +156 -151
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +222 -217
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +59 -58
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +152 -151
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +34 -33
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/TriggersPage.js +6 -6
- package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +235 -234
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +24 -23
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +4 -4
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +339 -338
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js +95 -94
- package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +82 -81
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +107 -106
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +104 -103
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +262 -261
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +68 -67
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +204 -203
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +177 -176
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +373 -372
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +4 -4
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +51 -50
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js +100 -99
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js +134 -133
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js +66 -65
- package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmActions.js +229 -228
- package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js +62 -61
- package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js +126 -125
- package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +93 -92
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +5 -5
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +127 -126
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +76 -75
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +8 -8
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +4 -4
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +4 -4
- package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +104 -103
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js +102 -101
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +59 -58
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +103 -102
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +123 -122
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +4 -4
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/dist/headshotmarketing/utils/index.d.ts +1 -0
- package/dist/headshotmarketing/utils/readableError.d.ts +16 -0
- package/dist/headshotmarketing/utils/readableError.js +12 -0
- package/dist/headshotmarketing/utils/readableError.js.map +1 -0
- package/package.json +5 -3
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { HeadshotmarketingAiToolExecutionStatus as e, HeadshotmarketingAudienceSuggestionStatus as t } from "../../../generated/wspace-types.js";
|
|
2
|
-
import { useApplyHeadshotmarketingAdBudgetRecommendationMutation as n, useHeadshotmarketingAdBudgetRecommendationsQuery as r, useHeadshotmarketingAgentRunsQuery as
|
|
3
|
-
import { useHeadshotMarketing as
|
|
4
|
-
import { cn as
|
|
2
|
+
import { useApplyHeadshotmarketingAdBudgetRecommendationMutation as n, useHeadshotmarketingAdBudgetRecommendationsQuery as r, useHeadshotmarketingAgentRunsQuery as ee, useHeadshotmarketingApplyAudienceSuggestionMutation as i, useHeadshotmarketingAudienceSuggestionsQuery as te, useHeadshotmarketingAutonomousLoopStatusQuery as ne, useHeadshotmarketingConfigureAutonomousLoopMutation as re, useHeadshotmarketingDismissAudienceSuggestionMutation as ie } from "../../../generated/wspace-operations.js";
|
|
3
|
+
import { useHeadshotMarketing as ae } from "../../context/HeadshotMarketingContext.js";
|
|
4
|
+
import { cn as a, formatCurrency as o, formatDate as s, formatNumber as c } from "../../utils/helpers.js";
|
|
5
5
|
import { AiDecisionCard as l } from "./AiDecisionCard.js";
|
|
6
6
|
import { computeBudgetDelta as oe, formatAiCost as se, formatAiLatency as ce, formatAiProvenance as le, summarizeAudienceCriteria as ue } from "./aiDecisionHelpers.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { readableError as u } from "../../utils/readableError.js";
|
|
8
|
+
import { useMemo as d, useState as f } from "react";
|
|
9
|
+
import { Activity as de, AlertTriangle as p, Bot as m, ChevronRight as h, RefreshCw as g, ShieldCheck as _, Sparkles as fe } from "lucide-react";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { ThemedSelect as b } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
import { AiPage as pe } from "@burdenoff/fe-libs/shared/pages";
|
|
12
13
|
// src/headshotmarketing/pages/ai/AiOperationsPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var x = 15, me = {
|
|
14
15
|
[e.Completed]: e.Completed,
|
|
15
16
|
[e.Failed]: e.Failed,
|
|
16
17
|
[e.Running]: e.Running
|
|
17
|
-
},
|
|
18
|
-
let { navigate:
|
|
19
|
-
|
|
20
|
-
let t = Number(
|
|
18
|
+
}, S = () => {
|
|
19
|
+
let { navigate: S, basePath: C } = ae(), { data: he, loading: ge, error: _e, refetch: w } = ne({ fetchPolicy: "network-only" }), [ve, { loading: T }] = re(), [E, ye] = f(""), [D, O] = f(null), [k, A] = f(null), j = he?.headshotmarketingAutonomousLoopStatus ?? null, M = E === "" ? String(j?.dailyBudget ?? 25) : E, N = async (e) => {
|
|
20
|
+
O(null), A(null);
|
|
21
|
+
let t = Number(M), n = Number.isFinite(t) && t >= 1 && t <= 500 ? Math.round(t) : void 0;
|
|
21
22
|
try {
|
|
22
23
|
await ve({ variables: { input: {
|
|
23
24
|
enabled: e,
|
|
24
25
|
dailyBudget: n
|
|
25
|
-
} } }), await
|
|
26
|
+
} } }), await w(), O(e ? "Autonomous loop enabled (propose-only)." : "Autonomous loop paused.");
|
|
26
27
|
} catch (e) {
|
|
27
|
-
|
|
28
|
+
A(u(e, "Could not update autonomous loop settings."));
|
|
28
29
|
}
|
|
29
|
-
}, { data:
|
|
30
|
+
}, { data: P, loading: be, error: F, refetch: I } = te({
|
|
30
31
|
variables: {
|
|
31
32
|
filter: { status: t.Proposed },
|
|
32
33
|
pagination: {
|
|
@@ -35,75 +36,75 @@ var b = 15, me = {
|
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
fetchPolicy: "network-only"
|
|
38
|
-
}), [
|
|
39
|
+
}), [xe] = i(), [Se] = ie(), [L, R] = f(null), [z, B] = f({}), [V, Ce] = f(() => /* @__PURE__ */ new Set()), { data: H, loading: we, error: U, refetch: Te } = r({
|
|
39
40
|
variables: { pagination: {
|
|
40
41
|
limit: 10,
|
|
41
42
|
offset: 0
|
|
42
43
|
} },
|
|
43
44
|
fetchPolicy: "network-only"
|
|
44
|
-
}), [
|
|
45
|
+
}), [Ee] = n(), W = P?.headshotmarketingAudienceSuggestions.items ?? [], G = d(() => (H?.headshotmarketingAdBudgetRecommendations.items ?? []).filter((e) => !e.appliedAt && !V.has(e.id)), [H, V]), De = async (e) => {
|
|
45
46
|
R(e), B((t) => {
|
|
46
47
|
let n = { ...t };
|
|
47
48
|
return delete n[e], n;
|
|
48
49
|
});
|
|
49
50
|
try {
|
|
50
|
-
await
|
|
51
|
+
await xe({ variables: { input: {
|
|
51
52
|
suggestionId: e,
|
|
52
53
|
confirm: !0
|
|
53
54
|
} } }), await I();
|
|
54
55
|
} catch (t) {
|
|
55
56
|
B((n) => ({
|
|
56
57
|
...n,
|
|
57
|
-
[e]: t
|
|
58
|
+
[e]: u(t, "Failed to apply audience suggestion.")
|
|
58
59
|
}));
|
|
59
60
|
} finally {
|
|
60
61
|
R(null);
|
|
61
62
|
}
|
|
62
|
-
},
|
|
63
|
+
}, Oe = async (e) => {
|
|
63
64
|
R(e), B((t) => {
|
|
64
65
|
let n = { ...t };
|
|
65
66
|
return delete n[e], n;
|
|
66
67
|
});
|
|
67
68
|
try {
|
|
68
|
-
await
|
|
69
|
+
await Se({ variables: { id: e } }), await I();
|
|
69
70
|
} catch (t) {
|
|
70
71
|
B((n) => ({
|
|
71
72
|
...n,
|
|
72
|
-
[e]: t
|
|
73
|
+
[e]: u(t, "Failed to dismiss audience suggestion.")
|
|
73
74
|
}));
|
|
74
75
|
} finally {
|
|
75
76
|
R(null);
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, ke = async (e) => {
|
|
78
79
|
R(e), B((t) => {
|
|
79
80
|
let n = { ...t };
|
|
80
81
|
return delete n[e], n;
|
|
81
82
|
});
|
|
82
83
|
try {
|
|
83
|
-
await
|
|
84
|
+
await Ee({ variables: { id: e } }), await Te();
|
|
84
85
|
} catch (t) {
|
|
85
86
|
B((n) => ({
|
|
86
87
|
...n,
|
|
87
|
-
[e]: t
|
|
88
|
+
[e]: u(t, "Failed to apply budget recommendation.")
|
|
88
89
|
}));
|
|
89
90
|
} finally {
|
|
90
91
|
R(null);
|
|
91
92
|
}
|
|
92
|
-
}, [K,
|
|
93
|
+
}, [K, Ae] = f("all"), [q, je] = f("all"), J = d(() => {
|
|
93
94
|
let e = {}, t = me[K];
|
|
94
95
|
return t && (e.status = t), q !== "all" && (e.trigger = q), Object.keys(e).length > 0 ? e : void 0;
|
|
95
|
-
}, [K, q]), { data: Y, loading:
|
|
96
|
+
}, [K, q]), { data: Y, loading: Me, error: Ne, fetchMore: X, refetch: Pe } = ee({
|
|
96
97
|
variables: {
|
|
97
98
|
filter: J,
|
|
98
|
-
page: { first:
|
|
99
|
+
page: { first: x }
|
|
99
100
|
},
|
|
100
101
|
fetchPolicy: "network-only"
|
|
101
|
-
}), Z = Y?.headshotmarketingAgentRuns.items ?? [],
|
|
102
|
-
Q?.hasNextPage && Q.endCursor && await
|
|
102
|
+
}), Z = Y?.headshotmarketingAgentRuns.items ?? [], Fe = Y?.headshotmarketingAgentRuns.totalCount ?? 0, Q = Y?.headshotmarketingAgentRuns.pageInfo, Ie = async () => {
|
|
103
|
+
Q?.hasNextPage && Q.endCursor && await X({
|
|
103
104
|
variables: {
|
|
104
105
|
filter: J,
|
|
105
106
|
page: {
|
|
106
|
-
first:
|
|
107
|
+
first: x,
|
|
107
108
|
after: Q.endCursor
|
|
108
109
|
}
|
|
109
110
|
},
|
|
@@ -113,218 +114,218 @@ var b = 15, me = {
|
|
|
113
114
|
} } : e
|
|
114
115
|
});
|
|
115
116
|
}, $ = W.length + G.length;
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ y("div", {
|
|
117
118
|
className: "space-y-8 pb-10",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ v(pe, {
|
|
119
120
|
productName: "HeadshotMarketing",
|
|
120
121
|
productId: "headshotmarketing",
|
|
121
122
|
enableModelRoutes: !0
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ y("div", {
|
|
123
124
|
className: "mx-auto w-full max-w-6xl space-y-6 px-4 sm:px-6",
|
|
124
125
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ y("section", {
|
|
126
127
|
"aria-labelledby": "hsm-autonomous-loop-heading",
|
|
127
128
|
className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop space-y-4",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ y("div", {
|
|
129
130
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ y("div", {
|
|
131
132
|
className: "space-y-1",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ y("div", {
|
|
133
134
|
className: "flex items-center gap-2",
|
|
134
135
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ v(m, {
|
|
136
137
|
className: "h-4 w-4 text-action-primary-bg",
|
|
137
138
|
"aria-hidden": "true"
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ v("h2", {
|
|
140
141
|
id: "hsm-autonomous-loop-heading",
|
|
141
142
|
className: "text-base font-semibold text-text-primary",
|
|
142
143
|
children: "Autonomous Marketing Loop"
|
|
143
144
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
className: "inline-flex items-center gap-1 rounded-full bg-status-info-bg px-2 py-0.5 text-[11px] font-semibold text-status-info-text",
|
|
146
|
-
children: [/* @__PURE__ */ _
|
|
145
|
+
/* @__PURE__ */ y("span", {
|
|
146
|
+
className: "inline-flex items-center gap-1 rounded-full bg-status-info-bg-subtle px-2 py-0.5 text-[11px] font-semibold text-status-info-text",
|
|
147
|
+
children: [/* @__PURE__ */ v(_, {
|
|
147
148
|
className: "h-3 w-3",
|
|
148
149
|
"aria-hidden": "true"
|
|
149
150
|
}), "Propose-only"]
|
|
150
151
|
})
|
|
151
152
|
]
|
|
152
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ v("p", {
|
|
153
154
|
className: "text-xs text-text-secondary",
|
|
154
155
|
children: "Scheduled lead scoring, budget optimization, and anomaly detection run via FluidGrids and queue proposals for explicit human review."
|
|
155
156
|
})]
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ y("button", {
|
|
157
158
|
type: "button",
|
|
158
|
-
onClick: () => void
|
|
159
|
+
onClick: () => void w(),
|
|
159
160
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam bg-gloss-card px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ v(g, {
|
|
161
162
|
className: "h-3.5 w-3.5",
|
|
162
163
|
"aria-hidden": "true"
|
|
163
164
|
}), "Refresh"]
|
|
164
165
|
})]
|
|
165
|
-
}), _e && !
|
|
166
|
+
}), _e && !j ? /* @__PURE__ */ y("div", {
|
|
166
167
|
role: "status",
|
|
167
168
|
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken/50 px-3 py-2.5 text-xs text-text-secondary",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
169
|
-
}) : ge && !
|
|
169
|
+
children: [/* @__PURE__ */ v(p, { className: "h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ v("span", { children: "Autonomous loop status is currently unavailable. All manual marketing workflows continue operating normally." })]
|
|
170
|
+
}) : ge && !j ? /* @__PURE__ */ v("div", { className: "h-16 animate-pulse rounded-md bg-bg-sunken/50" }) : j ? /* @__PURE__ */ y("div", {
|
|
170
171
|
className: "space-y-4",
|
|
171
172
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ y("div", {
|
|
173
174
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
174
175
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ y("div", {
|
|
176
177
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3",
|
|
177
178
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ v("p", {
|
|
179
180
|
className: "text-xs text-text-secondary",
|
|
180
181
|
children: "Workspace Status"
|
|
181
182
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ v("p", {
|
|
183
184
|
className: "mt-1 text-sm font-semibold text-text-primary",
|
|
184
|
-
children:
|
|
185
|
+
children: j.enabled ? "Enabled (Propose-only)" : "Paused"
|
|
185
186
|
}),
|
|
186
|
-
!
|
|
187
|
+
!j.flagEnabled && /* @__PURE__ */ v("p", {
|
|
187
188
|
className: "mt-0.5 text-[11px] text-status-warning-text",
|
|
188
189
|
children: "Workspace feature flag is off; scheduled runs will no-op."
|
|
189
190
|
})
|
|
190
191
|
]
|
|
191
192
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ y("div", {
|
|
193
194
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ v("p", {
|
|
195
196
|
className: "text-xs text-text-secondary",
|
|
196
197
|
children: "Daily Decision Budget"
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ y("p", {
|
|
198
199
|
className: "mt-1 text-sm font-semibold tabular-nums text-text-primary",
|
|
199
200
|
children: [
|
|
200
|
-
|
|
201
|
+
j.decisionsUsedToday,
|
|
201
202
|
" / ",
|
|
202
|
-
|
|
203
|
+
j.dailyBudget,
|
|
203
204
|
" ",
|
|
204
205
|
"used today"
|
|
205
206
|
]
|
|
206
207
|
})]
|
|
207
208
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ y("div", {
|
|
209
210
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ v("p", {
|
|
211
212
|
className: "text-xs text-text-secondary",
|
|
212
213
|
children: "Scheduled Cadences"
|
|
213
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ y("p", {
|
|
214
215
|
className: "mt-1 text-sm font-semibold tabular-nums text-text-primary",
|
|
215
216
|
children: [
|
|
216
|
-
|
|
217
|
+
j.schedules.filter((e) => e.enabled).length,
|
|
217
218
|
" of",
|
|
218
219
|
" ",
|
|
219
|
-
|
|
220
|
+
j.schedules.length,
|
|
220
221
|
" active"
|
|
221
222
|
]
|
|
222
223
|
})]
|
|
223
224
|
})
|
|
224
225
|
]
|
|
225
226
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ y("div", {
|
|
227
228
|
className: "flex flex-wrap items-end gap-3 border-t border-border-subtle pt-3",
|
|
228
229
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
230
231
|
htmlFor: "hsm-loop-daily-budget",
|
|
231
232
|
className: "block text-xs font-medium text-text-secondary",
|
|
232
233
|
children: "Daily decision cap (1–500)"
|
|
233
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ v("input", {
|
|
234
235
|
id: "hsm-loop-daily-budget",
|
|
235
236
|
type: "number",
|
|
236
237
|
min: 1,
|
|
237
238
|
max: 500,
|
|
238
|
-
value:
|
|
239
|
+
value: M,
|
|
239
240
|
onChange: (e) => ye(e.target.value),
|
|
240
241
|
className: "mt-1 w-28 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
241
242
|
})] }),
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ v("button", {
|
|
243
244
|
type: "button",
|
|
244
|
-
disabled:
|
|
245
|
-
onClick: () => void
|
|
246
|
-
className:
|
|
247
|
-
children:
|
|
245
|
+
disabled: T,
|
|
246
|
+
onClick: () => void N(!j.enabled),
|
|
247
|
+
className: a("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium disabled:opacity-60", j.enabled ? "border border-border-seam bg-gloss-card text-text-primary hover:bg-bg-sunken" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
|
|
248
|
+
children: T ? "Saving..." : j.enabled ? "Pause autonomous loop" : "Enable autonomous loop"
|
|
248
249
|
}),
|
|
249
|
-
|
|
250
|
+
j.enabled && /* @__PURE__ */ v("button", {
|
|
250
251
|
type: "button",
|
|
251
|
-
disabled:
|
|
252
|
-
onClick: () => void
|
|
252
|
+
disabled: T,
|
|
253
|
+
onClick: () => void N(!0),
|
|
253
254
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam bg-gloss-card px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
|
|
254
255
|
children: "Update cap"
|
|
255
256
|
})
|
|
256
257
|
]
|
|
257
258
|
}),
|
|
258
|
-
|
|
259
|
+
D && /* @__PURE__ */ v("p", {
|
|
259
260
|
role: "status",
|
|
260
261
|
className: "text-xs text-status-success-text",
|
|
261
|
-
children:
|
|
262
|
+
children: D
|
|
262
263
|
}),
|
|
263
|
-
|
|
264
|
+
k && /* @__PURE__ */ v("p", {
|
|
264
265
|
role: "alert",
|
|
265
266
|
className: "text-xs text-status-error-text",
|
|
266
|
-
children:
|
|
267
|
+
children: k
|
|
267
268
|
})
|
|
268
269
|
]
|
|
269
270
|
}) : null]
|
|
270
271
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ y("section", {
|
|
272
273
|
"aria-labelledby": "hsm-pending-decisions-heading",
|
|
273
274
|
className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop space-y-4",
|
|
274
275
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ y("div", {
|
|
276
277
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ y("div", {
|
|
278
279
|
className: "space-y-1",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ y("div", {
|
|
280
281
|
className: "flex items-center gap-2",
|
|
281
282
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ v(fe, {
|
|
283
284
|
className: "h-4 w-4 text-action-primary-bg",
|
|
284
285
|
"aria-hidden": "true"
|
|
285
286
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ v("h2", {
|
|
287
288
|
id: "hsm-pending-decisions-heading",
|
|
288
289
|
className: "text-base font-semibold text-text-primary",
|
|
289
290
|
children: "Pending AI Decisions"
|
|
290
291
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ v("span", {
|
|
292
293
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium tabular-nums text-text-secondary",
|
|
293
294
|
children: $
|
|
294
295
|
})
|
|
295
296
|
]
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ v("p", {
|
|
297
298
|
className: "text-xs text-text-secondary",
|
|
298
299
|
children: "Every proposed audience segment and budget shift stays pending until you explicitly apply or dismiss it."
|
|
299
300
|
})]
|
|
300
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ y("div", {
|
|
301
302
|
className: "flex flex-wrap items-center gap-2",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ y("button", {
|
|
303
304
|
type: "button",
|
|
304
|
-
onClick: () =>
|
|
305
|
+
onClick: () => S(C + "/crm/leads"),
|
|
305
306
|
className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
306
|
-
children: ["Score Leads", /* @__PURE__ */
|
|
307
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: ["Score Leads", /* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" })]
|
|
308
|
+
}), /* @__PURE__ */ y("button", {
|
|
308
309
|
type: "button",
|
|
309
|
-
onClick: () =>
|
|
310
|
+
onClick: () => S(C + "/crm/pipeline"),
|
|
310
311
|
className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
311
|
-
children: ["Deal Next Actions", /* @__PURE__ */
|
|
312
|
+
children: ["Deal Next Actions", /* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" })]
|
|
312
313
|
})]
|
|
313
314
|
})]
|
|
314
315
|
}),
|
|
315
|
-
(F || U) && $ === 0 && /* @__PURE__ */
|
|
316
|
+
(F || U) && $ === 0 && /* @__PURE__ */ y("div", {
|
|
316
317
|
role: "status",
|
|
317
318
|
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken/50 px-3 py-2.5 text-xs text-text-secondary",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ v(p, { className: "h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ v("span", { children: "Pending AI decisions are temporarily unavailable. Non-AI campaign and CRM controls remain available." })]
|
|
319
320
|
}),
|
|
320
|
-
|
|
321
|
+
be && we && $ === 0 ? /* @__PURE__ */ v("div", { className: "h-24 animate-pulse rounded-md bg-bg-sunken/50" }) : $ === 0 && !F && !U ? /* @__PURE__ */ v("p", {
|
|
321
322
|
className: "rounded-md border border-dashed border-border-subtle py-6 text-center text-xs text-text-secondary",
|
|
322
323
|
children: "No pending AI proposals right now. Generate audience suggestions on a campaign, budget proposals on an ad campaign, or score leads from CRM."
|
|
323
|
-
}) : /* @__PURE__ */
|
|
324
|
+
}) : /* @__PURE__ */ y("div", {
|
|
324
325
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
325
326
|
children: [W.map((e) => {
|
|
326
327
|
let t = ue(e.criteria);
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ v(l, {
|
|
328
329
|
testId: `decision-card-audience-${e.id}`,
|
|
329
330
|
title: e.name,
|
|
330
331
|
subtitle: `Audience proposal · ${c(e.previewCount)} matching contacts`,
|
|
@@ -338,11 +339,11 @@ var b = 15, me = {
|
|
|
338
339
|
dismissLabel: "Dismiss",
|
|
339
340
|
busy: L === e.id,
|
|
340
341
|
error: z[e.id] ?? null,
|
|
341
|
-
onApply: () => void
|
|
342
|
-
onDismiss: () => void
|
|
343
|
-
children: t.length > 0 && /* @__PURE__ */
|
|
342
|
+
onApply: () => void De(e.id),
|
|
343
|
+
onDismiss: () => void Oe(e.id),
|
|
344
|
+
children: t.length > 0 && /* @__PURE__ */ v("div", {
|
|
344
345
|
className: "flex flex-wrap gap-1.5",
|
|
345
|
-
children: t.map((e) => /* @__PURE__ */
|
|
346
|
+
children: t.map((e) => /* @__PURE__ */ v("span", {
|
|
346
347
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-[11px] text-text-secondary",
|
|
347
348
|
children: e
|
|
348
349
|
}, e))
|
|
@@ -350,7 +351,7 @@ var b = 15, me = {
|
|
|
350
351
|
}, e.id);
|
|
351
352
|
}), G.map((e) => {
|
|
352
353
|
let { delta: t, deltaPct: n, direction: r } = oe(e.currentBudget, e.recommendedBudget);
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ v(l, {
|
|
354
355
|
testId: `decision-card-budget-${e.id}`,
|
|
355
356
|
title: "Ad budget reallocation proposal",
|
|
356
357
|
subtitle: `Ad campaign ${e.adCampaignId}`,
|
|
@@ -359,29 +360,29 @@ var b = 15, me = {
|
|
|
359
360
|
confidence: e.confidence,
|
|
360
361
|
rationale: e.rationale,
|
|
361
362
|
source: e.source,
|
|
362
|
-
metrics: /* @__PURE__ */
|
|
363
|
+
metrics: /* @__PURE__ */ y("div", {
|
|
363
364
|
className: "grid grid-cols-3 gap-2 rounded-md border border-border-subtle bg-bg-sunken/40 p-2.5 text-xs",
|
|
364
365
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
366
367
|
className: "text-text-secondary",
|
|
367
368
|
children: "Current"
|
|
368
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ v("p", {
|
|
369
370
|
className: "font-semibold tabular-nums text-text-primary",
|
|
370
|
-
children:
|
|
371
|
+
children: o(e.currentBudget)
|
|
371
372
|
})] }),
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
373
374
|
className: "text-text-secondary",
|
|
374
375
|
children: "Proposed"
|
|
375
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ v("p", {
|
|
376
377
|
className: "font-semibold tabular-nums text-text-primary",
|
|
377
|
-
children:
|
|
378
|
+
children: o(e.recommendedBudget)
|
|
378
379
|
})] }),
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
380
381
|
className: "text-text-secondary",
|
|
381
382
|
children: "Change"
|
|
382
|
-
}), /* @__PURE__ */
|
|
383
|
+
}), /* @__PURE__ */ y("p", {
|
|
383
384
|
className: "font-semibold tabular-nums text-text-primary",
|
|
384
|
-
children: [t >= 0 ? "+" : "",
|
|
385
|
+
children: [t >= 0 ? "+" : "", o(t)]
|
|
385
386
|
})] })
|
|
386
387
|
]
|
|
387
388
|
}),
|
|
@@ -389,214 +390,214 @@ var b = 15, me = {
|
|
|
389
390
|
dismissLabel: "Dismiss",
|
|
390
391
|
busy: L === e.id,
|
|
391
392
|
error: z[e.id] ?? null,
|
|
392
|
-
onApply: () => void
|
|
393
|
-
onDismiss: () =>
|
|
393
|
+
onApply: () => void ke(e.id),
|
|
394
|
+
onDismiss: () => Ce((t) => new Set(t).add(e.id))
|
|
394
395
|
}, e.id);
|
|
395
396
|
})]
|
|
396
397
|
})
|
|
397
398
|
]
|
|
398
399
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ y("section", {
|
|
400
401
|
"aria-labelledby": "hsm-agent-runs-heading",
|
|
401
402
|
className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop space-y-4",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ y("div", {
|
|
403
404
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ y("div", {
|
|
405
406
|
className: "space-y-0.5",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ y("div", {
|
|
407
408
|
className: "flex items-center gap-2",
|
|
408
409
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ v(de, {
|
|
410
411
|
className: "h-4 w-4 text-action-primary-bg",
|
|
411
412
|
"aria-hidden": "true"
|
|
412
413
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ v("h2", {
|
|
414
415
|
id: "hsm-agent-runs-heading",
|
|
415
416
|
className: "text-base font-semibold text-text-primary",
|
|
416
417
|
children: "HeadshotMarketing AI Run Activity"
|
|
417
418
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ v("span", {
|
|
419
420
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium tabular-nums text-text-secondary",
|
|
420
|
-
children: c(
|
|
421
|
+
children: c(Fe)
|
|
421
422
|
})
|
|
422
423
|
]
|
|
423
|
-
}), /* @__PURE__ */
|
|
424
|
+
}), /* @__PURE__ */ v("p", {
|
|
424
425
|
className: "text-xs text-text-secondary",
|
|
425
426
|
children: "Product-level audit feed of lead scoring, audience segmentation, budget optimization, content tools, and agent runs reconciled to the shared AI ledger."
|
|
426
427
|
})]
|
|
427
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ y("div", {
|
|
428
429
|
className: "flex flex-wrap items-center gap-2",
|
|
429
430
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ y(b, {
|
|
431
432
|
"aria-label": "Filter runs by status",
|
|
432
433
|
value: K,
|
|
433
|
-
onChange: (e) =>
|
|
434
|
+
onChange: (e) => Ae(e.target.value),
|
|
434
435
|
className: "rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs text-text-primary",
|
|
435
436
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ v("option", {
|
|
437
438
|
value: "all",
|
|
438
439
|
children: "All statuses"
|
|
439
440
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ v("option", {
|
|
441
442
|
value: e.Completed,
|
|
442
443
|
children: "Completed"
|
|
443
444
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ v("option", {
|
|
445
446
|
value: e.Failed,
|
|
446
447
|
children: "Failed"
|
|
447
448
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ v("option", {
|
|
449
450
|
value: e.Running,
|
|
450
451
|
children: "Running"
|
|
451
452
|
})
|
|
452
453
|
]
|
|
453
454
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ y(b, {
|
|
455
456
|
"aria-label": "Filter runs by trigger",
|
|
456
457
|
value: q,
|
|
457
|
-
onChange: (e) =>
|
|
458
|
+
onChange: (e) => je(e.target.value),
|
|
458
459
|
className: "rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs text-text-primary",
|
|
459
460
|
children: [
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ v("option", {
|
|
461
462
|
value: "all",
|
|
462
463
|
children: "All triggers"
|
|
463
464
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ v("option", {
|
|
465
466
|
value: "manual",
|
|
466
467
|
children: "Manual"
|
|
467
468
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ v("option", {
|
|
469
470
|
value: "scheduled",
|
|
470
471
|
children: "Scheduled"
|
|
471
472
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ v("option", {
|
|
473
474
|
value: "event",
|
|
474
475
|
children: "Event"
|
|
475
476
|
})
|
|
476
477
|
]
|
|
477
478
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ y("button", {
|
|
479
480
|
type: "button",
|
|
480
|
-
onClick: () => void
|
|
481
|
+
onClick: () => void Pe(),
|
|
481
482
|
className: "inline-flex items-center gap-1 rounded-md border border-border-seam bg-gloss-card px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ v(g, {
|
|
483
484
|
className: "h-3.5 w-3.5",
|
|
484
485
|
"aria-hidden": "true"
|
|
485
486
|
}), "Refresh"]
|
|
486
487
|
})
|
|
487
488
|
]
|
|
488
489
|
})]
|
|
489
|
-
}),
|
|
490
|
+
}), Ne && Z.length === 0 ? /* @__PURE__ */ y("div", {
|
|
490
491
|
role: "status",
|
|
491
492
|
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken/50 px-3 py-2.5 text-xs text-text-secondary",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
493
|
-
}) :
|
|
493
|
+
children: [/* @__PURE__ */ v(p, { className: "h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ v("span", { children: "AI run activity is unavailable right now (requires AI ledger read permission or active AI service)." })]
|
|
494
|
+
}) : Me && Z.length === 0 ? /* @__PURE__ */ v("div", {
|
|
494
495
|
className: "space-y-2",
|
|
495
496
|
children: [
|
|
496
497
|
0,
|
|
497
498
|
1,
|
|
498
499
|
2
|
|
499
|
-
].map((e) => /* @__PURE__ */
|
|
500
|
-
}) : Z.length === 0 ? /* @__PURE__ */
|
|
500
|
+
].map((e) => /* @__PURE__ */ v("div", { className: "h-10 animate-pulse rounded-md bg-bg-sunken/50" }, e))
|
|
501
|
+
}) : Z.length === 0 ? /* @__PURE__ */ v("p", {
|
|
501
502
|
className: "rounded-md border border-dashed border-border-subtle py-6 text-center text-xs text-text-secondary",
|
|
502
503
|
children: "No AI runs recorded for this workspace yet."
|
|
503
|
-
}) : /* @__PURE__ */
|
|
504
|
+
}) : /* @__PURE__ */ y("div", {
|
|
504
505
|
className: "space-y-3",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ v("div", {
|
|
506
507
|
className: "overflow-x-auto",
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ y("table", {
|
|
508
509
|
className: "w-full text-start text-xs",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
510
|
+
children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
|
|
510
511
|
className: "border-b border-border-subtle text-text-secondary",
|
|
511
512
|
children: [
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ v("th", {
|
|
513
514
|
className: "py-2 pe-3 font-medium",
|
|
514
515
|
children: "Operation"
|
|
515
516
|
}),
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ v("th", {
|
|
517
518
|
className: "py-2 pe-3 font-medium",
|
|
518
519
|
children: "Model / Source"
|
|
519
520
|
}),
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ v("th", {
|
|
521
522
|
className: "py-2 pe-3 font-medium",
|
|
522
523
|
children: "Trigger"
|
|
523
524
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ v("th", {
|
|
525
526
|
className: "py-2 pe-3 font-medium",
|
|
526
527
|
children: "Decision"
|
|
527
528
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ v("th", {
|
|
529
530
|
className: "py-2 pe-3 font-medium",
|
|
530
531
|
children: "Latency"
|
|
531
532
|
}),
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ v("th", {
|
|
533
534
|
className: "py-2 pe-3 font-medium",
|
|
534
535
|
children: "Cost"
|
|
535
536
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ v("th", {
|
|
537
538
|
className: "py-2 pe-3 font-medium",
|
|
538
539
|
children: "Status"
|
|
539
540
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ v("th", {
|
|
541
542
|
className: "py-2 font-medium",
|
|
542
543
|
children: "When"
|
|
543
544
|
})
|
|
544
545
|
]
|
|
545
|
-
}) }), /* @__PURE__ */
|
|
546
|
+
}) }), /* @__PURE__ */ v("tbody", {
|
|
546
547
|
className: "divide-y divide-border-subtle",
|
|
547
|
-
children: Z.map((t) => /* @__PURE__ */
|
|
548
|
+
children: Z.map((t) => /* @__PURE__ */ y("tr", {
|
|
548
549
|
className: "text-text-primary",
|
|
549
550
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ v("td", {
|
|
551
552
|
className: "py-2.5 pe-3 font-medium",
|
|
552
553
|
children: t.operationKey
|
|
553
554
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ v("td", {
|
|
555
556
|
className: "py-2.5 pe-3 text-text-secondary",
|
|
556
557
|
children: le({
|
|
557
558
|
provider: t.provider,
|
|
558
559
|
model: t.model
|
|
559
560
|
})
|
|
560
561
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ v("td", {
|
|
562
563
|
className: "py-2.5 pe-3 capitalize text-text-secondary",
|
|
563
564
|
children: t.trigger
|
|
564
565
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ v("td", {
|
|
566
567
|
className: "py-2.5 pe-3 text-text-secondary",
|
|
567
568
|
children: t.decision ?? "—"
|
|
568
569
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ v("td", {
|
|
570
571
|
className: "py-2.5 pe-3 tabular-nums text-text-secondary",
|
|
571
572
|
children: ce(t.latencyMs ?? t.durationMs)
|
|
572
573
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ v("td", {
|
|
574
575
|
className: "py-2.5 pe-3 tabular-nums text-text-secondary",
|
|
575
576
|
children: se({
|
|
576
577
|
costUsd: t.costUsd,
|
|
577
578
|
simulated: t.simulated
|
|
578
579
|
})
|
|
579
580
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ v("td", {
|
|
581
582
|
className: "py-2.5 pe-3",
|
|
582
|
-
children: /* @__PURE__ */
|
|
583
|
-
className:
|
|
583
|
+
children: /* @__PURE__ */ v("span", {
|
|
584
|
+
className: a("inline-flex rounded-full px-2 py-0.5 text-[11px] font-medium", t.status === e.Completed ? "bg-status-success-bg-subtle text-status-success-text" : t.status === e.Failed ? "bg-status-error-bg-subtle text-status-error-text" : "bg-status-warning-bg-subtle text-status-warning-text"),
|
|
584
585
|
children: t.status.toLowerCase()
|
|
585
586
|
})
|
|
586
587
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ v("td", {
|
|
588
589
|
className: "py-2.5 whitespace-nowrap text-text-secondary",
|
|
589
|
-
children:
|
|
590
|
+
children: s(t.createdAt, "relative")
|
|
590
591
|
})
|
|
591
592
|
]
|
|
592
593
|
}, t.id))
|
|
593
594
|
})]
|
|
594
595
|
})
|
|
595
|
-
}), Q?.hasNextPage && /* @__PURE__ */
|
|
596
|
+
}), Q?.hasNextPage && /* @__PURE__ */ v("div", {
|
|
596
597
|
className: "flex justify-center pt-1",
|
|
597
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ v("button", {
|
|
598
599
|
type: "button",
|
|
599
|
-
onClick: () => void
|
|
600
|
+
onClick: () => void Ie(),
|
|
600
601
|
className: "rounded-md border border-border-seam bg-gloss-card px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
601
602
|
children: "Load more runs"
|
|
602
603
|
})
|
|
@@ -607,6 +608,6 @@ var b = 15, me = {
|
|
|
607
608
|
})]
|
|
608
609
|
});
|
|
609
610
|
};
|
|
610
|
-
export {
|
|
611
|
+
export { S as AiOperationsPage };
|
|
611
612
|
|
|
612
613
|
//# sourceMappingURL=AiOperationsPage.js.map
|