@arcgis/ai-components 5.1.0-next.98 → 5.1.0
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/README.md +2 -2
- package/dist/agent-utils/BaseAgent.d.ts +90 -0
- package/dist/agent-utils/BaseAgent.js +87 -0
- package/dist/agent-utils/FunctionAgent.d.ts +64 -0
- package/dist/agent-utils/FunctionAgent.js +98 -0
- package/dist/agent-utils/LLMAgent.d.ts +65 -0
- package/dist/agent-utils/LLMAgent.js +140 -0
- package/dist/agent-utils/WorkflowAgent.d.ts +44 -0
- package/dist/agent-utils/WorkflowAgent.js +70 -0
- package/dist/agent-utils/index.d.ts +177 -0
- package/dist/agent-utils/index.js +167 -0
- package/dist/agent-utils/middlewares/humanInTheLoop.d.ts +152 -0
- package/dist/agent-utils/middlewares/humanInTheLoop.js +94 -0
- package/dist/agent-utils/middlewares/middleware.d.ts +25 -0
- package/dist/agent-utils/middlewares/middleware.js +44 -0
- package/dist/agent-utils/middlewares/trace.d.ts +27 -0
- package/dist/agent-utils/middlewares/trace.js +42 -0
- package/dist/agent-utils/middlewares/types.d.ts +123 -0
- package/dist/agent-utils/middlewares/types.js +2 -0
- package/dist/agent-utils/tools/FunctionTool.d.ts +127 -0
- package/dist/agent-utils/tools/FunctionTool.js +80 -0
- package/dist/agent-utils/types.d.ts +181 -0
- package/dist/agent-utils/workflows/BaseWorkflow.d.ts +87 -0
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +72 -0
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +61 -0
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +58 -0
- package/dist/agent-utils/workflows/LoopWorkflow.js +56 -0
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +68 -0
- package/dist/agent-utils/workflows/ParallelWorkflow.js +129 -0
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +63 -0
- package/dist/agent-utils/workflows/RouterWorkflow.js +75 -0
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +56 -0
- package/dist/agent-utils/workflows/SequentialWorkflow.js +69 -0
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +74 -0
- package/dist/agent-utils/workflows/SwitchWorkflow.js +84 -0
- package/dist/assets/embeddings.worker-k9_Ou679.js +1 -0
- package/dist/cdn/23JKEYWV.js +2 -0
- package/dist/cdn/2XP5E435.js +2 -0
- package/dist/cdn/3H7F4V6U.js +2 -0
- package/dist/cdn/3J5RM5OR.js +36 -0
- package/dist/cdn/46U2PGRW.js +65 -0
- package/dist/cdn/4ASZF5I2.js +181 -0
- package/dist/cdn/4BA4OUWC.js +134 -0
- package/dist/cdn/4EALV6QJ.js +2 -0
- package/dist/cdn/4Z4AESFZ.js +2 -0
- package/dist/cdn/{5PT7ZFXF.js → 5RQUSM3T.js} +23 -5
- package/dist/cdn/6FEB6XYK.js +2 -0
- package/dist/cdn/7CCULIWM.js +2 -0
- package/dist/cdn/7Q2WROGA.js +2 -0
- package/dist/cdn/7WSTR3WA.js +2 -0
- package/dist/cdn/7ZN4HYX2.js +2 -0
- package/dist/cdn/A6C7XUI4.js +2 -0
- package/dist/cdn/{SFREIREB.js → AJKWCXDA.js} +8 -2
- package/dist/cdn/AXOPGQGZ.js +2 -0
- package/dist/cdn/BAGQCT2N.js +2 -0
- package/dist/cdn/BBB2NVY5.js +3 -0
- package/dist/cdn/BGZV7RUS.js +2 -0
- package/dist/cdn/BUTKUPXN.js +34 -0
- package/dist/cdn/CU2TRUZQ.js +99 -0
- package/dist/cdn/D5PZVUO7.js +2 -0
- package/dist/cdn/DB2C7FK7.js +2 -0
- package/dist/cdn/DHGNGMNJ.js +2 -0
- package/dist/cdn/DKNDDDWM.js +2 -0
- package/dist/cdn/DTRZOJOT.js +2 -0
- package/dist/cdn/ESRKMM6P.js +2 -0
- package/dist/cdn/FDBWYCAB.js +22 -0
- package/dist/cdn/FYNHAVHL.js +2 -0
- package/dist/cdn/H3EEFM4A.js +179 -0
- package/dist/cdn/HIGLOYFN.js +9 -0
- package/dist/cdn/JNDONBTW.js +2 -0
- package/dist/cdn/JOLKZ6S5.js +2 -0
- package/dist/cdn/JQ5VH32K.js +2 -0
- package/dist/cdn/K6BGVUQ7.js +2 -0
- package/dist/cdn/KGYSBUFO.js +9 -0
- package/dist/cdn/L6GVMINQ.js +2 -0
- package/dist/cdn/LTPDBXQ7.js +6 -0
- package/dist/cdn/LUY7QCZ3.js +2 -0
- package/dist/cdn/LXJWWOGK.js +66 -0
- package/dist/cdn/M7C6Y752.js +2 -0
- package/dist/cdn/{3QC3BRZP.js → MEQ67UQH.js} +1 -1
- package/dist/cdn/MJM2MHJW.js +44 -0
- package/dist/cdn/MNCG7Q7C.js +3 -0
- package/dist/cdn/MNHNUIMV.js +2 -0
- package/dist/cdn/N2SKXRLK.js +71 -0
- package/dist/cdn/OBDCCGVH.js +2 -0
- package/dist/cdn/OFH2TDZM.js +2 -0
- package/dist/cdn/OP6ENMCN.js +180 -0
- package/dist/cdn/P5M2HNJ7.js +2 -0
- package/dist/cdn/PFW7KXCP.js +48 -0
- package/dist/cdn/PIUDMACH.js +56 -0
- package/dist/cdn/PKH5BECA.js +2 -0
- package/dist/cdn/PTKZXFXB.js +31 -0
- package/dist/cdn/{O62HTIOD.js → Q33HJXYV.js} +1 -1
- package/dist/cdn/QH6TSBNI.js +2 -0
- package/dist/cdn/QZXQIJSW.js +2 -0
- package/dist/cdn/SHCVYGIH.js +4 -0
- package/dist/cdn/SUFXLHTD.js +2 -0
- package/dist/cdn/{VHOF6SUZ.js → TIXCHLEN.js} +17 -1
- package/dist/cdn/TOYQ22PR.js +2 -0
- package/dist/cdn/UDXMJNRF.js +3 -0
- package/dist/cdn/UE3CP46P.js +2 -0
- package/dist/cdn/VDAF255D.js +22 -0
- package/dist/cdn/VPZHLYPA.js +2 -0
- package/dist/cdn/{7EXACS27.js → VWMJ7HIK.js} +10 -7
- package/dist/cdn/W2CWLWUT.js +14 -0
- package/dist/cdn/W6HO4D6J.js +18 -0
- package/dist/cdn/WNJM5TET.js +2 -0
- package/dist/cdn/XKIAXVPE.js +2 -0
- package/dist/cdn/XMJF5F4M.js +2 -0
- package/dist/cdn/Y5GGIKKC.js +2 -0
- package/dist/cdn/YURWID37.js +2 -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.ar.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/BaseWorkflow.js +107 -0
- package/dist/chunks/adapter.js +3130 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +229 -0
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +25 -0
- package/dist/chunks/arcgis_knowledge_current_map_context.js +37 -0
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +101 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +137 -0
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +34 -0
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +324 -0
- package/dist/chunks/data_explore_filter_prompt.js +125 -0
- package/dist/chunks/data_explore_query_prompt.js +149 -0
- package/dist/chunks/embeddings.worker.js +25 -0
- package/dist/chunks/field_descriptions_prompt.js +112 -0
- package/dist/chunks/generateLayerDescriptions.js +453 -0
- package/dist/chunks/graph.js +86 -0
- package/dist/chunks/helpGraph.js +127 -0
- package/dist/chunks/help_prompt.js +74 -0
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +139 -0
- package/dist/chunks/layerStylingGraph.js +193 -0
- package/dist/chunks/layer_descriptions_prompt.js +59 -0
- package/dist/chunks/layer_styling_prompt.js +72 -0
- package/dist/chunks/navigationGraph.js +271 -0
- package/dist/chunks/navigation_intent_prompt.js +52 -0
- package/dist/chunks/navigation_tool_prompt.js +39 -0
- package/dist/chunks/orchestrator.js +569 -0
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/state.js +71 -0
- package/dist/chunks/summarize_query_response_prompt.js +80 -0
- package/dist/chunks/toolCallResponse.js +32 -0
- package/dist/chunks/utils.js +46 -28
- package/dist/chunks/utils2.js +41 -6
- package/dist/chunks/utils3.js +16 -0
- package/dist/components/arcgis-assistant/customElement.d.ts +82 -8
- package/dist/components/arcgis-assistant/customElement.js +393 -152
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +15 -2
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +6 -2
- package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -2
- package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +30 -8
- package/dist/components/arcgis-assistant-help-agent/customElement.js +33 -8
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +5 -5
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
- package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +158 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +74 -0
- package/dist/components/arcgis-assistant-knowledge-agent/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-knowledge-agent/index.js +1 -0
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +31 -6
- package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
- package/dist/components/arcgis-assistant-message/customElement.js +28 -26
- package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +2 -2
- package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
- package/dist/components/arcgis-assistant-message-block/index.js +1 -0
- package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +23 -27
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +5 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +31 -7
- package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/loader.js +8 -6
- package/dist/types/lumina.d.ts +16 -5
- package/dist/types/preact.d.ts +18 -5
- package/dist/types/react.d.ts +20 -5
- package/dist/types/stencil.d.ts +16 -5
- package/dist/utils/index.d.ts +246 -9
- package/dist/utils/index.js +113 -10
- package/package.json +28 -12
- package/dist/cdn/2YEKZADB.js +0 -2
- package/dist/cdn/457RLS3H.js +0 -2
- package/dist/cdn/4CPZZBYD.js +0 -2
- package/dist/cdn/54ATSQPS.js +0 -72
- package/dist/cdn/5JBT3YNY.js +0 -2
- package/dist/cdn/5JS65BCP.js +0 -29
- package/dist/cdn/7EHQLXMU.js +0 -2
- package/dist/cdn/AKOWC7YT.js +0 -18
- package/dist/cdn/ARCP5UZY.js +0 -2
- package/dist/cdn/B4DEC7PH.js +0 -2
- package/dist/cdn/D7WNBUVK.js +0 -106
- package/dist/cdn/DSEMD4M2.js +0 -4
- package/dist/cdn/ESTSYVJP.js +0 -54
- package/dist/cdn/EUNEQNYC.js +0 -2
- package/dist/cdn/G4SVCCJH.js +0 -2
- package/dist/cdn/I2KPFZDL.js +0 -2
- package/dist/cdn/KVH3PDVW.js +0 -2
- package/dist/cdn/LSGRWCAO.js +0 -5
- package/dist/cdn/LXFCO34K.js +0 -2
- package/dist/cdn/M73KKJSM.js +0 -2
- package/dist/cdn/PTGKT5P6.js +0 -3
- package/dist/cdn/Q5D5LJS5.js +0 -2
- package/dist/cdn/R5FWFRWW.js +0 -2
- package/dist/cdn/TRDKA5Y6.js +0 -2
- package/dist/cdn/UK6CP7BR.js +0 -2
- package/dist/cdn/WBRZZ4FB.js +0 -2
- package/dist/cdn/Y3AUHNRX.js +0 -2
- package/dist/cdn/YGW7TUNX.js +0 -2
- package/dist/cdn/YNJYG2RG.js +0 -2
- package/dist/cdn/YW52XJMM.js +0 -396
- package/dist/cdn/Z3DVGFEE.js +0 -2
- package/dist/cdn/Z4N6N4OZ.js +0 -271
- package/dist/cdn/ZLO73NU6.js +0 -2
- package/dist/cdn/ZPNJGIAF.js +0 -2
- /package/dist/cdn/{YVTKUITE.js → 53Z3R4OY.js} +0 -0
- /package/dist/cdn/{CFT5BBC6.js → 77GAVZIK.js} +0 -0
- /package/dist/cdn/{W5CHGOOR.js → G7XK3XOR.js} +0 -0
- /package/dist/cdn/{DMLSCJAM.js → HJGF7W5O.js} +0 -0
- /package/dist/cdn/{JDL3HFFX.js → MQ7QXIOW.js} +0 -0
- /package/dist/cdn/{MZJGADGH.js → NMWLJECU.js} +0 -0
- /package/dist/cdn/{24MYCR6F.js → URYKQKFE.js} +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import "../arcgis-assistant-interrupt/index.js";
|
|
2
1
|
import "@esri/calcite-components/components/calcite-notice";
|
|
3
2
|
import "@esri/calcite-components/components/calcite-link";
|
|
4
|
-
import "../arcgis-assistant-suggested-prompts/index.js";
|
|
5
3
|
import "@esri/calcite-components/components/calcite-panel";
|
|
6
4
|
import "../arcgis-assistant-chat/index.js";
|
|
7
5
|
import "../arcgis-assistant-message/index.js";
|
|
8
|
-
import "../arcgis-assistant-message-text/index.js";
|
|
9
6
|
import "../arcgis-assistant-message-block/index.js";
|
|
10
7
|
import "../arcgis-assistant-user-message/index.js";
|
|
11
8
|
import "../arcgis-assistant-message-loading/index.js";
|
|
9
|
+
import "../arcgis-assistant-interrupt/index.js";
|
|
10
|
+
import "../arcgis-assistant-suggested-prompts/index.js";
|
|
12
11
|
import "../arcgis-assistant-chat-entry/index.js";
|
|
13
12
|
import "@esri/calcite-components/components/calcite-button";
|
|
14
13
|
export * from "./customElement.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UXSuggestion } from "
|
|
1
|
+
import type { UXSuggestion } from "../../utils/index.js";
|
|
2
2
|
|
|
3
3
|
/** An interrupt is a UI mechanism used by an agent to prompt the user for additional input or clarification. */
|
|
4
4
|
export interface Interrupt {
|
|
@@ -51,7 +51,7 @@ export interface AssistantMessage extends ChatMessageBase {
|
|
|
51
51
|
* UI elements separate from the plain text transcript and can be used to display actions, follow-up prompts,
|
|
52
52
|
* or app-registered custom content.
|
|
53
53
|
*/
|
|
54
|
-
blocks?: UXSuggestion[];
|
|
54
|
+
blocks?: (UXSuggestion & { isPending?: boolean; })[];
|
|
55
55
|
/**
|
|
56
56
|
* Log messages related to the assistant's processing of the user's request. This can include information about
|
|
57
57
|
* the agents or tools it invoked, the parameters generated by the LLM, and any relevant details about how it
|
|
@@ -71,6 +71,19 @@ export interface AssistantMessage extends ChatMessageBase {
|
|
|
71
71
|
* performance over time.
|
|
72
72
|
*/
|
|
73
73
|
feedback?: Feedback;
|
|
74
|
+
/**
|
|
75
|
+
* Indicates whether the message content is still being streamed from the assistant. This can be used to show loading
|
|
76
|
+
* indicators or placeholders in the UI until the full content is received.
|
|
77
|
+
*/
|
|
78
|
+
isStreaming?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* An array of interrupts emitted by the assistant during the processing of the user's request. Each interrupt includes
|
|
81
|
+
* details about the type of interrupt, the message to display to the user, and any options for user input.
|
|
82
|
+
*/
|
|
83
|
+
interrupts?: {
|
|
84
|
+
interrupt: Interrupt;
|
|
85
|
+
response?: string[] | boolean | string;
|
|
86
|
+
}[];
|
|
74
87
|
}
|
|
75
88
|
|
|
76
89
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { AgentRegistration } from "@arcgis/ai-orchestrator";
|
|
3
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { AgentRegistration } from "../../utils/index.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The Assistant Agent component is a generic wrapper for registering custom agents to the [arcgis-assistant](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/) component. To define
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as s } from "@arcgis/lumina";
|
|
4
|
-
import { i as e, a as i } from "../../chunks/
|
|
4
|
+
import { i as e, a as i } from "../../chunks/utils2.js";
|
|
5
5
|
class n extends s {
|
|
6
6
|
static {
|
|
7
7
|
this.properties = { agent: 0, context: 0 };
|
|
8
8
|
}
|
|
9
|
+
#t;
|
|
9
10
|
async getContext() {
|
|
10
11
|
return e(this.context) ? await this.context() : this.context;
|
|
11
12
|
}
|
|
12
13
|
load() {
|
|
13
|
-
i(this);
|
|
14
|
+
this.#t = i(this);
|
|
15
|
+
}
|
|
16
|
+
disconnectedCallback() {
|
|
17
|
+
this.#t?.unregister(this.agent.id), super.disconnectedCallback();
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
t("arcgis-assistant-agent", n);
|
|
@@ -1,10 +1,16 @@
|
|
|
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
|
+
* Wraps and renders the conversation area. Use it as the container for message list content.
|
|
8
|
+
* Offers chat-level layout structure for message starter, message list, and loading regions.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
7
12
|
export abstract class ArcgisAssistantChat extends LitElement {
|
|
13
|
+
accessor interrupt: Interrupt | null;
|
|
8
14
|
/** @default false */
|
|
9
15
|
accessor loading: boolean;
|
|
10
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
|
};
|
|
@@ -5,7 +5,8 @@ import type { ChatMessage } from "../arcgis-assistant/types.js";
|
|
|
5
5
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Provides the input bar and submit or cancel behavior. Use it to collect prompts and emit submit events.
|
|
9
|
+
* Offers keyboard submit/history behavior, entry action slots, and optional voice-input integration.
|
|
9
10
|
*
|
|
10
11
|
* @slot [entry-actions-start] - Slot for adding actions to the start of the entry area.
|
|
11
12
|
* @slot [entry-actions-end] - Slot for adding actions to the end of the entry area.
|
|
@@ -15,6 +16,8 @@ export abstract class ArcgisAssistantChatEntry extends LitElement {
|
|
|
15
16
|
protected _messages: { entryPlaceholder: string; } & T9nMeta<{ entryPlaceholder: string; }>;
|
|
16
17
|
/** @default false */
|
|
17
18
|
accessor awaitingResponse: boolean;
|
|
19
|
+
/** @default false */
|
|
20
|
+
accessor disabled: boolean;
|
|
18
21
|
accessor entryPlaceholder: string | undefined;
|
|
19
22
|
/** @default "" */
|
|
20
23
|
accessor inputValue: string;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/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
|
};
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import { LitElement as i } from "@arcgis/lumina";
|
|
4
|
+
import "@langchain/langgraph/web";
|
|
5
|
+
import "../../chunks/adapter.js";
|
|
6
|
+
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
|
+
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
9
|
+
import "../../chunks/generateLayerDescriptions.js";
|
|
10
|
+
import "@langchain/core/messages";
|
|
11
|
+
import "@langchain/core/callbacks/dispatch/web";
|
|
12
|
+
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
14
|
+
import "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
+
import "@arcgis/core/layers/FeatureLayer.js";
|
|
16
|
+
import "@arcgis/core/request.js";
|
|
17
|
+
import "@langchain/core/prompts";
|
|
18
|
+
import "@langchain/langgraph/prebuilt";
|
|
19
|
+
import "zod";
|
|
20
|
+
import { D as r } from "../../chunks/dataExplorationGraph.js";
|
|
21
|
+
import "@arcgis/core/views/LinkChartView.js";
|
|
22
|
+
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
23
|
+
import { r as a, a as s } from "../../chunks/utils2.js";
|
|
24
|
+
class e extends i {
|
|
7
25
|
constructor() {
|
|
8
|
-
super(...arguments), this.agent =
|
|
26
|
+
super(...arguments), this.agent = r;
|
|
9
27
|
}
|
|
10
28
|
static {
|
|
11
29
|
this.properties = { referenceElement: 1 };
|
|
12
30
|
}
|
|
13
31
|
#t;
|
|
32
|
+
#i;
|
|
14
33
|
getContext() {
|
|
15
34
|
if (!this.#t)
|
|
16
35
|
throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");
|
|
17
36
|
return { mapView: this.#t };
|
|
18
37
|
}
|
|
19
38
|
load() {
|
|
20
|
-
this.#t =
|
|
39
|
+
this.#t = a(this, "arcgis-assistant-data-exploration-agent"), this.#i = s(this);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
21
43
|
}
|
|
22
44
|
}
|
|
23
|
-
t("arcgis-assistant-data-exploration-agent",
|
|
45
|
+
t("arcgis-assistant-data-exploration-agent", e);
|
|
24
46
|
export {
|
|
25
|
-
|
|
47
|
+
e as ArcgisAssistantDataExplorationAgent
|
|
26
48
|
};
|
|
@@ -1,26 +1,51 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as t } from "../../chunks/runtime.js";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import { LitElement as i } from "@arcgis/lumina";
|
|
4
|
+
import "@langchain/langgraph/web";
|
|
5
|
+
import "../../chunks/adapter.js";
|
|
6
|
+
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
|
+
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
9
|
+
import "../../chunks/generateLayerDescriptions.js";
|
|
10
|
+
import "@langchain/core/messages";
|
|
11
|
+
import "@langchain/core/callbacks/dispatch/web";
|
|
12
|
+
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
14
|
+
import "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
+
import "@arcgis/core/layers/FeatureLayer.js";
|
|
16
|
+
import "@arcgis/core/request.js";
|
|
17
|
+
import "@langchain/core/prompts";
|
|
18
|
+
import "@langchain/langgraph/prebuilt";
|
|
19
|
+
import "zod";
|
|
20
|
+
import "@arcgis/core/intl.js";
|
|
21
|
+
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
22
|
+
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
23
|
+
import { H as r } from "../../chunks/helpGraph.js";
|
|
24
|
+
import "@arcgis/core/views/LinkChartView.js";
|
|
25
|
+
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
26
|
+
import { r as s, a as e } from "../../chunks/utils2.js";
|
|
27
|
+
class o extends i {
|
|
7
28
|
constructor() {
|
|
8
|
-
super(...arguments), this.agent =
|
|
29
|
+
super(...arguments), this.agent = r;
|
|
9
30
|
}
|
|
10
31
|
static {
|
|
11
32
|
this.properties = { referenceElement: 1 };
|
|
12
33
|
}
|
|
13
34
|
#t;
|
|
35
|
+
#i;
|
|
14
36
|
getContext() {
|
|
15
37
|
if (!this.#t)
|
|
16
38
|
throw new Error("arcgis-assistant-help-agent requires a mapView");
|
|
17
39
|
return { mapView: this.#t };
|
|
18
40
|
}
|
|
19
41
|
load() {
|
|
20
|
-
this.#t =
|
|
42
|
+
this.#t = s(this, "arcgis-assistant-help-agent"), this.#i = e(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
21
46
|
}
|
|
22
47
|
}
|
|
23
|
-
t("arcgis-assistant-help-agent",
|
|
48
|
+
t("arcgis-assistant-help-agent", o);
|
|
24
49
|
export {
|
|
25
|
-
|
|
50
|
+
o as ArcgisAssistantHelpAgent
|
|
26
51
|
};
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Renders interrupt prompts for extra user input. Use it when an agent pauses for confirmation, choice, or text input.
|
|
7
|
+
* Offers interrupt-specific input modes and submit or cancel event handling.
|
|
8
|
+
*/
|
|
6
9
|
export abstract class ArcgisAssistantInterrupt extends LitElement {
|
|
7
10
|
/** @internal */
|
|
8
11
|
protected _messages: {
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as c, html as e } from "lit";
|
|
4
4
|
import { LitElement as l, createEvent as s } from "@arcgis/lumina";
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
5
|
+
import { u as r } from "../../chunks/useT9n.js";
|
|
6
|
+
const n = c`:host{padding:var(--calcite-spacing-md);background:var(--calcite-panel-background-color, var(--calcite-color-background))}calcite-panel{border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));border:0 solid var(--calcite-color-brand);border-block-start-width:4px;box-shadow:var(--calcite-shadow-md);width:100%;--calcite-panel-border-color: none}.interrupt-content{padding:0 var(--calcite-spacing-md);background:var(--calcite-color-foreground-1)}`;
|
|
7
7
|
class o extends l {
|
|
8
8
|
constructor() {
|
|
9
|
-
super(...arguments), this.#t = [], this._messages =
|
|
9
|
+
super(...arguments), this.#t = [], this._messages = r({ blocking: !0 }), this.arcgisCancel = s(), this.arcgisSubmit = s();
|
|
10
10
|
}
|
|
11
11
|
static {
|
|
12
12
|
this.properties = { type: 1, message: 1, options: 0 };
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
|
-
this.styles =
|
|
15
|
+
this.styles = n;
|
|
16
16
|
}
|
|
17
17
|
#t;
|
|
18
18
|
_renderInterruptOptions() {
|
|
@@ -28,7 +28,7 @@ class o extends l {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}
|
|
31
|
+
return e`<calcite-panel .description=${this.message}><div class="interrupt-content">${this._renderInterruptOptions()}</div><calcite-button slot=footer-end appearance=outline @click=${() => this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${() => this.arcgisSubmit.emit(this.type === "boolean-choice" ? !0 : this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
a("arcgis-assistant-interrupt", o);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as l, html as t } from "lit";
|
|
4
|
+
import { LitElement as a } from "@arcgis/lumina";
|
|
5
|
+
const n = l`.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)}`;
|
|
6
|
+
class c extends a {
|
|
7
|
+
static {
|
|
8
|
+
this.properties = { interrupts: 0 };
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = n;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return this.interrupts?.length ? t`<calcite-block collapsible expanded heading="Assistant Questions"><div class="interrupts-container">${this.interrupts?.map(({ interrupt: s, response: i }) => t`<div class="interrupt-details"><div>Q: ${s.message}</div><ul>${Array.isArray(i) ? i.length ? i.map((e) => t`<li>${e}</li>`) : t`<li>(Question skipped)</li>` : t`<li>${i != null ? String(i) : "(Question skipped)"}</li>`}</ul></div>`)}</div></calcite-block>` : null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
r("arcgis-assistant-interrupt-preview", c);
|
|
18
|
+
export {
|
|
19
|
+
c as ArcgisAssistantInterruptPreview
|
|
20
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
3
|
+
import type LinkChartView from "@arcgis/core/views/LinkChartView.js";
|
|
4
|
+
import type KnowledgeGraph from "@arcgis/core/rest/knowledgeGraph/KnowledgeGraph.js";
|
|
5
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
|
+
import type { ArcgisLinkChart as ArcgisLinkChart } from "@arcgis/map-components/components/arcgis-link-chart";
|
|
7
|
+
import type { ArcgisMap as ArcgisMap } from "@arcgis/map-components/components/arcgis-map";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The Knowledge Agent enables the end user to explore knowledge graph data in a [link chart](https://developers.arcgis.com/javascript/latest/references/core/WebLinkChart/), a
|
|
11
|
+
* [knowledge graph service](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/), or a [knowledge graph layer](https://developers.arcgis.com/javascript/latest/references/core/layers/KnowledgeGraphLayer/) in a map via natural language queries. It also provides additional capabilities when used with a knowledge graph layer or link chart. See the list of capabilities below for more details.
|
|
12
|
+
*
|
|
13
|
+
* The knowledge agent is designed to answer questions about data in the knowledge graph provided by the knowledge graph layer on map,
|
|
14
|
+
* a link chart or a knowledge graph service url, and does not have access to external data sources or the user's location.
|
|
15
|
+
*
|
|
16
|
+
* It cannot create visualizations in the form of charts, layer renderers, new maps, or other visual outputs.
|
|
17
|
+
* When provided a link chart as context, it can create new link charts based on queries generated from user prompts.
|
|
18
|
+
*
|
|
19
|
+
* This agent can add to the knowledge graph data on a map or link chart if a user prompt generates a query that returns entities
|
|
20
|
+
* or relationships from the graph and asks for the returned results to be added to the view.
|
|
21
|
+
* It can also change the layout of a link chart or toggle visibility of non-spatial data on a link chart.
|
|
22
|
+
* However, it cannot change the symbology of
|
|
23
|
+
* features or create new layers or export results of a query to a file or external source.
|
|
24
|
+
*
|
|
25
|
+
* This is an unrendered component that must be added as a child of the `arcgis-assistant` component in either HTML or JavaScript.
|
|
26
|
+
*
|
|
27
|
+
* Link Chart context example:
|
|
28
|
+
* ```html
|
|
29
|
+
* <arcgis-link-chart id="my-link-chart"></arcgis-link-chart>
|
|
30
|
+
* <arcgis-assistant>
|
|
31
|
+
* <arcgis-assistant-knowledge-agent reference-element="my-link-chart"></arcgis-assistant-knowledge-agent>
|
|
32
|
+
* </arcgis-assistant>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Map context example:
|
|
36
|
+
* Note: the map must contain one knowledge graph layer.
|
|
37
|
+
* ```html
|
|
38
|
+
* <arcgis-map id="my-map"></arcgis-map>
|
|
39
|
+
* <arcgis-assistant>
|
|
40
|
+
* <arcgis-assistant-knowledge-agent reference-element="my-map"></arcgis-assistant-knowledge-agent>
|
|
41
|
+
* </arcgis-assistant>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Knowledge Graph Service context example:
|
|
45
|
+
* ```html
|
|
46
|
+
* <arcgis-assistant>
|
|
47
|
+
* <arcgis-assistant-knowledge-agent
|
|
48
|
+
* service-url="https://example.com/server/rest/services/Hosted/myKnowledgeGraph/KnowledgeGraphServer"
|
|
49
|
+
* >
|
|
50
|
+
* </arcgis-assistant-knowledge-agent>
|
|
51
|
+
* </arcgis-assistant>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* Once added to the assistant, the agent is loaded and ready to receive user messages directed to their knowledge graph related layers or data.
|
|
55
|
+
*
|
|
56
|
+
* ### Capabilities
|
|
57
|
+
*
|
|
58
|
+
* The knowledge agent provides the following capabilities related to a knowledge graph or associated knowledge graph layer or link chart layer:
|
|
59
|
+
*
|
|
60
|
+
* - **Query** - Ask about the entities and relationships in my graph. This includes questions about connections between entities and
|
|
61
|
+
* patterns in the graph, as well as questions about the structure of the graph such as the types of entities and relationships and the
|
|
62
|
+
* number of each type.
|
|
63
|
+
* Returns the results of the query in text form, and can optionally add returned
|
|
64
|
+
* entities or relationships to the map or link chart view if the user prompt requests it.
|
|
65
|
+
* - **Search** - Search for specific entities or relationships in the knowledge graph, or the closest matches based on their properties.
|
|
66
|
+
* Returns the results of the search in text form, and can optionally add returned entities or relationships to the map or link chart
|
|
67
|
+
* view if the user prompt requests it.
|
|
68
|
+
* - **Generate Cypher Query** - Generates and returns a cypher query based on a natural language question and the current knowledge
|
|
69
|
+
* graph data model,
|
|
70
|
+
* which can be run against the knowledge graph service.
|
|
71
|
+
*
|
|
72
|
+
* Additional capabilities with a map view with a knowledge graph layer or a link chart view
|
|
73
|
+
*
|
|
74
|
+
* - **Add entities and relationships** - Add entities or relationships the the knowledge graph or link chart layer based on results returned from searches or queries generated from user prompts.
|
|
75
|
+
*
|
|
76
|
+
* Additional capabilities with a link chart view only
|
|
77
|
+
*
|
|
78
|
+
* - **Change link chart layout** - Change the layout of the link chart between different modes such as force directed, radial, or hierarchical.
|
|
79
|
+
* - **Toggle non-spatial visibility** - Show or hide non-spatial entities and relationships on the link chart.
|
|
80
|
+
* - **Create link chart from query** - Recreate the link chart with new entities and relationships based on a query generated from the
|
|
81
|
+
* user prompt.
|
|
82
|
+
*
|
|
83
|
+
*
|
|
84
|
+
* ### Example questions
|
|
85
|
+
*
|
|
86
|
+
* The following are example questions a user can ask within the bounds of the knowledge agent:
|
|
87
|
+
*
|
|
88
|
+
* - "What entities are in this graph, and what is the count of each entity type?"
|
|
89
|
+
* - "Who are the top 5 entities most connected to Company X?"
|
|
90
|
+
* - "Find all employees with the last name Smith."
|
|
91
|
+
* - "What is the most influential company in this graph?"
|
|
92
|
+
* - "Generate a cypher query to find all employees of Company X that joined the company after 2022 who worked for a competitor before joining Company X."
|
|
93
|
+
* - "Add all connections between Company X and Company Y to the link chart"
|
|
94
|
+
* - "Change the layout to hierarchical"
|
|
95
|
+
* - "Hide non spatial data on the link chart"
|
|
96
|
+
* - "Create a new link chart with all employees from Company X that joined the company after 2015 and are located in California"
|
|
97
|
+
*
|
|
98
|
+
* > Due to the non-deterministic nature of generative AI, there may be inaccuracies or unexpected behavior when using the
|
|
99
|
+
* out-of-the-box agents.
|
|
100
|
+
*
|
|
101
|
+
* @since 5.1
|
|
102
|
+
* @beta
|
|
103
|
+
* @see [arcgis-assistant](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/)
|
|
104
|
+
* @see [Intro to building agentic mapping applications](https://developers.arcgis.com/javascript/latest/agentic-apps/ai-introduction/)
|
|
105
|
+
* @see [AI Assistant component sample](https://developers.arcgis.com/javascript/latest/sample-code/ai-assistant/)
|
|
106
|
+
*/
|
|
107
|
+
export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
108
|
+
/**
|
|
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
|
+
*
|
|
112
|
+
* Depending on the context provided, different capabilities will be available.
|
|
113
|
+
*/
|
|
114
|
+
accessor context: ArcgisKnowledgeAssistantContext | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* The reference element to the map that provides context for the navigation agent. Currently,
|
|
117
|
+
* this is only scoped to `arcgis-map` elements. This shows the navigation agent which map on which to
|
|
118
|
+
* perform navigation actions. This is required for the navigation agent to function properly.
|
|
119
|
+
*
|
|
120
|
+
* Setting this property is not necessary if you set the reference element on the parent
|
|
121
|
+
* `arcgis-assistant` component.
|
|
122
|
+
*
|
|
123
|
+
* @see [arcgis-assistant.referenceElement](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/#referenceElement)
|
|
124
|
+
* @example
|
|
125
|
+
* ```html
|
|
126
|
+
* <arcgis-link-chart id="my-link-chart"></arcgis-link-chart>
|
|
127
|
+
* <arcgis-assistant>
|
|
128
|
+
* <arcgis-assistant-knowledge-agent reference-element="my-link-chart"></arcgis-assistant-knowledge-agent>
|
|
129
|
+
* </arcgis-assistant>
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
accessor referenceElement: ArcgisLinkChart | ArcgisMap | string | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* The URL of a Knowledge Graph Service. This can be set to use the agent without a map or link chart view.
|
|
135
|
+
*
|
|
136
|
+
* If a map or link chart view reference element are provided, this property will be ignored.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```html
|
|
140
|
+
* <arcgis-assistant>
|
|
141
|
+
* <arcgis-assistant-knowledge-agent service-url="https://example.esri.com/server/rest/services/Hosted/KGS_Service_Name/KnowledgeGraphServer"></arcgis-assistant-knowledge-agent>
|
|
142
|
+
* </arcgis-assistant>
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
accessor serviceUrl: null | undefined | string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Context required by the Knowledge Link Chart agent.
|
|
150
|
+
* Supplied by the application via an agent `getContext()` provider.
|
|
151
|
+
*/
|
|
152
|
+
export type ArcgisKnowledgeAssistantContext = {
|
|
153
|
+
view: LinkChartView | MapView;
|
|
154
|
+
knowledgeGraph?: never;
|
|
155
|
+
} | {
|
|
156
|
+
knowledgeGraph: KnowledgeGraph;
|
|
157
|
+
view?: never;
|
|
158
|
+
};
|