@arcgis/ai-components 5.2.0-next.0 → 5.2.0-next.10
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/agent-utils/LLMAgent.js +22 -22
- package/dist/cdn/{DHOVCT6R.js → 2SJAOYZT.js} +1 -1
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/{AMP6IALT.js → 5W7S2RS4.js} +1 -1
- package/dist/cdn/64PJB5NU.js +2 -0
- package/dist/cdn/{OH64RMOR.js → 6AWNQHCO.js} +2 -2
- package/dist/cdn/BIV2IPHH.js +2 -0
- package/dist/cdn/CCY4TSBO.js +2 -0
- package/dist/cdn/{AO7BQHKC.js → CTSALWEP.js} +1 -1
- package/dist/cdn/{NAUXSHIE.js → D2N2NSRQ.js} +2 -2
- package/dist/cdn/{3PKJWIC3.js → D3TNNRP4.js} +1 -1
- package/dist/cdn/{H7422XUG.js → DOV5ZJ7M.js} +1 -1
- package/dist/cdn/EEUCKMU7.js +2 -0
- package/dist/cdn/EGHBXLNG.js +2 -0
- package/dist/cdn/{N2VQD46V.js → ETRWZ3MS.js} +31 -29
- package/dist/cdn/{QDO2AO53.js → EWI4V3GQ.js} +10 -10
- package/dist/cdn/{6MAINSY5.js → FL4W4VYN.js} +0 -1
- package/dist/cdn/GTLS44GI.js +2 -0
- package/dist/cdn/{SZOVY2QU.js → I6HNBTWY.js} +1 -1
- package/dist/cdn/JBHNHHWO.js +3 -0
- package/dist/cdn/{FX5JFRDL.js → JOFUPKIB.js} +1 -1
- package/dist/cdn/KUEOKIQR.js +2 -0
- package/dist/cdn/LKRAPK4A.js +165 -0
- package/dist/cdn/{6R6AY3D3.js → MODWHY3R.js} +2 -2
- package/dist/cdn/NXKKG5TK.js +2 -0
- package/dist/cdn/{2AXF774U.js → OBUZ7HBN.js} +1 -1
- package/dist/cdn/OIVRK7HT.js +2 -0
- package/dist/cdn/{HB5A5R2E.js → RUURNLTP.js} +1 -1
- package/dist/cdn/SWOXSJ62.js +2 -0
- package/dist/cdn/{LBVX2JYG.js → T537PKP4.js} +10 -7
- package/dist/cdn/{Y67XAMT4.js → TSZPHE7L.js} +2 -2
- package/dist/cdn/VAZNJSKA.js +16 -0
- package/dist/cdn/{V2P4AIGG.js → VMXLYWUK.js} +1 -1
- package/dist/cdn/{FB5DRKEB.js → VNQN5ZQO.js} +2 -2
- package/dist/cdn/WIDTPVSU.js +2 -0
- package/dist/cdn/{GM3QP65I.js → X2ZDYHCG.js} +18 -5
- package/dist/cdn/{P6OPJQMC.js → XER22VYQ.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/adapter.js +527 -522
- package/dist/chunks/arcgisKnowledgeGraph.js +3 -3
- package/dist/chunks/dataExplorationGraph.js +135 -119
- package/dist/chunks/data_explore_query_prompt.js +18 -5
- package/dist/chunks/generateLayerDescriptions.js +236 -209
- package/dist/chunks/helpGraph.js +4 -4
- package/dist/chunks/intent_prompt.js +0 -1
- package/dist/chunks/layerStylingGraph.js +10 -10
- package/dist/chunks/navigationGraph.js +27 -27
- package/dist/chunks/orchestrator.js +240 -201
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/summarize_query_response_prompt.js +10 -7
- package/dist/components/arcgis-assistant/customElement.d.ts +15 -0
- package/dist/components/arcgis-assistant/customElement.js +227 -127
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +14 -1
- package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -2
- package/dist/components/arcgis-assistant-chat/customElement.js +7 -7
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +13 -9
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
- package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
- package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
- package/dist/components/arcgis-assistant-message/customElement.js +28 -26
- package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
- package/dist/components/arcgis-assistant-message-block/index.js +1 -0
- package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/loader.js +6 -5
- package/dist/types/lumina.d.ts +10 -4
- package/dist/types/preact.d.ts +11 -4
- package/dist/types/react.d.ts +12 -4
- package/dist/types/stencil.d.ts +10 -4
- package/dist/utils/index.d.ts +85 -42
- package/dist/utils/index.js +22 -18
- package/package.json +7 -7
- package/dist/cdn/7BCR6TUO.js +0 -2
- package/dist/cdn/7GH7VSB2.js +0 -2
- package/dist/cdn/7PLV4QH6.js +0 -2
- package/dist/cdn/DDLZOMUY.js +0 -2
- package/dist/cdn/EF453FJ2.js +0 -3
- package/dist/cdn/METXWS7V.js +0 -166
- package/dist/cdn/MH5RPXHM.js +0 -2
- package/dist/cdn/NVI3I46B.js +0 -2
- package/dist/cdn/OAVEHGB6.js +0 -2
- package/dist/cdn/QR54T33D.js +0 -2
- package/dist/cdn/SXDLXCIM.js +0 -2
- package/dist/cdn/U3QQW6VA.js +0 -16
- package/dist/cdn/USMDJUFS.js +0 -2
- package/dist/cdn/Y333DGV6.js +0 -2
package/dist/chunks/helpGraph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { StateGraph as d, START as g, END as i } from "@langchain/langgraph/web";
|
|
3
|
-
import { l as h, g as
|
|
3
|
+
import { l as h, g as f, f as p, r as x, t as y, H as u } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
6
|
import { j as S, s as c } from "./generateLayerDescriptions.js";
|
|
@@ -31,7 +31,7 @@ ${t}`;
|
|
|
31
31
|
`) : "No agents currently available.";
|
|
32
32
|
};
|
|
33
33
|
async function _(e, t) {
|
|
34
|
-
const r = await
|
|
34
|
+
const r = await f("help_prompt"), s = p(t, "layersAndFieldsRegistry"), l = p(t, "agentRegistry");
|
|
35
35
|
try {
|
|
36
36
|
const a = await S({
|
|
37
37
|
promptText: r,
|
|
@@ -65,9 +65,9 @@ async function _(e, t) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
const C = (e, t) =>
|
|
68
|
+
const C = (e, t) => x(["agentRegistry"], "Help Agent")(e, t);
|
|
69
69
|
async function H(e, t) {
|
|
70
|
-
const r = new E(m);
|
|
70
|
+
const r = new E(m, { handleToolErrors: !1 });
|
|
71
71
|
try {
|
|
72
72
|
const s = e.helpInternalState.toolCallMessage;
|
|
73
73
|
if (!s)
|
|
@@ -117,7 +117,6 @@ Do not reinterpret the request into a different form.
|
|
|
117
117
|
- \`requiresFollowUp\` should indicate a likely next agent step, not uncertainty about the current request
|
|
118
118
|
- Set \`requiresFollowUp\` to \`true\` only when another orchestration step will likely be needed after this agent succeeds
|
|
119
119
|
- Set \`requiresFollowUp\` to \`false\` when a successful result from this agent would likely complete the user-visible task
|
|
120
|
-
- Default to \`false\`
|
|
121
120
|
`;
|
|
122
121
|
export {
|
|
123
122
|
e as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { NodeInterrupt as
|
|
2
|
+
import { NodeInterrupt as E, StateGraph as L, START as w, END as h } from "@langchain/langgraph/web";
|
|
3
3
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
4
4
|
import "@arcgis/core/portal/Portal.js";
|
|
5
5
|
import { s as i, j as I } from "./generateLayerDescriptions.js";
|
|
@@ -9,16 +9,16 @@ import "@arcgis/core/core/reactiveUtils.js";
|
|
|
9
9
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
10
10
|
import "@arcgis/core/request.js";
|
|
11
11
|
import "@langchain/core/prompts";
|
|
12
|
-
import { f as p, z as v, A as
|
|
12
|
+
import { f as p, z as v, A as T, B as R, C as F, D as C, E as A, F as $, I as N, J as b, K as q, L as M, g as _, r as j, M as S } from "./adapter.js";
|
|
13
13
|
import { h as k } from "./toolCallResponse.js";
|
|
14
14
|
import { ToolNode as V } from "@langchain/langgraph/prebuilt";
|
|
15
|
-
const
|
|
15
|
+
const m = 0.7, z = 10, D = async (t, e) => {
|
|
16
16
|
try {
|
|
17
17
|
await i({ text: "Similarity search to find fields" }, e);
|
|
18
18
|
const r = p(e, "fieldSearch"), a = p(e, "layersAndFieldsRegistry"), o = p(e, "embeddingCache"), n = await r.searchFields({
|
|
19
19
|
text: t.agentExecutionContext.assignedTask,
|
|
20
20
|
layerIds: t.vectorSearchLayerIds,
|
|
21
|
-
minScore:
|
|
21
|
+
minScore: m,
|
|
22
22
|
topResults: z,
|
|
23
23
|
embeddingCache: o
|
|
24
24
|
}), c = n.map(({ layerId: d, results: g }) => {
|
|
@@ -30,7 +30,7 @@ ${y}`;
|
|
|
30
30
|
`);
|
|
31
31
|
let l;
|
|
32
32
|
return n.length > 0 ? l = `Vector search completed. Matching layers and fields with scores:
|
|
33
|
-
${c}` : l = `No vector search results found for score over ${
|
|
33
|
+
${c}` : l = `No vector search results found for score over ${m}.`, await i({ text: l }, e), {
|
|
34
34
|
...t,
|
|
35
35
|
vectorSearchFieldResults: n
|
|
36
36
|
};
|
|
@@ -65,8 +65,8 @@ ${c}` : l = "Vector search completed. No matching layers found.", await i({ text
|
|
|
65
65
|
}
|
|
66
66
|
}, f = [
|
|
67
67
|
v,
|
|
68
|
-
R,
|
|
69
68
|
T,
|
|
69
|
+
R,
|
|
70
70
|
F,
|
|
71
71
|
C,
|
|
72
72
|
A,
|
|
@@ -104,7 +104,7 @@ ${c}` : l = "Vector search completed. No matching layers found.", await i({ text
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
async function B(t, e) {
|
|
107
|
-
const a = await new V(f).invoke(
|
|
107
|
+
const a = await new V(f, { handleToolErrors: !1 }).invoke(
|
|
108
108
|
{
|
|
109
109
|
messages: x(t.agentExecutionContext.messages)
|
|
110
110
|
},
|
|
@@ -160,20 +160,20 @@ const U = async (t, e) => (await i({ text: "Exiting Layer Styling agent" }, e),
|
|
|
160
160
|
message: "Choose a layer to apply the styles.",
|
|
161
161
|
metadata: [...r]
|
|
162
162
|
};
|
|
163
|
-
throw new
|
|
163
|
+
throw new E(n);
|
|
164
164
|
}
|
|
165
165
|
let o = null;
|
|
166
166
|
return Array.isArray(a.payload) && a.payload.length > 0 && (o = a.payload[0]), {
|
|
167
167
|
...t,
|
|
168
168
|
selectedLayerId: o ?? t.vectorSearchLayerIds[0]
|
|
169
169
|
};
|
|
170
|
-
}, O = (t, e) => j(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Layer Styling Agent")(t, e), Q = () => new
|
|
170
|
+
}, O = (t, e) => j(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Layer Styling Agent")(t, e), Q = () => new L(S).addNode("requireLayerStylingServices", O).addNode("vectorSearchLayers", H).addNode("layerSelectionHITL", K).addNode("vectorSearchFields", D).addNode("populateLayerFieldInfo", J).addNode("agent", G).addNode("tools", B).addNode("earlyExit", U).addEdge(w, "requireLayerStylingServices").addEdge("requireLayerStylingServices", "vectorSearchLayers").addConditionalEdges(
|
|
171
171
|
"layerSelectionHITL",
|
|
172
172
|
(e) => e.vectorSearchLayerIds.length ? "vectorSearchFields" : "earlyExit"
|
|
173
173
|
).addConditionalEdges(
|
|
174
174
|
"vectorSearchFields",
|
|
175
175
|
(e) => e.vectorSearchFieldResults.length ? "populateLayerFieldInfo" : "earlyExit"
|
|
176
|
-
).addEdge("populateLayerFieldInfo", "agent").addEdge("agent", "tools").addEdge("tools",
|
|
176
|
+
).addEdge("populateLayerFieldInfo", "agent").addEdge("agent", "tools").addEdge("tools", h).addEdge("earlyExit", h), W = String.raw`- **layerStyling** — User wants to change how features are drawn or styled on the map based on their data, such as applying color, size, transparency, symbols, or charts according to field values.
|
|
177
177
|
_Example: “Color points by sales amount”_
|
|
178
178
|
_Example: “Show population density with a color gradient”_
|
|
179
179
|
_Example: “Create a relationship map between height and depth”_
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { StateGraph as
|
|
2
|
+
import { StateGraph as b, START as $, END as C } from "@langchain/langgraph/web";
|
|
3
3
|
import { k as F, m as R, n as L, o as M, p as A, u as _, v as I, w as q, x as Z, g as T, y as k, t as j, f as u, r as P, N as w } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
@@ -25,14 +25,14 @@ const S = [
|
|
|
25
25
|
Z
|
|
26
26
|
];
|
|
27
27
|
async function O(e, t) {
|
|
28
|
-
const o = await T("navigation_tool_prompt"), { mapView: s } = k(t), i = s.map.bookmarks?.map((p) => p.name).filter(Boolean) ?? [],
|
|
29
|
-
(p,
|
|
28
|
+
const o = await T("navigation_tool_prompt"), { mapView: s } = k(t), i = s.map.bookmarks?.map((p) => p.name).filter(Boolean) ?? [], l = e.vectorSearchLayerResults?.length > 0 ? e.vectorSearchLayerResults.map(
|
|
29
|
+
(p, E) => `${E + 1}. layerId=${p.id} | title=${p.title ?? ""} | name=${p.name ?? ""} | score=${p.score.toFixed(2)}`
|
|
30
30
|
).join(`
|
|
31
|
-
`) : "",
|
|
31
|
+
`) : "", c = e.vectorSearchFieldResults?.length > 0 ? JSON.stringify(e.vectorSearchFieldResults, null, 2) : "", a = e.intent === "goToBookmark" && i.length ? `Available bookmarks:
|
|
32
32
|
${i.map((p) => `- ${p}`).join(`
|
|
33
33
|
`)}` : "", r = (e.intent === "goToLayer" || e.intent === "goToFeatures") && e.vectorSearchLayerResults?.length ? `Candidate layers:
|
|
34
|
-
${
|
|
35
|
-
${
|
|
34
|
+
${l}` : "", d = e.intent === "goToFeatures" && e.vectorSearchFieldResults?.length ? `Candidate fields:
|
|
35
|
+
${c}` : "", y = {
|
|
36
36
|
intent: e.intent,
|
|
37
37
|
bookmarksSection: a,
|
|
38
38
|
layersSection: r,
|
|
@@ -70,7 +70,7 @@ const B = (e) => {
|
|
|
70
70
|
return { text: t };
|
|
71
71
|
};
|
|
72
72
|
async function D(e, t) {
|
|
73
|
-
const o = new G(S);
|
|
73
|
+
const o = new G(S, { handleToolErrors: !1 });
|
|
74
74
|
try {
|
|
75
75
|
const s = e.navigationInternalState.toolCallMessage;
|
|
76
76
|
if (!s)
|
|
@@ -81,19 +81,19 @@ async function D(e, t) {
|
|
|
81
81
|
},
|
|
82
82
|
t
|
|
83
83
|
);
|
|
84
|
-
let i = "",
|
|
85
|
-
for (const
|
|
86
|
-
const a = B(
|
|
84
|
+
let i = "", l;
|
|
85
|
+
for (const c of g) {
|
|
86
|
+
const a = B(c.content);
|
|
87
87
|
a.text && (i += `${a.text}
|
|
88
|
-
`), a.sharedStatePatch && (
|
|
89
|
-
...
|
|
88
|
+
`), a.sharedStatePatch && (l = {
|
|
89
|
+
...l,
|
|
90
90
|
...a.sharedStatePatch
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
return await h({ text: `Finished executing navigation tool: ${i}` }, t), {
|
|
94
94
|
...e,
|
|
95
95
|
outputMessage: i,
|
|
96
|
-
sharedStatePatch:
|
|
96
|
+
sharedStatePatch: l,
|
|
97
97
|
status: "success",
|
|
98
98
|
summary: i ? j(i) : "Navigation executed.",
|
|
99
99
|
navigationInternalState: {
|
|
@@ -120,12 +120,12 @@ async function J(e, t) {
|
|
|
120
120
|
name: n.name,
|
|
121
121
|
description: n.description,
|
|
122
122
|
schema: n.schema
|
|
123
|
-
})),
|
|
124
|
-
${
|
|
123
|
+
})), l = s.map.bookmarks?.map((n) => n.name).filter(Boolean) ?? [], c = l.length ? `Available bookmarks:
|
|
124
|
+
${l.map((n) => `- ${n}`).join(`
|
|
125
125
|
`)}` : "", a = {
|
|
126
126
|
tools: g.map(({ name: n, description: m, schema: v }) => `${n}: ${m}, ${JSON.stringify(v)}`).join(`
|
|
127
127
|
`),
|
|
128
|
-
bookmarks:
|
|
128
|
+
bookmarks: c,
|
|
129
129
|
assignedTask: e.agentExecutionContext.assignedTask,
|
|
130
130
|
userRequest: e.agentExecutionContext.userRequest,
|
|
131
131
|
priorSteps: e.agentExecutionContext.priorSteps
|
|
@@ -145,7 +145,7 @@ const H = 0.7, U = async (e, t) => {
|
|
|
145
145
|
{ text: `Similarity search to find layers: ${e.agentExecutionContext.assignedTask}` },
|
|
146
146
|
t
|
|
147
147
|
);
|
|
148
|
-
const o = u(t, "layerSearch"), s = u(t, "layersAndFieldsRegistry"), g = u(t, "embeddingCache"),
|
|
148
|
+
const o = u(t, "layerSearch"), s = u(t, "layersAndFieldsRegistry"), g = u(t, "embeddingCache"), l = (await o.searchLayers({
|
|
149
149
|
text: e.agentExecutionContext.assignedTask,
|
|
150
150
|
minScore: H,
|
|
151
151
|
embeddingCache: g
|
|
@@ -158,12 +158,12 @@ const H = 0.7, U = async (e, t) => {
|
|
|
158
158
|
score: r
|
|
159
159
|
};
|
|
160
160
|
});
|
|
161
|
-
let
|
|
162
|
-
return
|
|
163
|
-
${
|
|
164
|
-
`)}` :
|
|
161
|
+
let c;
|
|
162
|
+
return l.length > 0 ? c = `Vector search completed. Matching layers:
|
|
163
|
+
${l.map((a) => `- layerId=${a.id} | title=${a.title ?? ""} | name=${a.name ?? ""} | score=${a.score.toFixed(2)}`).join(`
|
|
164
|
+
`)}` : c = "Vector search completed. No matching layers found.", await h({ text: c }, t), {
|
|
165
165
|
...e,
|
|
166
|
-
vectorSearchLayerResults:
|
|
166
|
+
vectorSearchLayerResults: l
|
|
167
167
|
};
|
|
168
168
|
} catch (o) {
|
|
169
169
|
throw await h(
|
|
@@ -180,7 +180,7 @@ ${c.map((a) => `- layerId=${a.id} | title=${a.title ?? ""} | name=${a.name ?? ""
|
|
|
180
180
|
const o = u(t, "fieldSearch"), s = u(t, "layersAndFieldsRegistry"), g = u(t, "embeddingCache"), i = e.vectorSearchLayerResults?.map((r) => r.id) ?? [];
|
|
181
181
|
if (i.length === 0)
|
|
182
182
|
return await h({ text: "No candidate layers for field search" }, t), e;
|
|
183
|
-
const
|
|
183
|
+
const c = (await o.searchFields({
|
|
184
184
|
text: e.agentExecutionContext.assignedTask,
|
|
185
185
|
layerIds: i,
|
|
186
186
|
minScore: f,
|
|
@@ -205,15 +205,15 @@ ${c.map((a) => `- layerId=${a.id} | title=${a.title ?? ""} | name=${a.name ?? ""
|
|
|
205
205
|
};
|
|
206
206
|
});
|
|
207
207
|
let a;
|
|
208
|
-
return
|
|
209
|
-
${
|
|
208
|
+
return c.length > 0 ? a = `Vector search completed. Matching layers and fields:
|
|
209
|
+
${c.map(
|
|
210
210
|
(r) => `${r.layerName ?? r.layerId}:
|
|
211
211
|
${r.results.map((d) => ` - ${d.name} (${d.score.toFixed(2)})`).join(`
|
|
212
212
|
`)}`
|
|
213
213
|
).join(`
|
|
214
214
|
`)}` : a = `No vector search field results found for score over ${f}.`, await h({ text: a }, t), {
|
|
215
215
|
...e,
|
|
216
|
-
vectorSearchFieldResults:
|
|
216
|
+
vectorSearchFieldResults: c
|
|
217
217
|
};
|
|
218
218
|
} catch (o) {
|
|
219
219
|
throw await h(
|
|
@@ -221,7 +221,7 @@ ${r.results.map((d) => ` - ${d.name} (${d.score.toFixed(2)})`).join(`
|
|
|
221
221
|
t
|
|
222
222
|
), o;
|
|
223
223
|
}
|
|
224
|
-
}, Q = (e, t) => P(["layerSearch", "layersAndFieldsRegistry"], "Navigation Agent")(e, t), X = () => new
|
|
224
|
+
}, Q = (e, t) => P(["layerSearch", "layersAndFieldsRegistry"], "Navigation Agent")(e, t), X = () => new b(w).addNode("requireNavigationServices", Q).addNode("intentLLM", J).addNode("vectorSearchLayers", U).addNode("vectorSearchFields", K).addNode("agent", O).addNode("tools", D).addEdge($, "requireNavigationServices").addEdge("requireNavigationServices", "intentLLM").addConditionalEdges(
|
|
225
225
|
"intentLLM",
|
|
226
226
|
(t) => t.intent === "goToLayer" || t.intent === "goToFeatures" ? "vectorSearchLayers" : "agent",
|
|
227
227
|
{
|