@arcgis/ai-components 6.0.0-next.1 → 6.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.js +1 -1
- package/dist/agent-utils/SkillAgent.js +1 -1
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/createSchema.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +23 -21
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/tools/MCPToolProvider.js +1 -1
- package/dist/agent-utils/tools/WebMCPToolProvider.js +1 -1
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.js +1 -1
- package/dist/agents/agents/dataExploration/dataExplorationAgent.js +1 -1
- package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.js +1 -1
- package/dist/agents/agents/help/helpAgent.js +11 -11
- package/dist/agents/agents/helpGraph/graph/helpGraph.js +1 -1
- package/dist/agents/agents/layerStyling/context/layerStylingContext.js +1 -1
- package/dist/agents/agents/layerStyling/graph/layerStylingGraph.js +1 -1
- package/dist/agents/agents/navigation/navigationAgent.js +1 -1
- package/dist/agents/agents/navigationGraph/graph/navigationGraph.js +1 -1
- package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
- package/dist/agents/tools/help/listFields/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +35 -18
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
- package/dist/agents/tools/query/getStatistics/adapter.js +1 -1
- package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
- package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
- package/dist/agents/tools/shared/resolveToolArtifact.js +1 -1
- package/dist/agents/tools/shared/types.js +1 -1
- package/dist/cdn/24KEZCPF.js +2 -0
- package/dist/cdn/{2UKFCF2J.js → 272R36XK.js} +2 -2
- package/dist/cdn/{FX4LV2S3.js → 2H32MDP2.js} +1 -1
- package/dist/cdn/{VAXH6RUQ.js → 2HNGMLFD.js} +2 -2
- package/dist/cdn/{24TK55FP.js → 2JD3G7IW.js} +2 -2
- package/dist/cdn/{P4CHI7W3.js → 2NOLMOEP.js} +2 -2
- package/dist/cdn/{ZU2FHVNK.js → 2OW3DCUT.js} +2 -2
- package/dist/cdn/2PGZDONH.js +2 -0
- package/dist/cdn/2WY5MPMY.js +2 -0
- package/dist/cdn/{2DWN3SKH.js → 3COVQI26.js} +2 -2
- package/dist/cdn/{VIJVRJHL.js → 3UVQLYUK.js} +2 -2
- package/dist/cdn/46NXKDIE.js +2 -0
- package/dist/cdn/{BIEX4MVV.js → 5HNKH5OK.js} +2 -2
- package/dist/cdn/{46DT6BIG.js → 5INBG23U.js} +1 -1
- package/dist/cdn/{YJXRCO4T.js → 5LBUP33F.js} +2 -2
- package/dist/cdn/{JEWJ4M25.js → 5OGABLOF.js} +5 -5
- package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
- package/dist/cdn/{EEHDAYOG.js → 5XZ5VL42.js} +2 -2
- package/dist/cdn/{DI3VGUJY.js → 63OF33IL.js} +2 -2
- package/dist/cdn/{NHWT7CXX.js → 6ELWX4W5.js} +2 -2
- package/dist/cdn/{OKVLGJAG.js → 6J3J7VLW.js} +2 -2
- package/dist/cdn/{AOVJ34QE.js → 6QOSUG64.js} +2 -2
- package/dist/cdn/{GVFJHADC.js → 6UGT2UG5.js} +2 -2
- package/dist/cdn/{QEGO4B2W.js → 7GDMXAF5.js} +2 -2
- package/dist/cdn/7JIXXYZR.js +2 -0
- package/dist/cdn/{X5ET73QZ.js → 7OQK2F7O.js} +2 -2
- package/dist/cdn/{FSLPYC4Y.js → A4ZVCRVF.js} +2 -2
- package/dist/cdn/{OVIQ5NSE.js → AGDGDULE.js} +2 -2
- package/dist/cdn/{TPULIO6I.js → AMA67DVI.js} +2 -2
- package/dist/cdn/AO42IPOX.js +2 -0
- package/dist/cdn/{UOKYHQNO.js → AOT3PM2Q.js} +2 -2
- package/dist/cdn/{EG5BMYZO.js → AQ7KG25Q.js} +2 -2
- package/dist/cdn/AY2ZONWQ.js +2 -0
- package/dist/cdn/{JZPPP4QY.js → BMVPOFHU.js} +2 -2
- package/dist/cdn/BWUQRZPK.js +2 -0
- package/dist/cdn/{XWNZMKQF.js → C3VLDYS2.js} +2 -2
- package/dist/cdn/{PQ2DPOFM.js → C5Q6E7UC.js} +2 -2
- package/dist/cdn/{FDOMMK2M.js → CETIZ4IQ.js} +1 -1
- package/dist/cdn/CKDKQVS3.js +2 -0
- package/dist/cdn/{TENUVOFJ.js → COANVCKH.js} +2 -2
- package/dist/cdn/CV5YAJMD.js +2 -0
- package/dist/cdn/{BBB5EJUB.js → CWZG7DML.js} +3 -3
- package/dist/cdn/{2O52MJ3D.js → D7CRICBG.js} +2 -2
- package/dist/cdn/D7FEOAW3.js +2 -0
- package/dist/cdn/{PGUEODFA.js → DY6MO2CA.js} +2 -2
- package/dist/cdn/EKMCGN6R.js +2 -0
- package/dist/cdn/EUIURCPS.js +2 -0
- package/dist/cdn/{RFDMNYTA.js → EWZNZZ5S.js} +2 -2
- package/dist/cdn/{DGCWQYN3.js → FGQH46Z2.js} +2 -2
- package/dist/cdn/FIZMK7GS.js +1 -0
- package/dist/cdn/FONIQ7VF.js +2 -0
- package/dist/cdn/G4L7RUTK.js +49 -0
- package/dist/cdn/{FYZATVB3.js → G7MCIFV2.js} +2 -2
- package/dist/cdn/{SDWWUWAF.js → GGAXXX5X.js} +2 -2
- package/dist/cdn/GS5JDPZH.js +2 -0
- package/dist/cdn/{T3SCINN5.js → H4QWVTEZ.js} +2 -2
- package/dist/cdn/H653UVNH.js +2 -0
- package/dist/cdn/{ZSLHB6MF.js → H6J65TWL.js} +2 -2
- package/dist/cdn/{UHEYPSOR.js → HCPI2RJE.js} +2 -2
- package/dist/cdn/{PCAMBPOA.js → HJOWCZPL.js} +2 -2
- package/dist/cdn/{5REENYPV.js → HTNKDDEV.js} +2 -2
- package/dist/cdn/{6WYVG3JI.js → HU527DML.js} +2 -2
- package/dist/cdn/{DJG6DBCU.js → I2RQZAFF.js} +3 -3
- package/dist/cdn/I37ZJHTM.js +2 -0
- package/dist/cdn/{GHFOAS7T.js → I724KIFI.js} +2 -2
- package/dist/cdn/IH5P2PWJ.js +2 -0
- package/dist/cdn/{C67KQCPS.js → J3T5HB77.js} +2 -2
- package/dist/cdn/{EXLDRGUC.js → JCWFLYB4.js} +2 -2
- package/dist/cdn/{IHP25JWI.js → JSRNLNOE.js} +2 -2
- package/dist/cdn/JZT4ECVH.js +2 -0
- package/dist/cdn/{MPWEXYYB.js → KDA5VPLO.js} +2 -2
- package/dist/cdn/KRPPMEOF.js +2 -0
- package/dist/cdn/{GBFRJF4F.js → KURNYULZ.js} +2 -2
- package/dist/cdn/{ZKWXHSEQ.js → L46O52F7.js} +2 -2
- package/dist/cdn/{FJV7CI7O.js → LDDP7NSY.js} +2 -2
- package/dist/cdn/{ZQTCPJUV.js → LGIXZLOP.js} +2 -2
- package/dist/cdn/{OGZFST2A.js → LMAIOLS2.js} +2 -2
- package/dist/cdn/{CFAC4FN3.js → LWEKPFV6.js} +2 -2
- package/dist/cdn/{L5IPMRHC.js → M52LKZN7.js} +2 -2
- package/dist/cdn/{AQF6BBWC.js → M5UMOOL2.js} +2 -2
- package/dist/cdn/MNMCIS4E.js +15 -0
- package/dist/cdn/{7X22QXJP.js → MR3R5YHQ.js} +2 -2
- package/dist/cdn/{MD2FTKQT.js → MSHEHZYP.js} +3 -3
- package/dist/cdn/{M6JQGHCE.js → MUSLUFKI.js} +2 -2
- package/dist/cdn/MYLY2ABI.js +2 -0
- package/dist/cdn/{AMP43OT2.js → N2GN5WOI.js} +2 -2
- package/dist/cdn/{RE7MJTEF.js → NAVK5JJ2.js} +3 -3
- package/dist/cdn/NDSYDURO.js +2 -0
- package/dist/cdn/{7ZTYHZIN.js → NK2QRPS6.js} +2 -2
- package/dist/cdn/{GMZUN5SF.js → NYFL2F5L.js} +2 -2
- package/dist/cdn/{PGH7POKS.js → OKDXM5D4.js} +2 -2
- package/dist/cdn/{JFL5IWPK.js → OMUWBY75.js} +2 -2
- package/dist/cdn/{34O57OGV.js → OPQCY33W.js} +1 -1
- package/dist/cdn/{R74ZHFA6.js → OUMTV5H5.js} +1 -1
- package/dist/cdn/OVH4S4ZB.js +3 -0
- package/dist/cdn/{5FDBJI24.js → OZDRETY2.js} +2 -2
- package/dist/cdn/{DYSPEU7W.js → PR4VMSKD.js} +1 -1
- package/dist/cdn/{HSMAXOOA.js → PXBS2FXE.js} +2 -2
- package/dist/cdn/{XEJFVUNQ.js → QAVDW7A7.js} +1 -1
- package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
- package/dist/cdn/RNJ7T5GF.js +2 -0
- package/dist/cdn/{YBWRFVA6.js → RQYDIQVD.js} +3 -3
- package/dist/cdn/{BMPBJXD7.js → S6OUM5X2.js} +2 -2
- package/dist/cdn/{A22375P3.js → SUMXIUIS.js} +2 -2
- package/dist/cdn/SW3D6QD4.js +2 -0
- package/dist/cdn/{GEFFWUB2.js → T2OYUOSO.js} +1 -1
- package/dist/cdn/T7LYQ56H.js +2 -0
- package/dist/cdn/{DZOQFEOB.js → TFXK2POV.js} +2 -2
- package/dist/cdn/{XQ3NBBQ3.js → TIQUULA4.js} +1 -1
- package/dist/cdn/{LCI5MEDN.js → TOUYGIGK.js} +2 -2
- package/dist/cdn/TZQ6XEKW.js +2 -0
- package/dist/cdn/{5LA77ZBW.js → UMTRLI63.js} +2 -2
- package/dist/cdn/{NPV4MEAZ.js → UP7RW5K2.js} +2 -2
- package/dist/cdn/{XCLICBG7.js → UR2S7L6Z.js} +2 -2
- package/dist/cdn/{CEKOEHB3.js → UWHRBGWN.js} +2 -2
- package/dist/cdn/{UQRBY7ID.js → UXDRYDOD.js} +2 -2
- package/dist/cdn/{JUPTVXLY.js → UZ7XFHYI.js} +2 -2
- package/dist/cdn/{AAUVOBPS.js → VINKTQFR.js} +1 -1
- package/dist/cdn/{SWXUQFB6.js → VU7IOGNS.js} +2 -2
- package/dist/cdn/{HC5DJL2U.js → W2SIOY2B.js} +2 -2
- package/dist/cdn/{FBARYPZ7.js → W36IUEUB.js} +2 -2
- package/dist/cdn/{5TW2NFES.js → WEBAQIUT.js} +2 -2
- package/dist/cdn/{WSIZ2OTL.js → WHIWOYHN.js} +1 -1
- package/dist/cdn/WOL5YMJ2.js +2 -0
- package/dist/cdn/{66VWTARH.js → X3YFCWQZ.js} +2 -2
- package/dist/cdn/{ICBIUFK7.js → X4EQEKM7.js} +2 -2
- package/dist/cdn/{TJBU5BQK.js → XBWGOD6I.js} +2 -2
- package/dist/cdn/{6E6T6U7W.js → XGDXTTYW.js} +2 -2
- package/dist/cdn/{CDS2HGQY.js → XLHYQNAM.js} +2 -2
- package/dist/cdn/{NEV6OZN3.js → XMQJWPXI.js} +2 -2
- package/dist/cdn/{QT3B5K4R.js → XQUKC4YK.js} +2 -2
- package/dist/cdn/{JEBRN3EU.js → XSH4B7FP.js} +2 -2
- package/dist/cdn/{LK7ZIQW6.js → XVWSIDZV.js} +2 -2
- package/dist/cdn/{J6A4AS7E.js → XYMIFFBW.js} +2 -2
- package/dist/cdn/{MPQ2OZXN.js → Y3ZKMD47.js} +2 -2
- package/dist/cdn/{YPLPDUMB.js → YAANCUW2.js} +2 -2
- package/dist/cdn/{KY7M4WHO.js → YD5LVM7V.js} +2 -2
- package/dist/cdn/{AMURN3LO.js → YGI277SH.js} +2 -2
- package/dist/cdn/{YI6NIHNI.js → YGSDJ4V3.js} +2 -2
- package/dist/cdn/YIF2OD6F.js +2 -0
- package/dist/cdn/YJEARDAZ.js +2 -0
- package/dist/cdn/{XC3T3Z5R.js → YSEHJQ4L.js} +2 -2
- package/dist/cdn/Z44NI2YQ.js +2 -0
- package/dist/cdn/{UYP5PH5E.js → ZUKM4DGB.js} +2 -2
- package/dist/cdn/ZVVNATCX.js +2 -0
- package/dist/cdn/agent-utils/BaseAgent.js +2 -2
- package/dist/cdn/agent-utils/FunctionAgent.js +2 -2
- package/dist/cdn/agent-utils/LLMAgent.js +2 -2
- package/dist/cdn/agent-utils/SkillAgent.js +2 -2
- package/dist/cdn/agent-utils/WorkflowAgent.js +2 -2
- package/dist/cdn/agent-utils/createSchema.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/agent-utils/tools/FunctionTool.js +2 -2
- package/dist/cdn/agent-utils/tools/MCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/tools/WebMCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -2
- package/dist/cdn/orchestrator/models/chatModel.js +2 -2
- package/dist/cdn/orchestrator/models/prompts.js +2 -2
- package/dist/cdn/orchestrator/signals.js +2 -2
- package/dist/cdn/orchestrator/state/runtime.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +1 -1
- package/dist/chunks/SKILL2.js +1 -1
- package/dist/chunks/SKILL3.js +7 -11
- package/dist/chunks/SKILL4.js +1 -1
- package/dist/chunks/adapter.js +1 -1
- package/dist/chunks/adapter2.js +1 -1
- package/dist/chunks/aiFactory.js +1 -1
- package/dist/chunks/aiUtilityService.js +1 -1
- package/dist/chunks/arcgisToolRegistry.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/converterUtils.js +1 -1
- package/dist/chunks/createSkillAgent.js +1 -1
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +1 -1
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +1 -1
- package/dist/chunks/fetchService.js +1 -1
- package/dist/chunks/fetchUtils.js +1 -1
- package/dist/chunks/fieldStatistics.js +1 -1
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +1 -1
- package/dist/chunks/getPrompt.js +1 -1
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpState.js +1 -1
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/intent_prompt.js +19 -108
- package/dist/chunks/layerQueryToolCalling.js +1 -1
- package/dist/chunks/layerStylingState.js +1 -1
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/localization.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/modelConfig.js +1 -1
- package/dist/chunks/modelPricing.js +1 -1
- package/dist/chunks/navigationState.js +1 -1
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/observationSnapshot.js +1 -1
- package/dist/chunks/reducers.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolveFieldNames.js +1 -1
- package/dist/chunks/resolveGeometryFilter.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/runtime2.js +1 -1
- package/dist/chunks/runtimeSpans.js +1 -1
- package/dist/chunks/schema.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/textFormatters.js +1 -1
- package/dist/chunks/toolCallResponse.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/webmapSchema.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +101 -101
- package/dist/components/arcgis-assistant/types.d.ts +2 -0
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +6 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +25 -24
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-inspector/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-latency/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-panel/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-run/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-usage/customElement.js +1 -1
- package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/orchestrator/embeddings/cosineSimilarity.js +1 -1
- package/dist/orchestrator/embeddings/getEmbeddings.js +1 -1
- package/dist/orchestrator/embeddings/webmapEmbeddings.js +1 -1
- package/dist/orchestrator/models/chatModel.js +1 -1
- package/dist/orchestrator/models/prompts.js +1 -1
- package/dist/orchestrator/orchestrator/orchestrator.js +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.js +1 -1
- package/dist/orchestrator/signals.js +1 -1
- package/dist/orchestrator/state/runtime.js +1 -1
- package/dist/orchestrator/state/types.js +1 -1
- package/dist/orchestrator/types.d.ts +6 -0
- package/dist/orchestrator/types.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/2UDDCWNW.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/4KFTUBFL.js +0 -2
- package/dist/cdn/6PK2UPG3.js +0 -2
- package/dist/cdn/74CVYM72.js +0 -19
- package/dist/cdn/7HVIVV3O.js +0 -2
- package/dist/cdn/7MCFHVEH.js +0 -3
- package/dist/cdn/AO2G4EXA.js +0 -2
- package/dist/cdn/AWPLRVPS.js +0 -2
- package/dist/cdn/C76HLPKU.js +0 -2
- package/dist/cdn/CADNOKIK.js +0 -2
- package/dist/cdn/CHHC6YNW.js +0 -2
- package/dist/cdn/DBRBT54R.js +0 -2
- package/dist/cdn/DJKEGIQZ.js +0 -2
- package/dist/cdn/EGSD465U.js +0 -2
- package/dist/cdn/HLWG7OIR.js +0 -2
- package/dist/cdn/HWIM4KWF.js +0 -2
- package/dist/cdn/KKWCHNYQ.js +0 -2
- package/dist/cdn/KX6CZEVZ.js +0 -2
- package/dist/cdn/M2G44RTS.js +0 -2
- package/dist/cdn/MB7SEHPZ.js +0 -2
- package/dist/cdn/MC2V5WT3.js +0 -2
- package/dist/cdn/MZFWD5CQ.js +0 -2
- package/dist/cdn/NMFEXE4D.js +0 -2
- package/dist/cdn/OT5ECP4V.js +0 -138
- package/dist/cdn/OYHYHALE.js +0 -2
- package/dist/cdn/QUZTFUWM.js +0 -1
- package/dist/cdn/RF6HWZMB.js +0 -2
- package/dist/cdn/RFPTOFM4.js +0 -2
- package/dist/cdn/RKURZ5T2.js +0 -2
- package/dist/cdn/SJ4UMNIS.js +0 -2
- package/dist/cdn/USPB2QBX.js +0 -2
- package/dist/cdn/V6EX4YCY.js +0 -2
- package/dist/cdn/VA4M72JC.js +0 -2
- package/dist/cdn/VQ67NANV.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as L } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as T, html as d } from "lit";
|
|
4
4
|
import M from "@arcgis/core/core/Collection.js";
|
|
5
|
-
import { whenOnce as
|
|
5
|
+
import { whenOnce as O, watch as R, when as D } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
6
|
import U from "@arcgis/core/portal/Portal.js";
|
|
7
7
|
import { LitElement as B, createEvent as b, nothing as w } from "@arcgis/lumina";
|
|
8
8
|
import * as z from "@arcgis/toolkit/log";
|
|
@@ -11,14 +11,14 @@ import { createRef as E, ref as k } from "lit/directives/ref.js";
|
|
|
11
11
|
import { u as q } from "../../chunks/useT9n.js";
|
|
12
12
|
import { Orchestrator as F } from "../../orchestrator/orchestrator/orchestrator.js";
|
|
13
13
|
import H from "@arcgis/core/core/Accessor.js";
|
|
14
|
-
import { property as
|
|
14
|
+
import { property as y, subclass as V } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
15
15
|
import { marked as S } from "marked";
|
|
16
16
|
import { g as j } from "../../chunks/utils2.js";
|
|
17
17
|
import { g as I } from "../../chunks/slottableRequestUtils.js";
|
|
18
18
|
import A from "@arcgis/core/identity/IdentityManager.js";
|
|
19
19
|
const W = T`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;
|
|
20
|
-
function $(
|
|
21
|
-
return
|
|
20
|
+
function $(o) {
|
|
21
|
+
return o.trim() ? S.lexer(o).filter((t) => t.type !== "space").map((t) => S.parser([t])) : [];
|
|
22
22
|
}
|
|
23
23
|
class x {
|
|
24
24
|
constructor() {
|
|
@@ -105,47 +105,47 @@ class x {
|
|
|
105
105
|
"wbr"
|
|
106
106
|
]), s = /<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu, i = [];
|
|
107
107
|
for (let r = s.exec(t); r; r = s.exec(t)) {
|
|
108
|
-
const [, g, p, m] = r,
|
|
109
|
-
if (!(e.has(
|
|
108
|
+
const [, g, p, m] = r, n = p.toLowerCase();
|
|
109
|
+
if (!(e.has(n) || m === "/"))
|
|
110
110
|
if (g === "/") {
|
|
111
111
|
for (let c = i.length - 1; c >= 0; c--)
|
|
112
|
-
if (i[c].name ===
|
|
112
|
+
if (i[c].name === n) {
|
|
113
113
|
i.splice(c);
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
} else
|
|
117
|
-
i.push({ name:
|
|
117
|
+
i.push({ name: n, index: r.index });
|
|
118
118
|
}
|
|
119
119
|
return i.length ? i[0].index : -1;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function G(
|
|
122
|
+
function G(o) {
|
|
123
123
|
const t = new x();
|
|
124
|
-
return t.push(
|
|
124
|
+
return t.push(o), t.finalize();
|
|
125
125
|
}
|
|
126
|
-
const Z = async (
|
|
127
|
-
async function* J(
|
|
126
|
+
const Z = async (o) => await new Promise((t) => setTimeout(t, o));
|
|
127
|
+
async function* J(o, { chunkSize: t = 15, delay: e = 50 } = {}) {
|
|
128
128
|
const s = new x();
|
|
129
|
-
for (let i = 0; i <
|
|
130
|
-
yield s.push(
|
|
129
|
+
for (let i = 0; i < o.length; i += t)
|
|
130
|
+
yield s.push(o.slice(i, i + t)), await Z(e);
|
|
131
131
|
yield s.finalize();
|
|
132
132
|
}
|
|
133
|
-
var K = Object.defineProperty, Q = Object.getOwnPropertyDescriptor,
|
|
134
|
-
for (var i = s > 1 ? void 0 : s ? Q(t, e) : t, r =
|
|
135
|
-
(g =
|
|
133
|
+
var K = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, _ = (o, t, e, s) => {
|
|
134
|
+
for (var i = s > 1 ? void 0 : s ? Q(t, e) : t, r = o.length - 1, g; r >= 0; r--)
|
|
135
|
+
(g = o[r]) && (i = (s ? g(t, e, i) : g(i)) || i);
|
|
136
136
|
return s && i && K(t, e, i), i;
|
|
137
137
|
};
|
|
138
|
-
const P = (
|
|
139
|
-
async function* C(
|
|
138
|
+
const P = (o) => !o || typeof o != "object" ? !1 : o.name === "AbortError";
|
|
139
|
+
async function* C(o, t, e, s, i = !1) {
|
|
140
140
|
if (i) {
|
|
141
141
|
if (s?.aborted) {
|
|
142
142
|
yield { type: "cancelled", log: e, runId: t };
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
|
-
yield { type: "block-data", blockType: "text", data: { parts: G(
|
|
145
|
+
yield { type: "block-data", blockType: "text", data: { parts: G(o) }, runId: t };
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
for await (const r of J(
|
|
148
|
+
for await (const r of J(o)) {
|
|
149
149
|
if (s?.aborted) {
|
|
150
150
|
yield { type: "cancelled", log: e, runId: t };
|
|
151
151
|
return;
|
|
@@ -154,8 +154,8 @@ async function* C(l, t, e, s, i = !1) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
let u = class extends H {
|
|
157
|
-
constructor(
|
|
158
|
-
super(
|
|
157
|
+
constructor(o) {
|
|
158
|
+
super(o), this.view = null, this.streamingDisabled = !1, this.runtimeEventsEnabled = !1, this.loading = !1, this.processing = !1, this.processingStep = "";
|
|
159
159
|
}
|
|
160
160
|
async load() {
|
|
161
161
|
this._set("loading", !0);
|
|
@@ -169,7 +169,7 @@ let u = class extends H {
|
|
|
169
169
|
this.orchestrator?.dispose(), super.destroy();
|
|
170
170
|
}
|
|
171
171
|
async _initialize() {
|
|
172
|
-
this.removeHandles(), await Promise.all([this.portal.load(), this.view?.when()]), this.view && await
|
|
172
|
+
this.removeHandles(), await Promise.all([this.portal.load(), this.view?.when()]), this.view && await O(() => !this.view.updating), this._set(
|
|
173
173
|
"orchestrator",
|
|
174
174
|
await F.init({
|
|
175
175
|
agents: [...this.agents],
|
|
@@ -177,7 +177,7 @@ let u = class extends H {
|
|
|
177
177
|
view: this.view ?? void 0
|
|
178
178
|
})
|
|
179
179
|
), this.addHandles([
|
|
180
|
-
|
|
180
|
+
R(
|
|
181
181
|
() => [this.view, this.agents],
|
|
182
182
|
() => {
|
|
183
183
|
this._initialize();
|
|
@@ -188,14 +188,14 @@ let u = class extends H {
|
|
|
188
188
|
clearChatHistory() {
|
|
189
189
|
this.orchestrator?.newConversation();
|
|
190
190
|
}
|
|
191
|
-
async *ask(
|
|
191
|
+
async *ask(o, t, e) {
|
|
192
192
|
if (!this.orchestrator)
|
|
193
193
|
throw new Error("Orchestrator not initialized yet.");
|
|
194
194
|
this._set("processing", !0), this._set("processingStep", "");
|
|
195
195
|
const s = [];
|
|
196
196
|
let i, r = "pending";
|
|
197
197
|
try {
|
|
198
|
-
const g = this.orchestrator.ask(
|
|
198
|
+
const g = this.orchestrator.ask(o, t);
|
|
199
199
|
for await (const p of g)
|
|
200
200
|
switch (r = p.runId, p.type) {
|
|
201
201
|
case "runtime": {
|
|
@@ -208,27 +208,27 @@ let u = class extends H {
|
|
|
208
208
|
}
|
|
209
209
|
case "completed": {
|
|
210
210
|
this._set("processing", !1), this._set("processingStep", "");
|
|
211
|
-
const m = p.result,
|
|
212
|
-
if (!
|
|
211
|
+
const m = p.result, n = !!m.content.length, c = !!i?.length;
|
|
212
|
+
if (!n && !c) {
|
|
213
213
|
yield { type: "completed", error: "No response received.", log: s, runId: r };
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
if (yield { type: "block-start", blockType: "text", runId: r }, yield* C(
|
|
218
|
-
for (const
|
|
216
|
+
const l = m.content;
|
|
217
|
+
if (yield { type: "block-start", blockType: "text", runId: r }, yield* C(l, r, s, e, this.streamingDisabled), yield { type: "block-end", blockType: "text", runId: r }, c)
|
|
218
|
+
for (const a of i) {
|
|
219
219
|
if (e?.aborted) {
|
|
220
220
|
yield { type: "cancelled", log: s, runId: r };
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
|
-
const { type: h, data:
|
|
223
|
+
const { type: h, data: f } = a;
|
|
224
224
|
if (yield { type: "block-start", blockType: h, runId: r }, h === "text") {
|
|
225
|
-
const v = typeof
|
|
225
|
+
const v = typeof f?.content == "string" ? f.content : "";
|
|
226
226
|
yield* C(v, r, s, e, this.streamingDisabled);
|
|
227
227
|
} else
|
|
228
|
-
yield { type: "block-data", blockType: h, data:
|
|
228
|
+
yield { type: "block-data", blockType: h, data: f, runId: r };
|
|
229
229
|
yield { type: "block-end", blockType: h, runId: r };
|
|
230
230
|
}
|
|
231
|
-
yield { type: "completed", response:
|
|
231
|
+
yield { type: "completed", response: l, blocks: i, log: s, runId: r };
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
case "ux-suggestion": {
|
|
@@ -237,21 +237,21 @@ let u = class extends H {
|
|
|
237
237
|
break;
|
|
238
238
|
}
|
|
239
239
|
case "interrupt": {
|
|
240
|
-
const { kind: m, message:
|
|
240
|
+
const { kind: m, message: n, metadata: c, showOtherOption: l } = p.interrupt, a = Array.isArray(c) ? c.filter((f) => typeof f == "string") : [], h = (() => {
|
|
241
241
|
switch (m) {
|
|
242
242
|
case "booleanChoice":
|
|
243
|
-
return { type: "boolean-choice", message:
|
|
243
|
+
return { type: "boolean-choice", message: n, options: a };
|
|
244
244
|
case "singleSelection":
|
|
245
|
-
return { type: "single-select", message:
|
|
245
|
+
return { type: "single-select", message: n, options: a };
|
|
246
246
|
case "multipleSelection":
|
|
247
|
-
return { type: "multi-select", message:
|
|
247
|
+
return { type: "multi-select", message: n, options: a };
|
|
248
248
|
case "textInput":
|
|
249
|
-
return { type: "text-input", message:
|
|
249
|
+
return { type: "text-input", message: n };
|
|
250
250
|
default:
|
|
251
|
-
return { type: m, message:
|
|
251
|
+
return { type: m, message: n, options: a };
|
|
252
252
|
}
|
|
253
253
|
})();
|
|
254
|
-
this._set("processingStep", "Waiting for user input..."), yield { type: "interrupt", payload:
|
|
254
|
+
this._set("processingStep", "Waiting for user input..."), yield { type: "interrupt", payload: { ...h, showOtherOption: l }, runId: r };
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
257
|
case "cancelled": {
|
|
@@ -286,37 +286,37 @@ let u = class extends H {
|
|
|
286
286
|
this.orchestrator?.cancel();
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
_([
|
|
290
|
+
y({ readOnly: !0 })
|
|
291
291
|
], u.prototype, "orchestrator", 2);
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
_([
|
|
293
|
+
y()
|
|
294
294
|
], u.prototype, "agents", 2);
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
_([
|
|
296
|
+
y()
|
|
297
297
|
], u.prototype, "portal", 2);
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
_([
|
|
299
|
+
y()
|
|
300
300
|
], u.prototype, "view", 2);
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
_([
|
|
302
|
+
y()
|
|
303
303
|
], u.prototype, "messages", 2);
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
_([
|
|
305
|
+
y()
|
|
306
306
|
], u.prototype, "streamingDisabled", 2);
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
_([
|
|
308
|
+
y()
|
|
309
309
|
], u.prototype, "runtimeEventsEnabled", 2);
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
_([
|
|
311
|
+
y({ readOnly: !0 })
|
|
312
312
|
], u.prototype, "loading", 2);
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
_([
|
|
314
|
+
y({ readOnly: !0 })
|
|
315
315
|
], u.prototype, "processing", 2);
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
_([
|
|
317
|
+
y({ readOnly: !0 })
|
|
318
318
|
], u.prototype, "processingStep", 2);
|
|
319
|
-
u =
|
|
319
|
+
u = _([
|
|
320
320
|
V("OrchestratorController")
|
|
321
321
|
], u);
|
|
322
322
|
const X = "Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.", Y = "Embeddings not found for this web map.", tt = "https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings";
|
|
@@ -414,7 +414,7 @@ class et extends B {
|
|
|
414
414
|
id: Date.now().toString(),
|
|
415
415
|
// TODO: Replace with a more robust ID generation method or get from orchestrator
|
|
416
416
|
role: "user",
|
|
417
|
-
content: e?.displayText?.trim() || s || i.map((
|
|
417
|
+
content: e?.displayText?.trim() || s || i.map((n) => this.#f(n)).join(" "),
|
|
418
418
|
parts: i
|
|
419
419
|
}), !this._orchestratorController))
|
|
420
420
|
return;
|
|
@@ -424,22 +424,22 @@ class et extends B {
|
|
|
424
424
|
...r ? { routing: "direct", agentId: r } : { routing: "auto", agentIds: this.allowedAgentIds },
|
|
425
425
|
locale: g
|
|
426
426
|
}, m = this._orchestratorController.ask(s, p, this.#e?.signal);
|
|
427
|
-
for await (const
|
|
428
|
-
const c =
|
|
429
|
-
switch (
|
|
427
|
+
for await (const n of m) {
|
|
428
|
+
const c = n.runId, l = this.messages.at(-1);
|
|
429
|
+
switch (n.type) {
|
|
430
430
|
case "runtime":
|
|
431
|
-
this.arcgisRuntime.emit(
|
|
431
|
+
this.arcgisRuntime.emit(n.event);
|
|
432
432
|
break;
|
|
433
433
|
case "block-start": {
|
|
434
434
|
this._isAnswering = !0;
|
|
435
|
-
const
|
|
436
|
-
if (
|
|
437
|
-
const h = [...
|
|
438
|
-
this.messages.splice(-1, 1, { ...
|
|
435
|
+
const a = { type: n.blockType, isPending: !0 };
|
|
436
|
+
if (l?.role === "assistant" && l.id === c) {
|
|
437
|
+
const h = [...l.blocks ?? [], a];
|
|
438
|
+
this.messages.splice(-1, 1, { ...l, blocks: h });
|
|
439
439
|
} else
|
|
440
440
|
this.messages.push({
|
|
441
441
|
role: "assistant",
|
|
442
|
-
blocks: [
|
|
442
|
+
blocks: [a],
|
|
443
443
|
id: c,
|
|
444
444
|
isStreaming: !0,
|
|
445
445
|
interrupts: this._interruptDetails
|
|
@@ -447,58 +447,58 @@ class et extends B {
|
|
|
447
447
|
break;
|
|
448
448
|
}
|
|
449
449
|
case "block-data": {
|
|
450
|
-
if (
|
|
450
|
+
if (l?.role !== "assistant" || l?.id !== c)
|
|
451
451
|
break;
|
|
452
|
-
const
|
|
453
|
-
if (h?.type !==
|
|
452
|
+
const a = [...l.blocks ?? []], h = a[a.length - 1], { blockType: f, data: v } = n;
|
|
453
|
+
if (h?.type !== f || !h.isPending)
|
|
454
454
|
break;
|
|
455
|
-
|
|
455
|
+
f === "text" ? a[a.length - 1] = {
|
|
456
456
|
...h,
|
|
457
457
|
data: {
|
|
458
458
|
...h.data,
|
|
459
459
|
parts: v?.parts
|
|
460
460
|
}
|
|
461
|
-
} :
|
|
461
|
+
} : a[a.length - 1] = { ...h, data: { ...h.data, ...v ?? {} } }, this.messages.splice(-1, 1, { ...l, blocks: a });
|
|
462
462
|
break;
|
|
463
463
|
}
|
|
464
464
|
case "block-end": {
|
|
465
|
-
if (
|
|
465
|
+
if (l?.role !== "assistant" || l?.id !== c)
|
|
466
466
|
break;
|
|
467
|
-
const
|
|
468
|
-
if (h?.type !==
|
|
467
|
+
const a = [...l.blocks ?? []], h = a[a.length - 1];
|
|
468
|
+
if (h?.type !== n.blockType || !h.isPending)
|
|
469
469
|
break;
|
|
470
|
-
const
|
|
471
|
-
|
|
470
|
+
const f = h;
|
|
471
|
+
a[a.length - 1] = { ...f, data: { ...f.data }, isPending: !1 }, this.messages.splice(-1, 1, { ...l, blocks: a });
|
|
472
472
|
break;
|
|
473
473
|
}
|
|
474
474
|
case "completed":
|
|
475
|
-
|
|
475
|
+
n.error ? (this.messages.push({
|
|
476
476
|
role: "assistant",
|
|
477
|
-
log:
|
|
478
|
-
error:
|
|
477
|
+
log: n.log,
|
|
478
|
+
error: n.error,
|
|
479
479
|
id: c,
|
|
480
480
|
interrupts: this._interruptDetails
|
|
481
|
-
}), this._interruptDetails = []) :
|
|
482
|
-
...
|
|
483
|
-
content:
|
|
484
|
-
blocks:
|
|
481
|
+
}), this._interruptDetails = []) : l?.role === "assistant" && l.id === c && this.messages.splice(-1, 1, {
|
|
482
|
+
...l,
|
|
483
|
+
content: n.response,
|
|
484
|
+
blocks: l.blocks?.map((a) => ({ ...a, data: { ...a.data }, isPending: !1 })) ?? [],
|
|
485
485
|
isStreaming: !1,
|
|
486
|
-
log:
|
|
486
|
+
log: n.log
|
|
487
487
|
}), this._isAnswering = !1, this.#e = null, this._canceling = !1;
|
|
488
488
|
break;
|
|
489
489
|
case "interrupt":
|
|
490
|
-
this._interrupt = { ...
|
|
490
|
+
this._interrupt = { ...n.payload, id: c }, this.arcgisInterrupt.emit(this._interrupt);
|
|
491
491
|
break;
|
|
492
492
|
case "cancelled":
|
|
493
|
-
|
|
494
|
-
...
|
|
495
|
-
blocks:
|
|
493
|
+
l?.role === "assistant" && l.id === c ? this.messages.splice(-1, 1, {
|
|
494
|
+
...l,
|
|
495
|
+
blocks: l.blocks?.filter((a) => a.type === "text" || !a.isPending) ?? [],
|
|
496
496
|
isStreaming: !1,
|
|
497
|
-
log:
|
|
497
|
+
log: n.log,
|
|
498
498
|
error: `(${this._messages.stoppedByUserLabel})`
|
|
499
499
|
}) : (this.messages.push({
|
|
500
500
|
role: "assistant",
|
|
501
|
-
log:
|
|
501
|
+
log: n.log,
|
|
502
502
|
error: `(${this._messages.stoppedByUserLabel})`,
|
|
503
503
|
id: c,
|
|
504
504
|
interrupts: this._interruptDetails
|
|
@@ -516,7 +516,7 @@ class et extends B {
|
|
|
516
516
|
loaded() {
|
|
517
517
|
this.manager.onLifecycle(() => {
|
|
518
518
|
this.#t.value?.addEventListener("arcgisPromptSelect", this.#d), this.#t.value?.addEventListener("arcgisSubmit", this.#l), this.#t.value?.addEventListener("arcgisCancel", this.#c), this.#t.value?.addEventListener("arcgisFeedback", this.#h);
|
|
519
|
-
const t =
|
|
519
|
+
const t = D(() => !!this._interrupt && !!this.#i.value, () => {
|
|
520
520
|
const s = this.#i.value;
|
|
521
521
|
s.removeEventListener("arcgisSubmit", this.#n), s.removeEventListener("arcgisCancel", this.#a), s.addEventListener("arcgisSubmit", this.#n, { once: !0 }), s.addEventListener("arcgisCancel", this.#a, { once: !0 });
|
|
522
522
|
}), e = this.messages.on("after-add", (s) => {
|
|
@@ -600,7 +600,7 @@ class et extends B {
|
|
|
600
600
|
return this._error ? d`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error === X ? d`<div slot=message>${Y}</div><calcite-link slot=link .href=${tt} target=_blank title=${this._messages.learnAboutWebMapEmbeddingsLabel ?? w}>${this._messages.readMoreLabel}</calcite-link>` : d`<div slot=message>${this._error}</div>`}</calcite-notice>` : null;
|
|
601
601
|
}
|
|
602
602
|
render() {
|
|
603
|
-
return d`<calcite-panel .loading=${!this._orchestratorController && !this._error || this._orchestratorController?.loading} .heading=${this.heading ?? this._messages.assistantLabel} .description=${this.description} ${k(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map((t) => t.role === "assistant" ? d`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#u} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((e, s) => d`<slot name=${I(t.id, s) ?? w} slot=${I(t.id, s) ?? w}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>` : d`<arcgis-assistant-user-message .message=${t} .user=${this._user} .userAvatarEnabled=${this.userAvatarEnabled}></arcgis-assistant-user-message>`)}</slot>${this._interrupt ? d`<div slot=message-loading><div class="interrupt-waiting-message">${this._messages.waitingForUserInputMessage}</div></div>` : d`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt ? d`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${k(this.#i)}></arcgis-assistant-interrupt></slot>` : this.suggestedPrompts?.length ? d`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>` : null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}${this._submissionError ? d`<div role=alert>${this._submissionError}</div>` : null}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse || this._isAnswering} .commandProvider=${this.commandProvider} .entityProviders=${this.entityProviders} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling || !this._isSignedIn || !!this._interrupt || !!this._error} ${k(this.#o)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse || this._isAnswering ? "circle-stop" : "send"} @click=${() => {
|
|
603
|
+
return d`<calcite-panel .loading=${!this._orchestratorController && !this._error || this._orchestratorController?.loading} .heading=${this.heading ?? this._messages.assistantLabel} .description=${this.description} ${k(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map((t) => t.role === "assistant" ? d`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#u} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((e, s) => d`<slot name=${I(t.id, s) ?? w} slot=${I(t.id, s) ?? w}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>` : d`<arcgis-assistant-user-message .message=${t} .user=${this._user} .userAvatarEnabled=${this.userAvatarEnabled}></arcgis-assistant-user-message>`)}</slot>${this._interrupt ? d`<div slot=message-loading><div class="interrupt-waiting-message">${this._messages.waitingForUserInputMessage}</div></div>` : d`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt ? d`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} .showOtherOption=${this._interrupt.showOtherOption ?? !1} ${k(this.#i)}></arcgis-assistant-interrupt></slot>` : this.suggestedPrompts?.length ? d`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>` : null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}${this._submissionError ? d`<div role=alert>${this._submissionError}</div>` : null}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse || this._isAnswering} .commandProvider=${this.commandProvider} .entityProviders=${this.entityProviders} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling || !this._isSignedIn || !!this._interrupt || !!this._error} ${k(this.#o)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse || this._isAnswering ? "circle-stop" : "send"} @click=${() => {
|
|
604
604
|
this.#o.value?.submitMessage();
|
|
605
605
|
}} round>${this.awaitingResponse || this._isAnswering ? this._messages.stopButtonLabel : this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`;
|
|
606
606
|
}
|
|
@@ -39,6 +39,8 @@ export interface Interrupt {
|
|
|
39
39
|
* If the type is `single-select`, the options could be ["Choice A", "Choice B", "Choice C"].
|
|
40
40
|
*/
|
|
41
41
|
options?: string[];
|
|
42
|
+
/** Shows the built-in Other option for single-select and multi-select prompts. Defaults to false. */
|
|
43
|
+
showOtherOption?: boolean;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
/** A chat message sent by the assistant. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as H } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as z } from "@arcgis/lumina";
|
|
4
4
|
import { b as B, i as U } from "../../chunks/utils3.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as b } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as S, html as g } from "lit";
|
|
4
4
|
import { LitElement as w, createEvent as f, safeClassMap as _ } from "@arcgis/lumina";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../chunks/createSkillAgent.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../chunks/createSkillAgent.js";
|
|
@@ -27,6 +27,12 @@ export abstract class ArcgisAssistantInterrupt extends LitElement {
|
|
|
27
27
|
}>;
|
|
28
28
|
accessor message: string | undefined;
|
|
29
29
|
accessor options: string[] | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Shows the built-in Other option for single-select and multi-select prompts. Defaults to false.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
accessor showOtherOption: boolean;
|
|
30
36
|
accessor type: "boolean-choice" | "multi-select" | "single-select" | "text-input";
|
|
31
37
|
readonly arcgisCancel: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
32
38
|
readonly arcgisSubmit: import("@arcgis/lumina").TargetedEvent<this, string[] | boolean | string>;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as n, html as
|
|
3
|
+
import { css as n, html as e } from "lit";
|
|
4
4
|
import { LitElement as h, createEvent as a, safeClassMap as u } from "@arcgis/lumina";
|
|
5
5
|
import { createRef as r, ref as c } from "lit/directives/ref.js";
|
|
6
|
-
import { u as
|
|
7
|
-
const
|
|
6
|
+
import { u as p } from "../../chunks/useT9n.js";
|
|
7
|
+
const d = n`: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)}.other-input calcite-input[disabled]{pointer-events:none}.last-option{--calcite-list-border-color: transparent}`;
|
|
8
8
|
class m extends h {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this.#
|
|
10
|
+
super(...arguments), this.#e = r(), this.#t = r(), this._messages = p({ blocking: !0 }), this._selectedOptions = [], this._otherValue = "", this._otherSelected = !1, this.showOtherOption = !1, this.arcgisCancel = a(), this.arcgisSubmit = a();
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.properties = { _selectedOptions: 16, _otherValue: 16, _otherSelected: 16, type: 1, message: 1, options: [1, { type: Array }] };
|
|
13
|
+
this.properties = { _selectedOptions: 16, _otherValue: 16, _otherSelected: 16, type: 1, message: 1, options: [1, { type: Array }], showOtherOption: 5 };
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
|
-
this.styles =
|
|
16
|
+
this.styles = d;
|
|
17
17
|
}
|
|
18
|
-
#t;
|
|
19
18
|
#e;
|
|
19
|
+
#t;
|
|
20
20
|
_isSubmitDisabled() {
|
|
21
|
-
return this._otherSelected ? !this._otherValue.trim() : !this._selectedOptions.length;
|
|
21
|
+
return this._otherSelected && this.showOtherOption ? !this._otherValue.trim() : !this._selectedOptions.length;
|
|
22
22
|
}
|
|
23
23
|
_getSubmitValue() {
|
|
24
|
-
|
|
24
|
+
const t = this._otherSelected && this.showOtherOption;
|
|
25
|
+
return typeof this._selectedOptions == "string" ? t ? this._otherValue.trim() : this._selectedOptions : this._selectedOptions.concat(t ? this._otherValue.trim() : []);
|
|
25
26
|
}
|
|
26
27
|
_getSkipValue() {
|
|
27
28
|
return this.type === "multi-select" ? [] : "";
|
|
@@ -29,39 +30,39 @@ class m extends h {
|
|
|
29
30
|
_selectOtherOption() {
|
|
30
31
|
this._otherSelected || (this._otherSelected = !0, this.type !== "multi-select" && (this._selectedOptions = ""), this._focusOtherInput());
|
|
31
32
|
}
|
|
32
|
-
_handleSingleSelectChange(
|
|
33
|
+
_handleSingleSelectChange(t) {
|
|
33
34
|
const i = this._otherSelected;
|
|
34
|
-
this._otherSelected =
|
|
35
|
+
this._otherSelected = t.target.selectedItems[0] === this.#t.value, this._selectedOptions = this._otherSelected ? "" : t.target.selectedItems[0]?.value, this._otherSelected && !i && this._focusOtherInput();
|
|
35
36
|
}
|
|
36
|
-
_handleMultiSelectChange(
|
|
37
|
-
const i = this._otherSelected, s = this.#
|
|
38
|
-
this._otherSelected = s ?
|
|
37
|
+
_handleMultiSelectChange(t) {
|
|
38
|
+
const i = this._otherSelected, s = this.#t.value;
|
|
39
|
+
this._otherSelected = s ? t.target.selectedItems.includes(s) : !1, this._selectedOptions = t.target.selectedItems.filter((l) => l !== s).map((l) => l.value), this._otherSelected && !i && this._focusOtherInput();
|
|
39
40
|
}
|
|
40
41
|
async _focusOtherInput() {
|
|
41
|
-
await this.updateComplete, await this.#
|
|
42
|
+
await this.updateComplete, await this.#e.value?.setFocus();
|
|
42
43
|
}
|
|
43
44
|
_renderOptions() {
|
|
44
|
-
return this.options?.map((
|
|
45
|
+
return this.options?.map((t, i) => e`<calcite-list-item class=${u({ "last-option": i === this.options.length - 1 })} .label=${t} .value=${t}></calcite-list-item>`);
|
|
45
46
|
}
|
|
46
47
|
_renderOtherInput() {
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
}}><calcite-input .label=${this._messages.otherLabel} .placeholder=${this._messages.otherLabel} .disabled=${!this._otherSelected} @calciteInputInput=${(
|
|
48
|
+
return e`<div slot=content class="other-input" @click=${(t) => {
|
|
49
|
+
t.stopPropagation(), this._selectOtherOption();
|
|
50
|
+
}}><calcite-input .label=${this._messages.otherLabel} .placeholder=${this._messages.otherLabel} .disabled=${!this._otherSelected} @calciteInputInput=${(t) => this._otherValue = t.target.value} ${c(this.#e)}></calcite-input></div>`;
|
|
50
51
|
}
|
|
51
52
|
_renderInterruptOptions() {
|
|
52
53
|
switch (this.type) {
|
|
53
54
|
case "single-select":
|
|
54
|
-
return
|
|
55
|
+
return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this._handleSingleSelectChange(t)}>${this._renderOptions()}${this.showOtherOption ? e`<calcite-list-item .selected=${this._otherSelected} ${c(this.#t)}>${this._renderOtherInput()}</calcite-list-item>` : null}</calcite-list>`;
|
|
55
56
|
case "multi-select":
|
|
56
|
-
return
|
|
57
|
+
return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${(t) => this._handleMultiSelectChange(t)}>${this._renderOptions()}${this.showOtherOption ? e`<calcite-list-item .selected=${this._otherSelected} ${c(this.#t)}>${this._renderOtherInput()}</calcite-list-item>` : null}</calcite-list>`;
|
|
57
58
|
case "boolean-choice":
|
|
58
59
|
return null;
|
|
59
60
|
case "text-input":
|
|
60
|
-
return
|
|
61
|
+
return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${(t) => this._selectedOptions = t.target.value}></calcite-input>`;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
render() {
|
|
64
|
-
return
|
|
65
|
+
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.arcgisSubmit.emit(this._getSkipValue())}>${this._messages.skipButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid .disabled=${this._isSubmitDisabled()} @click=${() => this.arcgisSubmit.emit(this._getSubmitValue())}>${this._messages.submitButtonLabel}</calcite-button>`}</calcite-panel>`;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
o("arcgis-assistant-interrupt", m);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as r } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as a, html as i } from "lit";
|
|
4
4
|
import { LitElement as l } from "@arcgis/lumina";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as e } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
import "../../chunks/createSkillAgent.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../chunks/createSkillAgent.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as n } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as i, html as r } from "lit";
|
|
4
4
|
import { LitElement as o } from "@arcgis/lumina";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as s } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as i, html as e } from "lit";
|
|
4
4
|
import { LitElement as a, createEvent as c } from "@arcgis/lumina";
|