@arcgis/ai-components 5.2.0-next.10 → 5.2.0-next.100
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/agent-utils/FunctionAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.d.ts +7 -4
- package/dist/agent-utils/LLMAgent.js +4 -2
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- package/dist/agent-utils/WorkflowAgent.js +14 -15
- package/dist/agent-utils/index.d.ts +177 -0
- package/dist/agent-utils/index.js +167 -0
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +25 -33
- package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
- package/dist/agent-utils/types.d.ts +37 -8
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
- package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
- package/dist/agentic-workflow/Edge.d.ts +16 -0
- package/dist/agentic-workflow/WebAgent.d.ts +39 -0
- package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
- package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
- package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
- package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
- package/dist/agentic-workflow/types.d.ts +29 -0
- package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
- package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +121 -0
- package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
- package/dist/agents/tools/help/listFields/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
- package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
- package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
- package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getStatistics/adapter.js +157 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.js +144 -0
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/queryFeatures/adapter.js +130 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
- package/dist/cdn/22KHSDJI.js +2 -0
- package/dist/cdn/2EY3BQQX.js +2 -0
- package/dist/cdn/{SWOXSJ62.js → 2O4DON37.js} +1 -1
- package/dist/cdn/34O57OGV.js +2 -0
- package/dist/cdn/{5W7S2RS4.js → 3UEKINYC.js} +1 -1
- package/dist/cdn/4OGR5QKS.js +2 -0
- package/dist/cdn/5FL5BTTX.js +66 -0
- package/dist/cdn/5HBAJ57P.js +2 -0
- package/dist/cdn/5K5ZY267.js +2 -0
- package/dist/cdn/5MK44FNO.js +2 -0
- package/dist/cdn/5WYRJMBW.js +2 -0
- package/dist/cdn/5X7EG7D2.js +2 -0
- package/dist/cdn/5XZLS7UO.js +2 -0
- package/dist/cdn/5ZFUGNRN.js +2 -0
- package/dist/cdn/655YIKL3.js +11 -0
- package/dist/cdn/6ECRQVHY.js +2 -0
- package/dist/cdn/6OOZSZRJ.js +2 -0
- package/dist/cdn/{D3TNNRP4.js → 6P44KOKX.js} +1 -1
- package/dist/cdn/6YYPVU7H.js +3 -0
- package/dist/cdn/7BCQMK6D.js +2 -0
- package/dist/cdn/7SRLZQVC.js +5 -0
- package/dist/cdn/7V6OSTFC.js +2 -0
- package/dist/cdn/7VAQUCBU.js +9 -0
- package/dist/cdn/7VUSIGEM.js +2 -0
- package/dist/cdn/ACJTJLZN.js +2 -0
- package/dist/cdn/AI6DYOKR.js +181 -0
- package/dist/cdn/AKD5UOVX.js +2 -0
- package/dist/cdn/ANRQWYU2.js +2 -0
- package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
- package/dist/cdn/APFZY4PI.js +2 -0
- package/dist/cdn/B2JDVLA6.js +2 -0
- package/dist/cdn/BE7BRJZD.js +2 -0
- package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
- package/dist/cdn/C4FEETBZ.js +2 -0
- package/dist/cdn/C4JT4S5E.js +2 -0
- package/dist/cdn/CCC6LBMY.js +2 -0
- package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
- package/dist/cdn/CJMUJXPL.js +2 -0
- package/dist/cdn/COH3QXWG.js +4 -0
- package/dist/cdn/CP5BVGJU.js +2 -0
- package/dist/cdn/D5UFYQHN.js +44 -0
- package/dist/cdn/EWLXNGKH.js +208 -0
- package/dist/cdn/EYOWRGDP.js +2 -0
- package/dist/cdn/F5NIRETW.js +2 -0
- package/dist/cdn/FDOMMK2M.js +2 -0
- package/dist/cdn/FG647IP6.js +2 -0
- package/dist/cdn/FJO4KNOZ.js +2 -0
- package/dist/cdn/FUF3NAU7.js +2 -0
- package/dist/cdn/FXP5UIQU.js +156 -0
- package/dist/cdn/{T537PKP4.js → FYZATVB3.js} +1 -1
- package/dist/cdn/G2EGT3CF.js +6 -0
- package/dist/cdn/G3SF6U2U.js +2 -0
- package/dist/cdn/G7OMHU2B.js +2 -0
- package/dist/cdn/HAEFC2SJ.js +2 -0
- package/dist/cdn/HDACNIZF.js +2 -0
- package/dist/cdn/HHFNQR6Z.js +2 -0
- package/dist/cdn/HHUQXL3R.js +2 -0
- package/dist/cdn/IBZ2NEAO.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
- package/dist/cdn/ICQCK5D3.js +2 -0
- package/dist/cdn/IHP25JWI.js +99 -0
- package/dist/cdn/IJVMUS2L.js +14 -0
- package/dist/cdn/J6A4AS7E.js +22 -0
- package/dist/cdn/J6SZIQJA.js +2 -0
- package/dist/cdn/JCOA24UH.js +3 -0
- package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
- package/dist/cdn/JO5ETMPS.js +2 -0
- package/dist/cdn/K2R6XVK3.js +2 -0
- package/dist/cdn/KITIP6J2.js +2 -0
- package/dist/cdn/KWD2ECTM.js +2 -0
- package/dist/cdn/{MODWHY3R.js → LAYVGCPL.js} +6 -4
- package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
- package/dist/cdn/LLUGJKAQ.js +2 -0
- package/dist/cdn/MWYBF3F3.js +66 -0
- package/dist/cdn/{VMXLYWUK.js → MXTXJKFE.js} +1 -1
- package/dist/cdn/MY47B3CE.js +3 -0
- package/dist/cdn/NEV6OZN3.js +71 -0
- package/dist/cdn/NNXISHCA.js +14 -0
- package/dist/cdn/NZSOJ726.js +2 -0
- package/dist/cdn/O4NVW75A.js +2 -0
- package/dist/cdn/OE3GW5LE.js +2 -0
- package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
- package/dist/cdn/ONQ6JSBJ.js +2 -0
- package/dist/cdn/OX64WOEL.js +22 -0
- package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
- package/dist/cdn/PUHRBGKB.js +2 -0
- package/dist/cdn/Q57QWN5W.js +2 -0
- package/dist/cdn/QUKNPVAF.js +2 -0
- package/dist/cdn/R2PQVY4O.js +2 -0
- package/dist/cdn/R74ZHFA6.js +2 -0
- package/dist/cdn/RBE55SWR.js +2 -0
- package/dist/cdn/RHYNE5OE.js +2 -0
- package/dist/cdn/RLEHNAIA.js +2 -0
- package/dist/cdn/RVSTAUQS.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
- package/dist/cdn/{GTLS44GI.js → SXM4NUT5.js} +1 -1
- package/dist/cdn/SZ2QSSB3.js +2 -0
- package/dist/cdn/T4RIGOXB.js +2 -0
- package/dist/cdn/TCH5I5LS.js +2 -0
- package/dist/cdn/TEPP7YPR.js +2 -0
- package/dist/cdn/TMVF2W5N.js +36 -0
- package/dist/cdn/TPULIO6I.js +34 -0
- package/dist/cdn/UDRKUVZP.js +2 -0
- package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
- package/dist/cdn/UHNVDALX.js +18 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/V6HOUZPZ.js +2 -0
- package/dist/cdn/VAXH6RUQ.js +134 -0
- package/dist/cdn/VLLZ2FFU.js +2 -0
- package/dist/cdn/VOKXKU7M.js +56 -0
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/WGO5SER7.js +6 -0
- package/dist/cdn/WJXXOKGA.js +9 -0
- package/dist/cdn/WKTQVBFJ.js +2 -0
- package/dist/cdn/{2SJAOYZT.js → WSWB3B7B.js} +1 -1
- package/dist/cdn/XX6GHMNR.js +2 -0
- package/dist/cdn/Y7XD7ZRD.js +2 -0
- package/dist/cdn/YEZ3AMNX.js +2 -0
- package/dist/cdn/YLVJA4ZE.js +2 -0
- package/dist/cdn/Z5HWPSZN.js +2 -0
- package/dist/cdn/Z5W4V7RC.js +2 -0
- package/dist/cdn/ZDV4K4WG.js +2 -0
- package/dist/cdn/ZOEMBHRF.js +2 -0
- package/dist/cdn/ZRVZMPFN.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
- package/dist/cdn/agent-utils/index.js +2 -0
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +1295 -2104
- package/dist/chunks/arcgisKnowledgeGraph.js +128 -72
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
- package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
- package/dist/chunks/baseAgentState.js +58 -0
- package/dist/chunks/converterUtils.js +66 -41
- package/dist/chunks/dataExplorationGraph.js +131 -182
- package/dist/chunks/data_explore_query_prompt.js +9 -4
- package/dist/chunks/fetchAgentContext.js +13 -0
- package/dist/chunks/fetchService.js +10 -0
- package/dist/chunks/fieldStatistics.js +79 -0
- package/dist/chunks/formatFeatureAttributes.js +132 -0
- package/dist/chunks/generateLayerDescriptions.js +259 -282
- package/dist/chunks/helpGraph.js +35 -25
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +16 -0
- package/dist/chunks/layerStylingGraph.js +39 -33
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationGraph.js +140 -116
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/orchestrator.js +444 -233
- package/dist/chunks/resolvePointGeometryFilter.js +92 -0
- package/dist/chunks/state.js +21 -27
- package/dist/chunks/toolCallResponse.js +14 -10
- package/dist/chunks/utils2.js +11 -11
- package/dist/components/arcgis-assistant/customElement.d.ts +82 -1
- package/dist/components/arcgis-assistant/customElement.js +332 -183
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +614 -10
- package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +20 -4
- package/dist/components/arcgis-assistant-help-agent/customElement.js +29 -7
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +11 -12
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +12 -8
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +40 -16
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +30 -7
- package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message/customElement.js +9 -8
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message-loading/customElement.js +11 -10
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +18 -4
- package/dist/components/arcgis-assistant-speech-input/customElement.js +34 -52
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
- package/dist/components/arcgis-assistant-user-message/customElement.js +15 -10
- 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/loader.js +6 -6
- package/dist/oauth-callback.html +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
- package/dist/types/lumina.d.ts +5 -4
- package/dist/types/preact.d.ts +5 -4
- package/dist/types/react.d.ts +5 -4
- package/dist/types/stencil.d.ts +7 -6
- package/dist/utils/index.d.ts +65 -38
- package/dist/utils/index.js +56 -55
- package/package.json +32 -12
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/64PJB5NU.js +0 -2
- package/dist/cdn/6AWNQHCO.js +0 -4
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/BIV2IPHH.js +0 -2
- package/dist/cdn/CCY4TSBO.js +0 -2
- package/dist/cdn/CTSALWEP.js +0 -2
- package/dist/cdn/D2N2NSRQ.js +0 -72
- package/dist/cdn/DOV5ZJ7M.js +0 -2
- package/dist/cdn/EEUCKMU7.js +0 -2
- package/dist/cdn/EGHBXLNG.js +0 -2
- package/dist/cdn/ETRWZ3MS.js +0 -108
- package/dist/cdn/EWI4V3GQ.js +0 -36
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/I6HNBTWY.js +0 -2
- package/dist/cdn/JBHNHHWO.js +0 -3
- package/dist/cdn/JOFUPKIB.js +0 -2
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/KUEOKIQR.js +0 -2
- package/dist/cdn/LKRAPK4A.js +0 -165
- package/dist/cdn/NXKKG5TK.js +0 -2
- package/dist/cdn/OBUZ7HBN.js +0 -2
- package/dist/cdn/OIVRK7HT.js +0 -2
- package/dist/cdn/RUURNLTP.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/TSZPHE7L.js +0 -22
- package/dist/cdn/VAZNJSKA.js +0 -16
- package/dist/cdn/VNQN5ZQO.js +0 -14
- package/dist/cdn/WIDTPVSU.js +0 -2
- package/dist/cdn/XER22VYQ.js +0 -3
- package/dist/cdn/YIMNOUTF.js +0 -2
|
@@ -2,44 +2,49 @@
|
|
|
2
2
|
import { c as s } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as e, html as t } from "lit";
|
|
4
4
|
import { LitElement as i } from "@arcgis/lumina";
|
|
5
|
-
import { createRef as a, ref as
|
|
6
|
-
import
|
|
7
|
-
import { watch as
|
|
8
|
-
const
|
|
9
|
-
class
|
|
5
|
+
import { createRef as a, ref as l } from "lit/directives/ref.js";
|
|
6
|
+
import n from "@arcgis/core/core/Collection.js";
|
|
7
|
+
import { when as r, watch as o } from "@arcgis/core/core/reactiveUtils.js";
|
|
8
|
+
const c = e`.messages-container{display:flex;flex:1;flex-direction:column;line-height:var(--calcite-font-line-height-relative-snug)}.messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-xxl);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}.end-ref{margin-top:var(--calcite-spacing-lg)}`;
|
|
9
|
+
class m extends i {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.#
|
|
11
|
+
super(...arguments), this.#e = a(), this.#s = !1, this.loading = !1, this.messages = new n([]), this.interrupt = null;
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { loading: 5, messages: 0, interrupt: 0 };
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.styles =
|
|
17
|
+
this.styles = c;
|
|
18
18
|
}
|
|
19
|
+
#e;
|
|
19
20
|
#s;
|
|
20
21
|
firstUpdated() {
|
|
21
|
-
this
|
|
22
|
+
this.#t();
|
|
22
23
|
}
|
|
23
24
|
loaded() {
|
|
24
25
|
this.manager.onLifecycle(() => [
|
|
25
26
|
this.messages.on("change", () => {
|
|
26
|
-
this
|
|
27
|
+
this.#t();
|
|
27
28
|
}),
|
|
28
|
-
|
|
29
|
-
this
|
|
30
|
-
})
|
|
29
|
+
r(() => !this.loading, () => {
|
|
30
|
+
this.#s = !1;
|
|
31
|
+
}),
|
|
32
|
+
o(() => [this.loading, this.interrupt], () => this.#t())
|
|
31
33
|
]);
|
|
32
34
|
}
|
|
33
|
-
|
|
35
|
+
#t() {
|
|
34
36
|
requestAnimationFrame(() => {
|
|
35
|
-
this.#s.value?.scrollIntoView({ behavior: "smooth" });
|
|
37
|
+
this.#s || this.#e.value?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
36
38
|
});
|
|
37
39
|
}
|
|
40
|
+
#i() {
|
|
41
|
+
this.#s = !0;
|
|
42
|
+
}
|
|
38
43
|
render() {
|
|
39
|
-
return t`<div class="messages-container"><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div ${
|
|
44
|
+
return t`<div class="messages-container" @wheel=${this.#i}><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div class="end-ref" ${l(this.#e)}></div></div>`;
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
|
-
s("arcgis-assistant-chat",
|
|
47
|
+
s("arcgis-assistant-chat", m);
|
|
43
48
|
export {
|
|
44
|
-
|
|
49
|
+
m as ArcgisAssistantChat
|
|
45
50
|
};
|
|
@@ -5,20 +5,32 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/core/request.js";
|
|
9
|
+
import "@arcgis/toolkit/string";
|
|
8
10
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
11
|
import "@langchain/core/messages";
|
|
10
12
|
import "@langchain/core/callbacks/dispatch/web";
|
|
13
|
+
import "@langchain/core/callbacks/base";
|
|
11
14
|
import "@langchain/openai";
|
|
15
|
+
import "@arcgis/core/config.js";
|
|
12
16
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
17
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
18
|
import "@langchain/core/prompts";
|
|
19
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
27
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
28
|
import "@langchain/langgraph/prebuilt";
|
|
17
29
|
import "zod";
|
|
18
30
|
import { D as r } from "../../chunks/dataExplorationGraph.js";
|
|
19
|
-
import "
|
|
31
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
20
32
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
21
|
-
import { r as
|
|
33
|
+
import { r as o, i as a } from "../../chunks/utils2.js";
|
|
22
34
|
class s extends i {
|
|
23
35
|
constructor() {
|
|
24
36
|
super(...arguments), this.agent = r;
|
|
@@ -27,13 +39,17 @@ class s extends i {
|
|
|
27
39
|
this.properties = { referenceElement: 1 };
|
|
28
40
|
}
|
|
29
41
|
#t;
|
|
42
|
+
#i;
|
|
30
43
|
getContext() {
|
|
31
44
|
if (!this.#t)
|
|
32
45
|
throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");
|
|
33
46
|
return { mapView: this.#t };
|
|
34
47
|
}
|
|
35
48
|
load() {
|
|
36
|
-
this.#t =
|
|
49
|
+
this.#t = o(this, "arcgis-assistant-data-exploration-agent"), this.#i = a(this);
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
37
53
|
}
|
|
38
54
|
}
|
|
39
55
|
t("arcgis-assistant-data-exploration-agent", s);
|
|
@@ -5,24 +5,42 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/core/request.js";
|
|
9
|
+
import "@arcgis/toolkit/string";
|
|
8
10
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
11
|
import "@langchain/core/messages";
|
|
10
12
|
import "@langchain/core/callbacks/dispatch/web";
|
|
13
|
+
import "@langchain/core/callbacks/base";
|
|
11
14
|
import "@langchain/openai";
|
|
15
|
+
import "@arcgis/core/config.js";
|
|
12
16
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
17
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
18
|
import "@langchain/core/prompts";
|
|
19
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
27
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
28
|
import "@langchain/langgraph/prebuilt";
|
|
17
29
|
import "zod";
|
|
30
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
32
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
36
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
37
|
import "@arcgis/core/intl.js";
|
|
19
38
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
39
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
40
|
import { H as r } from "../../chunks/helpGraph.js";
|
|
22
|
-
import "@arcgis/core/views/LinkChartView.js";
|
|
23
41
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
24
|
-
import { r as
|
|
25
|
-
class
|
|
42
|
+
import { r as o, i as p } from "../../chunks/utils2.js";
|
|
43
|
+
class m extends i {
|
|
26
44
|
constructor() {
|
|
27
45
|
super(...arguments), this.agent = r;
|
|
28
46
|
}
|
|
@@ -30,16 +48,20 @@ class o extends i {
|
|
|
30
48
|
this.properties = { referenceElement: 1 };
|
|
31
49
|
}
|
|
32
50
|
#t;
|
|
51
|
+
#i;
|
|
33
52
|
getContext() {
|
|
34
53
|
if (!this.#t)
|
|
35
54
|
throw new Error("arcgis-assistant-help-agent requires a mapView");
|
|
36
55
|
return { mapView: this.#t };
|
|
37
56
|
}
|
|
38
57
|
load() {
|
|
39
|
-
this.#t =
|
|
58
|
+
this.#t = o(this, "arcgis-assistant-help-agent"), this.#i = p(this);
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
40
62
|
}
|
|
41
63
|
}
|
|
42
|
-
t("arcgis-assistant-help-agent",
|
|
64
|
+
t("arcgis-assistant-help-agent", m);
|
|
43
65
|
export {
|
|
44
|
-
|
|
66
|
+
m as ArcgisAssistantHelpAgent
|
|
45
67
|
};
|
|
@@ -13,11 +13,15 @@ export abstract class ArcgisAssistantInterrupt extends LitElement {
|
|
|
13
13
|
enterTextLabel: string;
|
|
14
14
|
submitButtonLabel: string;
|
|
15
15
|
cancelButtonLabel: string;
|
|
16
|
+
approveButtonLabel: string;
|
|
17
|
+
declineButtonLabel: string;
|
|
16
18
|
} & T9nMeta<{
|
|
17
19
|
optionsLabel: string;
|
|
18
20
|
enterTextLabel: string;
|
|
19
21
|
submitButtonLabel: string;
|
|
20
22
|
cancelButtonLabel: string;
|
|
23
|
+
approveButtonLabel: string;
|
|
24
|
+
declineButtonLabel: string;
|
|
21
25
|
}>;
|
|
22
26
|
accessor message: string | undefined;
|
|
23
27
|
accessor options: string[] | undefined;
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as l, createEvent as
|
|
2
|
+
import { c } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as a, html as e } from "lit";
|
|
4
|
+
import { LitElement as l, createEvent as s } from "@arcgis/lumina";
|
|
5
5
|
import { u as r } from "../../chunks/useT9n.js";
|
|
6
|
-
const n =
|
|
6
|
+
const n = a`:host{padding:var(--calcite-spacing-md);background:var(--calcite-panel-background-color, var(--calcite-color-background))}calcite-panel{border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));border:0 solid var(--calcite-color-brand);border-block-start-width:4px;box-shadow:var(--calcite-shadow-md);width:100%;--calcite-panel-border-color: none}.interrupt-content{padding:0 var(--calcite-spacing-md);background:var(--calcite-color-foreground-1)}`;
|
|
7
7
|
class o extends l {
|
|
8
8
|
constructor() {
|
|
9
|
-
super(...arguments), this
|
|
9
|
+
super(...arguments), this._messages = r({ blocking: !0 }), this._selectedOptions = [], this.arcgisCancel = s(), this.arcgisSubmit = s();
|
|
10
10
|
}
|
|
11
11
|
static {
|
|
12
|
-
this.properties = { type: 1, message: 1, options: 0 };
|
|
12
|
+
this.properties = { _selectedOptions: 16, type: 1, message: 1, options: 0 };
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
15
|
this.styles = n;
|
|
16
16
|
}
|
|
17
|
-
#t;
|
|
18
17
|
_renderInterruptOptions() {
|
|
19
18
|
switch (this.type) {
|
|
20
19
|
case "single-select":
|
|
21
|
-
return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this
|
|
20
|
+
return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this._selectedOptions = t.target.selectedItems[0]?.value}>${this.options?.map((t) => e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
22
21
|
case "multi-select":
|
|
23
|
-
return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this
|
|
22
|
+
return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this._selectedOptions = t.target.selectedItems.map((i) => i.value)}>${this.options?.map((t) => e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
24
23
|
case "boolean-choice":
|
|
25
24
|
return null;
|
|
26
25
|
case "text-input":
|
|
27
|
-
return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${(t) => this
|
|
26
|
+
return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${(t) => this._selectedOptions = t.target.value}></calcite-input>`;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
render() {
|
|
31
|
-
return e`<calcite-panel .description=${this.message}><div class="interrupt-content">${this._renderInterruptOptions()}</div
|
|
30
|
+
return e`<calcite-panel .description=${this.message}><div class="interrupt-content">${this._renderInterruptOptions()}</div>${this.type === "boolean-choice" ? e`<calcite-button slot=footer-end appearance=outline @click=${() => this.arcgisSubmit.emit(!1)}>${this._messages.declineButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${() => this.arcgisSubmit.emit(!0)}>${this._messages.approveButtonLabel}</calcite-button>` : e`<calcite-button slot=footer-end appearance=outline @click=${() => this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid .disabled=${!this._selectedOptions.length} @click=${() => this.arcgisSubmit.emit(this._selectedOptions)}>${this._messages.submitButtonLabel}</calcite-button>`}</calcite-panel>`;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
|
|
33
|
+
c("arcgis-assistant-interrupt", o);
|
|
35
34
|
export {
|
|
36
35
|
o as ArcgisAssistantInterrupt
|
|
37
36
|
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { css as a, html as i } from "lit";
|
|
4
|
+
import { LitElement as l } from "@arcgis/lumina";
|
|
5
|
+
import { u as n } from "../../chunks/useT9n.js";
|
|
6
|
+
const c = a`.interrupt-details{word-wrap:break-word}.interrupt-details ul{margin-block:var(--calcite-spacing-xxs) 0;padding-inline-start:var(--calcite-spacing-xxl)}.interrupt-details li{margin-block:0}.interrupts-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}`;
|
|
7
|
+
class p extends l {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this._messages = n({ blocking: !0 });
|
|
10
|
+
}
|
|
7
11
|
static {
|
|
8
12
|
this.properties = { interrupts: 0 };
|
|
9
13
|
}
|
|
10
14
|
static {
|
|
11
|
-
this.styles =
|
|
15
|
+
this.styles = c;
|
|
12
16
|
}
|
|
13
17
|
render() {
|
|
14
|
-
return this.interrupts?.length ?
|
|
18
|
+
return this.interrupts?.length ? i`<calcite-block expandable expanded .heading=${this._messages.assistantQuestions}><div class="interrupts-container">${this.interrupts?.map(({ interrupt: s, response: t }) => i`<div class="interrupt-details"><div>Q: ${s.message}</div><ul>${Array.isArray(t) ? t.length ? t.map((e) => i`<li>${e}</li>`) : i`<li>${this._messages.questionSkipped}</li>` : i`<li>${t != null ? String(t) : this._messages.questionSkipped}</li>`}</ul></div>`)}</div></calcite-block>` : null;
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
|
-
r("arcgis-assistant-interrupt-preview",
|
|
21
|
+
r("arcgis-assistant-interrupt-preview", p);
|
|
18
22
|
export {
|
|
19
|
-
|
|
23
|
+
p as ArcgisAssistantInterruptPreview
|
|
20
24
|
};
|
|
@@ -106,12 +106,12 @@ import type { ArcgisMap as ArcgisMap } from "@arcgis/map-components/components/a
|
|
|
106
106
|
*/
|
|
107
107
|
export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
* a
|
|
109
|
+
* Optional context for the knowledge agent. If the agent does not have a view or kg service url provided via reference element or serviceUrl property
|
|
110
|
+
* a knowledge graph can be provided directly via context to enable Knowledge Service related capabilties.
|
|
111
111
|
*
|
|
112
112
|
* Depending on the context provided, different capabilities will be available.
|
|
113
113
|
*/
|
|
114
|
-
accessor context:
|
|
114
|
+
accessor context: ArcgisKnowledgeAssistantContext | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* The reference element to the map that provides context for the navigation agent. Currently,
|
|
117
117
|
* this is only scoped to `arcgis-map` elements. This shows the navigation agent which map on which to
|
|
@@ -149,10 +149,10 @@ export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
|
149
149
|
* Context required by the Knowledge Link Chart agent.
|
|
150
150
|
* Supplied by the application via an agent `getContext()` provider.
|
|
151
151
|
*/
|
|
152
|
-
export type
|
|
153
|
-
knowledgeGraph: KnowledgeGraph;
|
|
154
|
-
view?: never;
|
|
155
|
-
} | {
|
|
152
|
+
export type ArcgisKnowledgeAssistantContext = {
|
|
156
153
|
view: LinkChartView | MapView;
|
|
157
154
|
knowledgeGraph?: never;
|
|
155
|
+
} | {
|
|
156
|
+
knowledgeGraph: KnowledgeGraph;
|
|
157
|
+
view?: never;
|
|
158
158
|
};
|
|
@@ -1,36 +1,57 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
-
import { LitElement as
|
|
3
|
+
import { LitElement as e } from "@arcgis/lumina";
|
|
4
4
|
import "@langchain/langgraph/web";
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/core/request.js";
|
|
9
|
+
import "@arcgis/toolkit/string";
|
|
8
10
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
11
|
import "@langchain/core/messages";
|
|
10
12
|
import "@langchain/core/callbacks/dispatch/web";
|
|
13
|
+
import "@langchain/core/callbacks/base";
|
|
11
14
|
import "@langchain/openai";
|
|
15
|
+
import "@arcgis/core/config.js";
|
|
12
16
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
17
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
18
|
import "@langchain/core/prompts";
|
|
19
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
27
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
28
|
import "@langchain/langgraph/prebuilt";
|
|
17
29
|
import "zod";
|
|
30
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
32
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
36
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
37
|
import "@arcgis/core/intl.js";
|
|
19
38
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
39
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
40
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
21
41
|
import { A as o } from "../../chunks/arcgisKnowledgeGraph.js";
|
|
22
|
-
import {
|
|
23
|
-
import { fetchKnowledgeGraph as
|
|
24
|
-
class
|
|
42
|
+
import { a as s, i as n } from "../../chunks/utils2.js";
|
|
43
|
+
import { fetchKnowledgeGraph as p } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
44
|
+
class m extends e {
|
|
25
45
|
constructor() {
|
|
26
46
|
super(...arguments), this.agent = o;
|
|
27
47
|
}
|
|
28
48
|
static {
|
|
29
49
|
this.properties = { referenceElement: 1, serviceUrl: 3, context: 0 };
|
|
30
50
|
}
|
|
31
|
-
#
|
|
51
|
+
#i;
|
|
32
52
|
#r;
|
|
33
53
|
#t;
|
|
54
|
+
#e;
|
|
34
55
|
get serviceUrl() {
|
|
35
56
|
return this.#r;
|
|
36
57
|
}
|
|
@@ -39,30 +60,33 @@ class c extends i {
|
|
|
39
60
|
}
|
|
40
61
|
async getContext() {
|
|
41
62
|
const t = this.context ? { ...this.context, knowledgeGraph: void 0, view: void 0 } : {};
|
|
42
|
-
if (this.#
|
|
63
|
+
if (this.#i)
|
|
43
64
|
return {
|
|
44
65
|
...t,
|
|
45
|
-
view: this.#
|
|
66
|
+
view: this.#i
|
|
46
67
|
};
|
|
47
68
|
if (this.#t)
|
|
48
69
|
try {
|
|
49
|
-
const
|
|
50
|
-
return { ...t, knowledgeGraph:
|
|
51
|
-
} catch (
|
|
52
|
-
console.error("Failed to load knowledge graph via service URL:",
|
|
70
|
+
const i = await this.#t;
|
|
71
|
+
return { ...t, knowledgeGraph: i };
|
|
72
|
+
} catch (i) {
|
|
73
|
+
console.error("Failed to load knowledge graph via service URL:", i);
|
|
53
74
|
}
|
|
54
75
|
if (!this.context?.knowledgeGraph && !this.context?.view)
|
|
55
76
|
throw new Error("arcgis-assistant-knowledge-agent requires either a knowledgeGraph or view in context, and neither were provided");
|
|
56
77
|
return this.context;
|
|
57
78
|
}
|
|
58
79
|
willUpdate(t) {
|
|
59
|
-
t.has("serviceUrl") && this.serviceUrl ? this.#t =
|
|
80
|
+
t.has("serviceUrl") && this.serviceUrl ? this.#t = p(this.serviceUrl) : this.#t = void 0;
|
|
60
81
|
}
|
|
61
82
|
load() {
|
|
62
|
-
this.#
|
|
83
|
+
this.#i = s(this) ?? void 0, this.#e = n(this);
|
|
84
|
+
}
|
|
85
|
+
disconnectedCallback() {
|
|
86
|
+
this.#e?.unregister(this.agent.id), super.disconnectedCallback();
|
|
63
87
|
}
|
|
64
88
|
}
|
|
65
|
-
r("arcgis-assistant-knowledge-agent",
|
|
89
|
+
r("arcgis-assistant-knowledge-agent", m);
|
|
66
90
|
export {
|
|
67
|
-
|
|
91
|
+
m as ArcgisAssistantKnowledgeAgent
|
|
68
92
|
};
|
|
@@ -5,24 +5,43 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/core/request.js";
|
|
9
|
+
import "@arcgis/toolkit/string";
|
|
8
10
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
11
|
import "@langchain/core/messages";
|
|
10
12
|
import "@langchain/core/callbacks/dispatch/web";
|
|
13
|
+
import "@langchain/core/callbacks/base";
|
|
11
14
|
import "@langchain/openai";
|
|
15
|
+
import "@arcgis/core/config.js";
|
|
12
16
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
17
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
18
|
import "@langchain/core/prompts";
|
|
19
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
27
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
28
|
import "@langchain/langgraph/prebuilt";
|
|
17
29
|
import "zod";
|
|
30
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
32
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
36
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
37
|
import "@arcgis/core/intl.js";
|
|
19
38
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
39
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
40
|
import { L as r } from "../../chunks/layerStylingGraph.js";
|
|
22
|
-
import "
|
|
41
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
23
42
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
24
|
-
import { r as
|
|
25
|
-
class
|
|
43
|
+
import { r as o, i as m } from "../../chunks/utils2.js";
|
|
44
|
+
class s extends i {
|
|
26
45
|
constructor() {
|
|
27
46
|
super(...arguments), this.agent = r;
|
|
28
47
|
}
|
|
@@ -30,16 +49,20 @@ class o extends i {
|
|
|
30
49
|
this.properties = { referenceElement: 1 };
|
|
31
50
|
}
|
|
32
51
|
#t;
|
|
52
|
+
#i;
|
|
33
53
|
getContext() {
|
|
34
54
|
if (!this.#t)
|
|
35
55
|
throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");
|
|
36
56
|
return { mapView: this.#t };
|
|
37
57
|
}
|
|
38
58
|
load() {
|
|
39
|
-
this.#t =
|
|
59
|
+
this.#t = o(this, "arcgis-assistant-layer-styling-agent"), this.#i = m(this);
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
40
63
|
}
|
|
41
64
|
}
|
|
42
|
-
t("arcgis-assistant-layer-styling-agent",
|
|
65
|
+
t("arcgis-assistant-layer-styling-agent", s);
|
|
43
66
|
export {
|
|
44
|
-
|
|
67
|
+
s as ArcgisAssistantLayerStylingAgent
|
|
45
68
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { AssistantMessage } from "../arcgis-assistant/types.js";
|
|
4
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Renders a single assistant response message shell. Pass one assistant message object and let it host body and footer actions.
|
|
7
8
|
* Offers a reusable assistant-message layout with icon, content, and footer slot regions.
|
|
8
9
|
*/
|
|
9
10
|
export abstract class ArcgisAssistantMessage extends LitElement {
|
|
11
|
+
/** @internal */
|
|
12
|
+
protected _messages: { loadingLabel: string; } & T9nMeta<{ loadingLabel: string; }>;
|
|
10
13
|
/** @default false */
|
|
11
14
|
accessor assistantAvatarEnabled: boolean;
|
|
12
15
|
/** @default false */
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { c as o } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as l, html as e } from "lit";
|
|
4
4
|
import { LitElement as c, nothing as d } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { u as g } from "../../chunks/useT9n.js";
|
|
6
|
+
import { useSlottableRequest as m } from "@arcgis/lumina/controllers";
|
|
6
7
|
import { g as r } from "../../chunks/slottableRequestUtils.js";
|
|
7
|
-
const
|
|
8
|
+
const p = l`:host{display:block;container-type:inline-size}.container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.content-container{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;gap:var(--calcite-spacing-md)}.content{display:flex;flex-direction:column;min-width:0;gap:var(--calcite-spacing-sm)}.blocks{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.block-pending{display:flex;justify-content:center;align-items:center;padding:var(--calcite-spacing-sm);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 2s ease-in-out infinite;border-radius:var(--calcite-border-radius);min-height:100px}.message-error{font-style:italic}@container (min-width: 480px){.container{max-width:80%}}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.block-pending{animation:none}}`;
|
|
8
9
|
function b({ message: t }) {
|
|
9
10
|
const s = /* @__PURE__ */ new Map();
|
|
10
11
|
return t && t.blocks?.forEach((a, i) => {
|
|
@@ -14,15 +15,15 @@ function b({ message: t }) {
|
|
|
14
15
|
}
|
|
15
16
|
}), s;
|
|
16
17
|
}
|
|
17
|
-
class
|
|
18
|
+
class u extends c {
|
|
18
19
|
constructor() {
|
|
19
|
-
super(...arguments), this.
|
|
20
|
+
super(...arguments), this._messages = g({ blocking: !0 }), this.arcgisSlottableRequest = m(this, ["message"], b), this.feedbackEnabled = !1, this.logEnabled = !1, this.copyEnabled = !1, this.readAloudEnabled = !1, this.footerDisabled = !1, this.assistantAvatarEnabled = !1;
|
|
20
21
|
}
|
|
21
22
|
static {
|
|
22
23
|
this.properties = { _isStreaming: 16, feedbackEnabled: 5, logEnabled: 5, copyEnabled: 5, readAloudEnabled: 5, footerDisabled: 5, message: 0, assistantAvatarEnabled: 5 };
|
|
23
24
|
}
|
|
24
25
|
static {
|
|
25
|
-
this.styles =
|
|
26
|
+
this.styles = p;
|
|
26
27
|
}
|
|
27
28
|
get _isStreaming() {
|
|
28
29
|
return !!this.message?.isStreaming;
|
|
@@ -36,10 +37,10 @@ class p extends c {
|
|
|
36
37
|
return e`<arcgis-assistant-message-footer .message=${this.message} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-footer>`;
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
39
|
-
return e`<div class="container">${this.assistantAvatarEnabled ? e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>` : null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error ? e`<div class="message-error">${this.message.error}</div>` : null}${this._isStreaming ? e`<div class="streaming-indicator"><calcite-loader label
|
|
40
|
+
return e`<div class="container">${this.assistantAvatarEnabled ? e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>` : null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error ? e`<div class="message-error">${this.message.error}</div>` : null}${this._isStreaming ? e`<div class="streaming-indicator"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader></div>` : null}${!this.footerDisabled && !this._isStreaming ? e`<slot name=footer>${this._renderFooter()}</slot>` : null}</div></div>`;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
o("arcgis-assistant-message",
|
|
43
|
+
o("arcgis-assistant-message", u);
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
u as ArcgisAssistantMessage
|
|
45
46
|
};
|
|
@@ -21,7 +21,7 @@ class c extends o {
|
|
|
21
21
|
case "suggested-prompts":
|
|
22
22
|
return this._renderSuggestedPrompts(s);
|
|
23
23
|
case "text":
|
|
24
|
-
return r`<arcgis-assistant-message-text .content=${s.data?.content}></arcgis-assistant-message-text>`;
|
|
24
|
+
return r`<arcgis-assistant-message-text .content=${s.data?.content} .parts=${s.data?.parts}></arcgis-assistant-message-text>`;
|
|
25
25
|
default:
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { AssistantMessage } from "../arcgis-assistant/types.js";
|
|
4
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Shows in-progress assistant response UI. Use it to display thinking or loading state while work is running.
|
|
7
8
|
* Offers a default loading message shell with icon/content slot overrides.
|
|
8
9
|
*/
|
|
9
10
|
export abstract class ArcgisAssistantMessageLoading extends LitElement {
|
|
11
|
+
/** @internal */
|
|
12
|
+
protected _messages: { loadingLabel: string; } & T9nMeta<{ loadingLabel: string; }>;
|
|
10
13
|
/** @default false */
|
|
11
14
|
accessor assistantAvatarEnabled: boolean;
|
|
12
15
|
accessor interrupts: AssistantMessage["interrupts"] | undefined;
|