@arcgis/ai-components 5.2.0-next.8 → 5.2.0-next.85
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 +3 -2
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- 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 +183 -0
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +27 -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 +109 -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 +52 -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 +154 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.js +141 -0
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/queryFeatures/adapter.js +127 -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/2EY3BQQX.js +2 -0
- package/dist/cdn/34O57OGV.js +2 -0
- package/dist/cdn/3POGAH2X.js +2 -0
- package/dist/cdn/3SEKXQVK.js +9 -0
- package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/4HDDRBIY.js +2 -0
- package/dist/cdn/4NJ2FF7H.js +2 -0
- package/dist/cdn/4OGR5QKS.js +2 -0
- package/dist/cdn/4QGVOLW6.js +22 -0
- package/dist/cdn/4WIDLQUH.js +2 -0
- package/dist/cdn/5WYRJMBW.js +2 -0
- package/dist/cdn/5X7EG7D2.js +2 -0
- package/dist/cdn/5ZFUGNRN.js +2 -0
- package/dist/cdn/6HF36IKA.js +2 -0
- package/dist/cdn/6KFMRBAA.js +2 -0
- package/dist/cdn/6NHYXISD.js +2 -0
- package/dist/cdn/6U4GTCLJ.js +66 -0
- package/dist/cdn/7BCQMK6D.js +2 -0
- package/dist/cdn/7GMCLVSZ.js +2 -0
- package/dist/cdn/7M6VKBTK.js +6 -0
- package/dist/cdn/{GGSZM7KV.js → 7Q5EESAR.js} +6 -4
- package/dist/cdn/7SRLZQVC.js +5 -0
- package/dist/cdn/7TXR75RG.js +2 -0
- package/dist/cdn/7V6OSTFC.js +2 -0
- package/dist/cdn/7VAQUCBU.js +9 -0
- package/dist/cdn/7ZFAFKJT.js +2 -0
- package/dist/cdn/ACJTJLZN.js +2 -0
- package/dist/cdn/AI6DYOKR.js +181 -0
- package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
- package/dist/cdn/APFZY4PI.js +2 -0
- package/dist/cdn/AT4XVTJR.js +44 -0
- package/dist/cdn/AZ5G7YZH.js +3 -0
- package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
- package/dist/cdn/BM3WFHJG.js +2 -0
- package/dist/cdn/{DHOVCT6R.js → BPCBE7J6.js} +1 -1
- 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/CP5BVGJU.js +2 -0
- package/dist/cdn/CZM4URK7.js +2 -0
- package/dist/cdn/DPALM2OW.js +2 -0
- package/dist/cdn/E7JZ7GUW.js +18 -0
- package/dist/cdn/EMLOVMD4.js +2 -0
- package/dist/cdn/EWLXNGKH.js +208 -0
- package/dist/cdn/F2J6BMMX.js +36 -0
- package/dist/cdn/FAR3DFFK.js +2 -0
- package/dist/cdn/FDOMMK2M.js +2 -0
- package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
- package/dist/cdn/GFEOVHJK.js +2 -0
- package/dist/cdn/HDM2D2GD.js +2 -0
- package/dist/cdn/HHFNQR6Z.js +2 -0
- package/dist/cdn/HMUWQCXU.js +2 -0
- package/dist/cdn/I3ONG4AX.js +2 -0
- package/dist/cdn/IBZ2NEAO.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
- package/dist/cdn/IFJM5XEQ.js +2 -0
- package/dist/cdn/IHP25JWI.js +99 -0
- package/dist/cdn/J6A4AS7E.js +22 -0
- package/dist/cdn/J6SZIQJA.js +2 -0
- package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
- package/dist/cdn/JKIESH74.js +2 -0
- package/dist/cdn/JO5ETMPS.js +2 -0
- package/dist/cdn/JWIE3YK3.js +2 -0
- package/dist/cdn/K2R6XVK3.js +2 -0
- package/dist/cdn/KITIP6J2.js +2 -0
- package/dist/cdn/KPO4XX6J.js +2 -0
- package/dist/cdn/KWD2ECTM.js +2 -0
- package/dist/cdn/L7XTRDFM.js +3 -0
- package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
- package/dist/cdn/LLUGJKAQ.js +2 -0
- package/dist/cdn/LMPNXXTQ.js +2 -0
- package/dist/cdn/LYKCYBGB.js +2 -0
- package/dist/cdn/{3PKJWIC3.js → M2L5R4LA.js} +1 -1
- package/dist/cdn/{V2P4AIGG.js → M4URMXDS.js} +1 -1
- package/dist/cdn/MDAKBX7N.js +2 -0
- package/dist/cdn/MWYBF3F3.js +66 -0
- package/dist/cdn/NEV6OZN3.js +71 -0
- package/dist/cdn/NQDOAPE3.js +2 -0
- package/dist/cdn/OAKRPM7D.js +2 -0
- package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
- package/dist/cdn/ONMNQBPO.js +2 -0
- package/dist/cdn/ONQ6JSBJ.js +2 -0
- package/dist/cdn/OWTGH34K.js +2 -0
- package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
- package/dist/cdn/PSYRZMX2.js +2 -0
- package/dist/cdn/PUHRBGKB.js +2 -0
- package/dist/cdn/Q57QWN5W.js +2 -0
- package/dist/cdn/QNNGPA3Q.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/RV55GABG.js +2 -0
- package/dist/cdn/RWWOOC7S.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
- package/dist/cdn/T4RIGOXB.js +2 -0
- package/dist/cdn/TACBKKBI.js +2 -0
- package/dist/cdn/TMJMDCSA.js +4 -0
- package/dist/cdn/TPULIO6I.js +34 -0
- package/dist/cdn/U2D53TAX.js +14 -0
- package/dist/cdn/UEEH5ZQK.js +156 -0
- package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
- package/dist/cdn/UHZG7SKO.js +2 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/V52XWEGV.js +11 -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/VNJMTA6O.js +2 -0
- package/dist/cdn/VOKXKU7M.js +56 -0
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/W5G35GO4.js +2 -0
- package/dist/cdn/WKTQVBFJ.js +2 -0
- package/dist/cdn/WLH47YFC.js +14 -0
- package/dist/cdn/WP7ORLSB.js +6 -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/Z5W4V7RC.js +2 -0
- package/dist/cdn/ZLWWWTH4.js +2 -0
- package/dist/cdn/ZOEMBHRF.js +2 -0
- package/dist/cdn/ZQMBJ6MI.js +2 -0
- package/dist/cdn/ZRESBCJL.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
- package/dist/cdn/ZUNLFO6M.js +3 -0
- 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 +1294 -2112
- package/dist/chunks/arcgisKnowledgeGraph.js +127 -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 +56 -0
- package/dist/chunks/converterUtils.js +66 -41
- package/dist/chunks/dataExplorationGraph.js +132 -177
- 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 +34 -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 +36 -31
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationGraph.js +123 -103
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/orchestrator.js +205 -175
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/state.js +21 -27
- package/dist/chunks/summarize_query_response_prompt.js +9 -7
- package/dist/chunks/toolCallResponse.js +13 -10
- package/dist/chunks/types.js +59 -0
- package/dist/chunks/utils2.js +11 -11
- package/dist/components/arcgis-assistant/customElement.d.ts +56 -0
- package/dist/components/arcgis-assistant/customElement.js +387 -155
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +14 -1
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +608 -10
- package/dist/components/arcgis-assistant-chat/customElement.d.ts +2 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +2 -0
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +19 -3
- package/dist/components/arcgis-assistant-help-agent/customElement.js +28 -6
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +17 -14
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +24 -0
- package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +39 -16
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +29 -6
- package/dist/components/arcgis-assistant-message/customElement.d.ts +5 -0
- package/dist/components/arcgis-assistant-message/customElement.js +29 -26
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- 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-loading/customElement.d.ts +7 -0
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -7
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- 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 +17 -3
- package/dist/components/arcgis-assistant-speech-input/customElement.js +29 -46
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
- 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 +9 -8
- package/dist/oauth-callback.html +1 -1
- package/dist/types/lumina.d.ts +9 -8
- package/dist/types/preact.d.ts +9 -8
- package/dist/types/react.d.ts +9 -8
- package/dist/types/stencil.d.ts +11 -10
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/index.js +56 -55
- package/package.json +32 -12
- package/dist/cdn/2AXF774U.js +0 -2
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/53ZCUPKK.js +0 -22
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/5XRDJL7R.js +0 -14
- package/dist/cdn/7BCR6TUO.js +0 -2
- package/dist/cdn/7GH7VSB2.js +0 -2
- package/dist/cdn/7PLV4QH6.js +0 -2
- package/dist/cdn/AO7BQHKC.js +0 -2
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/DDLZOMUY.js +0 -2
- package/dist/cdn/EECZLT6C.js +0 -166
- package/dist/cdn/ETRWZ3MS.js +0 -108
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FX5JFRDL.js +0 -2
- package/dist/cdn/H7422XUG.js +0 -2
- package/dist/cdn/HB5A5R2E.js +0 -2
- package/dist/cdn/I6HNBTWY.js +0 -2
- package/dist/cdn/IG6YKZH3.js +0 -3
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/MH5RPXHM.js +0 -2
- package/dist/cdn/NAUXSHIE.js +0 -72
- package/dist/cdn/NVI3I46B.js +0 -2
- package/dist/cdn/OAVEHGB6.js +0 -2
- package/dist/cdn/OH64RMOR.js +0 -4
- package/dist/cdn/P26NON3Z.js +0 -16
- package/dist/cdn/P6OPJQMC.js +0 -3
- package/dist/cdn/QR54T33D.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/S3VPZFWQ.js +0 -36
- package/dist/cdn/SXDLXCIM.js +0 -2
- package/dist/cdn/USMDJUFS.js +0 -2
- package/dist/cdn/Y333DGV6.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type Collection from "@arcgis/core/core/Collection.js";
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
|
-
import type { ChatMessage } from "../arcgis-assistant/types.js";
|
|
4
|
+
import type { ChatMessage, Interrupt } from "../arcgis-assistant/types.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Wraps and renders the conversation area. Use it as the container for message list content.
|
|
@@ -10,6 +10,7 @@ import type { ChatMessage } from "../arcgis-assistant/types.js";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export abstract class ArcgisAssistantChat extends LitElement {
|
|
13
|
+
accessor interrupt: Interrupt | null;
|
|
13
14
|
/** @default false */
|
|
14
15
|
accessor loading: boolean;
|
|
15
16
|
accessor messages: Collection<ChatMessage>;
|
|
@@ -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 {
|
|
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
|
-
this.properties = { loading: 5, messages: 0 };
|
|
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
|
-
r(() => this.loading, () => {
|
|
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
|
};
|
|
@@ -16,6 +16,8 @@ export abstract class ArcgisAssistantChatEntry extends LitElement {
|
|
|
16
16
|
protected _messages: { entryPlaceholder: string; } & T9nMeta<{ entryPlaceholder: string; }>;
|
|
17
17
|
/** @default false */
|
|
18
18
|
accessor awaitingResponse: boolean;
|
|
19
|
+
/** @default false */
|
|
20
|
+
accessor disabled: boolean;
|
|
19
21
|
accessor entryPlaceholder: string | undefined;
|
|
20
22
|
/** @default "" */
|
|
21
23
|
accessor inputValue: string;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { createRef as
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as p, html as c } from "lit";
|
|
4
|
+
import { LitElement as f, createEvent as l, safeClassMap as g } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as u, ref as h } from "lit/directives/ref.js";
|
|
6
|
+
import { u as m } from "../../chunks/useT9n.js";
|
|
7
|
+
import y from "@arcgis/core/core/Collection.js";
|
|
8
|
+
import { classes as v } from "@arcgis/toolkit/dom";
|
|
9
|
+
const b = p`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.status-indicator{width:9px;height:9px;border-radius:100%;background-color:var(--calcite-color-status-success)}.status-indicator[data-status=working]{background-color:var(--calcite-color-status-warning)}.status-indicator[data-status=error]{background-color:var(--calcite-color-status-danger)}.status-text{text-transform:capitalize}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}`;
|
|
10
|
+
class w extends f {
|
|
10
11
|
constructor() {
|
|
11
|
-
super(...arguments), this.#s =
|
|
12
|
+
super(...arguments), this.#s = u(), this.#i = u(), this.#t = -1, this.#e = "", this.#a = (t) => {
|
|
12
13
|
t.stopPropagation();
|
|
13
14
|
const s = t.detail;
|
|
14
15
|
this._setDraftValue(s.value), s.focusInput && this.#s.value && this.#s.value.setFocus();
|
|
15
16
|
}, this.#r = (t) => {
|
|
16
17
|
const s = t.target.value ?? "";
|
|
17
18
|
this.inputValue = s, this.#e = s;
|
|
18
|
-
}, this._messages =
|
|
19
|
+
}, this._messages = m({ blocking: !0 }), this._inFocus = !1, this.keyboardShortcutsDisabled = !1, this.awaitingResponse = !1, this.inputValue = "", this.voiceInputEnabled = !1, this.messages = new y([]), this.disabled = !1, this.arcgisCancel = l(), this.arcgisSubmit = l();
|
|
19
20
|
}
|
|
20
21
|
static {
|
|
21
|
-
this.properties = { _userMessages: 16, keyboardShortcutsDisabled: 5, entryPlaceholder: 1, awaitingResponse: 5, inputValue: 1, status: 1, voiceInputEnabled: 5, messages: 0 };
|
|
22
|
+
this.properties = { _inFocus: 16, _userMessages: 16, keyboardShortcutsDisabled: 5, entryPlaceholder: 1, awaitingResponse: 5, inputValue: 1, status: 1, voiceInputEnabled: 5, messages: 0, disabled: 5 };
|
|
22
23
|
}
|
|
23
24
|
static {
|
|
24
|
-
this.styles =
|
|
25
|
+
this.styles = b;
|
|
25
26
|
}
|
|
26
27
|
#s;
|
|
27
28
|
#i;
|
|
@@ -54,8 +55,8 @@ class v extends g {
|
|
|
54
55
|
const e = this._userMessages;
|
|
55
56
|
if (e.length === 0)
|
|
56
57
|
return;
|
|
57
|
-
const r = a.value ?? "",
|
|
58
|
-
if (!(i == null ||
|
|
58
|
+
const r = a.value ?? "", o = a.shadowRoot?.querySelector("textarea"), i = o?.selectionStart, n = o?.selectionEnd;
|
|
59
|
+
if (!(i == null || n == null) && !(i !== n || t === "up" && i !== 0 || t === "down" && i !== r.length)) {
|
|
59
60
|
if (t === "up") {
|
|
60
61
|
this.#t === -1 ? (this.#e = r, this.#t = e.length - 1) : this.#t = Math.max(0, this.#t - 1), this.inputValue = e[this.#t] ?? "", s.preventDefault();
|
|
61
62
|
return;
|
|
@@ -66,13 +67,19 @@ class v extends g {
|
|
|
66
67
|
_setDraftValue(t) {
|
|
67
68
|
this.inputValue = t, this.#t = -1, this.#e = t;
|
|
68
69
|
}
|
|
70
|
+
_onFocusIn() {
|
|
71
|
+
this._inFocus = !0;
|
|
72
|
+
}
|
|
73
|
+
_onFocusOut() {
|
|
74
|
+
this._inFocus = !1;
|
|
75
|
+
}
|
|
69
76
|
render() {
|
|
70
|
-
return
|
|
77
|
+
return c`<div class="input-container"><calcite-text-area class=${g(v({ focused: this._inFocus }))} .value=${this.inputValue} .placeholder=${this.entryPlaceholder ?? this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#r} .disabled=${this.disabled} @keydown=${async (t) => {
|
|
71
78
|
t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || this.keyboardShortcutsDisabled || (t.key === "Enter" ? (t.preventDefault(), await this.submitMessage()) : t.key === "ArrowUp" ? await this._navigateHistory("up", t) : t.key === "ArrowDown" && await this._navigateHistory("down", t));
|
|
72
|
-
}} ${h(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled ?
|
|
79
|
+
}} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${h(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled ? c`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${h(this.#i)}></arcgis-assistant-speech-input>` : null}<slot name=entry-actions-end></slot></div></calcite-text-area></div>`;
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
|
-
|
|
82
|
+
d("arcgis-assistant-chat-entry", w);
|
|
76
83
|
export {
|
|
77
|
-
|
|
84
|
+
w as ArcgisAssistantChatEntry
|
|
78
85
|
};
|
|
@@ -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";
|
|
11
13
|
import "@langchain/openai";
|
|
14
|
+
import "@arcgis/core/config.js";
|
|
12
15
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
16
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
17
|
import "@langchain/core/prompts";
|
|
18
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
19
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
27
|
import "@langchain/langgraph/prebuilt";
|
|
17
28
|
import "zod";
|
|
18
29
|
import { D as r } from "../../chunks/dataExplorationGraph.js";
|
|
30
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
19
31
|
import "@arcgis/core/views/LinkChartView.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";
|
|
11
13
|
import "@langchain/openai";
|
|
14
|
+
import "@arcgis/core/config.js";
|
|
12
15
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
16
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
17
|
import "@langchain/core/prompts";
|
|
18
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
19
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
27
|
import "@langchain/langgraph/prebuilt";
|
|
17
28
|
import "zod";
|
|
29
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
30
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
32
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
36
|
import "@arcgis/core/intl.js";
|
|
19
37
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
38
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
39
|
import { H as r } from "../../chunks/helpGraph.js";
|
|
22
40
|
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,33 +1,36 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { html as e } from "lit";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { u as
|
|
6
|
-
|
|
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
|
+
import { u as r } from "../../chunks/useT9n.js";
|
|
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
|
+
class o extends l {
|
|
7
8
|
constructor() {
|
|
8
|
-
super(...arguments), this
|
|
9
|
+
super(...arguments), this._messages = r({ blocking: !0 }), this._selectedOptions = [], this.arcgisCancel = s(), this.arcgisSubmit = s();
|
|
9
10
|
}
|
|
10
11
|
static {
|
|
11
|
-
this.properties = { type: 1, message: 1, options: 0 };
|
|
12
|
+
this.properties = { _selectedOptions: 16, type: 1, message: 1, options: 0 };
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = n;
|
|
12
16
|
}
|
|
13
|
-
#t;
|
|
14
17
|
_renderInterruptOptions() {
|
|
15
18
|
switch (this.type) {
|
|
16
19
|
case "single-select":
|
|
17
|
-
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>`;
|
|
18
21
|
case "multi-select":
|
|
19
|
-
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>`;
|
|
20
23
|
case "boolean-choice":
|
|
21
24
|
return null;
|
|
22
25
|
case "text-input":
|
|
23
|
-
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>`;
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
render() {
|
|
27
|
-
return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}
|
|
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>`;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
c("arcgis-assistant-interrupt", o);
|
|
31
34
|
export {
|
|
32
|
-
|
|
35
|
+
o as ArcgisAssistantInterrupt
|
|
33
36
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
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
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.properties = { interrupts: 0 };
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = c;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return this.interrupts?.length ? i`<calcite-block collapsible 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;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
r("arcgis-assistant-interrupt-preview", p);
|
|
22
|
+
export {
|
|
23
|
+
p as ArcgisAssistantInterruptPreview
|
|
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,56 @@
|
|
|
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";
|
|
11
13
|
import "@langchain/openai";
|
|
14
|
+
import "@arcgis/core/config.js";
|
|
12
15
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
16
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
17
|
import "@langchain/core/prompts";
|
|
18
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
19
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
27
|
import "@langchain/langgraph/prebuilt";
|
|
17
28
|
import "zod";
|
|
29
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
30
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
32
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
36
|
import "@arcgis/core/intl.js";
|
|
19
37
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
38
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
39
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
21
40
|
import { A as o } from "../../chunks/arcgisKnowledgeGraph.js";
|
|
22
|
-
import {
|
|
23
|
-
import { fetchKnowledgeGraph as
|
|
24
|
-
class
|
|
41
|
+
import { a as s, i as n } from "../../chunks/utils2.js";
|
|
42
|
+
import { fetchKnowledgeGraph as p } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
43
|
+
class m extends e {
|
|
25
44
|
constructor() {
|
|
26
45
|
super(...arguments), this.agent = o;
|
|
27
46
|
}
|
|
28
47
|
static {
|
|
29
48
|
this.properties = { referenceElement: 1, serviceUrl: 3, context: 0 };
|
|
30
49
|
}
|
|
31
|
-
#
|
|
50
|
+
#i;
|
|
32
51
|
#r;
|
|
33
52
|
#t;
|
|
53
|
+
#e;
|
|
34
54
|
get serviceUrl() {
|
|
35
55
|
return this.#r;
|
|
36
56
|
}
|
|
@@ -39,30 +59,33 @@ class c extends i {
|
|
|
39
59
|
}
|
|
40
60
|
async getContext() {
|
|
41
61
|
const t = this.context ? { ...this.context, knowledgeGraph: void 0, view: void 0 } : {};
|
|
42
|
-
if (this.#
|
|
62
|
+
if (this.#i)
|
|
43
63
|
return {
|
|
44
64
|
...t,
|
|
45
|
-
view: this.#
|
|
65
|
+
view: this.#i
|
|
46
66
|
};
|
|
47
67
|
if (this.#t)
|
|
48
68
|
try {
|
|
49
|
-
const
|
|
50
|
-
return { ...t, knowledgeGraph:
|
|
51
|
-
} catch (
|
|
52
|
-
console.error("Failed to load knowledge graph via service URL:",
|
|
69
|
+
const i = await this.#t;
|
|
70
|
+
return { ...t, knowledgeGraph: i };
|
|
71
|
+
} catch (i) {
|
|
72
|
+
console.error("Failed to load knowledge graph via service URL:", i);
|
|
53
73
|
}
|
|
54
74
|
if (!this.context?.knowledgeGraph && !this.context?.view)
|
|
55
75
|
throw new Error("arcgis-assistant-knowledge-agent requires either a knowledgeGraph or view in context, and neither were provided");
|
|
56
76
|
return this.context;
|
|
57
77
|
}
|
|
58
78
|
willUpdate(t) {
|
|
59
|
-
t.has("serviceUrl") && this.serviceUrl ? this.#t =
|
|
79
|
+
t.has("serviceUrl") && this.serviceUrl ? this.#t = p(this.serviceUrl) : this.#t = void 0;
|
|
60
80
|
}
|
|
61
81
|
load() {
|
|
62
|
-
this.#
|
|
82
|
+
this.#i = s(this) ?? void 0, this.#e = n(this);
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
this.#e?.unregister(this.agent.id), super.disconnectedCallback();
|
|
63
86
|
}
|
|
64
87
|
}
|
|
65
|
-
r("arcgis-assistant-knowledge-agent",
|
|
88
|
+
r("arcgis-assistant-knowledge-agent", m);
|
|
66
89
|
export {
|
|
67
|
-
|
|
90
|
+
m as ArcgisAssistantKnowledgeAgent
|
|
68
91
|
};
|
|
@@ -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";
|
|
11
13
|
import "@langchain/openai";
|
|
14
|
+
import "@arcgis/core/config.js";
|
|
12
15
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
16
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import "@arcgis/core/request.js";
|
|
15
17
|
import "@langchain/core/prompts";
|
|
18
|
+
import "../../agents/tools/navigation/goToAddress/adapter.js";
|
|
19
|
+
import "../../agents/tools/navigation/goToBookmark/adapter.js";
|
|
20
|
+
import "../../agents/tools/navigation/goToFeatures/adapter.js";
|
|
21
|
+
import "../../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
22
|
+
import "../../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
23
|
+
import "../../agents/tools/navigation/goToLayer/adapter.js";
|
|
24
|
+
import "../../agents/tools/navigation/goToScale/adapter.js";
|
|
25
|
+
import "../../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
26
|
+
import "../../agents/tools/navigation/goToZoom/adapter.js";
|
|
16
27
|
import "@langchain/langgraph/prebuilt";
|
|
17
28
|
import "zod";
|
|
29
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
30
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
31
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
32
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
33
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
34
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
35
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
18
36
|
import "@arcgis/core/intl.js";
|
|
19
37
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
38
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
39
|
import { L as r } from "../../chunks/layerStylingGraph.js";
|
|
40
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
22
41
|
import "@arcgis/core/views/LinkChartView.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,17 @@
|
|
|
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; }>;
|
|
13
|
+
/** @default false */
|
|
14
|
+
accessor assistantAvatarEnabled: boolean;
|
|
10
15
|
/** @default false */
|
|
11
16
|
accessor copyEnabled: boolean;
|
|
12
17
|
/** @default false */
|