@arcgis/portal-components 5.2.0-next.94 → 5.2.0-next.96
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/cdn/{BMZFIENS.js → 27WR6TKM.js} +1 -1
- package/dist/cdn/{P6DWFLYH.js → 2LROLM5D.js} +1 -1
- package/dist/cdn/{P4ELMYQQ.js → 2M7ICZ55.js} +1 -1
- package/dist/cdn/2RPQKCIL.js +2 -0
- package/dist/cdn/2SUHE7I3.js +2 -0
- package/dist/cdn/{EZNTXOKK.js → 2Z5BVWD4.js} +1 -1
- package/dist/cdn/{2VGYRITT.js → 33IZVRD6.js} +1 -1
- package/dist/cdn/{BTSXQQKZ.js → 4PPXBKIJ.js} +3 -3
- package/dist/cdn/{H4L2DX4R.js → 4R5TLPGN.js} +1 -1
- package/dist/cdn/{Q54ZD7WJ.js → 6NHNSWIQ.js} +1 -1
- package/dist/cdn/{BL2ZND4S.js → A6YWV3MB.js} +1 -1
- package/dist/cdn/{QLHCXOVQ.js → ACCEI7S4.js} +1 -1
- package/dist/cdn/{LTHZ2TRG.js → AVNFYSR4.js} +1 -1
- package/dist/cdn/{H76EB2WF.js → BA3HGV4Q.js} +1 -1
- package/dist/cdn/{7OR2HKBV.js → BCYZTGDC.js} +1 -1
- package/dist/cdn/BFH3HBUT.js +2 -0
- package/dist/cdn/BIJ755UR.js +2 -0
- package/dist/cdn/{GJ7GKO7I.js → BXDQIHOS.js} +1 -1
- package/dist/cdn/{KA4XSW6O.js → BY6ZY3C4.js} +1 -1
- package/dist/cdn/EFY6BRUW.js +2 -0
- package/dist/cdn/{7HHPKD5C.js → EHQVLI6M.js} +1 -1
- package/dist/cdn/FD7DZ3IE.js +2 -0
- package/dist/cdn/{5YCQRL4K.js → FJSGWELR.js} +1 -1
- package/dist/cdn/{CBXQFKN5.js → G2CJ5PLI.js} +1 -1
- package/dist/cdn/{T7FVQDHN.js → GBYHBRUW.js} +1 -1
- package/dist/cdn/{7XD6KSXV.js → GUTV5BR3.js} +1 -1
- package/dist/cdn/{PF3TB3QZ.js → H6QY5OJL.js} +1 -1
- package/dist/cdn/{DCIRWNQL.js → HFP5F435.js} +1 -1
- package/dist/cdn/{WNYL4EZA.js → HLQD6W3F.js} +1 -1
- package/dist/cdn/{YS2SZ3DL.js → IGZ7A7S3.js} +1 -1
- package/dist/cdn/{CNDTRZJT.js → INPDIPW5.js} +1 -1
- package/dist/cdn/{546M6SVH.js → KCJDG4OE.js} +1 -1
- package/dist/cdn/{PJLV3EQS.js → LDTVM22U.js} +1 -1
- package/dist/cdn/LDVTUC6I.js +2 -0
- package/dist/cdn/{MRHDSM6U.js → LLRHHAXZ.js} +1 -1
- package/dist/cdn/{YMLZCVEI.js → M6EVMQYT.js} +1 -1
- package/dist/cdn/MA5HWGFW.js +2 -0
- package/dist/cdn/{47ZPCFHE.js → NAAAOC2Z.js} +1 -1
- package/dist/cdn/{7VNYKGBJ.js → NQX5UAUH.js} +74 -74
- package/dist/cdn/{ZGNXS6U5.js → PAFEMDUL.js} +1 -1
- package/dist/cdn/{KIKZIZGV.js → PH4LUNY2.js} +1 -1
- package/dist/cdn/{SFD33DHG.js → PKSH2HSK.js} +1 -1
- package/dist/cdn/{QNCSWTTL.js → PLVQ3AZ4.js} +1 -1
- package/dist/cdn/{POQBF4N7.js → QNFTJR2M.js} +1 -1
- package/dist/cdn/{433M2GP4.js → QVLQEBPD.js} +1 -1
- package/dist/cdn/{I2KQQXOO.js → S7IRYX4A.js} +1 -1
- package/dist/cdn/{OOH5B3WJ.js → T3BCFS2M.js} +1 -1
- package/dist/cdn/{R5BQIF6P.js → TFCRFHRE.js} +1 -1
- package/dist/cdn/VENYHN3O.js +2 -0
- package/dist/cdn/{EUWBMLIT.js → VHNV45FQ.js} +1 -1
- package/dist/cdn/{W7O7ZYZ4.js → VJ4STLVD.js} +1 -1
- package/dist/cdn/{7FVPT4SA.js → VKYMORWN.js} +1 -1
- package/dist/cdn/{6XLTWENT.js → VQKLCN3V.js} +1 -1
- package/dist/cdn/{TBQ5W7VE.js → W4GBRVNN.js} +1 -1
- package/dist/cdn/WAEULETE.js +2 -0
- package/dist/cdn/{O6ZQ4BRU.js → WYXW3ETE.js} +1 -1
- package/dist/cdn/{7SB7JHBR.js → XEH2E6NR.js} +1 -1
- package/dist/cdn/{TB4YQUMO.js → XWLOXRJZ.js} +1 -1
- package/dist/cdn/{RBQG66FL.js → YFT47SCG.js} +1 -1
- package/dist/cdn/{R77U3ROB.js → YQHVXBGD.js} +1 -1
- package/dist/cdn/{O7KHFGHS.js → ZI3JA3SL.js} +1 -1
- package/dist/cdn/{WYLEYSM3.js → ZJ7GT4N2.js} +1 -1
- package/dist/cdn/{ZTGGJIVB.js → ZWDOT3HF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +18 -7
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +440 -404
- package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +5 -1
- package/dist/components/arcgis-portal-ai-assistant/index.js +0 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +327 -323
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +6 -6
- package/dist/cdn/2T33E2DS.js +0 -2
- package/dist/cdn/3HAZNYCD.js +0 -2
- package/dist/cdn/4NXBBNYR.js +0 -2
- package/dist/cdn/DN2QW5FV.js +0 -2
- package/dist/cdn/HNWQS7DU.js +0 -2
- package/dist/cdn/NVGQFC2K.js +0 -2
- package/dist/cdn/O3JIWIMI.js +0 -2
- package/dist/cdn/RDAUPHB6.js +0 -2
- package/dist/cdn/RVWAHK4A.js +0 -2
- package/dist/cdn/YWNUWLOL.js +0 -2
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { css as
|
|
5
|
-
import { createRef as
|
|
6
|
-
import { u as
|
|
7
|
-
import { NodeInterrupt as
|
|
8
|
-
import { sendTraceMessage as p, invokeStructuredPrompt as
|
|
2
|
+
import { c as Ve } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as Be, createEvent as Ke } from "@arcgis/lumina";
|
|
4
|
+
import { css as Qe, render as We, html as I } from "lit";
|
|
5
|
+
import { createRef as k, ref as E } from "lit/directives/ref.js";
|
|
6
|
+
import { u as Je } from "../../chunks/useT9n.js";
|
|
7
|
+
import { NodeInterrupt as J, Annotation as h, StateGraph as N, START as P, END as w } from "@langchain/langgraph/web";
|
|
8
|
+
import { sendTraceMessage as p, invokeStructuredPrompt as v, sendUXSuggestion as _, createAgentRuntimeStateWithSharedState as G, createChatModel as Y, getEmbeddings as _e } from "@arcgis/ai-components/utils/index.js";
|
|
9
9
|
import s from "zod";
|
|
10
|
-
import { a as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { a as U, t as
|
|
14
|
-
import { ChatPromptTemplate as
|
|
15
|
-
import { tool as
|
|
16
|
-
import { s as
|
|
17
|
-
import { g as
|
|
18
|
-
import
|
|
19
|
-
const
|
|
10
|
+
import { a as Ye, c as He, q as Xe } from "../../chunks/groups2.js";
|
|
11
|
+
import ee from "@arcgis/core/identity/IdentityManager.js";
|
|
12
|
+
import te from "@arcgis/core/request.js";
|
|
13
|
+
import { a as U, t as Ze, b as Q } from "../../chunks/functionalities.js";
|
|
14
|
+
import { ChatPromptTemplate as H } from "@langchain/core/prompts";
|
|
15
|
+
import { tool as Me } from "@langchain/core/tools";
|
|
16
|
+
import { s as et, a as tt } from "../../chunks/item.js";
|
|
17
|
+
import { g as at, e as nt, i as ot, c as rt, a as st } from "../../chunks/groups.js";
|
|
18
|
+
import it from "@arcgis/core/portal/Portal.js";
|
|
19
|
+
const Ce = (e) => {
|
|
20
20
|
const { portal: t, user: a } = e ?? {};
|
|
21
21
|
return !!e && !!t && !!a;
|
|
22
22
|
};
|
|
23
23
|
function x(e) {
|
|
24
|
-
if (!
|
|
24
|
+
if (!Ce(e))
|
|
25
25
|
throw new Error("Invalid context: PortalAssistantContext with portal and user is required.");
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const ct = `
|
|
28
28
|
Write a concise, friendly success message for adding members to a group.
|
|
29
29
|
|
|
30
30
|
Rules:
|
|
@@ -39,9 +39,9 @@ Added members:
|
|
|
39
39
|
|
|
40
40
|
Not added members:
|
|
41
41
|
{notAddedMembers}
|
|
42
|
-
`,
|
|
42
|
+
`, ut = (e) => e.map((t) => `"${t}"`).join(", "), lt = s.object({
|
|
43
43
|
successMessage: s.string().default("")
|
|
44
|
-
}),
|
|
44
|
+
}), ae = "portal-group-creation", ne = "approveAddMembers", dt = async (e, t) => {
|
|
45
45
|
if (e.intentParams.intent !== "addMembers")
|
|
46
46
|
return {
|
|
47
47
|
status: "success",
|
|
@@ -65,10 +65,10 @@ ${n.map((g) => `- **@${g}**`).join(`
|
|
|
65
65
|
`)}
|
|
66
66
|
|
|
67
67
|
Do you want to continue?`, { hitlResponse: i } = t?.configurable ?? {};
|
|
68
|
-
if (i?.agentId !==
|
|
68
|
+
if (i?.agentId !== ae || i.id !== ne) {
|
|
69
69
|
const g = {
|
|
70
|
-
agentId:
|
|
71
|
-
id:
|
|
70
|
+
agentId: ae,
|
|
71
|
+
id: ne,
|
|
72
72
|
kind: "booleanChoice",
|
|
73
73
|
message: r,
|
|
74
74
|
metadata: {
|
|
@@ -77,7 +77,7 @@ Do you want to continue?`, { hitlResponse: i } = t?.configurable ?? {};
|
|
|
77
77
|
members: [...n]
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
throw new
|
|
80
|
+
throw new J(g);
|
|
81
81
|
}
|
|
82
82
|
if (i.payload !== !0)
|
|
83
83
|
return {
|
|
@@ -85,12 +85,12 @@ Do you want to continue?`, { hitlResponse: i } = t?.configurable ?? {};
|
|
|
85
85
|
outputMessage: "Okay, I cancelled adding members to the group."
|
|
86
86
|
};
|
|
87
87
|
await p(
|
|
88
|
-
{ text: `Adding members ${
|
|
88
|
+
{ text: `Adding members ${ut(n)}...`, agentName: "group-creation" },
|
|
89
89
|
t
|
|
90
90
|
);
|
|
91
91
|
const u = t?.configurable?.context;
|
|
92
92
|
x(u);
|
|
93
|
-
const { result: c, error: d } = await
|
|
93
|
+
const { result: c, error: d } = await Ye(u.portal, a, n);
|
|
94
94
|
if (d || !c)
|
|
95
95
|
return {
|
|
96
96
|
status: "success",
|
|
@@ -98,9 +98,9 @@ Do you want to continue?`, { hitlResponse: i } = t?.configurable ?? {};
|
|
|
98
98
|
};
|
|
99
99
|
const { addedUsernames: l, notAddedUsers: m } = c;
|
|
100
100
|
try {
|
|
101
|
-
const f = (await
|
|
102
|
-
promptText:
|
|
103
|
-
schema:
|
|
101
|
+
const f = (await v({
|
|
102
|
+
promptText: ct,
|
|
103
|
+
schema: lt,
|
|
104
104
|
modelTier: "fast",
|
|
105
105
|
inputVariables: {
|
|
106
106
|
addedMembers: l.join(", "),
|
|
@@ -115,7 +115,7 @@ Do you want to continue?`, { hitlResponse: i } = t?.configurable ?? {};
|
|
|
115
115
|
console.error("Error generating add-members success message:", g);
|
|
116
116
|
}
|
|
117
117
|
return {};
|
|
118
|
-
},
|
|
118
|
+
}, pt = `
|
|
119
119
|
Write a concise, friendly success message after creating a portal group.
|
|
120
120
|
|
|
121
121
|
Rules:
|
|
@@ -126,7 +126,7 @@ Rules:
|
|
|
126
126
|
|
|
127
127
|
Group title:
|
|
128
128
|
{groupTitle}
|
|
129
|
-
`,
|
|
129
|
+
`, mt = `
|
|
130
130
|
Write a concise, friendly failure message after an attempt to create a portal group.
|
|
131
131
|
|
|
132
132
|
Rules:
|
|
@@ -141,11 +141,11 @@ Group title:
|
|
|
141
141
|
|
|
142
142
|
Failure reason:
|
|
143
143
|
{failureReason}
|
|
144
|
-
`,
|
|
144
|
+
`, oe = "portal-group-creation", re = "approveCreateGroup", gt = s.object({
|
|
145
145
|
successMessage: s.string().default("")
|
|
146
|
-
}),
|
|
146
|
+
}), ht = s.object({
|
|
147
147
|
failureMessage: s.string().default("")
|
|
148
|
-
}),
|
|
148
|
+
}), ft = async (e, t) => {
|
|
149
149
|
if (e.intentParams.intent !== "create")
|
|
150
150
|
return {
|
|
151
151
|
status: "success",
|
|
@@ -158,10 +158,10 @@ Failure reason:
|
|
|
158
158
|
outputMessage: "What title would you like for the new group?"
|
|
159
159
|
};
|
|
160
160
|
const n = `A group with the title **${a}** will be created. Do you want to continue?`, { hitlResponse: o } = t?.configurable;
|
|
161
|
-
if (o?.agentId !==
|
|
161
|
+
if (o?.agentId !== oe || o.id !== re) {
|
|
162
162
|
const d = {
|
|
163
|
-
agentId:
|
|
164
|
-
id:
|
|
163
|
+
agentId: oe,
|
|
164
|
+
id: re,
|
|
165
165
|
kind: "booleanChoice",
|
|
166
166
|
message: n,
|
|
167
167
|
metadata: {
|
|
@@ -170,7 +170,7 @@ Failure reason:
|
|
|
170
170
|
access: "private"
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
|
-
throw new
|
|
173
|
+
throw new J(d);
|
|
174
174
|
}
|
|
175
175
|
if (o.payload !== !0)
|
|
176
176
|
return {
|
|
@@ -180,16 +180,16 @@ Failure reason:
|
|
|
180
180
|
await p({ text: `Creating group "${a}"...`, agentName: "group-creation" }, t);
|
|
181
181
|
const r = t?.configurable?.context;
|
|
182
182
|
x(r);
|
|
183
|
-
const { result: i, error: u } = await
|
|
183
|
+
const { result: i, error: u } = await He(r.portal, {
|
|
184
184
|
title: a,
|
|
185
185
|
access: "private"
|
|
186
186
|
});
|
|
187
187
|
if (u || !i) {
|
|
188
188
|
const d = u?.message?.trim() || "No additional details were provided.";
|
|
189
189
|
try {
|
|
190
|
-
const m = (await
|
|
191
|
-
promptText:
|
|
192
|
-
schema:
|
|
190
|
+
const m = (await v({
|
|
191
|
+
promptText: mt,
|
|
192
|
+
schema: ht,
|
|
193
193
|
modelTier: "fast",
|
|
194
194
|
inputVariables: {
|
|
195
195
|
groupTitle: a,
|
|
@@ -211,9 +211,9 @@ Failure reason:
|
|
|
211
211
|
}
|
|
212
212
|
const c = i.id;
|
|
213
213
|
try {
|
|
214
|
-
const l = (await
|
|
215
|
-
promptText:
|
|
216
|
-
schema:
|
|
214
|
+
const l = (await v({
|
|
215
|
+
promptText: pt,
|
|
216
|
+
schema: gt,
|
|
217
217
|
modelTier: "fast",
|
|
218
218
|
inputVariables: {
|
|
219
219
|
groupTitle: a
|
|
@@ -230,7 +230,7 @@ Failure reason:
|
|
|
230
230
|
console.error("Error generating create-group success message:", d);
|
|
231
231
|
}
|
|
232
232
|
return {};
|
|
233
|
-
},
|
|
233
|
+
}, b = (e) => {
|
|
234
234
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
235
235
|
const a = e[t];
|
|
236
236
|
if (a.type !== "human")
|
|
@@ -244,7 +244,7 @@ Failure reason:
|
|
|
244
244
|
).join(" ").trim();
|
|
245
245
|
}
|
|
246
246
|
return "";
|
|
247
|
-
},
|
|
247
|
+
}, yt = `
|
|
248
248
|
You classify whether a user is asking to create a new ArcGIS Portal group or add members to an existing group.
|
|
249
249
|
|
|
250
250
|
Rules:
|
|
@@ -270,16 +270,16 @@ Examples:
|
|
|
270
270
|
|
|
271
271
|
User message:
|
|
272
272
|
{userMessage}
|
|
273
|
-
`,
|
|
273
|
+
`, wt = s.object({
|
|
274
274
|
intent: s.enum(["clarify", "create", "addMembers"]).default("clarify"),
|
|
275
275
|
title: s.string().default(""),
|
|
276
276
|
memberIdentifiers: s.array(s.string()).default([]),
|
|
277
277
|
clarifyMessage: s.string().default("")
|
|
278
|
-
}),
|
|
278
|
+
}), vt = async (e, t) => {
|
|
279
279
|
await p({ text: "Thinking about groups...", agentName: "group-creation" }, t);
|
|
280
|
-
const a =
|
|
281
|
-
promptText:
|
|
282
|
-
schema:
|
|
280
|
+
const a = b(e.agentExecutionContext.messages).trim(), n = await v({
|
|
281
|
+
promptText: yt,
|
|
282
|
+
schema: wt,
|
|
283
283
|
modelTier: "default",
|
|
284
284
|
inputVariables: { userMessage: a }
|
|
285
285
|
}), o = n.title.trim(), r = n.memberIdentifiers.filter(Boolean), i = n.clarifyMessage.trim(), u = n.intent === "create" && !!o, c = n.intent === "addMembers" && r.length > 0;
|
|
@@ -288,7 +288,7 @@ User message:
|
|
|
288
288
|
status: "success",
|
|
289
289
|
outputMessage: !u && !c ? i : ""
|
|
290
290
|
};
|
|
291
|
-
},
|
|
291
|
+
}, bt = [
|
|
292
292
|
"general",
|
|
293
293
|
"about",
|
|
294
294
|
"homePage",
|
|
@@ -312,63 +312,61 @@ User message:
|
|
|
312
312
|
"openData",
|
|
313
313
|
"hub",
|
|
314
314
|
"orgExtensions"
|
|
315
|
-
],
|
|
315
|
+
], It = ["newItem", "createLayer", "developerCredentials"], xt = ["favorites", "group", "living-atlas", "org"], St = ["featured", "my", "organization"], Tt = ["overview", "content", "members", "settings"], Mt = ["licenses", "members", "overview", "reports", "settings", "status"], Ct = s.object({
|
|
316
316
|
destinationType: s.literal("portal-content"),
|
|
317
|
-
hash: s.enum(
|
|
317
|
+
hash: s.enum(xt).optional(),
|
|
318
318
|
queryParams: s.object({
|
|
319
|
-
newItem: s.enum(
|
|
319
|
+
newItem: s.enum(It).optional()
|
|
320
320
|
}).optional()
|
|
321
|
-
}),
|
|
321
|
+
}), At = s.object({
|
|
322
322
|
destinationType: s.literal("portal-groups"),
|
|
323
|
-
hash: s.enum(
|
|
324
|
-
}),
|
|
323
|
+
hash: s.enum(St).optional()
|
|
324
|
+
}), Nt = s.object({
|
|
325
325
|
destinationType: s.literal("portal-org"),
|
|
326
|
-
hash: s.enum(
|
|
326
|
+
hash: s.enum(Mt).optional(),
|
|
327
327
|
queryParams: s.object({
|
|
328
|
-
tab: s.enum(
|
|
328
|
+
tab: s.enum(bt).optional(),
|
|
329
329
|
section: s.string().optional(),
|
|
330
330
|
subsection: s.string().optional(),
|
|
331
331
|
period: s.string().optional(),
|
|
332
332
|
startTime: s.string().optional(),
|
|
333
333
|
endTime: s.string().optional()
|
|
334
334
|
}).optional()
|
|
335
|
-
}),
|
|
335
|
+
}), Pt = s.object({
|
|
336
336
|
destinationType: s.literal("portal-item"),
|
|
337
337
|
itemId: s.string().trim().min(1)
|
|
338
|
-
}),
|
|
338
|
+
}), Gt = s.object({
|
|
339
339
|
destinationType: s.literal("portal-group"),
|
|
340
|
-
groupId: s.string().trim().min(1)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
s.literal("portal-map-viewer"),
|
|
345
|
-
s.literal("portal-notebooks"),
|
|
346
|
-
s.literal("portal-scene-viewer")
|
|
347
|
-
])
|
|
348
|
-
}), Nt = s.union([
|
|
349
|
-
xt,
|
|
350
|
-
St,
|
|
351
|
-
Tt,
|
|
352
|
-
Mt,
|
|
340
|
+
groupId: s.string().trim().min(1),
|
|
341
|
+
hash: s.enum(Tt).optional(),
|
|
342
|
+
queryParams: s.record(s.string(), s.string()).optional()
|
|
343
|
+
}), qt = s.union([
|
|
353
344
|
Ct,
|
|
354
|
-
|
|
355
|
-
|
|
345
|
+
s.object({ destinationType: s.literal("portal-gallery") }),
|
|
346
|
+
Gt,
|
|
347
|
+
At,
|
|
348
|
+
Pt,
|
|
349
|
+
s.object({ destinationType: s.literal("portal-map-viewer") }),
|
|
350
|
+
s.object({ destinationType: s.literal("portal-notebooks") }),
|
|
351
|
+
Nt,
|
|
352
|
+
s.object({ destinationType: s.literal("portal-scene-viewer") })
|
|
353
|
+
]), Ae = "portal-navigation", F = async (e, t) => {
|
|
356
354
|
const a = t?.configurable?.context;
|
|
357
|
-
!
|
|
358
|
-
},
|
|
355
|
+
!Ce(a) || !a.navigationTargetMap?.[e.destinationType] || await _({ type: Ae, data: { ...e } }, t);
|
|
356
|
+
}, kt = async (e, t) => {
|
|
359
357
|
const a = e.createdGroupId ?? e.agentExecutionContext.sharedState.createdGroupId?.value;
|
|
360
358
|
return a ? (await p({ text: "Preparing navigation...", agentName: "group-creation" }, t), await F({ destinationType: "portal-group", groupId: a }, t), {}) : {};
|
|
361
|
-
},
|
|
362
|
-
...
|
|
359
|
+
}, se = (e, t) => t ?? e, Ne = h.Root({
|
|
360
|
+
...G(),
|
|
363
361
|
// * Shared state between nodes (but not persisted to the agent execution context)
|
|
364
362
|
/** Parameters related to the user's intent for group creation actions */
|
|
365
|
-
intentParams: h({ reducer:
|
|
363
|
+
intentParams: h({ reducer: se, default: () => ({ intent: "clarify" }) }),
|
|
366
364
|
/** The ID of the group that was created
|
|
367
365
|
* even though we already have this in the shared state
|
|
368
366
|
* we still need it here to also share between nodes
|
|
369
367
|
*/
|
|
370
|
-
createdGroupId: h({ reducer:
|
|
371
|
-
}),
|
|
368
|
+
createdGroupId: h({ reducer: se, default: () => "" })
|
|
369
|
+
}), Et = () => new N(Ne).addNode("detectGroupCreationIntent", vt).addNode("createPortalGroup", ft).addNode("addMembersToPortalGroup", dt).addNode("suggestCreatedGroupNavigation", kt).addEdge(P, "detectGroupCreationIntent").addConditionalEdges("detectGroupCreationIntent", (t) => {
|
|
372
370
|
switch (t.intentParams.intent) {
|
|
373
371
|
case "create":
|
|
374
372
|
return "createPortalGroup";
|
|
@@ -377,41 +375,41 @@ User message:
|
|
|
377
375
|
default:
|
|
378
376
|
return w;
|
|
379
377
|
}
|
|
380
|
-
}).addEdge("createPortalGroup", "suggestCreatedGroupNavigation").addEdge("addMembersToPortalGroup", "suggestCreatedGroupNavigation").addEdge("suggestCreatedGroupNavigation", w),
|
|
378
|
+
}).addEdge("createPortalGroup", "suggestCreatedGroupNavigation").addEdge("addMembersToPortalGroup", "suggestCreatedGroupNavigation").addEdge("suggestCreatedGroupNavigation", w), zt = String.raw`- **portal-group-creation** - Portal group creation assistant:
|
|
381
379
|
- creates a new ArcGIS Portal group for the signed-in user
|
|
382
380
|
- adds users to the newly created group using @mention usernames
|
|
383
|
-
`,
|
|
381
|
+
`, Dt = {
|
|
384
382
|
id: "portal-group-creation",
|
|
385
383
|
name: "Portal Group Creation",
|
|
386
|
-
description:
|
|
387
|
-
createGraph:
|
|
388
|
-
workspace:
|
|
389
|
-
},
|
|
390
|
-
const t = e?.[
|
|
384
|
+
description: zt,
|
|
385
|
+
createGraph: Et,
|
|
386
|
+
workspace: Ne
|
|
387
|
+
}, Pe = "portalDocAssistantMemory", $t = () => ({ conversationId: "" }), Rt = (e) => {
|
|
388
|
+
const t = e?.[Pe]?.value;
|
|
391
389
|
if (!t || typeof t != "object")
|
|
392
|
-
return
|
|
390
|
+
return $t();
|
|
393
391
|
const a = t;
|
|
394
392
|
return {
|
|
395
393
|
conversationId: typeof a.conversationId == "string" ? a.conversationId : ""
|
|
396
394
|
};
|
|
397
|
-
},
|
|
398
|
-
[
|
|
399
|
-
}),
|
|
395
|
+
}, Ut = (e) => ({
|
|
396
|
+
[Pe]: { value: e }
|
|
397
|
+
}), Ft = {
|
|
400
398
|
pipeline: {
|
|
401
399
|
follow_up: { allow: !1 }
|
|
402
400
|
}
|
|
403
401
|
};
|
|
404
|
-
function
|
|
402
|
+
function Ot(e) {
|
|
405
403
|
return {
|
|
406
404
|
kind: "DocAIAssistantRequest",
|
|
407
405
|
filters: {
|
|
408
|
-
...
|
|
406
|
+
...Ft,
|
|
409
407
|
persona: { persona: e }
|
|
410
408
|
}
|
|
411
409
|
};
|
|
412
410
|
}
|
|
413
|
-
const
|
|
414
|
-
async function
|
|
411
|
+
const Lt = "https://www.arcgis.com/sharing/rest";
|
|
412
|
+
async function jt({
|
|
415
413
|
portal: e,
|
|
416
414
|
question: t,
|
|
417
415
|
persona: a,
|
|
@@ -421,18 +419,18 @@ async function Ft({
|
|
|
421
419
|
skillId: i
|
|
422
420
|
}) {
|
|
423
421
|
i ??= "doc_ai_assistant";
|
|
424
|
-
const u =
|
|
422
|
+
const u = Ot(a), c = await Vt({
|
|
425
423
|
portal: e,
|
|
426
424
|
skillId: i,
|
|
427
425
|
message: t,
|
|
428
426
|
options: { context: u, previousConversationId: n, useProdDocAssistant: o, signal: r }
|
|
429
427
|
});
|
|
430
428
|
return {
|
|
431
|
-
reply:
|
|
429
|
+
reply: Bt(c, i),
|
|
432
430
|
conversationId: c[0]?.conversationId ?? ""
|
|
433
431
|
};
|
|
434
432
|
}
|
|
435
|
-
async function
|
|
433
|
+
async function Vt({
|
|
436
434
|
portal: e,
|
|
437
435
|
skillId: t,
|
|
438
436
|
message: a,
|
|
@@ -440,8 +438,8 @@ async function Ot({
|
|
|
440
438
|
}) {
|
|
441
439
|
const o = e.helperServices.aiAssistantServices.url, i = `${n.useProdDocAssistant ? "https://aiservices-beta.arcgis.com" : o}/skills/${t}/chat`, c = {
|
|
442
440
|
"Content-Type": "application/json",
|
|
443
|
-
token: n.useProdDocAssistant ? (await
|
|
444
|
-
}, d = await
|
|
441
|
+
token: n.useProdDocAssistant ? (await ee.getCredential(Lt, { oAuthPopupConfirmation: !1 })).token : ee.findCredential(e.url)?.token ?? ""
|
|
442
|
+
}, d = await te(i, {
|
|
445
443
|
method: "post",
|
|
446
444
|
body: JSON.stringify({
|
|
447
445
|
message: a,
|
|
@@ -458,8 +456,8 @@ async function Ot({
|
|
|
458
456
|
const l = d.data, m = [l], { conversationId: g, inquiryId: f } = l, y = async (M, q) => {
|
|
459
457
|
if (!q)
|
|
460
458
|
return;
|
|
461
|
-
await
|
|
462
|
-
const S = await
|
|
459
|
+
await Ze(500);
|
|
460
|
+
const S = await te(i, {
|
|
463
461
|
method: "post",
|
|
464
462
|
body: JSON.stringify({ conversationId: g, inquiryId: f, ackSequenceNumber: M }),
|
|
465
463
|
headers: c,
|
|
@@ -474,7 +472,7 @@ async function Ot({
|
|
|
474
472
|
};
|
|
475
473
|
return l.hasMore && await y(l.sequenceNumber, l.hasMore), m;
|
|
476
474
|
}
|
|
477
|
-
function
|
|
475
|
+
function Bt(e, t) {
|
|
478
476
|
switch (t) {
|
|
479
477
|
case "doc_chat":
|
|
480
478
|
return e.find((a) => a.message != null)?.message ?? "";
|
|
@@ -492,11 +490,11 @@ function Lt(e, t) {
|
|
|
492
490
|
return U(t);
|
|
493
491
|
}
|
|
494
492
|
}
|
|
495
|
-
const
|
|
493
|
+
const Kt = async (e, t) => {
|
|
496
494
|
const a = performance.now();
|
|
497
495
|
try {
|
|
498
496
|
await p({ text: "Asking documentation assistant...", agentName: "doc-assistant" }, t);
|
|
499
|
-
const n =
|
|
497
|
+
const n = b(e.agentExecutionContext.messages).trim();
|
|
500
498
|
if (!n)
|
|
501
499
|
return {
|
|
502
500
|
status: "success",
|
|
@@ -504,7 +502,7 @@ const jt = async (e, t) => {
|
|
|
504
502
|
};
|
|
505
503
|
const o = t?.configurable?.context;
|
|
506
504
|
x(o);
|
|
507
|
-
const r =
|
|
505
|
+
const r = Rt(e.agentExecutionContext.sharedState), { reply: i, conversationId: u } = await jt({
|
|
508
506
|
portal: o.portal,
|
|
509
507
|
question: n,
|
|
510
508
|
previousConversationId: r.conversationId || void 0,
|
|
@@ -515,7 +513,7 @@ const jt = async (e, t) => {
|
|
|
515
513
|
return {
|
|
516
514
|
status: "success",
|
|
517
515
|
outputMessage: i.trim() || "I could not retrieve a response from the documentation assistant.",
|
|
518
|
-
sharedStatePatch:
|
|
516
|
+
sharedStatePatch: Ut({
|
|
519
517
|
conversationId: u || r.conversationId
|
|
520
518
|
})
|
|
521
519
|
};
|
|
@@ -526,7 +524,7 @@ const jt = async (e, t) => {
|
|
|
526
524
|
durationMs: Number((performance.now() - a).toFixed(1))
|
|
527
525
|
});
|
|
528
526
|
}
|
|
529
|
-
},
|
|
527
|
+
}, Ge = Me(
|
|
530
528
|
async ({ groupTitle: e }, t) => {
|
|
531
529
|
const a = e.trim();
|
|
532
530
|
if (!a)
|
|
@@ -534,7 +532,7 @@ const jt = async (e, t) => {
|
|
|
534
532
|
const n = t?.configurable?.context;
|
|
535
533
|
x(n);
|
|
536
534
|
try {
|
|
537
|
-
return (await
|
|
535
|
+
return (await Xe(n.portal, { query: `title:${a}`, num: 1 }))?.results[0]?.id || null;
|
|
538
536
|
} catch (o) {
|
|
539
537
|
return console.error("Error searching for portal group by title:", o), null;
|
|
540
538
|
}
|
|
@@ -546,14 +544,14 @@ const jt = async (e, t) => {
|
|
|
546
544
|
groupTitle: s.string().describe("The portal group title to resolve to a group id.")
|
|
547
545
|
})
|
|
548
546
|
}
|
|
549
|
-
),
|
|
547
|
+
), qe = Me(
|
|
550
548
|
async ({ itemTitle: e }, t) => {
|
|
551
549
|
const a = e.trim();
|
|
552
550
|
if (!a)
|
|
553
551
|
return null;
|
|
554
552
|
const n = t?.configurable?.context;
|
|
555
553
|
x(n);
|
|
556
|
-
const { result: o, error: r } = await
|
|
554
|
+
const { result: o, error: r } = await et(n.portal, a, { num: 1 });
|
|
557
555
|
return r && console.error("Error searching for portal item by title:", r), o?.results[0]?.id || null;
|
|
558
556
|
},
|
|
559
557
|
{
|
|
@@ -571,7 +569,7 @@ function A(e, t = "#") {
|
|
|
571
569
|
const n = e.match(new RegExp(`\\${t}([^\\s"']+)`, "u"));
|
|
572
570
|
return n?.[1] ? n[1].trim() : null;
|
|
573
571
|
}
|
|
574
|
-
function
|
|
572
|
+
function Qt(e) {
|
|
575
573
|
const t = Q(e).flatMap((a) => {
|
|
576
574
|
const n = a, o = e[a], r = [
|
|
577
575
|
n,
|
|
@@ -587,11 +585,11 @@ function Vt(e) {
|
|
|
587
585
|
});
|
|
588
586
|
return Object.fromEntries(t);
|
|
589
587
|
}
|
|
590
|
-
function
|
|
588
|
+
function Wt(e) {
|
|
591
589
|
return Object.entries(e).map(([t, { description: a, hints: n }]) => ` - ${t}: ${a} (hints: ${n.join(", ")})`).join(`
|
|
592
590
|
`);
|
|
593
591
|
}
|
|
594
|
-
const
|
|
592
|
+
const Jt = {
|
|
595
593
|
// Example prompt: "Take me to my content"
|
|
596
594
|
"portal-content": {
|
|
597
595
|
description: "The main content page of the portal.",
|
|
@@ -725,13 +723,13 @@ const Kt = {
|
|
|
725
723
|
}
|
|
726
724
|
}
|
|
727
725
|
}
|
|
728
|
-
},
|
|
726
|
+
}, ke = Qt(Jt), _t = Q(ke), Yt = Wt(ke), Ht = `
|
|
729
727
|
You decide whether the assistant response should include a navigation action to ArcGIS Portal.
|
|
730
728
|
|
|
731
729
|
Given the user question and assistant response:
|
|
732
730
|
- Decide if a navigation action would help the user complete the task.
|
|
733
731
|
- If yes, choose one destinationType:
|
|
734
|
-
${
|
|
732
|
+
${Yt}
|
|
735
733
|
|
|
736
734
|
Rules:
|
|
737
735
|
- Only suggest navigation when you are highly confident the destination will help complete the user's task.
|
|
@@ -754,39 +752,39 @@ User question:
|
|
|
754
752
|
|
|
755
753
|
Assistant response:
|
|
756
754
|
{response}
|
|
757
|
-
`,
|
|
755
|
+
`, ie = s.object({
|
|
758
756
|
shouldSuggestNavigation: s.boolean().default(!1),
|
|
759
|
-
destinationType: s.enum(["none", ...
|
|
757
|
+
destinationType: s.enum(["none", ..._t]).default("none"),
|
|
760
758
|
itemId: s.string().default(""),
|
|
761
759
|
groupId: s.string().default(""),
|
|
762
760
|
confidence: s.number().min(0).max(1).default(0)
|
|
763
761
|
});
|
|
764
|
-
let
|
|
765
|
-
async function
|
|
766
|
-
return
|
|
762
|
+
let ce;
|
|
763
|
+
async function Xt() {
|
|
764
|
+
return ce ??= Y({ modelTier: "fast" }), await ce;
|
|
767
765
|
}
|
|
768
|
-
const
|
|
766
|
+
const Zt = async (e, t) => {
|
|
769
767
|
const a = performance.now();
|
|
770
768
|
try {
|
|
771
769
|
await p({ text: "Extracting navigation intent...", agentName: "doc-assistant" }, t);
|
|
772
770
|
const n = e.outputMessage.trim();
|
|
773
771
|
if (!n)
|
|
774
772
|
return {};
|
|
775
|
-
const o =
|
|
773
|
+
const o = b(e.agentExecutionContext.messages).trim(), r = await H.fromTemplate(Ht).format({
|
|
776
774
|
question: o,
|
|
777
775
|
response: n
|
|
778
|
-
}), u = (await
|
|
776
|
+
}), u = (await Xt()).withStructuredOutput(ie), c = ie.parse(await u.invoke(r));
|
|
779
777
|
if (!c.shouldSuggestNavigation || c.destinationType === "none")
|
|
780
778
|
return {};
|
|
781
779
|
if (c.destinationType === "portal-item" && !c.itemId) {
|
|
782
780
|
const l = A(o, "#");
|
|
783
|
-
l && (c.itemId = await
|
|
781
|
+
l && (c.itemId = await qe.invoke({ itemTitle: l }, t) ?? "");
|
|
784
782
|
}
|
|
785
783
|
if (c.destinationType === "portal-group" && !c.groupId) {
|
|
786
784
|
const l = A(o, "$") ?? A(o, "#");
|
|
787
|
-
l && (c.groupId = await
|
|
785
|
+
l && (c.groupId = await Ge.invoke({ groupTitle: l }, t) ?? "");
|
|
788
786
|
}
|
|
789
|
-
const d =
|
|
787
|
+
const d = ea(c);
|
|
790
788
|
return d ? (await F(d, t), {}) : {};
|
|
791
789
|
} finally {
|
|
792
790
|
console.info("[arcgis-portal-ai-assistant] node timing", {
|
|
@@ -796,7 +794,7 @@ const Yt = async (e, t) => {
|
|
|
796
794
|
});
|
|
797
795
|
}
|
|
798
796
|
};
|
|
799
|
-
function
|
|
797
|
+
function ea({
|
|
800
798
|
destinationType: e,
|
|
801
799
|
itemId: t,
|
|
802
800
|
groupId: a
|
|
@@ -822,7 +820,7 @@ function Ht({
|
|
|
822
820
|
case "portal-content-new-item-developer-credentials":
|
|
823
821
|
return {
|
|
824
822
|
queryParams: {
|
|
825
|
-
newItem:
|
|
823
|
+
newItem: ta[e]
|
|
826
824
|
},
|
|
827
825
|
destinationType: "portal-content"
|
|
828
826
|
};
|
|
@@ -830,11 +828,11 @@ function Ht({
|
|
|
830
828
|
case "portal-content-group":
|
|
831
829
|
case "portal-content-living-atlas":
|
|
832
830
|
case "portal-content-organization":
|
|
833
|
-
return { destinationType: "portal-content", hash:
|
|
831
|
+
return { destinationType: "portal-content", hash: aa[e] };
|
|
834
832
|
case "portal-groups-featured":
|
|
835
833
|
case "portal-groups-my":
|
|
836
834
|
case "portal-groups-organization":
|
|
837
|
-
return { destinationType: "portal-groups", hash:
|
|
835
|
+
return { destinationType: "portal-groups", hash: na[e] };
|
|
838
836
|
case "portal-org-security-custom-sign-in":
|
|
839
837
|
case "portal-org-security-logins":
|
|
840
838
|
case "portal-org-security-change-login-provider":
|
|
@@ -846,7 +844,7 @@ function Ht({
|
|
|
846
844
|
hash: "settings",
|
|
847
845
|
queryParams: {
|
|
848
846
|
tab: "security",
|
|
849
|
-
subsection:
|
|
847
|
+
subsection: oa[e]
|
|
850
848
|
}
|
|
851
849
|
};
|
|
852
850
|
case "portal-item":
|
|
@@ -859,51 +857,51 @@ function Ht({
|
|
|
859
857
|
return U(e);
|
|
860
858
|
}
|
|
861
859
|
}
|
|
862
|
-
const
|
|
860
|
+
const ta = {
|
|
863
861
|
"portal-content-new-item": "newItem",
|
|
864
862
|
"portal-content-new-item-feature-layer": "createLayer",
|
|
865
863
|
"portal-content-new-item-developer-credentials": "developerCredentials"
|
|
866
|
-
},
|
|
864
|
+
}, aa = {
|
|
867
865
|
"portal-content-favorites": "favorites",
|
|
868
866
|
"portal-content-group": "group",
|
|
869
867
|
"portal-content-living-atlas": "living-atlas",
|
|
870
868
|
"portal-content-organization": "org"
|
|
871
|
-
},
|
|
869
|
+
}, na = {
|
|
872
870
|
"portal-groups-featured": "featured",
|
|
873
871
|
"portal-groups-my": "my",
|
|
874
872
|
"portal-groups-organization": "organization"
|
|
875
|
-
},
|
|
873
|
+
}, oa = {
|
|
876
874
|
"portal-org-security-custom-sign-in": "customSignInSection",
|
|
877
875
|
"portal-org-security-logins": "loginsSection",
|
|
878
876
|
"portal-org-security-change-login-provider": "changeLoginProviderSection",
|
|
879
877
|
"portal-org-security-multifactor-auth": "multiFactorAuthSection",
|
|
880
878
|
"portal-org-security-multifactor-enforcement": "multifactorEnforcementSection",
|
|
881
879
|
"portal-org-security-multifactor-designated-admins": "multifactorDesignatedAdminsSection"
|
|
882
|
-
},
|
|
883
|
-
...
|
|
884
|
-
}),
|
|
880
|
+
}, Ee = h.Root({
|
|
881
|
+
...G()
|
|
882
|
+
}), ra = () => new N(Ee).addNode("answerDocQuestion", Kt).addNode("extractNavigationIntent", Zt).addEdge(P, "answerDocQuestion").addEdge("answerDocQuestion", "extractNavigationIntent").addEdge("extractNavigationIntent", w), sa = String.raw`- **portal-doc-assistant** - General ArcGIS documentation and Portal help assistant:
|
|
885
883
|
- answers general ArcGIS, Portal, Enterprise, and JavaScript SDK questions
|
|
886
884
|
- acts as a fallback when specialized agents are not applicable
|
|
887
|
-
`,
|
|
885
|
+
`, ia = {
|
|
888
886
|
id: "portal-doc-assistant",
|
|
889
887
|
name: "Portal Doc Assistant",
|
|
890
|
-
description:
|
|
891
|
-
createGraph:
|
|
892
|
-
workspace:
|
|
893
|
-
},
|
|
888
|
+
description: sa,
|
|
889
|
+
createGraph: ra,
|
|
890
|
+
workspace: Ee
|
|
891
|
+
}, ca = () => ({ latestGroupId: null, memory: {} }), O = (e) => {
|
|
894
892
|
const t = e?.agentExecutionContext.sharedState.portalGroupSummaryMemory?.value;
|
|
895
|
-
return t ? { latestGroupId: t.latestGroupId, memory: t.memory } :
|
|
896
|
-
},
|
|
893
|
+
return t ? { latestGroupId: t.latestGroupId, memory: t.memory } : ca();
|
|
894
|
+
}, ze = `
|
|
897
895
|
Shared markdown formatting rules:
|
|
898
896
|
- Use clear markdown headings (##) to separate sections.
|
|
899
897
|
- Use concise bullet points for lists of facts, counts, or signals.
|
|
900
898
|
- Emphasize key metrics with bold labels (for example: **Recent items:** 4).
|
|
901
899
|
- Keep wording direct and analytical; avoid filler language but make sure the language is friendly.
|
|
902
900
|
- Do not include raw internal IDs unless explicitly requested.
|
|
903
|
-
`,
|
|
901
|
+
`, ua = `
|
|
904
902
|
You answer follow-up questions about ArcGIS group analytics.
|
|
905
903
|
|
|
906
|
-
${
|
|
904
|
+
${ze}
|
|
907
905
|
|
|
908
906
|
Ground your answer in the provided group analytics summary and context.
|
|
909
907
|
If the answer is not available from the provided context, state that clearly and suggest what to check next.
|
|
@@ -925,14 +923,14 @@ Group full context:
|
|
|
925
923
|
|
|
926
924
|
Question:
|
|
927
925
|
{question}
|
|
928
|
-
`,
|
|
926
|
+
`, la = async (e, t) => {
|
|
929
927
|
await p({ text: "Answering group follow-up...", agentName: "group-analytics" }, t);
|
|
930
|
-
const a = O(e), n = e.groupSummaryGroupId ?? a.latestGroupId, o = n ? a.memory[n] : void 0, r = e.groupSummaryQuestion ||
|
|
928
|
+
const a = O(e), n = e.groupSummaryGroupId ?? a.latestGroupId, o = n ? a.memory[n] : void 0, r = e.groupSummaryQuestion || b(e.agentExecutionContext.messages);
|
|
931
929
|
return o ? {
|
|
932
930
|
status: "success",
|
|
933
|
-
outputMessage: (await
|
|
934
|
-
promptText:
|
|
935
|
-
schema:
|
|
931
|
+
outputMessage: (await v({
|
|
932
|
+
promptText: ua,
|
|
933
|
+
schema: da,
|
|
936
934
|
modelTier: "default",
|
|
937
935
|
inputVariables: {
|
|
938
936
|
summary: o.summary,
|
|
@@ -944,10 +942,10 @@ Question:
|
|
|
944
942
|
status: "success",
|
|
945
943
|
outputMessage: "I do not have group analytics context yet. Ask me to analyze a group first with analyze group <group id>."
|
|
946
944
|
};
|
|
947
|
-
},
|
|
945
|
+
}, da = s.object({
|
|
948
946
|
answer: s.string(),
|
|
949
947
|
isRelevant: s.boolean()
|
|
950
|
-
}),
|
|
948
|
+
}), pa = `
|
|
951
949
|
Classify the user's request for ArcGIS Portal group analytics.
|
|
952
950
|
|
|
953
951
|
Rules:
|
|
@@ -976,16 +974,16 @@ hasAnalyticsContext:
|
|
|
976
974
|
|
|
977
975
|
User message:
|
|
978
976
|
{userMessage}
|
|
979
|
-
`,
|
|
977
|
+
`, ma = async (e, t) => {
|
|
980
978
|
await p({ text: "Analyzing group-analytics intent...", agentName: "group-analytics" }, t);
|
|
981
|
-
const a =
|
|
979
|
+
const a = b(e.agentExecutionContext.messages), n = !!O(e).latestGroupId, o = await H.fromTemplate(pa).format({
|
|
982
980
|
userMessage: a,
|
|
983
981
|
hasAnalyticsContext: String(n)
|
|
984
|
-
}), i = (await
|
|
982
|
+
}), i = (await Y({ modelTier: "fast" })).withStructuredOutput(ue), u = ue.parse(await i.invoke(o));
|
|
985
983
|
let c = u.groupId;
|
|
986
984
|
if ((u.intent === "summarize" || u.intent === "navigation") && !c) {
|
|
987
985
|
const y = A(a, "$");
|
|
988
|
-
y && (c = await
|
|
986
|
+
y && (c = await Ge.invoke({ groupTitle: y }, t) ?? "");
|
|
989
987
|
}
|
|
990
988
|
const { intent: d, question: l } = u, m = d === "summarize" && !c, g = d === "followUp" && !(l ?? "").trim(), f = d === "clarify" || m || g;
|
|
991
989
|
return {
|
|
@@ -995,23 +993,23 @@ User message:
|
|
|
995
993
|
status: "success",
|
|
996
994
|
outputMessage: f ? "Please clarify with a group id or title" : ""
|
|
997
995
|
};
|
|
998
|
-
},
|
|
996
|
+
}, ue = s.object({
|
|
999
997
|
intent: s.enum(["summarize", "followUp", "navigation", "clarify"]),
|
|
1000
998
|
groupId: s.string().default(""),
|
|
1001
999
|
question: s.string().default("")
|
|
1002
|
-
}),
|
|
1000
|
+
}), ga = async (e, t) => {
|
|
1003
1001
|
const a = O(e), n = e.groupSummaryGroupId ?? a.latestGroupId;
|
|
1004
1002
|
return await p({ text: "Preparing navigation...", agentName: "group-analytics" }, t), await F(
|
|
1005
1003
|
n ? { destinationType: "portal-group", groupId: n } : { destinationType: "portal-groups" },
|
|
1006
1004
|
t
|
|
1007
1005
|
), { status: "success" };
|
|
1008
1006
|
};
|
|
1009
|
-
function
|
|
1007
|
+
function De({ timestamp: e, now: t, windowMs: a }) {
|
|
1010
1008
|
return e ? t - e <= a : !1;
|
|
1011
1009
|
}
|
|
1012
|
-
const
|
|
1013
|
-
function
|
|
1014
|
-
const t =
|
|
1010
|
+
const ha = 720 * 60 * 60 * 1e3;
|
|
1011
|
+
function fa(e) {
|
|
1012
|
+
const t = at(e);
|
|
1015
1013
|
return {
|
|
1016
1014
|
id: e.id ?? "",
|
|
1017
1015
|
title: e.title ?? "",
|
|
@@ -1024,10 +1022,10 @@ function ma(e) {
|
|
|
1024
1022
|
modified: e.modified?.getTime(),
|
|
1025
1023
|
isInvitationOnly: e.isInvitationOnly,
|
|
1026
1024
|
sourceSignals: {
|
|
1027
|
-
capabilities:
|
|
1028
|
-
membershipAccess:
|
|
1029
|
-
isOpenData:
|
|
1030
|
-
isDistributedCollaborationGroup:
|
|
1025
|
+
capabilities: st(e),
|
|
1026
|
+
membershipAccess: rt(e),
|
|
1027
|
+
isOpenData: ot(e),
|
|
1028
|
+
isDistributedCollaborationGroup: nt(e),
|
|
1031
1029
|
orgId: t.orgId,
|
|
1032
1030
|
hiddenMembers: t.hiddenMembers,
|
|
1033
1031
|
isViewOnly: t.isViewOnly,
|
|
@@ -1036,7 +1034,7 @@ function ma(e) {
|
|
|
1036
1034
|
}
|
|
1037
1035
|
};
|
|
1038
1036
|
}
|
|
1039
|
-
async function
|
|
1037
|
+
async function ya(e) {
|
|
1040
1038
|
const t = { owner: e.owner ?? "", admins: [], users: [] };
|
|
1041
1039
|
try {
|
|
1042
1040
|
return await e.fetchMembers();
|
|
@@ -1044,7 +1042,7 @@ async function ga(e) {
|
|
|
1044
1042
|
return console.warn("Unable to fetch group members for analytics context", a), t;
|
|
1045
1043
|
}
|
|
1046
1044
|
}
|
|
1047
|
-
function
|
|
1045
|
+
function wa(e) {
|
|
1048
1046
|
return e.map((t) => ({
|
|
1049
1047
|
id: t.id ?? "",
|
|
1050
1048
|
title: t.title ?? "Untitled",
|
|
@@ -1054,43 +1052,43 @@ function ha(e) {
|
|
|
1054
1052
|
modified: t.modified?.getTime()
|
|
1055
1053
|
}));
|
|
1056
1054
|
}
|
|
1057
|
-
function
|
|
1055
|
+
function va(e, t) {
|
|
1058
1056
|
return e.filter(
|
|
1059
|
-
(a) => a.modified ?
|
|
1057
|
+
(a) => a.modified ? De({ timestamp: a.modified, now: t, windowMs: ha }) : !1
|
|
1060
1058
|
);
|
|
1061
1059
|
}
|
|
1062
|
-
function
|
|
1060
|
+
function ba(e) {
|
|
1063
1061
|
const t = /* @__PURE__ */ new Map();
|
|
1064
1062
|
for (const a of e)
|
|
1065
1063
|
t.set(a.type, (t.get(a.type) ?? 0) + 1);
|
|
1066
1064
|
return [...t.entries()].sort((a, n) => n[1] - a[1] || a[0].localeCompare(n[0])).slice(0, 6).map(([a, n]) => ({ type: a, count: n }));
|
|
1067
1065
|
}
|
|
1068
|
-
async function
|
|
1069
|
-
const t = await e.queryItems({ num: 20, sortField: "modified", sortOrder: "desc" }), a =
|
|
1066
|
+
async function Ia(e) {
|
|
1067
|
+
const t = await e.queryItems({ num: 20, sortField: "modified", sortOrder: "desc" }), a = wa(t.results), n = Date.now();
|
|
1070
1068
|
return {
|
|
1071
1069
|
total: t.total,
|
|
1072
1070
|
topItems: a,
|
|
1073
|
-
recentlyModifiedItems:
|
|
1074
|
-
topItemTypes:
|
|
1071
|
+
recentlyModifiedItems: va(a, n),
|
|
1072
|
+
topItemTypes: ba(a)
|
|
1075
1073
|
};
|
|
1076
1074
|
}
|
|
1077
|
-
async function
|
|
1075
|
+
async function xa(e, t) {
|
|
1078
1076
|
if (!t)
|
|
1079
1077
|
return { error: { code: "missingGroupId", message: "Group id is required." } };
|
|
1080
1078
|
try {
|
|
1081
1079
|
const n = (await e.queryGroups({ query: `id:${t}`, num: 1 })).results[0];
|
|
1082
1080
|
if (!n)
|
|
1083
1081
|
return { error: { code: "groupNotFound", message: `No group found for id: ${t}` } };
|
|
1084
|
-
const o =
|
|
1082
|
+
const o = fa(n), r = await ya(n), i = await Ia(n);
|
|
1085
1083
|
return { result: { group: o, members: r, items: i } };
|
|
1086
1084
|
} catch (a) {
|
|
1087
1085
|
return console.error("Error fetching portal group analytics context:", a), { error: { code: "unhandledError" } };
|
|
1088
1086
|
}
|
|
1089
1087
|
}
|
|
1090
|
-
const
|
|
1088
|
+
const Sa = `
|
|
1091
1089
|
You summarize ArcGIS Portal groups based on structured context and deterministic activity signals.
|
|
1092
1090
|
|
|
1093
|
-
${
|
|
1091
|
+
${ze}
|
|
1094
1092
|
|
|
1095
1093
|
Output format requirements:
|
|
1096
1094
|
- Return concise markdown with clear sections in this order:
|
|
@@ -1126,7 +1124,7 @@ Group context:
|
|
|
1126
1124
|
|
|
1127
1125
|
Deterministic signals:
|
|
1128
1126
|
{deterministicSignals}
|
|
1129
|
-
`,
|
|
1127
|
+
`, Ta = 2160 * 60 * 60 * 1e3, Ma = async (e, t) => {
|
|
1130
1128
|
const a = e.groupSummaryGroupId;
|
|
1131
1129
|
if (!a)
|
|
1132
1130
|
return {
|
|
@@ -1136,15 +1134,15 @@ Deterministic signals:
|
|
|
1136
1134
|
await p({ text: `Analyzing group ${a}...`, agentName: "group-analytics" }, t);
|
|
1137
1135
|
const n = t?.configurable?.context;
|
|
1138
1136
|
x(n);
|
|
1139
|
-
const { result: o, error: r } = await
|
|
1137
|
+
const { result: o, error: r } = await xa(n.portal, a);
|
|
1140
1138
|
if (r || !o)
|
|
1141
1139
|
return await p({ text: "Failed to fetch group context", agentName: "group-analytics" }, t), {
|
|
1142
1140
|
status: "success",
|
|
1143
1141
|
outputMessage: "Unable to retrieve group context for analytics."
|
|
1144
1142
|
};
|
|
1145
|
-
const { group: i, items: u } = o, c = Date.now(), d = i.modified, l = d ?
|
|
1146
|
-
promptText:
|
|
1147
|
-
schema:
|
|
1143
|
+
const { group: i, items: u } = o, c = Date.now(), d = i.modified, l = d ? De({ timestamp: d, now: c, windowMs: Ta }) : !1, m = u.recentlyModifiedItems.length, g = m > 0, f = l || g, y = await v({
|
|
1144
|
+
promptText: Sa,
|
|
1145
|
+
schema: Ca,
|
|
1148
1146
|
modelTier: "default",
|
|
1149
1147
|
inputVariables: {
|
|
1150
1148
|
context: JSON.stringify(o),
|
|
@@ -1162,16 +1160,16 @@ Deterministic signals:
|
|
|
1162
1160
|
[a]: { summary: q, followUpQuestions: M, fullContext: o }
|
|
1163
1161
|
}
|
|
1164
1162
|
};
|
|
1165
|
-
return M.length && await
|
|
1163
|
+
return M.length && await _({ type: "suggested-prompts", data: { prompts: M } }, t), {
|
|
1166
1164
|
status: "success",
|
|
1167
1165
|
outputMessage: q,
|
|
1168
1166
|
sharedStatePatch: { portalGroupSummaryMemory: { value: C } }
|
|
1169
1167
|
};
|
|
1170
|
-
},
|
|
1168
|
+
}, Ca = s.object({
|
|
1171
1169
|
summary: s.string(),
|
|
1172
1170
|
followUpQuestions: s.array(s.string()).default([])
|
|
1173
|
-
}), L = (e, t) => t ?? e,
|
|
1174
|
-
...
|
|
1171
|
+
}), L = (e, t) => t ?? e, $e = h.Root({
|
|
1172
|
+
...G(),
|
|
1175
1173
|
groupSummaryIntent: h({
|
|
1176
1174
|
reducer: L,
|
|
1177
1175
|
default: () => "clarify"
|
|
@@ -1184,24 +1182,24 @@ Deterministic signals:
|
|
|
1184
1182
|
reducer: L,
|
|
1185
1183
|
default: () => ""
|
|
1186
1184
|
})
|
|
1187
|
-
}),
|
|
1185
|
+
}), Aa = () => new N($e).addNode("detectGroupSummaryIntent", ma).addNode("summarizePortalGroup", Ma).addNode("answerGroupSummaryFollowUp", la).addNode("suggestGroupSummaryNavigation", ga).addEdge(P, "detectGroupSummaryIntent").addConditionalEdges("detectGroupSummaryIntent", (t) => t.groupSummaryIntent === "summarize" ? "summarizePortalGroup" : t.groupSummaryIntent === "followUp" ? "answerGroupSummaryFollowUp" : t.groupSummaryIntent === "navigation" ? "suggestGroupSummaryNavigation" : w).addEdge("summarizePortalGroup", w).addEdge("answerGroupSummaryFollowUp", w).addEdge("suggestGroupSummaryNavigation", w), Na = String.raw`- **portal-group-analytics** - Portal group analytics assistant:
|
|
1188
1186
|
- summarizes ArcGIS portal groups from group context and sourceJSON details
|
|
1189
1187
|
- answers follow-up questions grounded in the summarized group
|
|
1190
1188
|
- suggests navigation to groups when relevant
|
|
1191
|
-
`,
|
|
1189
|
+
`, Pa = {
|
|
1192
1190
|
id: "portal-group-analytics",
|
|
1193
1191
|
name: "Portal Group Analytics",
|
|
1194
|
-
description:
|
|
1195
|
-
createGraph:
|
|
1196
|
-
workspace:
|
|
1197
|
-
},
|
|
1192
|
+
description: Na,
|
|
1193
|
+
createGraph: Aa,
|
|
1194
|
+
workspace: $e
|
|
1195
|
+
}, Ga = () => ({ latestItemId: null, memory: {} }), X = (e) => {
|
|
1198
1196
|
const t = e?.agentExecutionContext.sharedState.portalItemAnalyticsSummaryMemory?.value;
|
|
1199
|
-
return t ? { latestItemId: t.latestItemId, memory: t.memory } :
|
|
1200
|
-
},
|
|
1197
|
+
return t ? { latestItemId: t.latestItemId, memory: t.memory } : Ga();
|
|
1198
|
+
}, le = s.object({
|
|
1201
1199
|
intent: s.enum(["summarize", "followUp", "clarify"]),
|
|
1202
1200
|
itemId: s.string().default(""),
|
|
1203
1201
|
question: s.string().default("")
|
|
1204
|
-
}),
|
|
1202
|
+
}), qa = s.object({ summary: s.string(), followUpQuestions: s.array(s.string()).default([]) }), ka = s.object({ answer: s.string(), isRelevant: s.boolean() }), Ea = `
|
|
1205
1203
|
You answer follow-up questions about an ArcGIS item.
|
|
1206
1204
|
|
|
1207
1205
|
Ground your answer in the provided item context.
|
|
@@ -1221,14 +1219,14 @@ Item full context
|
|
|
1221
1219
|
|
|
1222
1220
|
Question:
|
|
1223
1221
|
{question}
|
|
1224
|
-
`,
|
|
1222
|
+
`, za = async (e, t) => {
|
|
1225
1223
|
await p({ text: "Answering follow-up...", agentName: "analytics" }, t);
|
|
1226
|
-
const a =
|
|
1224
|
+
const a = X(e), n = e.analyticsItemId ?? a.latestItemId, o = n ? a.memory[n] : void 0, r = e.analyticsQuestion || b(e.agentExecutionContext.messages);
|
|
1227
1225
|
return o ? {
|
|
1228
1226
|
status: "success",
|
|
1229
|
-
outputMessage: (await
|
|
1230
|
-
promptText:
|
|
1231
|
-
schema:
|
|
1227
|
+
outputMessage: (await v({
|
|
1228
|
+
promptText: Ea,
|
|
1229
|
+
schema: ka,
|
|
1232
1230
|
modelTier: "default",
|
|
1233
1231
|
inputVariables: {
|
|
1234
1232
|
summary: o.summary,
|
|
@@ -1240,7 +1238,7 @@ Question:
|
|
|
1240
1238
|
status: "success",
|
|
1241
1239
|
outputMessage: "I don't have enough information yet. Please ask me to summarize the item first using summarize item <item id>."
|
|
1242
1240
|
};
|
|
1243
|
-
},
|
|
1241
|
+
}, Da = `
|
|
1244
1242
|
Classify the user analytics request.
|
|
1245
1243
|
|
|
1246
1244
|
Rules:
|
|
@@ -1270,16 +1268,16 @@ hasSummaryContext:
|
|
|
1270
1268
|
|
|
1271
1269
|
User message:
|
|
1272
1270
|
{userMessage}
|
|
1273
|
-
`,
|
|
1271
|
+
`, $a = async (e, t) => {
|
|
1274
1272
|
await p({ text: "Analyzing intent...", agentName: "analytics" }, t);
|
|
1275
|
-
const a =
|
|
1273
|
+
const a = b(e.agentExecutionContext.messages), n = !!X(e).latestItemId, o = await H.fromTemplate(Da).format({
|
|
1276
1274
|
userMessage: a,
|
|
1277
1275
|
hasSummaryContext: String(n)
|
|
1278
|
-
}), i = (await
|
|
1276
|
+
}), i = (await Y({ modelTier: "fast" })).withStructuredOutput(le), u = le.parse(await i.invoke(o));
|
|
1279
1277
|
let c = u.itemId;
|
|
1280
1278
|
if (u.intent === "summarize" && !c) {
|
|
1281
1279
|
const y = A(a, "#");
|
|
1282
|
-
y && (c = await
|
|
1280
|
+
y && (c = await qe.invoke({ itemTitle: y }, t) ?? "");
|
|
1283
1281
|
}
|
|
1284
1282
|
const { intent: d, question: l } = u, f = d === "clarify" || d === "summarize" && !c || d === "followUp" && !l;
|
|
1285
1283
|
return {
|
|
@@ -1290,7 +1288,7 @@ User message:
|
|
|
1290
1288
|
status: "success",
|
|
1291
1289
|
outputMessage: f ? 'Please clarify with summarize item <item id>, summarize item #<title>, or summarize item #"<title with spaces>".' : ""
|
|
1292
1290
|
};
|
|
1293
|
-
},
|
|
1291
|
+
}, Ra = `
|
|
1294
1292
|
You are a item summary tool for ArcGIS. Your job is to summarize an item's info based on the provided context.
|
|
1295
1293
|
Summary rules:
|
|
1296
1294
|
- The summary should be concise markdown, make sure to format the output nicely so it's easy to read.
|
|
@@ -1305,7 +1303,7 @@ Do not include internal identifiers.
|
|
|
1305
1303
|
If the user asks for a detailed summary, you may expand the response up to 300 words.
|
|
1306
1304
|
Item context:
|
|
1307
1305
|
{context}
|
|
1308
|
-
`,
|
|
1306
|
+
`, Ua = async (e, t) => {
|
|
1309
1307
|
const a = e.analyticsItemId;
|
|
1310
1308
|
if (!a)
|
|
1311
1309
|
return {
|
|
@@ -1315,31 +1313,31 @@ Item context:
|
|
|
1315
1313
|
await p({ text: `Summarizing item ${a}...`, agentName: "analytics" }, t);
|
|
1316
1314
|
const n = t?.configurable?.context;
|
|
1317
1315
|
x(n);
|
|
1318
|
-
const { portal: o, user: r } = n, { result: i, error: u } = await
|
|
1316
|
+
const { portal: o, user: r } = n, { result: i, error: u } = await tt(r, o, a);
|
|
1319
1317
|
if (u || !i)
|
|
1320
1318
|
return await p({ text: "Failed to get item context for summarization", agentName: "analytics" }, t), {
|
|
1321
1319
|
status: "success",
|
|
1322
1320
|
outputMessage: "Unable to retrieve item context for summarization."
|
|
1323
1321
|
};
|
|
1324
|
-
const { context: c } = i, d = await
|
|
1325
|
-
promptText:
|
|
1326
|
-
schema:
|
|
1322
|
+
const { context: c } = i, d = await v({
|
|
1323
|
+
promptText: Ra,
|
|
1324
|
+
schema: qa,
|
|
1327
1325
|
modelTier: "default",
|
|
1328
1326
|
inputVariables: { context: JSON.stringify(c) }
|
|
1329
|
-
}), { followUpQuestions: l, summary: m } = d, g =
|
|
1327
|
+
}), { followUpQuestions: l, summary: m } = d, g = X(e), f = {
|
|
1330
1328
|
latestItemId: a,
|
|
1331
1329
|
memory: {
|
|
1332
1330
|
...g.memory,
|
|
1333
1331
|
[a]: { summary: m, followUpQuestions: l, fullContext: c }
|
|
1334
1332
|
}
|
|
1335
1333
|
};
|
|
1336
|
-
return l.length && await
|
|
1334
|
+
return l.length && await _({ type: "suggested-prompts", data: { prompts: l } }, t), {
|
|
1337
1335
|
status: "success",
|
|
1338
1336
|
outputMessage: m,
|
|
1339
1337
|
sharedStatePatch: { portalItemAnalyticsSummaryMemory: { value: f } }
|
|
1340
1338
|
};
|
|
1341
|
-
}, j = (e, t) => t ?? e,
|
|
1342
|
-
...
|
|
1339
|
+
}, j = (e, t) => t ?? e, Re = h.Root({
|
|
1340
|
+
...G(),
|
|
1343
1341
|
// States shared only across nodes in the graph, not between invocations
|
|
1344
1342
|
analyticsIntent: h({
|
|
1345
1343
|
reducer: j,
|
|
@@ -1353,26 +1351,26 @@ Item context:
|
|
|
1353
1351
|
reducer: j,
|
|
1354
1352
|
default: () => ""
|
|
1355
1353
|
})
|
|
1356
|
-
}),
|
|
1354
|
+
}), Fa = () => new N(Re).addNode("detectAnalyticsIntent", $a).addNode("summarizePortalItem", Ua).addNode("answerAnalyticsFollowUp", za).addEdge(P, "detectAnalyticsIntent").addConditionalEdges("detectAnalyticsIntent", (t) => t.analyticsIntent === "summarize" ? "summarizePortalItem" : t.analyticsIntent === "followUp" ? "answerAnalyticsFollowUp" : w).addEdge("summarizePortalItem", w).addEdge("answerAnalyticsFollowUp", w), Oa = String.raw`- **portal-item-analytics** - Portal item analytics assistant:
|
|
1357
1355
|
- answers questions about one specific ArcGIS portal item when item context is present
|
|
1358
1356
|
- summarizes item details, metadata, and context grounded in that item
|
|
1359
1357
|
- suggests follow-up prompts grounded in the same item
|
|
1360
1358
|
- use for item-specific requests, not for gallery browsing, featured content, or opening Map Viewer
|
|
1361
|
-
`,
|
|
1359
|
+
`, La = {
|
|
1362
1360
|
id: "portal-item-analytics",
|
|
1363
1361
|
name: "Portal Item Analytics",
|
|
1364
|
-
description:
|
|
1365
|
-
createGraph:
|
|
1366
|
-
workspace:
|
|
1367
|
-
},
|
|
1362
|
+
description: Oa,
|
|
1363
|
+
createGraph: Fa,
|
|
1364
|
+
workspace: Re
|
|
1365
|
+
}, ja = /^(?:take me to|navigate to|go to|show me|open)\s+(?:the\s+)?/u;
|
|
1368
1366
|
function R(e) {
|
|
1369
|
-
return e.toLowerCase().replace(/[^a-z0-9]+/gu, " ").trim().replace(
|
|
1367
|
+
return e.toLowerCase().replace(/[^a-z0-9]+/gu, " ").trim().replace(ja, "").trim();
|
|
1370
1368
|
}
|
|
1371
|
-
const
|
|
1369
|
+
const Va = s.object({
|
|
1372
1370
|
capabilityIds: s.array(s.string()).default([]),
|
|
1373
1371
|
confidence: s.number().min(0).max(1).default(0),
|
|
1374
1372
|
reason: s.string().default("")
|
|
1375
|
-
}),
|
|
1373
|
+
}), de = 0.8, Ba = String.raw`You select Portal navigation capabilities for a user's request.
|
|
1376
1374
|
|
|
1377
1375
|
Select only capability IDs from the supplied candidates. Return an empty array when none fit.
|
|
1378
1376
|
A named surface is required: do not select a capability on another Portal surface.
|
|
@@ -1382,10 +1380,10 @@ User request:
|
|
|
1382
1380
|
{userRequest}
|
|
1383
1381
|
|
|
1384
1382
|
Candidates:
|
|
1385
|
-
{candidates}`,
|
|
1383
|
+
{candidates}`, Ka = async (e, t) => {
|
|
1386
1384
|
if (e.outputMessage || e.targets.length === 0)
|
|
1387
1385
|
return {};
|
|
1388
|
-
const a =
|
|
1386
|
+
const a = b(e.agentExecutionContext.messages).trim(), n = Qa(a, e);
|
|
1389
1387
|
if (n.length === 1)
|
|
1390
1388
|
return await p(
|
|
1391
1389
|
{ text: `Selected navigation capability by exact match: ${n[0]}`, agentName: "navigation" },
|
|
@@ -1407,9 +1405,9 @@ Candidates:
|
|
|
1407
1405
|
}))
|
|
1408
1406
|
);
|
|
1409
1407
|
try {
|
|
1410
|
-
const r = await
|
|
1411
|
-
promptText:
|
|
1412
|
-
schema:
|
|
1408
|
+
const r = await v({
|
|
1409
|
+
promptText: Ba,
|
|
1410
|
+
schema: Va,
|
|
1413
1411
|
modelTier: "fast",
|
|
1414
1412
|
inputVariables: { candidates: o, userRequest: a }
|
|
1415
1413
|
}), i = new Set(e.targets.map(({ capability: c }) => c.id)), u = r.capabilityIds.filter((c) => i.has(c));
|
|
@@ -1425,10 +1423,10 @@ Candidates:
|
|
|
1425
1423
|
reason: r.reason,
|
|
1426
1424
|
request: a,
|
|
1427
1425
|
selectedCapabilityIds: u
|
|
1428
|
-
}), r.confidence <
|
|
1426
|
+
}), r.confidence < de ? {
|
|
1429
1427
|
chosenCapabilityIds: [],
|
|
1430
1428
|
status: "failed",
|
|
1431
|
-
summary: `Navigation selection confidence ${r.confidence} is below the required ${
|
|
1429
|
+
summary: `Navigation selection confidence ${r.confidence} is below the required ${de}; defer to the Portal Doc Assistant.`
|
|
1432
1430
|
} : { chosenCapabilityIds: u };
|
|
1433
1431
|
} catch {
|
|
1434
1432
|
return await p(
|
|
@@ -1441,7 +1439,7 @@ Candidates:
|
|
|
1441
1439
|
}), { chosenCapabilityIds: [] };
|
|
1442
1440
|
}
|
|
1443
1441
|
};
|
|
1444
|
-
function
|
|
1442
|
+
function Qa(e, t) {
|
|
1445
1443
|
const a = R(e);
|
|
1446
1444
|
return t.targets.filter(
|
|
1447
1445
|
({ capability: n }) => [n.title, ...n.hints].some(
|
|
@@ -1449,11 +1447,11 @@ function Va(e, t) {
|
|
|
1449
1447
|
)
|
|
1450
1448
|
).map(({ capability: n }) => n.id);
|
|
1451
1449
|
}
|
|
1452
|
-
const
|
|
1450
|
+
const Ue = /* @__PURE__ */ new Set(["1d", "7d", "14d", "30d", "3m", "6m"]), Wa = s.object({
|
|
1453
1451
|
period: s.string(),
|
|
1454
1452
|
startTime: s.string(),
|
|
1455
1453
|
endTime: s.string()
|
|
1456
|
-
}),
|
|
1454
|
+
}), Ja = String.raw`Extract temporal filters for an ArcGIS storage-credits query.
|
|
1457
1455
|
|
|
1458
1456
|
Return JSON only with these optional string fields:
|
|
1459
1457
|
- period
|
|
@@ -1479,14 +1477,14 @@ Now UTC:
|
|
|
1479
1477
|
|
|
1480
1478
|
User request:
|
|
1481
1479
|
{userRequest}`;
|
|
1482
|
-
async function
|
|
1480
|
+
async function _a(e, t = /* @__PURE__ */ new Date()) {
|
|
1483
1481
|
const a = e.trim();
|
|
1484
1482
|
if (!a)
|
|
1485
1483
|
return {};
|
|
1486
1484
|
try {
|
|
1487
|
-
const n = await
|
|
1488
|
-
promptText:
|
|
1489
|
-
schema:
|
|
1485
|
+
const n = await v({
|
|
1486
|
+
promptText: Ja,
|
|
1487
|
+
schema: Wa,
|
|
1490
1488
|
modelTier: "fast",
|
|
1491
1489
|
inputVariables: {
|
|
1492
1490
|
nowEpochMs: String(t.getTime()),
|
|
@@ -1494,19 +1492,19 @@ async function Qa(e, t = /* @__PURE__ */ new Date()) {
|
|
|
1494
1492
|
userRequest: a
|
|
1495
1493
|
}
|
|
1496
1494
|
});
|
|
1497
|
-
return
|
|
1495
|
+
return Ya(n, t);
|
|
1498
1496
|
} catch (n) {
|
|
1499
1497
|
return console.error(n), {};
|
|
1500
1498
|
}
|
|
1501
1499
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const a =
|
|
1500
|
+
function Ya(e, t = /* @__PURE__ */ new Date()) {
|
|
1501
|
+
const a = pe(e.startTime), n = pe(e.endTime), o = Ha(e.period);
|
|
1504
1502
|
if (o) {
|
|
1505
1503
|
if (a !== void 0 && n !== void 0 && a < n)
|
|
1506
1504
|
return { period: o, startTime: String(a), endTime: String(n) };
|
|
1507
|
-
const r =
|
|
1508
|
-
if (!r || n !== void 0 && !
|
|
1509
|
-
const u = n ?? t.getTime(), c =
|
|
1505
|
+
const r = Ue.has(o);
|
|
1506
|
+
if (!r || n !== void 0 && !Za(n, t.getTime())) {
|
|
1507
|
+
const u = n ?? t.getTime(), c = Xa(o, new Date(u));
|
|
1510
1508
|
if (c !== void 0)
|
|
1511
1509
|
return {
|
|
1512
1510
|
period: o,
|
|
@@ -1522,7 +1520,7 @@ function Wa(e, t = /* @__PURE__ */ new Date()) {
|
|
|
1522
1520
|
}
|
|
1523
1521
|
return a !== void 0 && n !== void 0 && a < n ? { startTime: String(a), endTime: String(n) } : a !== void 0 ? { startTime: String(a), endTime: String(t.getTime()) } : {};
|
|
1524
1522
|
}
|
|
1525
|
-
function
|
|
1523
|
+
function Ha(e) {
|
|
1526
1524
|
const t = e?.trim().match(/^(\d+)\s*([dwm])$/iu);
|
|
1527
1525
|
if (!t)
|
|
1528
1526
|
return;
|
|
@@ -1532,12 +1530,12 @@ function Ja(e) {
|
|
|
1532
1530
|
const n = t[2].toLowerCase();
|
|
1533
1531
|
if (n === "w") {
|
|
1534
1532
|
const o = a * 7;
|
|
1535
|
-
if (
|
|
1533
|
+
if (Ue.has(`${o}d`))
|
|
1536
1534
|
return `${o}d`;
|
|
1537
1535
|
}
|
|
1538
1536
|
return `${a}${n}`;
|
|
1539
1537
|
}
|
|
1540
|
-
function
|
|
1538
|
+
function Xa(e, t) {
|
|
1541
1539
|
const a = e.match(/^(\d+)([dwm])$/u);
|
|
1542
1540
|
if (!a)
|
|
1543
1541
|
return;
|
|
@@ -1552,18 +1550,18 @@ function _a(e, t) {
|
|
|
1552
1550
|
const r = new Date(t.getTime());
|
|
1553
1551
|
return r.setUTCMonth(r.getUTCMonth() - n), r.getTime();
|
|
1554
1552
|
}
|
|
1555
|
-
function
|
|
1553
|
+
function pe(e) {
|
|
1556
1554
|
if (!e)
|
|
1557
1555
|
return;
|
|
1558
1556
|
const t = Number.parseInt(e, 10);
|
|
1559
1557
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
1560
1558
|
return t;
|
|
1561
1559
|
}
|
|
1562
|
-
function
|
|
1560
|
+
function Za(e, t) {
|
|
1563
1561
|
const a = new Date(e), n = new Date(t);
|
|
1564
1562
|
return a.getUTCFullYear() === n.getUTCFullYear() && a.getUTCMonth() === n.getUTCMonth() && a.getUTCDate() === n.getUTCDate();
|
|
1565
1563
|
}
|
|
1566
|
-
const
|
|
1564
|
+
const en = {
|
|
1567
1565
|
schemaVersion: "1.0",
|
|
1568
1566
|
capabilities: [
|
|
1569
1567
|
{
|
|
@@ -1603,7 +1601,7 @@ const Ha = {
|
|
|
1603
1601
|
}
|
|
1604
1602
|
}
|
|
1605
1603
|
]
|
|
1606
|
-
},
|
|
1604
|
+
}, tn = {
|
|
1607
1605
|
schemaVersion: "1.0",
|
|
1608
1606
|
capabilities: [
|
|
1609
1607
|
{
|
|
@@ -1657,7 +1655,7 @@ const Ha = {
|
|
|
1657
1655
|
}
|
|
1658
1656
|
}
|
|
1659
1657
|
]
|
|
1660
|
-
},
|
|
1658
|
+
}, an = {
|
|
1661
1659
|
schemaVersion: "1.0",
|
|
1662
1660
|
capabilities: [
|
|
1663
1661
|
{
|
|
@@ -1677,12 +1675,12 @@ const Ha = {
|
|
|
1677
1675
|
}
|
|
1678
1676
|
}
|
|
1679
1677
|
]
|
|
1680
|
-
},
|
|
1681
|
-
"contentRouteRegistry.ts":
|
|
1682
|
-
"groupsRouteRegistry.ts":
|
|
1683
|
-
"orgSettingsRouteRegistry.ts":
|
|
1678
|
+
}, nn = {
|
|
1679
|
+
"contentRouteRegistry.ts": en,
|
|
1680
|
+
"groupsRouteRegistry.ts": tn,
|
|
1681
|
+
"orgSettingsRouteRegistry.ts": an
|
|
1684
1682
|
};
|
|
1685
|
-
function
|
|
1683
|
+
function me(e) {
|
|
1686
1684
|
const t = [], a = /* @__PURE__ */ new Set();
|
|
1687
1685
|
for (const [n, o] of Object.entries(e))
|
|
1688
1686
|
for (const r of o.capabilities) {
|
|
@@ -1694,29 +1692,29 @@ function pe(e) {
|
|
|
1694
1692
|
}
|
|
1695
1693
|
let z;
|
|
1696
1694
|
function T(e) {
|
|
1697
|
-
return e ? z =
|
|
1695
|
+
return e ? z = me({ customCapabilities: e }) : z || (z = me(nn)), z;
|
|
1698
1696
|
}
|
|
1699
|
-
async function
|
|
1700
|
-
const
|
|
1701
|
-
if (!
|
|
1697
|
+
async function on(e, t, a, n) {
|
|
1698
|
+
const o = T().find((i) => i.id === e);
|
|
1699
|
+
if (!o)
|
|
1702
1700
|
return;
|
|
1703
|
-
const
|
|
1704
|
-
return
|
|
1701
|
+
const r = await sn(rn(o, n), a);
|
|
1702
|
+
return r && un(r, t) ? { capability: o, target: r } : void 0;
|
|
1705
1703
|
}
|
|
1706
|
-
function
|
|
1707
|
-
const
|
|
1708
|
-
switch (
|
|
1704
|
+
function rn(e, t) {
|
|
1705
|
+
const a = e.resolutions.navigate;
|
|
1706
|
+
switch (a.routeKey) {
|
|
1709
1707
|
case "content":
|
|
1710
1708
|
return {
|
|
1711
1709
|
destinationType: "portal-content",
|
|
1712
|
-
hash:
|
|
1713
|
-
queryParams: a,
|
|
1710
|
+
hash: a.hash,
|
|
1711
|
+
queryParams: a.queryParams,
|
|
1714
1712
|
buttonLabel: e.buttonLabel
|
|
1715
1713
|
};
|
|
1716
1714
|
case "groups":
|
|
1717
|
-
if (
|
|
1715
|
+
if (a.hash === "featured")
|
|
1718
1716
|
return { destinationType: "portal-groups", hash: "featured" };
|
|
1719
|
-
if (
|
|
1717
|
+
if (a.hash === "organization")
|
|
1720
1718
|
return { destinationType: "portal-groups", hash: "organization" };
|
|
1721
1719
|
switch (e.id) {
|
|
1722
1720
|
case "my groups":
|
|
@@ -1726,21 +1724,31 @@ function an(e) {
|
|
|
1726
1724
|
default:
|
|
1727
1725
|
return { destinationType: "portal-groups" };
|
|
1728
1726
|
}
|
|
1727
|
+
case "group": {
|
|
1728
|
+
const n = t?.trim();
|
|
1729
|
+
return n ? {
|
|
1730
|
+
destinationType: "portal-group",
|
|
1731
|
+
groupId: n,
|
|
1732
|
+
hash: a.hash,
|
|
1733
|
+
queryParams: a.queryParams,
|
|
1734
|
+
buttonLabel: e.buttonLabel
|
|
1735
|
+
} : void 0;
|
|
1736
|
+
}
|
|
1729
1737
|
case "organization":
|
|
1730
1738
|
return {
|
|
1731
1739
|
destinationType: "portal-org",
|
|
1732
|
-
hash:
|
|
1733
|
-
queryParams: a,
|
|
1740
|
+
hash: a.hash,
|
|
1741
|
+
queryParams: a.queryParams,
|
|
1734
1742
|
buttonLabel: e.buttonLabel
|
|
1735
1743
|
};
|
|
1736
1744
|
default:
|
|
1737
1745
|
return;
|
|
1738
1746
|
}
|
|
1739
1747
|
}
|
|
1740
|
-
async function
|
|
1741
|
-
if (!e || !t || !
|
|
1748
|
+
async function sn(e, t) {
|
|
1749
|
+
if (!e || !t || !cn(e))
|
|
1742
1750
|
return e;
|
|
1743
|
-
const a = await
|
|
1751
|
+
const a = await _a(t);
|
|
1744
1752
|
if (!a.period && !a.startTime && !a.endTime)
|
|
1745
1753
|
return e;
|
|
1746
1754
|
const n = {
|
|
@@ -1751,25 +1759,33 @@ async function nn(e, t) {
|
|
|
1751
1759
|
};
|
|
1752
1760
|
return { ...e, queryParams: n };
|
|
1753
1761
|
}
|
|
1754
|
-
function
|
|
1762
|
+
function cn(e) {
|
|
1755
1763
|
return e.destinationType === "portal-org" && e.hash === "status";
|
|
1756
1764
|
}
|
|
1757
|
-
function
|
|
1765
|
+
function un(e, t) {
|
|
1758
1766
|
return !t || !!t[e.destinationType];
|
|
1759
1767
|
}
|
|
1760
|
-
|
|
1768
|
+
function ge(e) {
|
|
1769
|
+
return e.match(/\b[a-f0-9]{32}\b/iu)?.[0];
|
|
1770
|
+
}
|
|
1771
|
+
const he = "navigation", fe = "provideGroupId", ln = async (e, t) => {
|
|
1761
1772
|
if (e.outputMessage || e.status === "failed")
|
|
1762
1773
|
return {};
|
|
1763
|
-
const a = e.targets.find(({ capability:
|
|
1774
|
+
const a = e.targets.find(({ capability: i }) => e.chosenCapabilityIds.includes(i.id)) ?? e.targets[0];
|
|
1764
1775
|
if (!a)
|
|
1765
1776
|
return {
|
|
1766
1777
|
outputMessage: "I couldn't find a matching Portal page. Try asking to open your content, groups, or organization settings.",
|
|
1767
|
-
sharedStatePatch: { navLastAnsweredRequest: { value:
|
|
1778
|
+
sharedStatePatch: { navLastAnsweredRequest: { value: ye(e) } },
|
|
1768
1779
|
status: "success",
|
|
1769
1780
|
summary: "Navigation could not find a matching capability; route another agent if appropriate."
|
|
1770
1781
|
};
|
|
1771
|
-
const n =
|
|
1772
|
-
|
|
1782
|
+
const n = ye(e), o = dn(a.capability.resolutions.navigate, n, t), r = await on(
|
|
1783
|
+
a.capability.id,
|
|
1784
|
+
void 0,
|
|
1785
|
+
n,
|
|
1786
|
+
o
|
|
1787
|
+
);
|
|
1788
|
+
return r ? (await p({ text: "Preparing navigation...", agentName: "navigation" }, t), await F(r.target, t), {
|
|
1773
1789
|
outputMessage: e.chosenCapabilityIds.length ? a.capability.description : `The closest place to start is ${a.capability.title}. Click the button below to open it.`,
|
|
1774
1790
|
status: "success",
|
|
1775
1791
|
summary: `Navigation suggested ${a.capability.id}${e.retrievalDegraded ? " using keyword-only retrieval" : ""}.`,
|
|
@@ -1781,17 +1797,47 @@ const sn = async (e, t) => {
|
|
|
1781
1797
|
sharedStatePatch: { navLastAnsweredRequest: { value: n } }
|
|
1782
1798
|
});
|
|
1783
1799
|
};
|
|
1784
|
-
function
|
|
1785
|
-
return
|
|
1800
|
+
function ye(e) {
|
|
1801
|
+
return b(e.agentExecutionContext.messages) || e.agentExecutionContext.userRequest;
|
|
1802
|
+
}
|
|
1803
|
+
function dn(e, t, a) {
|
|
1804
|
+
if (e.routeKey !== "group")
|
|
1805
|
+
return;
|
|
1806
|
+
const n = ge(t);
|
|
1807
|
+
if (n)
|
|
1808
|
+
return n;
|
|
1809
|
+
const o = pn(a);
|
|
1810
|
+
if (o?.agentId === he && o.id === fe) {
|
|
1811
|
+
const i = typeof o.payload == "string" ? ge(o.payload) : void 0;
|
|
1812
|
+
if (i)
|
|
1813
|
+
return i;
|
|
1814
|
+
}
|
|
1815
|
+
const r = {
|
|
1816
|
+
agentId: he,
|
|
1817
|
+
id: fe,
|
|
1818
|
+
kind: "textInput",
|
|
1819
|
+
message: "Enter the group ID to open."
|
|
1820
|
+
};
|
|
1821
|
+
throw new J(r);
|
|
1822
|
+
}
|
|
1823
|
+
function pn(e) {
|
|
1824
|
+
const t = e?.configurable;
|
|
1825
|
+
if (!t || typeof t != "object" || !("hitlResponse" in t))
|
|
1826
|
+
return;
|
|
1827
|
+
const a = t.hitlResponse;
|
|
1828
|
+
if (!a || typeof a != "object" || !("agentId" in a) || !("id" in a) || !("payload" in a))
|
|
1829
|
+
return;
|
|
1830
|
+
const { agentId: n, id: o, payload: r } = a;
|
|
1831
|
+
return typeof n == "string" && typeof o == "string" ? { agentId: n, id: o, payload: r } : void 0;
|
|
1786
1832
|
}
|
|
1787
|
-
async function
|
|
1788
|
-
return e.length === 0 ? [] : (await
|
|
1833
|
+
async function Fe(e) {
|
|
1834
|
+
return e.length === 0 ? [] : (await it.getDefault().load(), await _e(e));
|
|
1789
1835
|
}
|
|
1790
|
-
const
|
|
1836
|
+
const mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1791
1837
|
__proto__: null,
|
|
1792
|
-
generateEmbeddings:
|
|
1838
|
+
generateEmbeddings: Fe
|
|
1793
1839
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1794
|
-
function
|
|
1840
|
+
function gn(e) {
|
|
1795
1841
|
const t = [], a = `${e.title}. ${e.description}`;
|
|
1796
1842
|
a.trim().length > 0 && t.push({ field: "summary", text: a });
|
|
1797
1843
|
const n = e.hints;
|
|
@@ -1800,21 +1846,21 @@ function un(e) {
|
|
|
1800
1846
|
typeof o == "string" && o.trim().length > 0 && t.push({ field: "hint", text: o });
|
|
1801
1847
|
return t;
|
|
1802
1848
|
}
|
|
1803
|
-
let
|
|
1804
|
-
async function
|
|
1805
|
-
const t =
|
|
1806
|
-
return
|
|
1807
|
-
throw t ===
|
|
1808
|
-
}), await
|
|
1849
|
+
let D, Z, $ = 0;
|
|
1850
|
+
async function hn(e = {}) {
|
|
1851
|
+
const t = $;
|
|
1852
|
+
return D ??= yn(e.embed ?? wn).then((a) => (t === $ && (Z = a), a)).catch((a) => {
|
|
1853
|
+
throw t === $ && (D = void 0), a;
|
|
1854
|
+
}), await D;
|
|
1809
1855
|
}
|
|
1810
|
-
function
|
|
1811
|
-
return
|
|
1856
|
+
function fn() {
|
|
1857
|
+
return Z;
|
|
1812
1858
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1859
|
+
function we() {
|
|
1860
|
+
$ += 1, Z = void 0, D = void 0;
|
|
1815
1861
|
}
|
|
1816
|
-
async function
|
|
1817
|
-
const t =
|
|
1862
|
+
async function yn(e) {
|
|
1863
|
+
const t = vn(), a = await e(t.map((n) => n.text));
|
|
1818
1864
|
if (a.length !== t.length)
|
|
1819
1865
|
throw new Error(`Expected ${t.length} vectors, got ${a.length}`);
|
|
1820
1866
|
return t.map((n, o) => ({
|
|
@@ -1822,46 +1868,46 @@ async function pn(e) {
|
|
|
1822
1868
|
vector: a[o]
|
|
1823
1869
|
}));
|
|
1824
1870
|
}
|
|
1825
|
-
async function
|
|
1826
|
-
const { generateEmbeddings: t } = await Promise.resolve().then(() =>
|
|
1871
|
+
async function wn(e) {
|
|
1872
|
+
const { generateEmbeddings: t } = await Promise.resolve().then(() => mn);
|
|
1827
1873
|
return await t(e);
|
|
1828
1874
|
}
|
|
1829
|
-
function
|
|
1875
|
+
function vn() {
|
|
1830
1876
|
return T().flatMap(
|
|
1831
|
-
(e) =>
|
|
1877
|
+
(e) => gn(e).map(({ field: t, text: a }) => ({
|
|
1832
1878
|
capabilityId: e.id,
|
|
1833
1879
|
field: t,
|
|
1834
1880
|
text: a
|
|
1835
1881
|
}))
|
|
1836
1882
|
);
|
|
1837
1883
|
}
|
|
1838
|
-
const
|
|
1884
|
+
const ve = 1.2, be = 0.75, bn = 60, In = 0.65, V = {
|
|
1839
1885
|
description: 1,
|
|
1840
1886
|
hint: 2,
|
|
1841
1887
|
title: 3
|
|
1842
1888
|
};
|
|
1843
1889
|
let W;
|
|
1844
|
-
function
|
|
1890
|
+
function xn() {
|
|
1845
1891
|
W = void 0;
|
|
1846
1892
|
}
|
|
1847
|
-
async function
|
|
1848
|
-
const a =
|
|
1893
|
+
async function Sn(e, t = {}) {
|
|
1894
|
+
const a = An(Oe(e));
|
|
1849
1895
|
let n = [], o = !1, r;
|
|
1850
1896
|
if (e.trim()) {
|
|
1851
|
-
const i = t.loadEmbeddings, u =
|
|
1897
|
+
const i = t.loadEmbeddings, u = fn();
|
|
1852
1898
|
if (!i && !u)
|
|
1853
1899
|
o = !0, r = "Capability embeddings are still loading.";
|
|
1854
1900
|
else
|
|
1855
1901
|
try {
|
|
1856
1902
|
if (i) {
|
|
1857
1903
|
const [c, d] = await Promise.all([
|
|
1858
|
-
(t.embedQuery ??
|
|
1904
|
+
(t.embedQuery ?? xe)(e),
|
|
1859
1905
|
i()
|
|
1860
1906
|
]);
|
|
1861
|
-
n =
|
|
1907
|
+
n = Ie(c, d);
|
|
1862
1908
|
} else if (u) {
|
|
1863
|
-
const c = await (t.embedQuery ??
|
|
1864
|
-
n =
|
|
1909
|
+
const c = await (t.embedQuery ?? xe)(e);
|
|
1910
|
+
n = Ie(c, u);
|
|
1865
1911
|
}
|
|
1866
1912
|
} catch {
|
|
1867
1913
|
o = !0, r = "Semantic search is unavailable.";
|
|
@@ -1872,13 +1918,13 @@ async function wn(e, t = {}) {
|
|
|
1872
1918
|
...r ? { degradedReason: r } : {},
|
|
1873
1919
|
// RRF combines ranks rather than raw scores because BM25 and cosine
|
|
1874
1920
|
// similarity are on different scales.
|
|
1875
|
-
matches:
|
|
1921
|
+
matches: Pn(a, n, t.topN ?? 5)
|
|
1876
1922
|
};
|
|
1877
1923
|
}
|
|
1878
|
-
function
|
|
1879
|
-
return W ??=
|
|
1924
|
+
function Tn() {
|
|
1925
|
+
return W ??= Mn(T()), W;
|
|
1880
1926
|
}
|
|
1881
|
-
function
|
|
1927
|
+
function Mn(e) {
|
|
1882
1928
|
const t = /* @__PURE__ */ new Map(), a = e.map((n) => {
|
|
1883
1929
|
const o = /* @__PURE__ */ new Map();
|
|
1884
1930
|
B(o, n.title, V.title), B(o, n.description, V.description);
|
|
@@ -1888,7 +1934,7 @@ function bn(e) {
|
|
|
1888
1934
|
t.set(r, (t.get(r) ?? 0) + 1);
|
|
1889
1935
|
return {
|
|
1890
1936
|
capability: n,
|
|
1891
|
-
length:
|
|
1937
|
+
length: Cn(o),
|
|
1892
1938
|
termFrequencies: o
|
|
1893
1939
|
};
|
|
1894
1940
|
});
|
|
@@ -1899,33 +1945,33 @@ function bn(e) {
|
|
|
1899
1945
|
};
|
|
1900
1946
|
}
|
|
1901
1947
|
function B(e, t, a) {
|
|
1902
|
-
for (const n of
|
|
1948
|
+
for (const n of Oe(t))
|
|
1903
1949
|
e.set(n, (e.get(n) ?? 0) + a);
|
|
1904
1950
|
}
|
|
1905
|
-
function
|
|
1951
|
+
function Cn(e) {
|
|
1906
1952
|
return [...e.values()].reduce((t, a) => t + a, 0);
|
|
1907
1953
|
}
|
|
1908
|
-
function
|
|
1954
|
+
function Oe(e) {
|
|
1909
1955
|
return e.toLowerCase().split(/[^a-z0-9]+/u).filter(Boolean);
|
|
1910
1956
|
}
|
|
1911
|
-
function
|
|
1912
|
-
const t =
|
|
1957
|
+
function An(e) {
|
|
1958
|
+
const t = Tn(), a = new Set(e), n = t.documents.length;
|
|
1913
1959
|
return t.documents.map(({ capability: o, length: r, termFrequencies: i }) => {
|
|
1914
1960
|
let u = 0;
|
|
1915
1961
|
for (const c of a) {
|
|
1916
1962
|
const d = i.get(c), l = t.documentFrequency.get(c);
|
|
1917
1963
|
if (!d || !l)
|
|
1918
1964
|
continue;
|
|
1919
|
-
const m = Math.log(1 + (n - l + 0.5) / (l + 0.5)), g =
|
|
1920
|
-
u += m * (d * (
|
|
1965
|
+
const m = Math.log(1 + (n - l + 0.5) / (l + 0.5)), g = ve * (1 - be + be * (r / t.averageDocumentLength));
|
|
1966
|
+
u += m * (d * (ve + 1) / (d + g));
|
|
1921
1967
|
}
|
|
1922
1968
|
return { capability: o, score: u };
|
|
1923
|
-
}).filter(({ score: o }) => o > 0).sort(
|
|
1969
|
+
}).filter(({ score: o }) => o > 0).sort(Le);
|
|
1924
1970
|
}
|
|
1925
|
-
function
|
|
1971
|
+
function Ie(e, t) {
|
|
1926
1972
|
const a = /* @__PURE__ */ new Map();
|
|
1927
1973
|
for (const o of t) {
|
|
1928
|
-
const r =
|
|
1974
|
+
const r = Nn(e, o.vector);
|
|
1929
1975
|
if (r === void 0)
|
|
1930
1976
|
continue;
|
|
1931
1977
|
const i = a.get(o.capabilityId);
|
|
@@ -1934,10 +1980,10 @@ function ye(e, t) {
|
|
|
1934
1980
|
const n = new Map(T().map((o) => [o.id, o]));
|
|
1935
1981
|
return [...a.entries()].flatMap(([o, r]) => {
|
|
1936
1982
|
const i = n.get(o);
|
|
1937
|
-
return i && r >=
|
|
1938
|
-
}).sort(
|
|
1983
|
+
return i && r >= In ? [{ capability: i, score: r }] : [];
|
|
1984
|
+
}).sort(Le);
|
|
1939
1985
|
}
|
|
1940
|
-
function
|
|
1986
|
+
function Nn(e, t) {
|
|
1941
1987
|
if (e.length === 0 || e.length !== t.length)
|
|
1942
1988
|
return;
|
|
1943
1989
|
let a = 0, n = 0, o = 0;
|
|
@@ -1946,33 +1992,33 @@ function Sn(e, t) {
|
|
|
1946
1992
|
const r = Math.sqrt(n) * Math.sqrt(o);
|
|
1947
1993
|
return r === 0 ? void 0 : a / r;
|
|
1948
1994
|
}
|
|
1949
|
-
async function
|
|
1950
|
-
const [t] = await
|
|
1995
|
+
async function xe(e) {
|
|
1996
|
+
const [t] = await Fe([e]);
|
|
1951
1997
|
if (!t)
|
|
1952
1998
|
throw new Error("Expected one query embedding.");
|
|
1953
1999
|
return t;
|
|
1954
2000
|
}
|
|
1955
|
-
function
|
|
2001
|
+
function Pn(e, t, a) {
|
|
1956
2002
|
const n = /* @__PURE__ */ new Map();
|
|
1957
|
-
return
|
|
2003
|
+
return Se(n, e, "keyword"), Se(n, t, "semantic"), [...n.values()].sort((o, r) => r.score !== o.score ? r.score - o.score : (r.semanticScore ?? 0) !== (o.semanticScore ?? 0) ? (r.semanticScore ?? 0) - (o.semanticScore ?? 0) : (r.keywordScore ?? 0) !== (o.keywordScore ?? 0) ? (r.keywordScore ?? 0) - (o.keywordScore ?? 0) : o.capability.id.localeCompare(r.capability.id)).slice(0, Math.max(0, a));
|
|
1958
2004
|
}
|
|
1959
|
-
function
|
|
2005
|
+
function Se(e, t, a) {
|
|
1960
2006
|
for (const [n, { capability: o, score: r }] of t.entries()) {
|
|
1961
2007
|
const i = n + 1, u = e.get(o.id) ?? { capability: o, score: 0 };
|
|
1962
|
-
u.score += 1 / (
|
|
2008
|
+
u.score += 1 / (bn + i), a === "keyword" ? (u.keywordRank = i, u.keywordScore = r) : (u.semanticRank = i, u.semanticScore = r), e.set(o.id, u);
|
|
1963
2009
|
}
|
|
1964
2010
|
}
|
|
1965
|
-
function
|
|
2011
|
+
function Le(e, t) {
|
|
1966
2012
|
return t.score - e.score || e.capability.id.localeCompare(t.capability.id);
|
|
1967
2013
|
}
|
|
1968
|
-
const
|
|
2014
|
+
const Gn = async (e, t) => {
|
|
1969
2015
|
await p({ text: "Finding a place to navigate...", agentName: "navigation" }, t);
|
|
1970
|
-
const a =
|
|
2016
|
+
const a = b(e.agentExecutionContext.messages).trim();
|
|
1971
2017
|
try {
|
|
1972
|
-
const n = await
|
|
2018
|
+
const n = await Sn(a, { topN: 5 });
|
|
1973
2019
|
return await p(
|
|
1974
2020
|
{
|
|
1975
|
-
text: `Navigation candidates: ${
|
|
2021
|
+
text: `Navigation candidates: ${kn(n.matches)}`,
|
|
1976
2022
|
agentName: "navigation"
|
|
1977
2023
|
},
|
|
1978
2024
|
t
|
|
@@ -1988,7 +2034,7 @@ const Mn = async (e, t) => {
|
|
|
1988
2034
|
), n.degradedReason && console.info("[arcgis-portal-ai-assistant] navigation semantic search:", n.degradedReason), {
|
|
1989
2035
|
chosenCapabilityIds: [],
|
|
1990
2036
|
retrievalDegraded: n.degradedReason ?? "",
|
|
1991
|
-
targets:
|
|
2037
|
+
targets: qn(a, n.matches)
|
|
1992
2038
|
};
|
|
1993
2039
|
} catch {
|
|
1994
2040
|
return {
|
|
@@ -1999,7 +2045,7 @@ const Mn = async (e, t) => {
|
|
|
1999
2045
|
};
|
|
2000
2046
|
}
|
|
2001
2047
|
};
|
|
2002
|
-
function
|
|
2048
|
+
function qn(e, t) {
|
|
2003
2049
|
const a = R(e), n = t.filter(
|
|
2004
2050
|
({ capability: r }) => [r.title, ...r.hints].some(
|
|
2005
2051
|
(i) => R(i) === a
|
|
@@ -2010,23 +2056,23 @@ function Cn(e, t) {
|
|
|
2010
2056
|
const [o] = n;
|
|
2011
2057
|
return [o, ...t.filter((r) => r !== o)];
|
|
2012
2058
|
}
|
|
2013
|
-
function
|
|
2059
|
+
function kn(e) {
|
|
2014
2060
|
return e.map(
|
|
2015
|
-
({ capability: t, keywordScore: a, semanticScore: n }) => `${t.title} (keyword: ${
|
|
2061
|
+
({ capability: t, keywordScore: a, semanticScore: n }) => `${t.title} (keyword: ${Te(a)}, semantic: ${Te(n)})`
|
|
2016
2062
|
).join("; ") || "none";
|
|
2017
2063
|
}
|
|
2018
|
-
function
|
|
2064
|
+
function Te(e) {
|
|
2019
2065
|
return e?.toFixed(3) ?? "none";
|
|
2020
2066
|
}
|
|
2021
|
-
const K = (e, t) => t ?? e,
|
|
2022
|
-
...
|
|
2067
|
+
const K = (e, t) => t ?? e, je = h.Root({
|
|
2068
|
+
...G(),
|
|
2023
2069
|
chosenCapabilityIds: h({ reducer: K, default: () => [] }),
|
|
2024
2070
|
// Empty when hybrid keyword-and-semantic retrieval succeeds; otherwise
|
|
2025
2071
|
// contains the semantic-search failure reason for response diagnostics.
|
|
2026
2072
|
retrievalDegraded: h({ reducer: K, default: () => "" }),
|
|
2027
2073
|
targets: h({ reducer: K, default: () => [] })
|
|
2028
|
-
}),
|
|
2029
|
-
function
|
|
2074
|
+
}), En = () => new N(je).addNode("retrieveNavigationTargets", Gn).addNode("chooseNavigationTargets", Ka).addNode("respondWithNavigation", ln).addEdge(P, "retrieveNavigationTargets").addEdge("retrieveNavigationTargets", "chooseNavigationTargets").addEdge("chooseNavigationTargets", "respondWithNavigation").addEdge("respondWithNavigation", w);
|
|
2075
|
+
function zn() {
|
|
2030
2076
|
return String.raw`- **Navigation** — Takes the user to the portal page or app that fulfills their request. Presenting the button COMPLETES the request — no follow-up step is needed.
|
|
2031
2077
|
|
|
2032
2078
|
Route here for **navigation intent** ("take me to the map viewer", "open content", "where is X?") and for **action intent** ("publish a scene layer", "create a web map", "share this item") — for an action, Navigation takes the user to the page where that workflow starts. Navigation searches the capability registry itself, so don't rule it out because a page isn't named here.
|
|
@@ -2039,16 +2085,16 @@ function Gn() {
|
|
|
2039
2085
|
|
|
2040
2086
|
Do not dispatch Navigation again for the same request in the same turn: once it has responded, the task is done.`;
|
|
2041
2087
|
}
|
|
2042
|
-
const
|
|
2088
|
+
const Dn = {
|
|
2043
2089
|
id: "navigation",
|
|
2044
2090
|
name: "Portal Navigation",
|
|
2045
2091
|
get description() {
|
|
2046
|
-
return
|
|
2092
|
+
return zn();
|
|
2047
2093
|
},
|
|
2048
|
-
createGraph:
|
|
2049
|
-
workspace:
|
|
2050
|
-
},
|
|
2051
|
-
function
|
|
2094
|
+
createGraph: En,
|
|
2095
|
+
workspace: je
|
|
2096
|
+
}, $n = Qe`:host{height:100%;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);display:block;width:100%;--tw-shadow: 0 1px 6px -1px rgba(0, 0, 0, .16), 0 1px 2px -1px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 1px 6px -1px var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-entry{display:flex;flex-direction:column;gap:.75rem;width:100%}.chat-actions{display:flex;justify-content:flex-end;gap:.5rem}.header-actions{display:flex;gap:.5rem;padding-inline-start:.75rem}.navigation-block{display:flex;flex-direction:column;align-items:stretch;gap:.35rem;margin-top:.5rem}.navigation-button{width:100%;margin-block:.25rem}.navigation-block-description{font-size:.75rem;color:var(--calcite-color-text-3)}`;
|
|
2097
|
+
function Rn(e, t) {
|
|
2052
2098
|
if (!t)
|
|
2053
2099
|
return;
|
|
2054
2100
|
const { destinationType: a } = e;
|
|
@@ -2068,16 +2114,16 @@ function En(e, t) {
|
|
|
2068
2114
|
case "portal-item":
|
|
2069
2115
|
return t[a]?.(e.itemId);
|
|
2070
2116
|
case "portal-group":
|
|
2071
|
-
return t[a]?.(e.groupId);
|
|
2117
|
+
return t[a]?.(e.groupId, e.hash, e.queryParams);
|
|
2072
2118
|
default:
|
|
2073
2119
|
return U(a);
|
|
2074
2120
|
}
|
|
2075
2121
|
}
|
|
2076
|
-
function
|
|
2077
|
-
const t =
|
|
2122
|
+
function Un(e) {
|
|
2123
|
+
const t = qt.safeParse(e);
|
|
2078
2124
|
return t.success ? t.data : void 0;
|
|
2079
2125
|
}
|
|
2080
|
-
function
|
|
2126
|
+
function Fn(e, t) {
|
|
2081
2127
|
const a = t.navigation;
|
|
2082
2128
|
switch (e.destinationType) {
|
|
2083
2129
|
case "portal-content":
|
|
@@ -2122,21 +2168,21 @@ function zn(e, t) {
|
|
|
2122
2168
|
return U(e);
|
|
2123
2169
|
}
|
|
2124
2170
|
}
|
|
2125
|
-
class
|
|
2171
|
+
class On extends Be {
|
|
2126
2172
|
constructor() {
|
|
2127
|
-
super(), this.t9n =
|
|
2173
|
+
super(), this.t9n = Je({ blocking: !0 }), this.assistantEl = k(), this.formEl = k(), this.voiceInputEl = k(), this.inputEl = k(), this.navigationSlotElements = /* @__PURE__ */ new Map(), this.handleSlottableRequest = (t) => {
|
|
2128
2174
|
const a = t.detail, n = a.data?.block;
|
|
2129
2175
|
if (!n)
|
|
2130
2176
|
return;
|
|
2131
2177
|
const o = this.getNavigationAction(n);
|
|
2132
2178
|
o && this.upsertNavigationSlotElement(a.slotName, o);
|
|
2133
|
-
}, this.inputText = "", this.showVoiceInput = !0, this.isListening = !1, this.isVoiceInputDisabled = !1, this.
|
|
2179
|
+
}, this.inputText = "", this.showVoiceInput = !0, this.isListening = !1, this.isVoiceInputDisabled = !1, this.autoDestroyDisabled = !1, this.defaultClosed = !1, this.useProdDocAssistant = !1, this.arcgisPortalNavigationRequest = Ke(), T();
|
|
2134
2180
|
}
|
|
2135
2181
|
static {
|
|
2136
|
-
this.properties = { inputText: 16, showVoiceInput: 16, isListening: 16, isVoiceInputDisabled: 16,
|
|
2182
|
+
this.properties = { inputText: 16, showVoiceInput: 16, isListening: 16, isVoiceInputDisabled: 16, autoDestroyDisabled: 5, portal: 0, user: 0, config: 0, navigationTargetMap: 0, disabledAgents: 0, defaultClosed: 5, navigationCapabilities: 0, useProdDocAssistant: 5 };
|
|
2137
2183
|
}
|
|
2138
2184
|
static {
|
|
2139
|
-
this.styles =
|
|
2185
|
+
this.styles = $n;
|
|
2140
2186
|
}
|
|
2141
2187
|
async load() {
|
|
2142
2188
|
await this.refreshCapabilityEmbeddings();
|
|
@@ -2145,30 +2191,30 @@ class $n extends Le {
|
|
|
2145
2191
|
!this.hasUpdated || !t.has("navigationCapabilities") || this.refreshCapabilityEmbeddings();
|
|
2146
2192
|
}
|
|
2147
2193
|
async clearEmbeddingsCache() {
|
|
2148
|
-
|
|
2194
|
+
we();
|
|
2149
2195
|
}
|
|
2150
2196
|
isAgentEnabled(t) {
|
|
2151
2197
|
return !this.disabledAgents?.[t];
|
|
2152
2198
|
}
|
|
2153
2199
|
async refreshCapabilityEmbeddings() {
|
|
2154
2200
|
try {
|
|
2155
|
-
T(this.navigationCapabilities),
|
|
2201
|
+
T(this.navigationCapabilities), xn(), we(), await hn();
|
|
2156
2202
|
} catch (t) {
|
|
2157
2203
|
console.warn("[arcgis-portal-ai-assistant] embeddings warm-up failed:", t);
|
|
2158
2204
|
}
|
|
2159
2205
|
}
|
|
2160
2206
|
getNavigationAction(t) {
|
|
2161
|
-
if (t?.type !==
|
|
2207
|
+
if (t?.type !== Ae)
|
|
2162
2208
|
return;
|
|
2163
|
-
const a = t.data, n =
|
|
2209
|
+
const a = t.data, n = Un(a);
|
|
2164
2210
|
if (!n)
|
|
2165
2211
|
return;
|
|
2166
|
-
const o =
|
|
2212
|
+
const o = Rn(a, this.navigationTargetMap);
|
|
2167
2213
|
if (o)
|
|
2168
2214
|
return {
|
|
2169
2215
|
href: o,
|
|
2170
2216
|
targetDetail: a,
|
|
2171
|
-
label: a?.buttonLabel ||
|
|
2217
|
+
label: a?.buttonLabel || Fn(n, this.t9n)
|
|
2172
2218
|
};
|
|
2173
2219
|
}
|
|
2174
2220
|
upsertNavigationSlotElement(t, a) {
|
|
@@ -2177,34 +2223,28 @@ class $n extends Le {
|
|
|
2177
2223
|
return;
|
|
2178
2224
|
const o = `navigation:${t}`;
|
|
2179
2225
|
let r = this.navigationSlotElements.get(o);
|
|
2180
|
-
r || (r = document.createElement("div"), r.slot = t, this.navigationSlotElements.set(o, r), n.append(r)),
|
|
2226
|
+
r || (r = document.createElement("div"), r.slot = t, this.navigationSlotElements.set(o, r), n.append(r)), We(I`<div><calcite-button class="navigation-button" appearance=outline width=full .href=${a.href} icon-end=launch @click=${(i) => {
|
|
2181
2227
|
i.preventDefault(), this.arcgisPortalNavigationRequest.emit({
|
|
2182
2228
|
href: a.href,
|
|
2183
2229
|
targetDetail: a.targetDetail
|
|
2184
2230
|
});
|
|
2185
|
-
}}>${a.label}</calcite-button>${a.description ?
|
|
2231
|
+
}}>${a.label}</calcite-button>${a.description ? I`<div class="navigation-block-description">${a.description}</div>` : null}</div>`, r);
|
|
2186
2232
|
}
|
|
2187
2233
|
render() {
|
|
2188
2234
|
const { t9n: t, inputText: a, portal: n, user: o, navigationTargetMap: r, showVoiceInput: i, isListening: u, isVoiceInputDisabled: c, useProdDocAssistant: d } = this;
|
|
2189
|
-
return
|
|
2190
|
-
this.interrupt = l;
|
|
2191
|
-
}} @arcgisInterruptCancel=${() => {
|
|
2192
|
-
this.interrupt = null;
|
|
2193
|
-
}} @arcgisInterruptSubmit=${() => {
|
|
2194
|
-
this.interrupt = null;
|
|
2195
|
-
}} @arcgisPromptSelect=${({ detail: l }) => {
|
|
2235
|
+
return I`<arcgis-assistant log-enabled keep-suggested-prompts .heading=${t.heading} .entryMessage=${t.entryMessage} @arcgisSlottableRequest=${this.handleSlottableRequest} @arcgisPromptSelect=${({ detail: l }) => {
|
|
2196
2236
|
this.inputText = l.prompt, requestAnimationFrame(() => {
|
|
2197
2237
|
this.inputEl.value?.focusTextArea();
|
|
2198
2238
|
});
|
|
2199
|
-
}} ${
|
|
2239
|
+
}} ${E(this.assistantEl)}><div slot=header-actions-start class="header-actions"><calcite-icon icon=effects></calcite-icon></div><form slot=chat-entry class="chat-entry" @submit=${(l) => {
|
|
2200
2240
|
l.preventDefault();
|
|
2201
2241
|
const m = a.trim();
|
|
2202
2242
|
m && (this.assistantEl.value?.submitMessage(m), this.inputText = "");
|
|
2203
|
-
}} ${
|
|
2243
|
+
}} ${E(this.formEl)}><arcgis-portal-mentionable-text-area .portal=${n} .user=${o} rows=3 .popoverListLabel=${t.mentionEntities} .placeholder=${t.placeholder} .value=${a} @arcgisUserMentionableTextAreaKeyDown=${({ detail: l }) => {
|
|
2204
2244
|
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), this.formEl.value?.requestSubmit());
|
|
2205
2245
|
}} @arcgisUserMentionableTextAreaChange=${({ detail: l }) => {
|
|
2206
2246
|
this.inputText = l ?? "";
|
|
2207
|
-
}} ${
|
|
2247
|
+
}} ${E(this.inputEl)}></arcgis-portal-mentionable-text-area><div class="chat-actions"><arcgis-portal-voice-input @arcgisVoiceInputStart=${() => {
|
|
2208
2248
|
this.isListening = !0, this.isVoiceInputDisabled = !1;
|
|
2209
2249
|
}} @arcgisVoiceInputStop=${() => {
|
|
2210
2250
|
this.isListening = !1, this.isVoiceInputDisabled = !1;
|
|
@@ -2212,18 +2252,14 @@ class $n extends Le {
|
|
|
2212
2252
|
l.detail.errorCode === "not-supported" && (this.showVoiceInput = !1);
|
|
2213
2253
|
}} @arcgisVoiceInputInterimTranscription=${(l) => {
|
|
2214
2254
|
this.inputText = l.detail.text;
|
|
2215
|
-
}} ${
|
|
2255
|
+
}} ${E(this.voiceInputEl)}></arcgis-portal-voice-input>${i && I`<calcite-button icon-start=microphone .label=${t.voiceInput} round .disabled=${c} .appearance=${u ? "solid" : "outline-fill"} @click=${async () => {
|
|
2216
2256
|
this.isVoiceInputDisabled = !0;
|
|
2217
2257
|
const l = this.voiceInputEl.value;
|
|
2218
2258
|
u ? await l?.stopListening() : await l?.startListening();
|
|
2219
|
-
}}></calcite-button>` || ""}<calcite-button type=submit icon-start=send round .disabled=${!a.trim()} .label=${t.send}>${t.send}</calcite-button></div></form>${this.isAgentEnabled("itemAnalytics") &&
|
|
2220
|
-
this.assistantEl.value?.submitInterrupt(l);
|
|
2221
|
-
}} @arcgisCancel=${() => {
|
|
2222
|
-
this.assistantEl.value?.cancelInterrupt();
|
|
2223
|
-
}}></arcgis-portal-ai-assistant-interrupt>` || ""}</arcgis-assistant>`;
|
|
2259
|
+
}}></calcite-button>` || ""}<calcite-button type=submit icon-start=send round .disabled=${!a.trim()} .label=${t.send}>${t.send}</calcite-button></div></form>${this.isAgentEnabled("itemAnalytics") && I`<arcgis-assistant-agent .agent=${La} .context=${{ portal: n, user: o, navigationTargetMap: r }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("groupCreation") && I`<arcgis-assistant-agent .agent=${Dt} .context=${{ portal: n, user: o, navigationTargetMap: r }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("docAssistant") && I`<arcgis-assistant-agent .agent=${ia} .context=${{ portal: n, user: o, navigationTargetMap: r, useProdDocAssistant: d }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("groupAnalytics") && I`<arcgis-assistant-agent .agent=${Pa} .context=${{ portal: n, user: o, navigationTargetMap: r }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("navigation") && I`<arcgis-assistant-agent .agent=${Dn} .context=${{ portal: n, user: o, navigationTargetMap: r }}></arcgis-assistant-agent>` || ""}</arcgis-assistant>`;
|
|
2224
2260
|
}
|
|
2225
2261
|
}
|
|
2226
|
-
|
|
2262
|
+
Ve("arcgis-portal-ai-assistant", On);
|
|
2227
2263
|
export {
|
|
2228
|
-
|
|
2264
|
+
On as ArcgisPortalAiAssistant
|
|
2229
2265
|
};
|