@esri/solutions-components 5.1.0-next.147 → 5.1.0-next.148

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.
@@ -10,14 +10,14 @@ import { T as De } from "../../chunks/interfaces.js";
10
10
  import { m as Fe } from "../../chunks/helpers.js";
11
11
  import te from "@arcgis/core/config.js";
12
12
  import { createRef as $e, ref as Me } from "lit-html/directives/ref.js";
13
- import { Annotation as b, StateGraph as O, START as z, END as x, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as j, sendTraceMessage as w, invokeStructuredPrompt as T, getEmbeddings as Be, cosineSimilarity as Ne, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
13
+ import { Annotation as b, StateGraph as O, START as z, END as v, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
+ import { createAgentRuntimeState as j, sendTraceMessage as w, invokeStructuredPrompt as T, getEmbeddings as Ne, cosineSimilarity as Be, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
15
  import r, { z as D } from "zod";
16
16
  import * as J from "@esri/arcgis-rest-portal";
17
17
  import { applyPatch as qe } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
19
  import { C as ie } from "../../chunks/converter.js";
20
- import { t as oe, g as B, c as ae, r as re, d as L } from "../../chunks/templates.js";
20
+ import { t as oe, g as N, c as ae, r as re, d as L } from "../../chunks/templates.js";
21
21
  import Ue from "@arcgis/core/portal/Portal.js";
22
22
  import Oe from "@arcgis/core/portal/PortalItem.js";
23
23
  const ze = Ee`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-space-2xl)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`;
@@ -34,7 +34,7 @@ ${Object.keys(t).join(`
34
34
  );
35
35
  return await s[1]();
36
36
  }
37
- function N(t) {
37
+ function B(t) {
38
38
  return t?.configurable?.context?.translations;
39
39
  }
40
40
  function le(t) {
@@ -79,18 +79,19 @@ function Ge(t, e) {
79
79
  const s = [];
80
80
  return (e?.configurable?.context?.configContext.allCards ?? []).forEach((i) => {
81
81
  const o = i.title;
82
- if (t.toLowerCase().includes(o.toLowerCase())) {
83
- const a = `<a href="" target="solutionId:${i.deployCommonId}">${o}</a>`, l = new RegExp(o, "gi");
84
- t = t.replace(l, a), s.push({
85
- solution: {
86
- title: i.title,
87
- id: i.deployCommonId,
88
- snippet: i.snippet,
89
- description: i.description
90
- },
91
- score: 100
92
- });
93
- }
82
+ if (!o)
83
+ return;
84
+ const a = new RegExp(`(?<![\\p{L}\\p{N}])${o}(?![\\p{L}\\p{N}])`, "giu");
85
+ let l = !1;
86
+ t = t.replace(a, () => (l = !0, `<a href="" target="solutionId:${i.deployCommonId}">${o}</a>`)), l && s.push({
87
+ solution: {
88
+ title: i.title,
89
+ id: i.deployCommonId,
90
+ snippet: i.snippet,
91
+ description: i.description
92
+ },
93
+ score: 100
94
+ });
94
95
  }), { source: t, allMatches: s };
95
96
  }
96
97
  function Ve(t) {
@@ -133,7 +134,7 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
133
134
  reducer: (t, e) => e ?? t,
134
135
  default: () => null
135
136
  })
136
- }), Ke = () => new O(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(z, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), ue = async (t, e, s, n) => {
137
+ }), Ke = () => new O(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(z, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", v), ue = async (t, e, s, n) => {
137
138
  if (!t) return;
138
139
  const i = de(t);
139
140
  if (!i) return;
@@ -149,7 +150,7 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
149
150
  } };
150
151
  n && (a.conversationId = n), U(a, i, e ?? "");
151
152
  }, Qe = async (t, e) => {
152
- const s = N(e), n = t.documentSkillUrl;
153
+ const s = B(e), n = t.documentSkillUrl;
153
154
  let i = [];
154
155
  await w(
155
156
  { text: s.agentProgress.explorerAgentSearching },
@@ -567,7 +568,7 @@ const ot = r.object({
567
568
  { error: a }
568
569
  ), i;
569
570
  }
570
- }, V = (t) => t in L, yt = 5, vt = 0.8, xt = 0.15, wt = "Web Mapping Application", St = "Embeddings";
571
+ }, V = (t) => t in L, yt = 5, xt = 0.8, vt = 0.15, wt = "Web Mapping Application", St = "Embeddings";
571
572
  let F = null, q = null, $ = null, M = null;
572
573
  const It = "Build", C = /* @__PURE__ */ Object.assign({
573
574
  "./prompts/assessBuildRequest.md": () => import("../../chunks/assessBuildRequest.js").then((t) => t.default),
@@ -577,7 +578,7 @@ const It = "Build", C = /* @__PURE__ */ Object.assign({
577
578
  "./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
578
579
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
579
580
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
580
- }), Ct = nt.builderMessages, h = (t, e, s) => N(e)?.builderMessages?.[t] ?? Ct[t], ge = (t) => {
581
+ }), Ct = nt.builderMessages, h = (t, e, s) => B(e)?.builderMessages?.[t] ?? Ct[t], ge = (t) => {
581
582
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
582
583
  detail: t
583
584
  }));
@@ -705,16 +706,16 @@ const kt = async (t, e, s) => {
705
706
  return `${e.replace(/\/+$/, "")}/sharing/rest`;
706
707
  }, At = async (t) => {
707
708
  await Promise.all([
708
- xe(t),
709
+ ve(t),
709
710
  H(t)
710
711
  ]);
711
- }, ve = async (t) => {
712
+ }, xe = async (t) => {
712
713
  const e = fe(t);
713
714
  (!$ || e && e !== M) && (M = e ?? M, $ = At(t).catch((n) => {
714
715
  throw $ = null, M = null, n;
715
716
  })), await $;
716
717
  };
717
- async function xe(t) {
718
+ async function ve(t) {
718
719
  if (F) return F;
719
720
  const e = be(t);
720
721
  if (!e)
@@ -792,7 +793,7 @@ Description: ${e.description}`).join(`
792
793
  const s = Rt(e), n = s?.templateId ?? null, i = {};
793
794
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
794
795
  }, $t = async (t, e) => {
795
- await w({ text: h("understandingRequest", e) }, e), await ve(e);
796
+ await w({ text: h("understandingRequest", e) }, e), await xe(e);
796
797
  const s = t.agentExecutionContext.userRequest, n = Lt(), i = t.agentExecutionContext.messages.slice(-11), o = await T({
797
798
  promptText: await y(C, "assessBuildRequest"),
798
799
  modelTier: "advanced",
@@ -805,7 +806,7 @@ Description: ${e.description}`).join(`
805
806
  ), l = {
806
807
  ...o,
807
808
  matchedTemplates: a
808
- }, [u, c] = a, f = !!u && u.confidence >= vt && (c === void 0 || u.confidence - c.confidence >= xt) ? u.templateId : null;
809
+ }, [u, c] = a, f = !!u && u.confidence >= xt && (c === void 0 || u.confidence - c.confidence >= vt) ? u.templateId : null;
809
810
  return {
810
811
  assessment: l,
811
812
  selectedTemplate: f,
@@ -819,7 +820,7 @@ Description: ${e.description}`).join(`
819
820
  summary: e,
820
821
  status: "success"
821
822
  };
822
- }, Bt = async (t, e) => {
823
+ }, Nt = async (t, e) => {
823
824
  const { currentDesign: s } = t;
824
825
  if (!s)
825
826
  return {
@@ -843,7 +844,7 @@ Description: ${e.description}`).join(`
843
844
  }
844
845
  })
845
846
  };
846
- }, Nt = (t, e) => {
847
+ }, Bt = (t, e) => {
847
848
  const s = t.updateAssessment?.assistantResponse ?? h("applyChangeFailed", e);
848
849
  return {
849
850
  outputMessage: s,
@@ -870,14 +871,14 @@ Description: ${e.description}`).join(`
870
871
  };
871
872
  }, qt = async (t, e) => {
872
873
  await w({ text: h("searchingExistingSolutions", e) }, e);
873
- const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await xe(e);
874
+ const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await ve(e);
874
875
  if (!i)
875
876
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
876
877
  if (!i.length)
877
878
  return { existingMatches: [] };
878
- const [o] = await Be([n]), a = i.map((d) => ({
879
+ const [o] = await Ne([n]), a = i.map((d) => ({
879
880
  solution: d,
880
- score: Ne(o, d.embedding)
881
+ score: Be(o, d.embedding)
881
882
  }));
882
883
  a.sort((d, g) => g.score - d.score);
883
884
  const l = a.slice(0, yt);
@@ -922,11 +923,11 @@ Description: ${d.description}`).join(`
922
923
  status: "success"
923
924
  };
924
925
  }, we = async (t, e) => {
925
- await ve(e);
926
+ await xe(e);
926
927
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
927
928
  await w({ text: h("creatingDesign", e) }, e);
928
- let i = B(t.selectedTemplate);
929
- if (i?.initialTemplate || (await H(e), i = B(t.selectedTemplate)), !i?.initialTemplate)
929
+ let i = N(t.selectedTemplate);
930
+ if (i?.initialTemplate || (await H(e), i = N(t.selectedTemplate)), !i?.initialTemplate)
930
931
  throw new Error("No hydrated templates are available for solution design.");
931
932
  const o = _(
932
933
  s ?? i.initialTemplate,
@@ -1005,10 +1006,10 @@ Description: ${d.description}`).join(`
1005
1006
  });
1006
1007
  } catch (p) {
1007
1008
  console.warn("[SolutionBuilder] updateDesign structured prompt failed:", p);
1008
- const v = h("applyChangeFailed", e);
1009
+ const x = h("applyChangeFailed", e);
1009
1010
  return {
1010
- outputMessage: v,
1011
- summary: v,
1011
+ outputMessage: x,
1012
+ summary: x,
1012
1013
  status: "success"
1013
1014
  };
1014
1015
  }
@@ -1023,7 +1024,7 @@ Description: ${d.description}`).join(`
1023
1024
  try {
1024
1025
  return JSON.parse(p);
1025
1026
  } catch {
1026
- const v = p.replace(/[\u0000-\u001F]/g, (Y) => {
1027
+ const x = p.replace(/[\u0000-\u001F]/g, (Y) => {
1027
1028
  switch (Y) {
1028
1029
  case "\b":
1029
1030
  return "\\b";
@@ -1041,7 +1042,7 @@ Description: ${d.description}`).join(`
1041
1042
  }
1042
1043
  });
1043
1044
  try {
1044
- return JSON.parse(v);
1045
+ return JSON.parse(x);
1045
1046
  } catch {
1046
1047
  return p;
1047
1048
  }
@@ -1051,7 +1052,7 @@ Description: ${d.description}`).join(`
1051
1052
  path: p.path.replace(/\/+$/, ""),
1052
1053
  ...p.value != null && p.value !== "" ? { value: u(p.value) } : {},
1053
1054
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
1054
- }))].sort((p, v) => p.op !== "remove" || v.op !== "remove" ? 0 : v.path.localeCompare(p.path, void 0, { numeric: !0 })), f = structuredClone(
1055
+ }))].sort((p, x) => p.op !== "remove" || x.op !== "remove" ? 0 : x.path.localeCompare(p.path, void 0, { numeric: !0 })), f = structuredClone(
1055
1056
  ae(s)
1056
1057
  );
1057
1058
  try {
@@ -1061,10 +1062,10 @@ Description: ${d.description}`).join(`
1061
1062
  "[SolutionBuilder] updateDesign JSON patch failed:",
1062
1063
  { error: p, llmResponse: o, patches: m, patchTarget: f }
1063
1064
  );
1064
- const v = h("applyChangeFailed", e);
1065
+ const x = h("applyChangeFailed", e);
1065
1066
  return {
1066
- outputMessage: v,
1067
- summary: v,
1067
+ outputMessage: x,
1068
+ summary: x,
1068
1069
  status: "success"
1069
1070
  };
1070
1071
  }
@@ -1096,8 +1097,8 @@ Description: ${d.description}`).join(`
1096
1097
  params: s.params ?? null
1097
1098
  }
1098
1099
  );
1099
- let R = B(t.selectedTemplate);
1100
- if (R?.initialTemplate || (await H(e), R = B(t.selectedTemplate)), !R?.initialTemplate)
1100
+ let R = N(t.selectedTemplate);
1101
+ if (R?.initialTemplate || (await H(e), R = N(t.selectedTemplate)), !R?.initialTemplate)
1101
1102
  throw new Error("No hydrated templates are available for solution design.");
1102
1103
  const P = new me(S, R.initialTemplate, !1);
1103
1104
  if (!P.isValid) {
@@ -1137,7 +1138,7 @@ Description: ${d.description}`).join(`
1137
1138
  status: "success",
1138
1139
  currentDesign: S
1139
1140
  };
1140
- }, jt = (t) => t.currentDesign !== null ? "assessUpdateRequest" : "assessBuildRequest", Jt = (t) => !t.updateAssessment || !t.updateAssessment.isValidUpdate ? "invalidUpdateExit" : "updateDesign", Gt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidBuildExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", Vt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ht = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Wt = () => new O(Dt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessBuildRequest", $t).addNode("assessUpdateRequest", Bt).addNode("invalidBuildExit", Mt).addNode("invalidUpdateExit", Nt).addNode("selectTemplateHIL", Pt).addNode("findExistingSolutions", qt).addNode("confirmContinueBuildingHIL", Ut).addNode("declineContinueBuildingExit", Ot).addNode("designSolution", we).addNode("updateDesign", zt).addEdge(z, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", jt, {
1141
+ }, jt = (t) => t.currentDesign !== null ? "assessUpdateRequest" : "assessBuildRequest", Jt = (t) => !t.updateAssessment || !t.updateAssessment.isValidUpdate ? "invalidUpdateExit" : "updateDesign", Gt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidBuildExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", Vt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ht = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Wt = () => new O(Dt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessBuildRequest", $t).addNode("assessUpdateRequest", Nt).addNode("invalidBuildExit", Mt).addNode("invalidUpdateExit", Bt).addNode("selectTemplateHIL", Pt).addNode("findExistingSolutions", qt).addNode("confirmContinueBuildingHIL", Ut).addNode("declineContinueBuildingExit", Ot).addNode("designSolution", we).addNode("updateDesign", zt).addEdge(z, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", jt, {
1141
1142
  assessUpdateRequest: "assessUpdateRequest",
1142
1143
  assessBuildRequest: "assessBuildRequest"
1143
1144
  }).addConditionalEdges("assessUpdateRequest", Jt, {
@@ -1147,13 +1148,13 @@ Description: ${d.description}`).join(`
1147
1148
  invalidBuildExit: "invalidBuildExit",
1148
1149
  selectTemplateHIL: "selectTemplateHIL",
1149
1150
  findExistingSolutions: "findExistingSolutions"
1150
- }).addEdge("invalidBuildExit", x).addEdge("invalidUpdateExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", Vt, {
1151
+ }).addEdge("invalidBuildExit", v).addEdge("invalidUpdateExit", v).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", Vt, {
1151
1152
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
1152
1153
  designSolution: "designSolution"
1153
1154
  }).addConditionalEdges("confirmContinueBuildingHIL", Ht, {
1154
1155
  declineContinueBuildingExit: "declineContinueBuildingExit",
1155
1156
  designSolution: "designSolution"
1156
- }).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
1157
+ }).addEdge("declineContinueBuildingExit", v).addEdge("designSolution", v).addEdge("updateDesign", v);
1157
1158
  await y(C, "description");
1158
1159
  const Kt = D.object({
1159
1160
  tool: D.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
@@ -1179,7 +1180,7 @@ const Kt = D.object({
1179
1180
  default: () => null
1180
1181
  })
1181
1182
  }), Qt = async (t, e) => {
1182
- const s = N(e);
1183
+ const s = B(e);
1183
1184
  await w(
1184
1185
  { text: s?.builderMessages.understandingRequest },
1185
1186
  e
@@ -1211,7 +1212,7 @@ const Kt = D.object({
1211
1212
  const n = await Wt().compile().invoke(t, e);
1212
1213
  return K("builder"), n;
1213
1214
  }, Zt = async (t, e) => {
1214
- const s = N(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.";
1215
+ const s = B(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.";
1215
1216
  await w(
1216
1217
  { text: s?.executingSolutionsAssistantAgent },
1217
1218
  e
@@ -1232,7 +1233,7 @@ const Kt = D.object({
1232
1233
  explorer: "routeToExplorer",
1233
1234
  builder: "routeToBuilder",
1234
1235
  other: "assistantResponse"
1235
- }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), ss = await y(W, "description"), ns = {
1236
+ }).addEdge("routeToExplorer", v).addEdge("routeToBuilder", v).addEdge("assistantResponse", v), ss = await y(W, "description"), ns = {
1236
1237
  id: "solutionsAssistant",
1237
1238
  name: "Solutions Assistant Agent",
1238
1239
  description: ss,
@@ -1364,11 +1365,7 @@ class as extends ke {
1364
1365
  }} slot=header-actions-end .text=${this._translations.tooltips.close}></calcite-action><calcite-tooltip placement=bottom reference-element=closeAssistantButton><span>${this._translations.tooltips.close}</span></calcite-tooltip></calcite-panel>`;
1365
1366
  }
1366
1367
  _clearConversation() {
1367
- this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1), console.log("[arcgis-solutions-assistant] Conversation after clear:", {
1368
- conversationId: this._conversationId,
1369
- suggestedPrompts: this._suggestedPrompts,
1370
- hasInteracted: this._hasInteracted
1371
- });
1368
+ this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1);
1372
1369
  }
1373
1370
  _sendFeedback(e, s, n, i) {
1374
1371
  const o = `https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(n)}&field:question=${encodeURIComponent(s)}&field:answer=${encodeURIComponent(e)}&field:context=${encodeURIComponent(JSON.stringify({ agent: i }))}&field:version=${encodeURIComponent("v2")}`;