@arcgis/ai-components 5.2.0-next.3 → 5.2.0-next.30
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/FunctionAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.js +23 -22
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- package/dist/agent-utils/index.d.ts +177 -0
- package/dist/agent-utils/index.js +167 -0
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +25 -33
- package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
- package/dist/agent-utils/types.d.ts +36 -7
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
- package/dist/cdn/27NEUQN3.js +2 -0
- package/dist/cdn/2NMR43NW.js +2 -0
- package/dist/cdn/3AXQTBIA.js +134 -0
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/4I4MCV7V.js +71 -0
- package/dist/cdn/4RZPOYZ7.js +9 -0
- package/dist/cdn/5SBLS4NW.js +2 -0
- package/dist/cdn/{AMP6IALT.js → 5W7S2RS4.js} +1 -1
- package/dist/cdn/6LZ6GOHF.js +56 -0
- package/dist/cdn/7IFCBXV7.js +2 -0
- package/dist/cdn/ADYIXCSG.js +2 -0
- package/dist/cdn/AFLQZIKS.js +180 -0
- package/dist/cdn/AMVOJNWN.js +2 -0
- package/dist/cdn/C7E7MJSR.js +2 -0
- package/dist/cdn/CAECQD75.js +2 -0
- package/dist/cdn/CIW3QMKV.js +2 -0
- package/dist/cdn/CJIV4KJZ.js +179 -0
- package/dist/cdn/CVHJMR5X.js +2 -0
- package/dist/cdn/DEAYZ3MK.js +2 -0
- package/dist/cdn/{H7422XUG.js → E2HENO3T.js} +1 -1
- package/dist/cdn/E7TMP4YV.js +3 -0
- package/dist/cdn/EBRNMPPO.js +48 -0
- package/dist/cdn/FWU6DFIB.js +2 -0
- package/dist/cdn/HBYZSLEZ.js +22 -0
- package/dist/cdn/HOCTVCHH.js +2 -0
- package/dist/cdn/{4HU7735A.js → HXOSLGWU.js} +6 -4
- package/dist/cdn/I64KIZG3.js +2 -0
- package/dist/cdn/IB4WTK74.js +2 -0
- package/dist/cdn/IC5P5NYY.js +2 -0
- package/dist/cdn/IGZWQJW7.js +3 -0
- package/dist/cdn/IKEF7ZHH.js +181 -0
- package/dist/cdn/IXAKT6L3.js +2 -0
- package/dist/cdn/JEIMRNYM.js +2 -0
- package/dist/cdn/JN744CAW.js +2 -0
- package/dist/cdn/KRE4U7V7.js +2 -0
- package/dist/cdn/{NE7E52YR.js → KTK4HNL2.js} +8 -2
- package/dist/cdn/L77BTGXY.js +2 -0
- package/dist/cdn/LEPJUN3X.js +22 -0
- package/dist/cdn/LODKJRS4.js +2 -0
- package/dist/cdn/M3SWPT3M.js +2 -0
- package/dist/cdn/MAV3DW27.js +4 -0
- package/dist/cdn/NOJYPREL.js +3 -0
- package/dist/cdn/NXKKG5TK.js +2 -0
- package/dist/cdn/O3F47IO5.js +2 -0
- package/dist/cdn/O7TGCM5P.js +6 -0
- package/dist/cdn/PBTINZTK.js +65 -0
- package/dist/cdn/PKHQW7QU.js +18 -0
- package/dist/cdn/PSWI3MFB.js +2 -0
- package/dist/cdn/Q73PK7Q7.js +2 -0
- package/dist/cdn/Q7TL5Q5N.js +2 -0
- package/dist/cdn/QSA4T3BU.js +2 -0
- package/dist/cdn/RMLXVQZ5.js +2 -0
- package/dist/cdn/RX45PCYB.js +9 -0
- package/dist/cdn/S27EJSLC.js +14 -0
- package/dist/cdn/SMADRJ67.js +2 -0
- package/dist/cdn/{ZLXN7NMF.js → T537PKP4.js} +9 -7
- package/dist/cdn/{X2ZDYHCG.js → TNMXWUXU.js} +9 -4
- package/dist/cdn/TSEQVE2H.js +36 -0
- package/dist/cdn/VKU4WAQV.js +2 -0
- package/dist/cdn/W2IHPJ54.js +34 -0
- package/dist/cdn/W2JAKE2M.js +2 -0
- package/dist/cdn/WAVKMZA6.js +2 -0
- package/dist/cdn/WDE3HN7K.js +2 -0
- package/dist/cdn/WH6QQK6N.js +2 -0
- package/dist/cdn/WNS5ZUF5.js +2 -0
- package/dist/cdn/{FL4W4VYN.js → X7GE26KU.js} +16 -0
- package/dist/cdn/XVQJBUMY.js +2 -0
- package/dist/cdn/YJ3QQXF6.js +2 -0
- package/dist/cdn/YRBANNQ5.js +2 -0
- package/dist/cdn/YYY7HKYX.js +2 -0
- package/dist/cdn/ZEYIBYSF.js +66 -0
- package/dist/cdn/ZMSJQB65.js +99 -0
- package/dist/cdn/ZOSUDIJH.js +2 -0
- package/dist/cdn/ZPLFFLPF.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/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/adapter.js +1794 -1597
- package/dist/chunks/arcgisKnowledgeGraph.js +126 -71
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
- package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +139 -113
- package/dist/chunks/data_explore_query_prompt.js +9 -4
- package/dist/chunks/generateLayerDescriptions.js +231 -191
- package/dist/chunks/helpGraph.js +17 -13
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +16 -0
- package/dist/chunks/layerStylingGraph.js +24 -20
- package/dist/chunks/navigationGraph.js +33 -28
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/orchestrator.js +267 -226
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +9 -7
- package/dist/chunks/toolCallResponse.js +12 -9
- package/dist/chunks/utils2.js +8 -8
- package/dist/components/arcgis-assistant/customElement.d.ts +27 -0
- package/dist/components/arcgis-assistant/customElement.js +385 -152
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +14 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
- 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 +11 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +8 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -8
- 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 +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +17 -11
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +10 -4
- package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
- package/dist/components/arcgis-assistant-message/customElement.js +28 -26
- package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
- package/dist/components/arcgis-assistant-message-block/index.js +1 -0
- package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +5 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +11 -5
- 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 +4 -0
- package/dist/loader.js +7 -6
- package/dist/types/lumina.d.ts +11 -5
- package/dist/types/preact.d.ts +12 -5
- package/dist/types/react.d.ts +13 -5
- package/dist/types/stencil.d.ts +11 -5
- package/dist/utils/index.d.ts +85 -42
- package/dist/utils/index.js +54 -49
- package/package.json +8 -7
- package/dist/cdn/2AXF774U.js +0 -2
- package/dist/cdn/3PKJWIC3.js +0 -2
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/7BCR6TUO.js +0 -2
- package/dist/cdn/7GH7VSB2.js +0 -2
- package/dist/cdn/7PLV4QH6.js +0 -2
- package/dist/cdn/AO7BQHKC.js +0 -2
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/DDLZOMUY.js +0 -2
- package/dist/cdn/DHOVCT6R.js +0 -2
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FHVXO2WG.js +0 -166
- package/dist/cdn/FX5JFRDL.js +0 -2
- package/dist/cdn/GSEPHN3A.js +0 -106
- package/dist/cdn/HB5A5R2E.js +0 -2
- package/dist/cdn/JY6LLOUJ.js +0 -22
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/MDVYQQUG.js +0 -14
- package/dist/cdn/MH5RPXHM.js +0 -2
- package/dist/cdn/NAUXSHIE.js +0 -72
- package/dist/cdn/NVI3I46B.js +0 -2
- package/dist/cdn/OAVEHGB6.js +0 -2
- package/dist/cdn/OH64RMOR.js +0 -4
- package/dist/cdn/ON2V5XI2.js +0 -3
- package/dist/cdn/P6OPJQMC.js +0 -3
- package/dist/cdn/QR54T33D.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/S6W6HV4T.js +0 -36
- package/dist/cdn/SXDLXCIM.js +0 -2
- package/dist/cdn/USMDJUFS.js +0 -2
- package/dist/cdn/V2P4AIGG.js +0 -2
- package/dist/cdn/V5YEZSRY.js +0 -16
- package/dist/cdn/Y333DGV6.js +0 -2
- package/dist/cdn/YY2SBO3V.js +0 -2
|
@@ -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";
|
|
@@ -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
|
/**
|
|
@@ -6,11 +6,15 @@ 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.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { createRef as
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as p, html as c } from "lit";
|
|
4
|
+
import { LitElement as f, createEvent as l, safeClassMap as g } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as u, ref as h } from "lit/directives/ref.js";
|
|
6
|
+
import { u as m } from "../../chunks/useT9n.js";
|
|
7
|
+
import y from "@arcgis/core/core/Collection.js";
|
|
8
|
+
import { classes as v } from "@arcgis/toolkit/dom";
|
|
9
|
+
const b = p`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.status-indicator{width:9px;height:9px;border-radius:100%;background-color:var(--calcite-color-status-success)}.status-indicator[data-status=working]{background-color:var(--calcite-color-status-warning)}.status-indicator[data-status=error]{background-color:var(--calcite-color-status-danger)}.status-text{text-transform:capitalize}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}`;
|
|
10
|
+
class w extends f {
|
|
10
11
|
constructor() {
|
|
11
|
-
super(...arguments), this.#s =
|
|
12
|
+
super(...arguments), this.#s = u(), this.#i = u(), this.#t = -1, this.#e = "", this.#a = (t) => {
|
|
12
13
|
t.stopPropagation();
|
|
13
14
|
const s = t.detail;
|
|
14
15
|
this._setDraftValue(s.value), s.focusInput && this.#s.value && this.#s.value.setFocus();
|
|
15
16
|
}, this.#r = (t) => {
|
|
16
17
|
const s = t.target.value ?? "";
|
|
17
18
|
this.inputValue = s, this.#e = s;
|
|
18
|
-
}, this._messages =
|
|
19
|
+
}, this._messages = m({ blocking: !0 }), this._inFocus = !1, this.keyboardShortcutsDisabled = !1, this.awaitingResponse = !1, this.inputValue = "", this.voiceInputEnabled = !1, this.messages = new y([]), this.disabled = !1, this.arcgisCancel = l(), this.arcgisSubmit = l();
|
|
19
20
|
}
|
|
20
21
|
static {
|
|
21
|
-
this.properties = { _userMessages: 16, keyboardShortcutsDisabled: 5, entryPlaceholder: 1, awaitingResponse: 5, inputValue: 1, status: 1, voiceInputEnabled: 5, messages: 0 };
|
|
22
|
+
this.properties = { _inFocus: 16, _userMessages: 16, keyboardShortcutsDisabled: 5, entryPlaceholder: 1, awaitingResponse: 5, inputValue: 1, status: 1, voiceInputEnabled: 5, messages: 0, disabled: 5 };
|
|
22
23
|
}
|
|
23
24
|
static {
|
|
24
|
-
this.styles =
|
|
25
|
+
this.styles = b;
|
|
25
26
|
}
|
|
26
27
|
#s;
|
|
27
28
|
#i;
|
|
@@ -54,8 +55,8 @@ class v extends g {
|
|
|
54
55
|
const e = this._userMessages;
|
|
55
56
|
if (e.length === 0)
|
|
56
57
|
return;
|
|
57
|
-
const r = a.value ?? "",
|
|
58
|
-
if (!(i == null ||
|
|
58
|
+
const r = a.value ?? "", o = a.shadowRoot?.querySelector("textarea"), i = o?.selectionStart, n = o?.selectionEnd;
|
|
59
|
+
if (!(i == null || n == null) && !(i !== n || t === "up" && i !== 0 || t === "down" && i !== r.length)) {
|
|
59
60
|
if (t === "up") {
|
|
60
61
|
this.#t === -1 ? (this.#e = r, this.#t = e.length - 1) : this.#t = Math.max(0, this.#t - 1), this.inputValue = e[this.#t] ?? "", s.preventDefault();
|
|
61
62
|
return;
|
|
@@ -66,13 +67,19 @@ class v extends g {
|
|
|
66
67
|
_setDraftValue(t) {
|
|
67
68
|
this.inputValue = t, this.#t = -1, this.#e = t;
|
|
68
69
|
}
|
|
70
|
+
_onFocusIn() {
|
|
71
|
+
this._inFocus = !0;
|
|
72
|
+
}
|
|
73
|
+
_onFocusOut() {
|
|
74
|
+
this._inFocus = !1;
|
|
75
|
+
}
|
|
69
76
|
render() {
|
|
70
|
-
return
|
|
77
|
+
return c`<div class="input-container"><calcite-text-area class=${g(v({ focused: this._inFocus }))} .value=${this.inputValue} .placeholder=${this.entryPlaceholder ?? this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#r} .disabled=${this.disabled} @keydown=${async (t) => {
|
|
71
78
|
t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || this.keyboardShortcutsDisabled || (t.key === "Enter" ? (t.preventDefault(), await this.submitMessage()) : t.key === "ArrowUp" ? await this._navigateHistory("up", t) : t.key === "ArrowDown" && await this._navigateHistory("down", t));
|
|
72
|
-
}} ${h(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled ?
|
|
79
|
+
}} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${h(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled ? c`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${h(this.#i)}></arcgis-assistant-speech-input>` : null}<slot name=entry-actions-end></slot></div></calcite-text-area></div>`;
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
|
-
|
|
82
|
+
d("arcgis-assistant-chat-entry", w);
|
|
76
83
|
export {
|
|
77
|
-
|
|
84
|
+
w as ArcgisAssistantChatEntry
|
|
78
85
|
};
|
|
@@ -5,10 +5,12 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
8
9
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
10
|
import "@langchain/core/messages";
|
|
10
11
|
import "@langchain/core/callbacks/dispatch/web";
|
|
11
12
|
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
12
14
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
15
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
16
|
import "@arcgis/core/request.js";
|
|
@@ -18,8 +20,8 @@ import "zod";
|
|
|
18
20
|
import { D as r } from "../../chunks/dataExplorationGraph.js";
|
|
19
21
|
import "@arcgis/core/views/LinkChartView.js";
|
|
20
22
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
21
|
-
import { r as a, a as
|
|
22
|
-
class
|
|
23
|
+
import { r as a, a as s } from "../../chunks/utils2.js";
|
|
24
|
+
class e extends i {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments), this.agent = r;
|
|
25
27
|
}
|
|
@@ -27,16 +29,20 @@ class s extends i {
|
|
|
27
29
|
this.properties = { referenceElement: 1 };
|
|
28
30
|
}
|
|
29
31
|
#t;
|
|
32
|
+
#i;
|
|
30
33
|
getContext() {
|
|
31
34
|
if (!this.#t)
|
|
32
35
|
throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");
|
|
33
36
|
return { mapView: this.#t };
|
|
34
37
|
}
|
|
35
38
|
load() {
|
|
36
|
-
this.#t = a(this, "arcgis-assistant-data-exploration-agent"),
|
|
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();
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
|
-
t("arcgis-assistant-data-exploration-agent",
|
|
45
|
+
t("arcgis-assistant-data-exploration-agent", e);
|
|
40
46
|
export {
|
|
41
|
-
|
|
47
|
+
e as ArcgisAssistantDataExplorationAgent
|
|
42
48
|
};
|
|
@@ -5,10 +5,12 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
8
9
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
10
|
import "@langchain/core/messages";
|
|
10
11
|
import "@langchain/core/callbacks/dispatch/web";
|
|
11
12
|
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
12
14
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
15
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
16
|
import "@arcgis/core/request.js";
|
|
@@ -21,7 +23,7 @@ import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
|
21
23
|
import { H as r } from "../../chunks/helpGraph.js";
|
|
22
24
|
import "@arcgis/core/views/LinkChartView.js";
|
|
23
25
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
24
|
-
import { r as
|
|
26
|
+
import { r as s, a as e } from "../../chunks/utils2.js";
|
|
25
27
|
class o extends i {
|
|
26
28
|
constructor() {
|
|
27
29
|
super(...arguments), this.agent = r;
|
|
@@ -30,13 +32,17 @@ class o extends i {
|
|
|
30
32
|
this.properties = { referenceElement: 1 };
|
|
31
33
|
}
|
|
32
34
|
#t;
|
|
35
|
+
#i;
|
|
33
36
|
getContext() {
|
|
34
37
|
if (!this.#t)
|
|
35
38
|
throw new Error("arcgis-assistant-help-agent requires a mapView");
|
|
36
39
|
return { mapView: this.#t };
|
|
37
40
|
}
|
|
38
41
|
load() {
|
|
39
|
-
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();
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
t("arcgis-assistant-help-agent", o);
|
|
@@ -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: {
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
|
-
import { html as e } from "lit";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { u as
|
|
6
|
-
|
|
3
|
+
import { css as c, html as e } from "lit";
|
|
4
|
+
import { LitElement as l, createEvent as s } from "@arcgis/lumina";
|
|
5
|
+
import { u as r } from "../../chunks/useT9n.js";
|
|
6
|
+
const n = 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
|
+
class o extends l {
|
|
7
8
|
constructor() {
|
|
8
|
-
super(...arguments), this.#t = [], this._messages =
|
|
9
|
+
super(...arguments), this.#t = [], this._messages = r({ blocking: !0 }), this.arcgisCancel = s(), this.arcgisSubmit = s();
|
|
9
10
|
}
|
|
10
11
|
static {
|
|
11
12
|
this.properties = { type: 1, message: 1, options: 0 };
|
|
12
13
|
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = n;
|
|
16
|
+
}
|
|
13
17
|
#t;
|
|
14
18
|
_renderInterruptOptions() {
|
|
15
19
|
switch (this.type) {
|
|
@@ -24,10 +28,10 @@ class n extends c {
|
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
render() {
|
|
27
|
-
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>`;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
|
-
a("arcgis-assistant-interrupt",
|
|
34
|
+
a("arcgis-assistant-interrupt", o);
|
|
31
35
|
export {
|
|
32
|
-
|
|
36
|
+
o as ArcgisAssistantInterrupt
|
|
33
37
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/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
|
+
};
|
|
@@ -106,12 +106,12 @@ import type { ArcgisMap as ArcgisMap } from "@arcgis/map-components/components/a
|
|
|
106
106
|
*/
|
|
107
107
|
export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
* a
|
|
109
|
+
* Optional context for the knowledge agent. If the agent does not have a view or kg service url provided via reference element or serviceUrl property
|
|
110
|
+
* a knowledge graph can be provided directly via context to enable Knowledge Service related capabilties.
|
|
111
111
|
*
|
|
112
112
|
* Depending on the context provided, different capabilities will be available.
|
|
113
113
|
*/
|
|
114
|
-
accessor context:
|
|
114
|
+
accessor context: ArcgisKnowledgeAssistantContext | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* The reference element to the map that provides context for the navigation agent. Currently,
|
|
117
117
|
* this is only scoped to `arcgis-map` elements. This shows the navigation agent which map on which to
|
|
@@ -149,10 +149,10 @@ export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
|
149
149
|
* Context required by the Knowledge Link Chart agent.
|
|
150
150
|
* Supplied by the application via an agent `getContext()` provider.
|
|
151
151
|
*/
|
|
152
|
-
export type
|
|
153
|
-
knowledgeGraph: KnowledgeGraph;
|
|
154
|
-
view?: never;
|
|
155
|
-
} | {
|
|
152
|
+
export type ArcgisKnowledgeAssistantContext = {
|
|
156
153
|
view: LinkChartView | MapView;
|
|
157
154
|
knowledgeGraph?: never;
|
|
155
|
+
} | {
|
|
156
|
+
knowledgeGraph: KnowledgeGraph;
|
|
157
|
+
view?: never;
|
|
158
158
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { LitElement as
|
|
2
|
+
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
import "@langchain/langgraph/web";
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
8
9
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
10
|
import "@langchain/core/messages";
|
|
10
11
|
import "@langchain/core/callbacks/dispatch/web";
|
|
11
12
|
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
12
14
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
15
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
16
|
import "@arcgis/core/request.js";
|
|
@@ -18,24 +20,25 @@ import "zod";
|
|
|
18
20
|
import "@arcgis/core/intl.js";
|
|
19
21
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
22
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
|
-
import { A as
|
|
22
|
-
import { b as
|
|
23
|
+
import { A as s } from "../../chunks/arcgisKnowledgeGraph.js";
|
|
24
|
+
import { b as o, a as n } from "../../chunks/utils2.js";
|
|
23
25
|
import { fetchKnowledgeGraph as a } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
24
|
-
class c extends
|
|
26
|
+
class c extends r {
|
|
25
27
|
constructor() {
|
|
26
|
-
super(...arguments), this.agent =
|
|
28
|
+
super(...arguments), this.agent = s;
|
|
27
29
|
}
|
|
28
30
|
static {
|
|
29
31
|
this.properties = { referenceElement: 1, serviceUrl: 3, context: 0 };
|
|
30
32
|
}
|
|
31
33
|
#e;
|
|
32
|
-
#
|
|
34
|
+
#i;
|
|
33
35
|
#t;
|
|
36
|
+
#r;
|
|
34
37
|
get serviceUrl() {
|
|
35
|
-
return this.#
|
|
38
|
+
return this.#i;
|
|
36
39
|
}
|
|
37
40
|
set serviceUrl(t) {
|
|
38
|
-
this.#
|
|
41
|
+
this.#i = t;
|
|
39
42
|
}
|
|
40
43
|
async getContext() {
|
|
41
44
|
const t = this.context ? { ...this.context, knowledgeGraph: void 0, view: void 0 } : {};
|
|
@@ -59,10 +62,13 @@ class c extends i {
|
|
|
59
62
|
t.has("serviceUrl") && this.serviceUrl ? this.#t = a(this.serviceUrl) : this.#t = void 0;
|
|
60
63
|
}
|
|
61
64
|
load() {
|
|
62
|
-
this.#e =
|
|
65
|
+
this.#e = o(this) ?? void 0, this.#r = n(this);
|
|
66
|
+
}
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
this.#r?.unregister(this.agent.id), super.disconnectedCallback();
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
|
-
|
|
71
|
+
i("arcgis-assistant-knowledge-agent", c);
|
|
66
72
|
export {
|
|
67
73
|
c as ArcgisAssistantKnowledgeAgent
|
|
68
74
|
};
|
|
@@ -5,10 +5,12 @@ import "@langchain/langgraph/web";
|
|
|
5
5
|
import "../../chunks/adapter.js";
|
|
6
6
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
7
7
|
import "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import "@arcgis/toolkit/string";
|
|
8
9
|
import "../../chunks/generateLayerDescriptions.js";
|
|
9
10
|
import "@langchain/core/messages";
|
|
10
11
|
import "@langchain/core/callbacks/dispatch/web";
|
|
11
12
|
import "@langchain/openai";
|
|
13
|
+
import "@arcgis/core/config.js";
|
|
12
14
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
13
15
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
16
|
import "@arcgis/core/request.js";
|
|
@@ -22,7 +24,7 @@ import { L as r } from "../../chunks/layerStylingGraph.js";
|
|
|
22
24
|
import "@arcgis/core/views/LinkChartView.js";
|
|
23
25
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
24
26
|
import { r as s, a as e } from "../../chunks/utils2.js";
|
|
25
|
-
class
|
|
27
|
+
class a extends i {
|
|
26
28
|
constructor() {
|
|
27
29
|
super(...arguments), this.agent = r;
|
|
28
30
|
}
|
|
@@ -30,16 +32,20 @@ class o extends i {
|
|
|
30
32
|
this.properties = { referenceElement: 1 };
|
|
31
33
|
}
|
|
32
34
|
#t;
|
|
35
|
+
#i;
|
|
33
36
|
getContext() {
|
|
34
37
|
if (!this.#t)
|
|
35
38
|
throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");
|
|
36
39
|
return { mapView: this.#t };
|
|
37
40
|
}
|
|
38
41
|
load() {
|
|
39
|
-
this.#t = s(this, "arcgis-assistant-layer-styling-agent"), e(this);
|
|
42
|
+
this.#t = s(this, "arcgis-assistant-layer-styling-agent"), this.#i = e(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
|
-
t("arcgis-assistant-layer-styling-agent",
|
|
48
|
+
t("arcgis-assistant-layer-styling-agent", a);
|
|
43
49
|
export {
|
|
44
|
-
|
|
50
|
+
a as ArcgisAssistantLayerStylingAgent
|
|
45
51
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { AssistantMessage } from "../arcgis-assistant/types.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Renders a single assistant response message shell. Pass one assistant message object and let it host body and footer actions.
|
|
7
|
+
* Offers a reusable assistant-message layout with icon, content, and footer slot regions.
|
|
8
|
+
*/
|
|
9
|
+
export abstract class ArcgisAssistantMessage extends LitElement {
|
|
10
|
+
/** @default false */
|
|
11
|
+
accessor assistantAvatarEnabled: boolean;
|
|
12
|
+
/** @default false */
|
|
13
|
+
accessor copyEnabled: boolean;
|
|
14
|
+
/** @default false */
|
|
15
|
+
accessor feedbackEnabled: boolean;
|
|
16
|
+
/** @default false */
|
|
17
|
+
accessor footerDisabled: boolean;
|
|
18
|
+
/** @default false */
|
|
19
|
+
accessor logEnabled: boolean;
|
|
20
|
+
accessor message: AssistantMessage | undefined;
|
|
21
|
+
/** @default false */
|
|
22
|
+
accessor readAloudEnabled: boolean;
|
|
23
|
+
}
|