site-operator 0.1.4 → 0.1.9

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/index.d.ts CHANGED
@@ -6,10 +6,14 @@ export declare class AgentChat extends LitElement {
6
6
  static styles: CSSResult;
7
7
  private _chatController;
8
8
  backendUrl: string;
9
+ conversationUrl: string;
9
10
  appName: string;
10
11
  agentAvatar: string;
11
12
  disclaimer: string;
12
13
  emptyText: string;
14
+ placeholder: string;
15
+ headerTitle: string;
16
+ hideHeader: boolean;
13
17
  interceptor: boolean;
14
18
  private _historyOpen;
15
19
  private _inspectorOpen;
@@ -735,9 +735,34 @@ var AgentIconButton = class extends i {
735
735
  }
736
736
  };
737
737
  __decorate([n()], AgentIconButton.prototype, "tooltip", void 0), AgentIconButton = __decorate([t("agent-icon-button")], AgentIconButton);
738
- const PlusIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`, ArrowUpIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`, CopyIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00006H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50006C5 4.67163 5.67157 4.00006 6.5 4.00006H13.5C14.3284 4.00006 15 4.67163 15 5.50006V12.5001C15 13.3285 14.3284 14.0001 13.5 14.0001H6.5C5.67157 14.0001 5 13.3285 5 12.5001V5.50006ZM6.5 5.00006H13.5C13.7761 5.00006 14 5.22392 14 5.50006V12.5001C14 12.7762 13.7761 13.0001 13.5 13.0001H6.5C6.22386 13.0001 6 12.7762 6 12.5001V5.50006C6 5.22392 6.22386 5.00006 6.5 5.00006Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`, ReloadIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.84998 7.49998C1.84998 4.6145 4.05979 2.21843 6.90545 1.91456V3.35016C4.97851 3.63937 3.49998 5.37979 3.49998 7.49998C3.49998 9.87062 5.27476 11.83 7.59505 12.0805C7.97776 12.1218 8.36856 12.1009 8.75239 12.0197C9.35912 11.8913 9.93282 11.6601 10.4552 11.3396C10.9575 11.0315 11.413 10.6548 11.8016 10.2195L10.9701 9.47743C10.6599 9.82496 10.2974 10.1246 9.89728 10.3701C9.6433 10.5259 9.37532 10.6559 9.09678 10.7578C9.09678 10.7578 9.09575 10.7582 9.09472 10.7586C9.01824 10.7876 8.94119 10.8142 8.8636 10.8384C8.42306 10.9757 7.96263 11.0252 7.49998 10.979C5.77663 10.8066 4.35928 9.43926 4.19539 7.71618L4.19539 7.71616C4.19065 7.66632 4.18663 7.61633 4.18335 7.56621C4.15928 7.19912 4.22558 6.83296 4.37349 6.49474L3.13488 5.7513C2.69344 6.36842 2.37893 7.07821 2.22687 7.8388C2.22271 7.8596 2.21862 7.88045 2.21461 7.90135C1.98632 9.09062 2.25732 10.3395 2.9497 11.3972L1.65039 12.5C0.73507 11.1017 0.366914 9.42169 0.672935 7.82827C0.725964 7.5522 0.813075 7.28383 0.93043 7.02568L1.84998 7.49998ZM13.849 5.89437C14.1554 6.36262 14.394 6.87979 14.5458 7.43004C14.5503 7.44641 14.5547 7.46281 14.5591 7.47924C14.8087 8.41443 14.7865 9.40028 14.5029 10.3232L12.9856 9.85698C13.1979 9.16629 13.208 8.43555 13.0211 7.74477L13.0211 7.74474C13.0205 7.74233 13.0198 7.73992 13.0192 7.73751C12.915 7.35952 12.7511 7.00424 12.5407 6.68267L13.849 5.89437ZM8.08544 13.0854L7.54452 7.49998H11.4999L8.08544 4.41452V13.0854Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;
739
- b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;
740
- const StopIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="3.75" y="3.75" width="7.5" height="7.5" fill="currentColor"></rect></svg>`, HistoryIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 7.5C1.5 4.18629 4.18629 1.5 7.5 1.5C10.8137 1.5 13.5 4.18629 13.5 7.5C13.5 10.8137 10.8137 13.5 7.5 13.5C4.18629 13.5 1.5 10.8137 1.5 7.5ZM2.5 7.5C2.5 4.73858 4.73858 2.5 7.5 2.5C10.2614 2.5 12.5 4.73858 12.5 7.5C12.5 10.2614 10.8137 12.5 7.5 12.5C4.73858 12.5 2.5 10.2614 2.5 7.5ZM8 4.5V7.25L9.94491 9.19491L9.2378 9.90202L7 7.66421V4.5H8Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path><path d="M0.5 7.5H2.5L1.5 5.5L0.5 7.5Z" fill="currentColor"/></svg>`, ToolIcon = b`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L10.5 3.79289L8.35355 1.64645C8.15829 1.45118 7.84171 1.45118 7.64645 1.64645L1.64645 7.64645C1.45118 7.84171 1.45118 8.15829 1.64645 8.35355L3.79289 10.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536L2.85355 13.5607C3.04882 13.7559 3.3654 13.7559 3.56066 13.5607L5.20711 11.9142L7.35355 14.0607C7.54882 14.2559 7.8654 14.2559 8.06066 14.0607L14.0607 8.06066C14.2559 7.8654 14.2559 7.54882 14.0607 7.35355L11.9142 5.20711L13.5607 3.56066C13.7559 3.3654 13.7559 3.04882 13.5607 2.85355L12.8536 2.14645ZM11.2071 5.91421L13.3536 8.06066L8.06066 13.3536L5.91421 11.2071L8.35355 8.76777C8.54882 8.57251 8.54882 8.25593 8.35355 8.06066C8.15829 7.8654 7.84171 7.8654 7.64645 8.06066L5.20711 10.5L3.35355 8.64645L8.64645 3.35355L10.5 5.20711L8.85355 6.85355C8.65829 7.04882 8.65829 7.3654 8.85355 7.56066C9.04882 7.75593 9.3654 7.75593 9.56066 7.56066L11.2071 5.91421Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;
738
+ const PlusIcon = b`
739
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus">
740
+ <path d="M5 12h14" />
741
+ <path d="M12 5v14" />
742
+ </svg>`, SendIcon = b`
743
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-send">
744
+ <path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" />
745
+ <path d="m21.854 2.147-10.94 10.939" />
746
+ </svg>`, CopyIcon = b`
747
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy">
748
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
749
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
750
+ </svg>`, ReloadIcon = b`
751
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-cw">
752
+ <path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" />
753
+ <path d="M21 3v5h-5" />
754
+ </svg>`, StopIcon = b`
755
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square">
756
+ <rect width="18" height="18" x="3" y="3" rx="2" />
757
+ </svg>`, HistoryIcon = b`
758
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history">
759
+ <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />
760
+ <path d="M3 3v5h5" />
761
+ <path d="M12 7v5l4 2" />
762
+ </svg>`, ToolIcon = b`
763
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wrench">
764
+ <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />
765
+ </svg>`;
741
766
  var ChatHeader = class extends i {
742
767
  constructor(...x) {
743
768
  super(...x), this.title = "Agent Chat";
@@ -1055,7 +1080,7 @@ const styles$3 = i$1`
1055
1080
  max-width: 48rem; /* max-w-screen-md */
1056
1081
  margin: 0 auto;
1057
1082
  display: flex;
1058
- align-items: flex-end;
1083
+ align-items: center;
1059
1084
  background-color: var(--agent-bg-zinc-100, #f4f4f5);
1060
1085
  border-radius: var(--agent-radius-3xl, 1.5rem);
1061
1086
  padding-left: 0.5rem;
@@ -1089,17 +1114,28 @@ const styles$3 = i$1`
1089
1114
  display: flex;
1090
1115
  align-items: center;
1091
1116
  justify-content: center;
1092
- width: 2rem;
1093
- height: 2rem;
1117
+ width: 2.25rem;
1118
+ height: 2.25rem;
1094
1119
  border-radius: var(--agent-radius-full, 9999px);
1095
- background-color: var(--agent-bg-black, #09090b);
1096
- color: var(--agent-text-white, #ffffff);
1097
- transition: opacity 0.2s;
1120
+ background-color: transparent;
1121
+ border: 1.5px solid transparent;
1122
+ color: var(--agent-text-foreground, #09090b);
1123
+ transition: all 0.2s ease-in-out;
1098
1124
  cursor: pointer;
1099
1125
  }
1126
+
1127
+ .action-button:hover:not(:disabled) {
1128
+ border-color: #22c55e;
1129
+ color: #22c55e;
1130
+ background-color: #22c55e10;
1131
+ }
1132
+
1133
+ .action-button:hover:not(:disabled) svg {
1134
+ fill: #22c55e20; /* Subtle fill for "relleno" feeling */
1135
+ }
1100
1136
 
1101
1137
  .action-button:disabled {
1102
- opacity: 0.1;
1138
+ opacity: 0.3;
1103
1139
  cursor: not-allowed;
1104
1140
  }
1105
1141
 
@@ -1118,7 +1154,7 @@ const styles$3 = i$1`
1118
1154
  `;
1119
1155
  var ChatComposer = class extends i {
1120
1156
  constructor(...x) {
1121
- super(...x), this.isRunning = !1, this.disclaimer = "", this._value = "";
1157
+ super(...x), this.isRunning = !1, this.disclaimer = "", this.placeholder = "", this._value = "";
1122
1158
  }
1123
1159
  static #e = this.styles = styles$3;
1124
1160
  _handleInput(x) {
@@ -1147,7 +1183,7 @@ var ChatComposer = class extends i {
1147
1183
  return b`
1148
1184
  <div class="composer-container">
1149
1185
  <textarea
1150
- placeholder="Enviar un mensaje a Agent"
1186
+ placeholder="${this.placeholder}"
1151
1187
  .value="${this._value}"
1152
1188
  @input="${this._handleInput}"
1153
1189
  @keydown="${this._handleKeyDown}"
@@ -1155,7 +1191,7 @@ var ChatComposer = class extends i {
1155
1191
  rows="1"
1156
1192
  ></textarea>
1157
1193
 
1158
- ${this.isRunning ? b`<button class="action-button" @click="${this._handleStop}">${StopIcon}</button>` : b`<button class="action-button" ?disabled="${!this._value.trim()}" @click="${this._handleSubmit}">${ArrowUpIcon}</button>`}
1194
+ ${this.isRunning ? b`<button class="action-button" @click="${this._handleStop}">${StopIcon}</button>` : b`<button class="action-button" ?disabled="${!this._value.trim()}" @click="${this._handleSubmit}">${SendIcon}</button>`}
1159
1195
  </div>
1160
1196
  <p class="disclaimer">
1161
1197
  ${this.disclaimer}
@@ -1163,7 +1199,7 @@ var ChatComposer = class extends i {
1163
1199
  `;
1164
1200
  }
1165
1201
  };
1166
- __decorate([n({ type: Boolean })], ChatComposer.prototype, "isRunning", void 0), __decorate([n({ type: String })], ChatComposer.prototype, "disclaimer", void 0), __decorate([r()], ChatComposer.prototype, "_value", void 0), __decorate([e("textarea")], ChatComposer.prototype, "_textarea", void 0), ChatComposer = __decorate([t("agent-chat-composer")], ChatComposer);
1202
+ __decorate([n({ type: Boolean })], ChatComposer.prototype, "isRunning", void 0), __decorate([n({ type: String })], ChatComposer.prototype, "disclaimer", void 0), __decorate([n({ type: String })], ChatComposer.prototype, "placeholder", void 0), __decorate([r()], ChatComposer.prototype, "_value", void 0), __decorate([e("textarea")], ChatComposer.prototype, "_textarea", void 0), ChatComposer = __decorate([t("agent-chat-composer")], ChatComposer);
1167
1203
  const styles$2 = i$1`
1168
1204
  :host {
1169
1205
  display: block;
@@ -1593,6 +1629,9 @@ const conversationService = new class {
1593
1629
  constructor() {
1594
1630
  this.baseUrl = "http://localhost:8003/api/v2/conversations";
1595
1631
  }
1632
+ initialize(x) {
1633
+ this.baseUrl = `${x}/api/v2/conversations`;
1634
+ }
1596
1635
  async getConversations() {
1597
1636
  let x = await fetch(`${this.baseUrl}`);
1598
1637
  if (!x.ok) throw Error(`Failed to fetch conversations: ${x.statusText}`);
@@ -1632,7 +1671,7 @@ const conversationService = new class {
1632
1671
  }, this._conversations = [], this._appContext = null, this.subscriber = new ChatSubscriber(this);
1633
1672
  }
1634
1673
  initialize(j) {
1635
- this.agent = new HttpAgent({ url: j.backendUrl }), this._appContext = {
1674
+ this.agent = new HttpAgent({ url: j.backendUrl }), j.conversationUrl && conversationService.initialize(j.conversationUrl), this._appContext = {
1636
1675
  appName: j.appName,
1637
1676
  currentPage: "home",
1638
1677
  inspector: j.inspector
@@ -1795,12 +1834,13 @@ var ChatController = class {
1795
1834
  const fetchInterceptorService = new FetchInterceptorService();
1796
1835
  var AgentChat = class extends i {
1797
1836
  constructor(...x) {
1798
- super(...x), this._chatController = new ChatController(this), this.backendUrl = "http://localhost:8001/ag_ui", this.appName = "Lit-Chat-App", this.agentAvatar = "", this.disclaimer = "Agent puede cometer errores. Verifica la información importante.", this.emptyText = "¿Cómo puedo ayudarte hoy?", this.interceptor = !1, this._historyOpen = !1, this._inspectorOpen = !1, this._inspectorEnabled = !1;
1837
+ super(...x), this._chatController = new ChatController(this), this.backendUrl = "http://localhost:8001/ag_ui", this.conversationUrl = "http://localhost:8003", this.appName = "Lit-Chat-App", this.agentAvatar = "", this.disclaimer = "Agent puede cometer errores. Verifica la información importante.", this.emptyText = "¿Cómo puedo ayudarte hoy?", this.placeholder = "Enviar un mensaje a Agent", this.headerTitle = "Agent", this.hideHeader = !1, this.interceptor = !1, this._historyOpen = !1, this._inspectorOpen = !1, this._inspectorEnabled = !1;
1799
1838
  }
1800
1839
  static #e = this.styles = styles;
1801
1840
  willUpdate(x) {
1802
- (x.has("backendUrl") || x.has("appName")) && (this._chatController.initialize({
1841
+ (x.has("backendUrl") || x.has("appName") || x.has("conversationUrl")) && (this._chatController.initialize({
1803
1842
  backendUrl: this.backendUrl,
1843
+ conversationUrl: this.conversationUrl,
1804
1844
  appName: this.appName,
1805
1845
  inspector: this.hasAttribute("inspector") || this.inspector
1806
1846
  }), this._inspectorEnabled = this.hasAttribute("inspector") || this.inspector), x.has("interceptor") && (this.interceptor ? this.enableFetchInterceptor() : fetchInterceptorService.destroy());
@@ -1829,10 +1869,13 @@ var AgentChat = class extends i {
1829
1869
  render() {
1830
1870
  return b`
1831
1871
  <div class="chat-layout">
1832
- <agent-chat-header
1833
- @new-thread="${this._handleNewThread}"
1834
- @toggle-history="${this._toggleHistory}"
1835
- ></agent-chat-header>
1872
+ ${this.hideHeader ? "" : b`
1873
+ <agent-chat-header
1874
+ .title="${this.headerTitle}"
1875
+ @new-thread="${this._handleNewThread}"
1876
+ @toggle-history="${this._toggleHistory}"
1877
+ ></agent-chat-header>
1878
+ `}
1836
1879
  <agent-chat-history-list
1837
1880
  .conversations="${this._chatController.conversations}"
1838
1881
  ?open="${this._historyOpen}"
@@ -1847,6 +1890,7 @@ var AgentChat = class extends i {
1847
1890
  <agent-chat-composer
1848
1891
  ?isRunning="${this._chatController.thread.isRunning}"
1849
1892
  .disclaimer="${this.disclaimer}"
1893
+ .placeholder="${this.placeholder}"
1850
1894
  @send="${this._handleSend}">
1851
1895
  </agent-chat-composer>
1852
1896
 
@@ -1867,6 +1911,9 @@ __decorate([n({
1867
1911
  type: String,
1868
1912
  attribute: "backend-url"
1869
1913
  })], AgentChat.prototype, "backendUrl", void 0), __decorate([n({
1914
+ type: String,
1915
+ attribute: "conversation-url"
1916
+ })], AgentChat.prototype, "conversationUrl", void 0), __decorate([n({
1870
1917
  type: String,
1871
1918
  attribute: "app-name"
1872
1919
  })], AgentChat.prototype, "appName", void 0), __decorate([n({
@@ -1879,6 +1926,15 @@ __decorate([n({
1879
1926
  type: String,
1880
1927
  attribute: "empty-text"
1881
1928
  })], AgentChat.prototype, "emptyText", void 0), __decorate([n({
1929
+ type: String,
1930
+ attribute: "placeholder"
1931
+ })], AgentChat.prototype, "placeholder", void 0), __decorate([n({
1932
+ type: String,
1933
+ attribute: "header-title"
1934
+ })], AgentChat.prototype, "headerTitle", void 0), __decorate([n({
1935
+ type: Boolean,
1936
+ attribute: "hide-header"
1937
+ })], AgentChat.prototype, "hideHeader", void 0), __decorate([n({
1882
1938
  type: Boolean,
1883
1939
  attribute: "interceptor"
1884
1940
  })], AgentChat.prototype, "interceptor", void 0), __decorate([r()], AgentChat.prototype, "_historyOpen", void 0), __decorate([r()], AgentChat.prototype, "_inspectorOpen", void 0), __decorate([r()], AgentChat.prototype, "_inspectorEnabled", void 0), AgentChat = __decorate([t("agent-chat")], AgentChat);
@@ -1,5 +1,5 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@ag-ui/client`)):typeof define==`function`&&define.amd?define([`exports`,`@ag-ui/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.SiteOperator={},e.AgUiClient))})(this,function(e,t){var n=globalThis,r=n.ShadowRoot&&(n.ShadyCSS===void 0||n.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,i=Symbol(),a=new WeakMap,o=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(r&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=a.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&a.set(t,e))}return e}toString(){return this.cssText}},s=e=>new o(typeof e==`string`?e:e+``,void 0,i),c=(e,...t)=>new o(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,i),l=(e,t)=>{if(r)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let r of t){let t=document.createElement(`style`),i=n.litNonce;i!==void 0&&t.setAttribute(`nonce`,i),t.textContent=r.cssText,e.appendChild(t)}},u=r?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return s(t)})(e):e,{is:d,defineProperty:ee,getOwnPropertyDescriptor:te,getOwnPropertyNames:ne,getOwnPropertySymbols:re,getPrototypeOf:ie}=Object,f=globalThis,ae=f.trustedTypes,oe=ae?ae.emptyScript:``,se=f.reactiveElementPolyfillSupport,p=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?oe:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},h=(e,t)=>!d(e,t),g={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:h};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=g){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&ee(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=te(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??g}static _$Ei(){if(this.hasOwnProperty(p(`elementProperties`)))return;let e=ie(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(p(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(p(`properties`))){let e=this.properties,t=[...ne(e),...re(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(u(e))}else e!==void 0&&t.push(u(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return l(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?m:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?m:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??h)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};_.elementStyles=[],_.shadowRootOptions={mode:`open`},_[p(`elementProperties`)]=new Map,_[p(`finalized`)]=new Map,se?.({ReactiveElement:_}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var v=globalThis,ce=e=>e,y=v.trustedTypes,le=y?y.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ue=`$lit$`,b=`lit$${Math.random().toFixed(9).slice(2)}$`,x=`?`+b,de=`<${x}>`,S=document,C=()=>S.createComment(``),w=e=>e===null||typeof e!=`object`&&typeof e!=`function`,T=Array.isArray,fe=e=>T(e)||typeof e?.[Symbol.iterator]==`function`,E=`[
2
- \f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pe=/-->/g,me=/>/g,O=RegExp(`>|${E}(?:([^\\s"'>=/]+)(${E}*=${E}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),he=/'/g,ge=/"/g,_e=/^(?:script|style|textarea|title)$/i,k=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),A=Symbol.for(`lit-noChange`),j=Symbol.for(`lit-nothing`),ve=new WeakMap,M=S.createTreeWalker(S,129);function ye(e,t){if(!T(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return le===void 0?t:le.createHTML(t)}var be=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=D;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===D?c[1]===`!--`?o=pe:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=O):(_e.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=O):o=me:o===O?c[0]===`>`?(o=i??D,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?O:c[3]===`"`?ge:he):o===ge||o===he?o=O:o===pe||o===me?o=D:(o=O,i=void 0);let d=o===O&&e[t+1].startsWith(`/>`)?` `:``;a+=o===D?n+de:l>=0?(r.push(s),n.slice(0,l)+ue+n.slice(l)+b+d):n+b+(l===-2?t:d)}return[ye(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},N=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=be(t,n);if(this.el=e.createElement(l,r),M.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=M.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ue)){let t=u[o++],n=i.getAttribute(e).split(b),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Se:r[1]===`?`?Ce:r[1]===`@`?we:I}),i.removeAttribute(e)}else e.startsWith(b)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(_e.test(i.tagName)){let e=i.textContent.split(b),t=e.length-1;if(t>0){i.textContent=y?y.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],C()),M.nextNode(),c.push({type:2,index:++a});i.append(e[t],C())}}}else if(i.nodeType===8)if(i.data===x)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(b,e+1))!==-1;)c.push({type:7,index:a}),e+=b.length-1}a++}}static createElement(e,t){let n=S.createElement(`template`);return n.innerHTML=e,n}};function P(e,t,n=e,r){if(t===A)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=w(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=P(e,i._$AS(e,t.values),i,r)),t}var xe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??S).importNode(t,!0);M.currentNode=r;let i=M.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new F(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Te(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=M.nextNode(),a++)}return M.currentNode=S,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},F=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),w(e)?e===j||e==null||e===``?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==A&&this._(e):e._$litType$===void 0?e.nodeType===void 0?fe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&w(this._$AH)?this._$AA.nextSibling.data=e:this.T(S.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=N.createElement(ye(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new xe(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=ve.get(e.strings);return t===void 0&&ve.set(e.strings,t=new N(e)),t}k(t){T(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(C()),this.O(C()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ce(e).nextSibling;ce(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},I=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=P(this,e,t,0),a=!w(e)||e!==this._$AH&&e!==A,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=P(this,r[n+o],t,o),s===A&&(s=this._$AH[o]),a||=!w(s)||s!==this._$AH[o],s===j?e=j:e!==j&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Se=class extends I{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},Ce=class extends I{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},we=class extends I{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=P(this,e,t,0)??j)===A)return;let n=this._$AH,r=e===j&&n!==j||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==j&&(n===j||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Te=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}},Ee=v.litHtmlPolyfillSupport;Ee?.(N,F),(v.litHtmlVersions??=[]).push(`3.3.2`);var De=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new F(t.insertBefore(C(),e),e,void 0,n??{})}return i._$AI(e),i},L=globalThis,R=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=De(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};R._$litElement$=!0,R.finalized=!0,L.litElementHydrateSupport?.({LitElement:R});var Oe=L.litElementPolyfillSupport;Oe?.({LitElement:R}),(L.litElementVersions??=[]).push(`4.2.2`);var z=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},ke={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:h},Ae=(e=ke,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function B(e){return(t,n)=>typeof n==`object`?Ae(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function V(e){return B({...e,state:!0,attribute:!1})}var je=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Me(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return je(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return je(n,r,{get(){return a(this)}})}}let Ne=c`
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@ag-ui/client`)):typeof define==`function`&&define.amd?define([`exports`,`@ag-ui/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.SiteOperator={},e.AgUiClient))})(this,function(e,t){var n=globalThis,r=n.ShadowRoot&&(n.ShadyCSS===void 0||n.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,i=Symbol(),a=new WeakMap,o=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(r&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=a.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&a.set(t,e))}return e}toString(){return this.cssText}},s=e=>new o(typeof e==`string`?e:e+``,void 0,i),c=(e,...t)=>new o(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,i),l=(e,t)=>{if(r)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let r of t){let t=document.createElement(`style`),i=n.litNonce;i!==void 0&&t.setAttribute(`nonce`,i),t.textContent=r.cssText,e.appendChild(t)}},u=r?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return s(t)})(e):e,{is:d,defineProperty:ee,getOwnPropertyDescriptor:te,getOwnPropertyNames:ne,getOwnPropertySymbols:re,getPrototypeOf:ie}=Object,f=globalThis,ae=f.trustedTypes,oe=ae?ae.emptyScript:``,se=f.reactiveElementPolyfillSupport,p=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?oe:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},h=(e,t)=>!d(e,t),ce={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:h};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ce){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&ee(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=te(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ce}static _$Ei(){if(this.hasOwnProperty(p(`elementProperties`)))return;let e=ie(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(p(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(p(`properties`))){let e=this.properties,t=[...ne(e),...re(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(u(e))}else e!==void 0&&t.push(u(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return l(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?m:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?m:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??h)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};g.elementStyles=[],g.shadowRootOptions={mode:`open`},g[p(`elementProperties`)]=new Map,g[p(`finalized`)]=new Map,se?.({ReactiveElement:g}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var _=globalThis,le=e=>e,v=_.trustedTypes,ue=v?v.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,de=`$lit$`,y=`lit$${Math.random().toFixed(9).slice(2)}$`,fe=`?`+y,pe=`<${fe}>`,b=document,x=()=>b.createComment(``),S=e=>e===null||typeof e!=`object`&&typeof e!=`function`,C=Array.isArray,me=e=>C(e)||typeof e?.[Symbol.iterator]==`function`,w=`[
2
+ \f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,he=/-->/g,ge=/>/g,E=RegExp(`>|${w}(?:([^\\s"'>=/]+)(${w}*=${w}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),_e=/'/g,ve=/"/g,D=/^(?:script|style|textarea|title)$/i,O=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),k=Symbol.for(`lit-noChange`),A=Symbol.for(`lit-nothing`),ye=new WeakMap,j=b.createTreeWalker(b,129);function be(e,t){if(!C(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ue===void 0?t:ue.createHTML(t)}var xe=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=T;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===T?c[1]===`!--`?o=he:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=E):(D.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=E):o=ge:o===E?c[0]===`>`?(o=i??T,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?E:c[3]===`"`?ve:_e):o===ve||o===_e?o=E:o===he||o===ge?o=T:(o=E,i=void 0);let d=o===E&&e[t+1].startsWith(`/>`)?` `:``;a+=o===T?n+pe:l>=0?(r.push(s),n.slice(0,l)+de+n.slice(l)+y+d):n+y+(l===-2?t:d)}return[be(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},M=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=xe(t,n);if(this.el=e.createElement(l,r),j.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=j.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(de)){let t=u[o++],n=i.getAttribute(e).split(y),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Ce:r[1]===`?`?we:r[1]===`@`?Te:F}),i.removeAttribute(e)}else e.startsWith(y)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(D.test(i.tagName)){let e=i.textContent.split(y),t=e.length-1;if(t>0){i.textContent=v?v.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],x()),j.nextNode(),c.push({type:2,index:++a});i.append(e[t],x())}}}else if(i.nodeType===8)if(i.data===fe)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(y,e+1))!==-1;)c.push({type:7,index:a}),e+=y.length-1}a++}}static createElement(e,t){let n=b.createElement(`template`);return n.innerHTML=e,n}};function N(e,t,n=e,r){if(t===k)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=S(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=N(e,i._$AS(e,t.values),i,r)),t}var Se=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??b).importNode(t,!0);j.currentNode=r;let i=j.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new P(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Ee(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=j.nextNode(),a++)}return j.currentNode=b,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},P=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=N(this,e,t),S(e)?e===A||e==null||e===``?(this._$AH!==A&&this._$AR(),this._$AH=A):e!==this._$AH&&e!==k&&this._(e):e._$litType$===void 0?e.nodeType===void 0?me(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==A&&S(this._$AH)?this._$AA.nextSibling.data=e:this.T(b.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=M.createElement(be(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Se(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=ye.get(e.strings);return t===void 0&&ye.set(e.strings,t=new M(e)),t}k(t){C(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(x()),this.O(x()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=le(e).nextSibling;le(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=A,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=A}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=N(this,e,t,0),a=!S(e)||e!==this._$AH&&e!==k,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=N(this,r[n+o],t,o),s===k&&(s=this._$AH[o]),a||=!S(s)||s!==this._$AH[o],s===A?e=A:e!==A&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Ce=class extends F{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A?void 0:e}},we=class extends F{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==A)}},Te=class extends F{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=N(this,e,t,0)??A)===k)return;let n=this._$AH,r=e===A&&n!==A||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==A&&(n===A||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ee=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){N(this,e)}},De=_.litHtmlPolyfillSupport;De?.(M,P),(_.litHtmlVersions??=[]).push(`3.3.2`);var Oe=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new P(t.insertBefore(x(),e),e,void 0,n??{})}return i._$AI(e),i},I=globalThis,L=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Oe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return k}};L._$litElement$=!0,L.finalized=!0,I.litElementHydrateSupport?.({LitElement:L});var ke=I.litElementPolyfillSupport;ke?.({LitElement:L}),(I.litElementVersions??=[]).push(`4.2.2`);var R=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Ae={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:h},je=(e=Ae,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function z(e){return(t,n)=>typeof n==`object`?je(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function B(e){return z({...e,state:!0,attribute:!1})}var Me=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Ne(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Me(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Me(n,r,{get(){return a(this)}})}}let Pe=c`
3
3
  :host {
4
4
  display: flex;
5
5
  flex-direction: column;
@@ -54,7 +54,7 @@
54
54
  transform: scale(1.1);
55
55
  }
56
56
 
57
- `,Pe=c`
57
+ `,Fe=c`
58
58
  :host {
59
59
  display: block;
60
60
  border-bottom: 1px solid var(--agent-border-zinc-200, #e4e4e7);
@@ -82,7 +82,7 @@
82
82
  display: flex;
83
83
  gap: 0.5rem;
84
84
  }
85
- `,Fe=c`
85
+ `,Ie=c`
86
86
  :host {
87
87
  display: inline-flex;
88
88
  }
@@ -109,23 +109,50 @@
109
109
  width: 1.25rem;
110
110
  height: 1.25rem;
111
111
  }
112
- `;function H(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var U=class extends R{constructor(...e){super(...e),this.tooltip=``}static#e=this.styles=Fe;render(){return k`
112
+ `;function V(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var H=class extends L{constructor(...e){super(...e),this.tooltip=``}static#e=this.styles=Ie;render(){return O`
113
113
  <button title="${this.tooltip}" aria-label="${this.tooltip||`Action`}">
114
114
  <slot></slot>
115
115
  </button>
116
- `}};H([B()],U.prototype,`tooltip`,void 0),U=H([z(`agent-icon-button`)],U);let Ie=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`,Le=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`,Re=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00006H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50006C5 4.67163 5.67157 4.00006 6.5 4.00006H13.5C14.3284 4.00006 15 4.67163 15 5.50006V12.5001C15 13.3285 14.3284 14.0001 13.5 14.0001H6.5C5.67157 14.0001 5 13.3285 5 12.5001V5.50006ZM6.5 5.00006H13.5C13.7761 5.00006 14 5.22392 14 5.50006V12.5001C14 12.7762 13.7761 13.0001 13.5 13.0001H6.5C6.22386 13.0001 6 12.7762 6 12.5001V5.50006C6 5.22392 6.22386 5.00006 6.5 5.00006Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`,ze=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.84998 7.49998C1.84998 4.6145 4.05979 2.21843 6.90545 1.91456V3.35016C4.97851 3.63937 3.49998 5.37979 3.49998 7.49998C3.49998 9.87062 5.27476 11.83 7.59505 12.0805C7.97776 12.1218 8.36856 12.1009 8.75239 12.0197C9.35912 11.8913 9.93282 11.6601 10.4552 11.3396C10.9575 11.0315 11.413 10.6548 11.8016 10.2195L10.9701 9.47743C10.6599 9.82496 10.2974 10.1246 9.89728 10.3701C9.6433 10.5259 9.37532 10.6559 9.09678 10.7578C9.09678 10.7578 9.09575 10.7582 9.09472 10.7586C9.01824 10.7876 8.94119 10.8142 8.8636 10.8384C8.42306 10.9757 7.96263 11.0252 7.49998 10.979C5.77663 10.8066 4.35928 9.43926 4.19539 7.71618L4.19539 7.71616C4.19065 7.66632 4.18663 7.61633 4.18335 7.56621C4.15928 7.19912 4.22558 6.83296 4.37349 6.49474L3.13488 5.7513C2.69344 6.36842 2.37893 7.07821 2.22687 7.8388C2.22271 7.8596 2.21862 7.88045 2.21461 7.90135C1.98632 9.09062 2.25732 10.3395 2.9497 11.3972L1.65039 12.5C0.73507 11.1017 0.366914 9.42169 0.672935 7.82827C0.725964 7.5522 0.813075 7.28383 0.93043 7.02568L1.84998 7.49998ZM13.849 5.89437C14.1554 6.36262 14.394 6.87979 14.5458 7.43004C14.5503 7.44641 14.5547 7.46281 14.5591 7.47924C14.8087 8.41443 14.7865 9.40028 14.5029 10.3232L12.9856 9.85698C13.1979 9.16629 13.208 8.43555 13.0211 7.74477L13.0211 7.74474C13.0205 7.74233 13.0198 7.73992 13.0192 7.73751C12.915 7.35952 12.7511 7.00424 12.5407 6.68267L13.849 5.89437ZM8.08544 13.0854L7.54452 7.49998H11.4999L8.08544 4.41452V13.0854Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;let Be=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="3.75" y="3.75" width="7.5" height="7.5" fill="currentColor"></rect></svg>`,Ve=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 7.5C1.5 4.18629 4.18629 1.5 7.5 1.5C10.8137 1.5 13.5 4.18629 13.5 7.5C13.5 10.8137 10.8137 13.5 7.5 13.5C4.18629 13.5 1.5 10.8137 1.5 7.5ZM2.5 7.5C2.5 4.73858 4.73858 2.5 7.5 2.5C10.2614 2.5 12.5 4.73858 12.5 7.5C12.5 10.2614 10.8137 12.5 7.5 12.5C4.73858 12.5 2.5 10.2614 2.5 7.5ZM8 4.5V7.25L9.94491 9.19491L9.2378 9.90202L7 7.66421V4.5H8Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path><path d="M0.5 7.5H2.5L1.5 5.5L0.5 7.5Z" fill="currentColor"/></svg>`,He=k`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L10.5 3.79289L8.35355 1.64645C8.15829 1.45118 7.84171 1.45118 7.64645 1.64645L1.64645 7.64645C1.45118 7.84171 1.45118 8.15829 1.64645 8.35355L3.79289 10.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536L2.85355 13.5607C3.04882 13.7559 3.3654 13.7559 3.56066 13.5607L5.20711 11.9142L7.35355 14.0607C7.54882 14.2559 7.8654 14.2559 8.06066 14.0607L14.0607 8.06066C14.2559 7.8654 14.2559 7.54882 14.0607 7.35355L11.9142 5.20711L13.5607 3.56066C13.7559 3.3654 13.7559 3.04882 13.5607 2.85355L12.8536 2.14645ZM11.2071 5.91421L13.3536 8.06066L8.06066 13.3536L5.91421 11.2071L8.35355 8.76777C8.54882 8.57251 8.54882 8.25593 8.35355 8.06066C8.15829 7.8654 7.84171 7.8654 7.64645 8.06066L5.20711 10.5L3.35355 8.64645L8.64645 3.35355L10.5 5.20711L8.85355 6.85355C8.65829 7.04882 8.65829 7.3654 8.85355 7.56066C9.04882 7.75593 9.3654 7.75593 9.56066 7.56066L11.2071 5.91421Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`;var W=class extends R{constructor(...e){super(...e),this.title=`Agent Chat`}static#e=this.styles=Pe;_handleNewThread(){this.dispatchEvent(new CustomEvent(`new-thread`,{bubbles:!0,composed:!0}))}_handleToggleHistory(){this.dispatchEvent(new CustomEvent(`toggle-history`,{bubbles:!0,composed:!0}))}render(){return k`
116
+ `}};V([z()],H.prototype,`tooltip`,void 0),H=V([R(`agent-icon-button`)],H);let Le=O`
117
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus">
118
+ <path d="M5 12h14" />
119
+ <path d="M12 5v14" />
120
+ </svg>`,Re=O`
121
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-send">
122
+ <path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" />
123
+ <path d="m21.854 2.147-10.94 10.939" />
124
+ </svg>`,ze=O`
125
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy">
126
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
127
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
128
+ </svg>`,Be=O`
129
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-cw">
130
+ <path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" />
131
+ <path d="M21 3v5h-5" />
132
+ </svg>`,Ve=O`
133
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square">
134
+ <rect width="18" height="18" x="3" y="3" rx="2" />
135
+ </svg>`,He=O`
136
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history">
137
+ <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />
138
+ <path d="M3 3v5h5" />
139
+ <path d="M12 7v5l4 2" />
140
+ </svg>`,Ue=O`
141
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wrench">
142
+ <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />
143
+ </svg>`;var U=class extends L{constructor(...e){super(...e),this.title=`Agent Chat`}static#e=this.styles=Fe;_handleNewThread(){this.dispatchEvent(new CustomEvent(`new-thread`,{bubbles:!0,composed:!0}))}_handleToggleHistory(){this.dispatchEvent(new CustomEvent(`toggle-history`,{bubbles:!0,composed:!0}))}render(){return O`
117
144
  <header class="header">
118
145
  <h1>${this.title}</h1>
119
146
  <div class="actions">
120
147
  <agent-icon-button tooltip="Conversaciones" @click="${this._handleToggleHistory}">
121
- ${Ve}
148
+ ${He}
122
149
  </agent-icon-button>
123
150
  <agent-icon-button tooltip="Nuevo Chat" @click="${this._handleNewThread}">
124
- ${Ie}
151
+ ${Le}
125
152
  </agent-icon-button>
126
153
  </div>
127
154
  </header>
128
- `}};H([B({type:String})],W.prototype,`title`,void 0),W=H([z(`agent-chat-header`)],W);let Ue=c`
155
+ `}};V([z({type:String})],U.prototype,`title`,void 0),U=V([R(`agent-chat-header`)],U);let We=c`
129
156
  :host {
130
157
  display: block;
131
158
  height: 100%;
@@ -180,7 +207,7 @@
180
207
  font-size: 1.25rem;
181
208
  line-height: 1.75rem;
182
209
  }
183
- `,We=c`
210
+ `,Ge=c`
184
211
  :host {
185
212
  display: block;
186
213
  margin: 1rem 0;
@@ -304,15 +331,15 @@
304
331
  transform: scale(1);
305
332
  }
306
333
  }
307
- `;var G=class extends R{constructor(...e){super(...e),this.isLast=!1,this.isStreaming=!1,this.agentAvatar=``}static#e=this.styles=We;updated(e){e.has(`message`)&&(this.setAttribute(`role`,this.message.role),this.requestUpdate())}_handleCopy(){navigator.clipboard.writeText(this.message.content)}_handleReload(){this.dispatchEvent(new CustomEvent(`reload-message`,{detail:{id:this.message.id},bubbles:!0,composed:!0}))}render(){let e=this.message.role===`user`;return k`
334
+ `;var W=class extends L{constructor(...e){super(...e),this.isLast=!1,this.isStreaming=!1,this.agentAvatar=``}static#e=this.styles=Ge;updated(e){e.has(`message`)&&(this.setAttribute(`role`,this.message.role),this.requestUpdate())}_handleCopy(){navigator.clipboard.writeText(this.message.content)}_handleReload(){this.dispatchEvent(new CustomEvent(`reload-message`,{detail:{id:this.message.id},bubbles:!0,composed:!0}))}render(){let e=this.message.role===`user`;return O`
308
335
  <div class="message-container">
309
- ${e?``:k`
310
- ${this.agentAvatar?k`<img src="${this.agentAvatar}" class="avatar-img" alt="AI">`:k`<div class="avatar">C</div>`}
336
+ ${e?``:O`
337
+ ${this.agentAvatar?O`<img src="${this.agentAvatar}" class="avatar-img" alt="AI">`:O`<div class="avatar">C</div>`}
311
338
  `}
312
339
 
313
340
  <div class="content-wrapper">
314
341
  <div class="bubble ${this.isStreaming?`streaming`:``}">
315
- ${this.message.isThinking?k`
342
+ ${this.message.isThinking?O`
316
343
  <div class="typing-indicator">
317
344
  <div class="typing-dot"></div>
318
345
  <div class="typing-dot"></div>
@@ -321,26 +348,26 @@
321
348
  `:this.message.content}
322
349
  </div>
323
350
 
324
- ${e?``:k`
351
+ ${e?``:O`
325
352
  <div class="actions">
326
353
  <agent-icon-button tooltip="Copy" @click="${this._handleCopy}">
327
- ${Re}
354
+ ${ze}
328
355
  </agent-icon-button>
329
356
  <agent-icon-button tooltip="Reload" @click="${this._handleReload}">
330
- ${ze}
357
+ ${Be}
331
358
  </agent-icon-button>
332
359
  </div>
333
360
  `}
334
361
  </div>
335
362
  </div>
336
- `}};H([B({type:Object})],G.prototype,`message`,void 0),H([B({type:Boolean})],G.prototype,`isLast`,void 0),H([B({type:Boolean})],G.prototype,`isStreaming`,void 0),H([B({type:String})],G.prototype,`agentAvatar`,void 0),G=H([z(`agent-chat-message`)],G);var K=class extends R{constructor(...e){super(...e),this.messages=[],this.isRunning=!1,this.agentAvatar=``,this.emptyText=``}static#e=this.styles=Ue;updated(e){e.has(`messages`)&&this.scrollToBottom()}async scrollToBottom(){await this.updateComplete,(this.shadowRoot?.querySelector(`agent-chat-message:last-of-type`))?.scrollIntoView({behavior:`smooth`,block:`end`})}render(){return this.messages.length===0?k`
363
+ `}};V([z({type:Object})],W.prototype,`message`,void 0),V([z({type:Boolean})],W.prototype,`isLast`,void 0),V([z({type:Boolean})],W.prototype,`isStreaming`,void 0),V([z({type:String})],W.prototype,`agentAvatar`,void 0),W=V([R(`agent-chat-message`)],W);var G=class extends L{constructor(...e){super(...e),this.messages=[],this.isRunning=!1,this.agentAvatar=``,this.emptyText=``}static#e=this.styles=We;updated(e){e.has(`messages`)&&this.scrollToBottom()}async scrollToBottom(){await this.updateComplete,(this.shadowRoot?.querySelector(`agent-chat-message:last-of-type`))?.scrollIntoView({behavior:`smooth`,block:`end`})}render(){return this.messages.length===0?O`
337
364
  <div class="empty-state">
338
- ${this.agentAvatar?k`<img src="${this.agentAvatar}" alt="Agent Avatar" class="empty-avatar-img">`:k`<div class="empty-avatar">SM</div>`}
365
+ ${this.agentAvatar?O`<img src="${this.agentAvatar}" alt="Agent Avatar" class="empty-avatar-img">`:O`<div class="empty-avatar">SM</div>`}
339
366
  <p class="empty-text">${this.emptyText}</p>
340
367
  </div>
341
- `:k`
368
+ `:O`
342
369
  <div class="messages-list">
343
- ${this.messages.map((e,t)=>k`
370
+ ${this.messages.map((e,t)=>O`
344
371
  <agent-chat-message
345
372
  .message=${e}
346
373
  .isLast=${t===this.messages.length-1}
@@ -349,7 +376,7 @@
349
376
  </agent-chat-message>
350
377
  `)}
351
378
  </div>
352
- `}};H([B({type:Array})],K.prototype,`messages`,void 0),H([B({type:Boolean})],K.prototype,`isRunning`,void 0),H([B({type:String})],K.prototype,`agentAvatar`,void 0),H([B({type:String})],K.prototype,`emptyText`,void 0),K=H([z(`agent-chat-thread`)],K);let Ge=c`
379
+ `}};V([z({type:Array})],G.prototype,`messages`,void 0),V([z({type:Boolean})],G.prototype,`isRunning`,void 0),V([z({type:String})],G.prototype,`agentAvatar`,void 0),V([z({type:String})],G.prototype,`emptyText`,void 0),G=V([R(`agent-chat-thread`)],G);let Ke=c`
353
380
  :host {
354
381
  display: block;
355
382
  padding: 1rem;
@@ -364,7 +391,7 @@
364
391
  max-width: 48rem; /* max-w-screen-md */
365
392
  margin: 0 auto;
366
393
  display: flex;
367
- align-items: flex-end;
394
+ align-items: center;
368
395
  background-color: var(--agent-bg-zinc-100, #f4f4f5);
369
396
  border-radius: var(--agent-radius-3xl, 1.5rem);
370
397
  padding-left: 0.5rem;
@@ -398,17 +425,28 @@
398
425
  display: flex;
399
426
  align-items: center;
400
427
  justify-content: center;
401
- width: 2rem;
402
- height: 2rem;
428
+ width: 2.25rem;
429
+ height: 2.25rem;
403
430
  border-radius: var(--agent-radius-full, 9999px);
404
- background-color: var(--agent-bg-black, #09090b);
405
- color: var(--agent-text-white, #ffffff);
406
- transition: opacity 0.2s;
431
+ background-color: transparent;
432
+ border: 1.5px solid transparent;
433
+ color: var(--agent-text-foreground, #09090b);
434
+ transition: all 0.2s ease-in-out;
407
435
  cursor: pointer;
408
436
  }
437
+
438
+ .action-button:hover:not(:disabled) {
439
+ border-color: #22c55e;
440
+ color: #22c55e;
441
+ background-color: #22c55e10;
442
+ }
443
+
444
+ .action-button:hover:not(:disabled) svg {
445
+ fill: #22c55e20; /* Subtle fill for "relleno" feeling */
446
+ }
409
447
 
410
448
  .action-button:disabled {
411
- opacity: 0.1;
449
+ opacity: 0.3;
412
450
  cursor: not-allowed;
413
451
  }
414
452
 
@@ -424,10 +462,10 @@
424
462
  font-size: 0.75rem;
425
463
  padding: 0.5rem;
426
464
  }
427
- `;var q=class extends R{constructor(...e){super(...e),this.isRunning=!1,this.disclaimer=``,this._value=``}static#e=this.styles=Ge;_handleInput(e){this._value=e.target.value,this._adjustHeight()}_handleKeyDown(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),this._handleSubmit())}_adjustHeight(){this._textarea&&(this._textarea.style.height=`auto`,this._textarea.style.height=`${Math.min(this._textarea.scrollHeight,160)}px`)}async _handleSubmit(){this._value.trim()&&(this.dispatchEvent(new CustomEvent(`send`,{detail:{content:this._value},bubbles:!0,composed:!0})),this._value=``,await this.updateComplete,this._textarea.style.height=`3rem`)}_handleStop(){this.dispatchEvent(new CustomEvent(`cancel`,{bubbles:!0,composed:!0}))}render(){return k`
465
+ `;var K=class extends L{constructor(...e){super(...e),this.isRunning=!1,this.disclaimer=``,this.placeholder=``,this._value=``}static#e=this.styles=Ke;_handleInput(e){this._value=e.target.value,this._adjustHeight()}_handleKeyDown(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),this._handleSubmit())}_adjustHeight(){this._textarea&&(this._textarea.style.height=`auto`,this._textarea.style.height=`${Math.min(this._textarea.scrollHeight,160)}px`)}async _handleSubmit(){this._value.trim()&&(this.dispatchEvent(new CustomEvent(`send`,{detail:{content:this._value},bubbles:!0,composed:!0})),this._value=``,await this.updateComplete,this._textarea.style.height=`3rem`)}_handleStop(){this.dispatchEvent(new CustomEvent(`cancel`,{bubbles:!0,composed:!0}))}render(){return O`
428
466
  <div class="composer-container">
429
467
  <textarea
430
- placeholder="Enviar un mensaje a Agent"
468
+ placeholder="${this.placeholder}"
431
469
  .value="${this._value}"
432
470
  @input="${this._handleInput}"
433
471
  @keydown="${this._handleKeyDown}"
@@ -435,12 +473,12 @@
435
473
  rows="1"
436
474
  ></textarea>
437
475
 
438
- ${this.isRunning?k`<button class="action-button" @click="${this._handleStop}">${Be}</button>`:k`<button class="action-button" ?disabled="${!this._value.trim()}" @click="${this._handleSubmit}">${Le}</button>`}
476
+ ${this.isRunning?O`<button class="action-button" @click="${this._handleStop}">${Ve}</button>`:O`<button class="action-button" ?disabled="${!this._value.trim()}" @click="${this._handleSubmit}">${Re}</button>`}
439
477
  </div>
440
478
  <p class="disclaimer">
441
479
  ${this.disclaimer}
442
480
  </p>
443
- `}};H([B({type:Boolean})],q.prototype,`isRunning`,void 0),H([B({type:String})],q.prototype,`disclaimer`,void 0),H([V()],q.prototype,`_value`,void 0),H([Me(`textarea`)],q.prototype,`_textarea`,void 0),q=H([z(`agent-chat-composer`)],q);let Ke=c`
481
+ `}};V([z({type:Boolean})],K.prototype,`isRunning`,void 0),V([z({type:String})],K.prototype,`disclaimer`,void 0),V([z({type:String})],K.prototype,`placeholder`,void 0),V([B()],K.prototype,`_value`,void 0),V([Ne(`textarea`)],K.prototype,`_textarea`,void 0),K=V([R(`agent-chat-composer`)],K);let qe=c`
444
482
  :host {
445
483
  display: block;
446
484
  position: absolute;
@@ -503,18 +541,18 @@
503
541
  color: #999;
504
542
  font-size: 0.9rem;
505
543
  }
506
- `;var J=class extends R{constructor(...e){super(...e),this.conversations=[],this.open=!1}static#e=this.styles=Ke;_handleSelect(e){this.dispatchEvent(new CustomEvent(`select-thread`,{detail:{conversation:e},bubbles:!0,composed:!0}))}render(){return k`
544
+ `;var q=class extends L{constructor(...e){super(...e),this.conversations=[],this.open=!1}static#e=this.styles=qe;_handleSelect(e){this.dispatchEvent(new CustomEvent(`select-thread`,{detail:{conversation:e},bubbles:!0,composed:!0}))}render(){return O`
507
545
  <div class="header">
508
546
  Conversaciones
509
547
  </div>
510
548
  <ul class="list">
511
- ${this.conversations.length===0?k`<div class="empty-state">No hay conversaciones recientes</div>`:this.conversations.map(e=>k`
549
+ ${this.conversations.length===0?O`<div class="empty-state">No hay conversaciones recientes</div>`:this.conversations.map(e=>O`
512
550
  <li class="item" @click="${()=>this._handleSelect(e)}">
513
551
  ${e.title}
514
552
  </li>
515
553
  `)}
516
554
  </ul>
517
- `}};H([B({type:Array})],J.prototype,`conversations`,void 0),H([B({type:Boolean,reflect:!0})],J.prototype,`open`,void 0),J=H([z(`agent-chat-history-list`)],J);let Y=new class extends EventTarget{constructor(...e){super(...e),this._context=null,this._messages=[],this._stream=[]}get context(){return this._context}get messages(){return this._messages}get stream(){return this._stream}setContext(e){this._context=e,this.notify()}setMessages(e){this._messages=[...e],this.notify()}addEvent(e,t){this._stream=[{event:e,content:t,time:new Date().toTimeString().split(` `)[0]},...this._stream].slice(0,100),this.notify()}clearStream(){this._stream=[],this.notify()}notify(){this.dispatchEvent(new CustomEvent(`inspector-change`))}},qe=c`
555
+ `}};V([z({type:Array})],q.prototype,`conversations`,void 0),V([z({type:Boolean,reflect:!0})],q.prototype,`open`,void 0),q=V([R(`agent-chat-history-list`)],q);let J=new class extends EventTarget{constructor(...e){super(...e),this._context=null,this._messages=[],this._stream=[]}get context(){return this._context}get messages(){return this._messages}get stream(){return this._stream}setContext(e){this._context=e,this.notify()}setMessages(e){this._messages=[...e],this.notify()}addEvent(e,t){this._stream=[{event:e,content:t,time:new Date().toTimeString().split(` `)[0]},...this._stream].slice(0,100),this.notify()}clearStream(){this._stream=[],this.notify()}notify(){this.dispatchEvent(new CustomEvent(`inspector-change`))}},Je=c`
518
556
  :host {
519
557
  position: absolute;
520
558
  bottom: 60px;
@@ -644,7 +682,7 @@
644
682
  .event-content {
645
683
  margin-top: 4px;
646
684
  }
647
- `;var X=class extends R{constructor(...e){super(...e),this._activeTab=`stream`,this._context=null,this._messages=[],this._stream=[],this._isDragging=!1,this._currentX=0,this._currentY=0,this._initialX=0,this._initialY=0,this._xOffset=0,this._yOffset=0,this._onInspectorChange=()=>{this._updateData()}}static#e=this.styles=qe;connectedCallback(){super.connectedCallback(),Y.addEventListener(`inspector-change`,this._onInspectorChange),this._updateData()}disconnectedCallback(){super.disconnectedCallback(),Y.removeEventListener(`inspector-change`,this._onInspectorChange)}_updateData(){this._context=Y.context,this._messages=Y.messages,this._stream=Y.stream,this.requestUpdate()}_handleClose(){this.dispatchEvent(new CustomEvent(`close`))}_dragStart(e){e.type===`touchstart`?(this._initialX=e.touches[0].clientX-this._xOffset,this._initialY=e.touches[0].clientY-this._yOffset):(this._initialX=e.clientX-this._xOffset,this._initialY=e.clientY-this._yOffset),!e.target.closest(`.close-button`)&&(this._isDragging=!0)}_drag(e){this._isDragging&&(e.preventDefault(),e.type===`touchmove`?(this._currentX=e.touches[0].clientX-this._initialX,this._currentY=e.touches[0].clientY-this._initialY):(this._currentX=e.clientX-this._initialX,this._currentY=e.clientY-this._initialY),this._xOffset=this._currentX,this._yOffset=this._currentY,this._setTranslate(this._currentX,this._currentY))}_dragEnd(){this._initialX=this._currentX,this._initialY=this._currentY,this._isDragging=!1}_setTranslate(e,t){this.style.transform=`translate3d(${e}px, ${t}px, 0)`}render(){return k`
685
+ `;var Y=class extends L{constructor(...e){super(...e),this._activeTab=`stream`,this._context=null,this._messages=[],this._stream=[],this._isDragging=!1,this._currentX=0,this._currentY=0,this._initialX=0,this._initialY=0,this._xOffset=0,this._yOffset=0,this._onInspectorChange=()=>{this._updateData()}}static#e=this.styles=Je;connectedCallback(){super.connectedCallback(),J.addEventListener(`inspector-change`,this._onInspectorChange),this._updateData()}disconnectedCallback(){super.disconnectedCallback(),J.removeEventListener(`inspector-change`,this._onInspectorChange)}_updateData(){this._context=J.context,this._messages=J.messages,this._stream=J.stream,this.requestUpdate()}_handleClose(){this.dispatchEvent(new CustomEvent(`close`))}_dragStart(e){e.type===`touchstart`?(this._initialX=e.touches[0].clientX-this._xOffset,this._initialY=e.touches[0].clientY-this._yOffset):(this._initialX=e.clientX-this._xOffset,this._initialY=e.clientY-this._yOffset),!e.target.closest(`.close-button`)&&(this._isDragging=!0)}_drag(e){this._isDragging&&(e.preventDefault(),e.type===`touchmove`?(this._currentX=e.touches[0].clientX-this._initialX,this._currentY=e.touches[0].clientY-this._initialY):(this._currentX=e.clientX-this._initialX,this._currentY=e.clientY-this._initialY),this._xOffset=this._currentX,this._yOffset=this._currentY,this._setTranslate(this._currentX,this._currentY))}_dragEnd(){this._initialX=this._currentX,this._initialY=this._currentY,this._isDragging=!1}_setTranslate(e,t){this.style.transform=`translate3d(${e}px, ${t}px, 0)`}render(){return O`
648
686
  <div class="header"
649
687
  @mousedown="${this._dragStart}"
650
688
  @touchstart="${this._dragStart}"
@@ -667,9 +705,9 @@
667
705
  <div class="content">
668
706
  ${this._renderContent()}
669
707
  </div>
670
- `}_renderContent(){switch(this._activeTab){case`context`:return k`<pre>${JSON.stringify(this._context,null,2)}</pre>`;case`messages`:return k`<pre>${JSON.stringify(this._messages,null,2)}</pre>`;case`stream`:return k`
708
+ `}_renderContent(){switch(this._activeTab){case`context`:return O`<pre>${JSON.stringify(this._context,null,2)}</pre>`;case`messages`:return O`<pre>${JSON.stringify(this._messages,null,2)}</pre>`;case`stream`:return O`
671
709
  <div class="stream-list">
672
- ${this._stream.map(e=>k`
710
+ ${this._stream.map(e=>O`
673
711
  <div class="event-item">
674
712
  <div class="event-header">
675
713
  <span class="event-name">${e.event}</span>
@@ -680,14 +718,17 @@
680
718
  </div>
681
719
  </div>
682
720
  `)}
683
- ${this._stream.length===0?k`<div style="color: #9ca3af; text-align: center; padding: 20px;">No events yet</div>`:``}
721
+ ${this._stream.length===0?O`<div style="color: #9ca3af; text-align: center; padding: 20px;">No events yet</div>`:``}
684
722
  </div>
685
- `}}};H([V()],X.prototype,`_activeTab`,void 0),H([V()],X.prototype,`_context`,void 0),H([V()],X.prototype,`_messages`,void 0),H([V()],X.prototype,`_stream`,void 0),X=H([z(`agent-inspector-window`)],X);var Je={thread:`thr`,message:`msg`,toolCall:`tc`,workflow:`wf`,task:`tsk`,attachment:`atc`,sdkHiddenContext:`shcx`};function Ye(e){return`${Je[e]}_${crypto.randomUUID().replace(/-/g,``).slice(0,8)}`}var Xe=class e{constructor(){this._spec=null}static getInstance(){return e._instance||=new e,e._instance}registerPortal(e){console.log(`Registering portal spec`,e),this._spec=e}async executePlan(e){if(!this._spec)return console.warn(`No portal registered. Cannot execute plan.`),{status:`error`,details:`No portal registered`};console.log(`Executing plan:`,e);try{for(let t of e.steps){let e=this._spec.actions[t.action];if(e)console.log(`Executing portal action: ${t.action}`,t.args),await e(t.args);else throw console.warn(`Action ${t.action} not found in portal spec.`),Error(`Action ${t.action} not found`)}return{status:`ok`}}catch(e){return console.error(`Error executing plan:`,e),{status:`error`,details:e.message||e}}}get specs(){return this._spec}};let Z=Xe.getInstance();var Ze=class{constructor(e){this.service=e}onRunStartedEvent(e){Y.addEvent(`onRunStartedEvent`,e.event),this.service.addPlaceholderMessage()}onTextMessageStartEvent(e){Y.addEvent(`onTextMessageStartEvent`,e.event),this.service.prepareMessageForStreaming(e.event.messageId)}onTextMessageContentEvent(e){Y.addEvent(`onTextMessageContentEvent`,e.event);let t=e.event.delta||e.event.content||``;this.service.appendMessageContent(e.event.messageId,t)}onMessagesSnapshotEvent(e){Y.addEvent(`onMessagesSnapshotEvent`,e.event);let t=e.event.messages.map(e=>{let t=``;return t=typeof e.content==`string`?e.content:Array.isArray(e.content)?e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``):JSON.stringify(e.content),{id:e.id,role:e.role,content:t,createdAt:Date.now()}});this.service.setMessages(t),this.service.setMessages(t)}async onToolCallEndEvent(e){if(Y.addEvent(`onToolCallEndEvent`,e.event),e.toolCallName===`executePlan`){console.log(`ChatSubscriber: Received executePlan tool call`,e.toolCallArgs);let t=await Z.executePlan(e.toolCallArgs);console.log(`ChatSubscriber: executePlan result`,t)}}async onClientToolCall(e){Y.addEvent(`onClientToolCall`,e.event),e.toolName===`executePlan`&&(console.log(`ChatSubscriber: Received executePlan client tool call`,e.args),await Z.executePlan(e.args))}};let Qe=new class{constructor(){this.baseUrl=`http://localhost:8003/api/v2/conversations`}async getConversations(){let e=await fetch(`${this.baseUrl}`);if(!e.ok)throw Error(`Failed to fetch conversations: ${e.statusText}`);return e.json()}async createConversation(e){let t={...e,title:e.title||`Nueva conversación`},n=await fetch(this.baseUrl,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`Failed to create conversation: ${n.statusText}`);return n.json()}async updateConversation(e,t){let n=await fetch(`${this.baseUrl}/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`Failed to update conversation: ${n.statusText}`);return n.json()}async deleteConversation(e){let t=await fetch(`${this.baseUrl}/${e}`,{method:`DELETE`});if(!t.ok)throw Error(`Failed to delete conversation: ${t.statusText}`)}},Q=new class extends EventTarget{constructor(){super(),this._thread={id:``,messages:[],isRunning:!1},this._conversations=[],this._appContext=null,this.subscriber=new Ze(this)}initialize(e){this.agent=new t.HttpAgent({url:e.backendUrl}),this._appContext={appName:e.appName,currentPage:`home`,inspector:e.inspector},Y.setContext(this._appContext),Y.setMessages(this._thread.messages)}get thread(){return this._thread}get conversations(){return this._conversations}setAppContext(e){this._appContext=e,Y.setContext(e),this.notify()}async sendMessage(e){if(!this.agent){console.error(`ChatService not initialized. Call initialize() first.`);return}if(!this._thread.id)try{let t=await Qe.createConversation({title:e.slice(0,30)+(e.length>30?`...`:``)});this._thread.id=t.id,this.agent.threadId=this._thread.id}catch(e){console.error(`Failed to create conversation during sendMessage`,e);return}let t={id:Ye(`message`),role:`user`,content:e,createdAt:Date.now()};this._thread.messages=[...this._thread.messages,t],this._thread.isRunning=!0,this.notify();try{this.agent.threadId=this._thread.id,this.agent.addMessage({id:t.id,role:t.role,content:t.content});let e=[{value:new Date().toLocaleString(),description:`Current date and time`}];this._appContext&&e.push({value:JSON.stringify(this._appContext),description:`AgentState`}),this.agent.state=this._appContext,await this.agent.runAgent({context:e},this.subscriber)}catch(e){console.error(`Failed to send message`,e)}finally{this._thread.isRunning=!1,this.notify()}}addPlaceholderMessage(){let e={id:`thinking-placeholder`,role:`assistant`,content:``,createdAt:Date.now(),isThinking:!0};this._thread.messages=[...this._thread.messages,e],this.notify()}prepareMessageForStreaming(e){this._thread.messages=this._thread.messages.map(t=>t.isThinking?{...t,id:e,isThinking:!1}:t),this.notify()}appendMessageContent(e,t){this._thread.messages=this._thread.messages.map(n=>n.id===e?{...n,content:n.content+t}:n),this.notify()}setMessages(e){this._thread.messages=e,this.notify()}async startNewThread(){this._thread={id:``,messages:[],isRunning:!1},this.agent&&(this.agent.threadId=``),this.notify()}async refreshConversations(){try{this._conversations=(await Qe.getConversations()).map(e=>({id:e.id,title:e.title})),this.notify()}catch(e){console.error(`Failed to refresh conversations`,e)}}notify(){Y.setMessages(this._thread.messages),this.dispatchEvent(new CustomEvent(`state-change`))}};var $e=class{constructor(e){this._onStateChange=()=>{this._host.requestUpdate()},this._host=e,this._host.addController(this)}initialize(e){return Q.initialize(e)}hostConnected(){Q.addEventListener(`state-change`,this._onStateChange)}hostDisconnected(){Q.removeEventListener(`state-change`,this._onStateChange)}get thread(){return Q.thread}get conversations(){return Q.conversations}sendMessage(e){return Q.sendMessage(e)}startNewThread(){return Q.startNewThread()}setAppContext(e){return Q.setAppContext(e)}refreshConversations(){return Q.refreshConversations()}},et=class{constructor(){this.originalFetch=window.fetch,this._isEnabled=!1}get isEnabled(){return this._isEnabled}init(){if(this._isEnabled)return;let e=this;window.fetch=async function(t,n){try{let r=new Headers(n?.headers||{});return r.has(`Authorization`)||r.append(`Authorization`,`Bearer eyJhbGciOiJSUzI1NiIsImtpZCI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sgeSt-aB27J1YgAH3yywZCCdwI88dPejsAOhLz_AdhR9YBndSUEabiau8q3F1D5UNgwaijt-1ziRgzj1ngVzqC3v5EQJ1KM2kP0Am_xXxJkZFTkWpS2Vv7du-vFjabkkMFzVzsksf5PYfoHL4HL7mvrXOjrFPX4KTM2fYAs6qUc274hPvMh-JaU6KbiFAFRFVW6UqhbgZ9FYI_eVEMzlmNG0aQhJ4cy0Iac59J9ZQV-6UvpiFFegIDIrdfqqCguKgCFXe7Tg`),e.originalFetch(t,{...n,headers:r})}catch(e){return Promise.reject(e)}},this._isEnabled=!0,console.log(`Fetch interceptor initialized with test Authorization header (Native implementation).`)}destroy(){this._isEnabled&&(window.fetch=this.originalFetch,this._isEnabled=!1,console.log(`Fetch interceptor destroyed (Native implementation).`))}};let tt=new et;var $=class extends R{constructor(...e){super(...e),this._chatController=new $e(this),this.backendUrl=`http://localhost:8001/ag_ui`,this.appName=`Lit-Chat-App`,this.agentAvatar=``,this.disclaimer=`Agent puede cometer errores. Verifica la información importante.`,this.emptyText=`¿Cómo puedo ayudarte hoy?`,this.interceptor=!1,this._historyOpen=!1,this._inspectorOpen=!1,this._inspectorEnabled=!1}static#e=this.styles=Ne;willUpdate(e){(e.has(`backendUrl`)||e.has(`appName`))&&(this._chatController.initialize({backendUrl:this.backendUrl,appName:this.appName,inspector:this.hasAttribute(`inspector`)||this.inspector}),this._inspectorEnabled=this.hasAttribute(`inspector`)||this.inspector),e.has(`interceptor`)&&(this.interceptor?this.enableFetchInterceptor():tt.destroy())}enableFetchInterceptor(){console.warn(`Fetch interceptor is only available in development mode.`)}_handleSend(e){this._chatController.sendMessage(e.detail.content)}_handleNewThread(){this._chatController.startNewThread()}setAppContext(e){this._chatController.setAppContext(e)}_toggleHistory(){this._historyOpen=!this._historyOpen,this._historyOpen&&this._chatController.refreshConversations()}_handleSelectThread(e){console.log(`Selected conversation:`,e.detail.conversation),this._historyOpen=!1}_toggleInspector(){this._inspectorOpen=!this._inspectorOpen}render(){return k`
723
+ `}}};V([B()],Y.prototype,`_activeTab`,void 0),V([B()],Y.prototype,`_context`,void 0),V([B()],Y.prototype,`_messages`,void 0),V([B()],Y.prototype,`_stream`,void 0),Y=V([R(`agent-inspector-window`)],Y);var Ye={thread:`thr`,message:`msg`,toolCall:`tc`,workflow:`wf`,task:`tsk`,attachment:`atc`,sdkHiddenContext:`shcx`};function Xe(e){return`${Ye[e]}_${crypto.randomUUID().replace(/-/g,``).slice(0,8)}`}var Ze=class e{constructor(){this._spec=null}static getInstance(){return e._instance||=new e,e._instance}registerPortal(e){console.log(`Registering portal spec`,e),this._spec=e}async executePlan(e){if(!this._spec)return console.warn(`No portal registered. Cannot execute plan.`),{status:`error`,details:`No portal registered`};console.log(`Executing plan:`,e);try{for(let t of e.steps){let e=this._spec.actions[t.action];if(e)console.log(`Executing portal action: ${t.action}`,t.args),await e(t.args);else throw console.warn(`Action ${t.action} not found in portal spec.`),Error(`Action ${t.action} not found`)}return{status:`ok`}}catch(e){return console.error(`Error executing plan:`,e),{status:`error`,details:e.message||e}}}get specs(){return this._spec}};let X=Ze.getInstance();var Qe=class{constructor(e){this.service=e}onRunStartedEvent(e){J.addEvent(`onRunStartedEvent`,e.event),this.service.addPlaceholderMessage()}onTextMessageStartEvent(e){J.addEvent(`onTextMessageStartEvent`,e.event),this.service.prepareMessageForStreaming(e.event.messageId)}onTextMessageContentEvent(e){J.addEvent(`onTextMessageContentEvent`,e.event);let t=e.event.delta||e.event.content||``;this.service.appendMessageContent(e.event.messageId,t)}onMessagesSnapshotEvent(e){J.addEvent(`onMessagesSnapshotEvent`,e.event);let t=e.event.messages.map(e=>{let t=``;return t=typeof e.content==`string`?e.content:Array.isArray(e.content)?e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``):JSON.stringify(e.content),{id:e.id,role:e.role,content:t,createdAt:Date.now()}});this.service.setMessages(t),this.service.setMessages(t)}async onToolCallEndEvent(e){if(J.addEvent(`onToolCallEndEvent`,e.event),e.toolCallName===`executePlan`){console.log(`ChatSubscriber: Received executePlan tool call`,e.toolCallArgs);let t=await X.executePlan(e.toolCallArgs);console.log(`ChatSubscriber: executePlan result`,t)}}async onClientToolCall(e){J.addEvent(`onClientToolCall`,e.event),e.toolName===`executePlan`&&(console.log(`ChatSubscriber: Received executePlan client tool call`,e.args),await X.executePlan(e.args))}};let Z=new class{constructor(){this.baseUrl=`http://localhost:8003/api/v2/conversations`}initialize(e){this.baseUrl=`${e}/api/v2/conversations`}async getConversations(){let e=await fetch(`${this.baseUrl}`);if(!e.ok)throw Error(`Failed to fetch conversations: ${e.statusText}`);return e.json()}async createConversation(e){let t={...e,title:e.title||`Nueva conversación`},n=await fetch(this.baseUrl,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`Failed to create conversation: ${n.statusText}`);return n.json()}async updateConversation(e,t){let n=await fetch(`${this.baseUrl}/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`Failed to update conversation: ${n.statusText}`);return n.json()}async deleteConversation(e){let t=await fetch(`${this.baseUrl}/${e}`,{method:`DELETE`});if(!t.ok)throw Error(`Failed to delete conversation: ${t.statusText}`)}},Q=new class extends EventTarget{constructor(){super(),this._thread={id:``,messages:[],isRunning:!1},this._conversations=[],this._appContext=null,this.subscriber=new Qe(this)}initialize(e){this.agent=new t.HttpAgent({url:e.backendUrl}),e.conversationUrl&&Z.initialize(e.conversationUrl),this._appContext={appName:e.appName,currentPage:`home`,inspector:e.inspector},J.setContext(this._appContext),J.setMessages(this._thread.messages)}get thread(){return this._thread}get conversations(){return this._conversations}setAppContext(e){this._appContext=e,J.setContext(e),this.notify()}async sendMessage(e){if(!this.agent){console.error(`ChatService not initialized. Call initialize() first.`);return}if(!this._thread.id)try{let t=await Z.createConversation({title:e.slice(0,30)+(e.length>30?`...`:``)});this._thread.id=t.id,this.agent.threadId=this._thread.id}catch(e){console.error(`Failed to create conversation during sendMessage`,e);return}let t={id:Xe(`message`),role:`user`,content:e,createdAt:Date.now()};this._thread.messages=[...this._thread.messages,t],this._thread.isRunning=!0,this.notify();try{this.agent.threadId=this._thread.id,this.agent.addMessage({id:t.id,role:t.role,content:t.content});let e=[{value:new Date().toLocaleString(),description:`Current date and time`}];this._appContext&&e.push({value:JSON.stringify(this._appContext),description:`AgentState`}),this.agent.state=this._appContext,await this.agent.runAgent({context:e},this.subscriber)}catch(e){console.error(`Failed to send message`,e)}finally{this._thread.isRunning=!1,this.notify()}}addPlaceholderMessage(){let e={id:`thinking-placeholder`,role:`assistant`,content:``,createdAt:Date.now(),isThinking:!0};this._thread.messages=[...this._thread.messages,e],this.notify()}prepareMessageForStreaming(e){this._thread.messages=this._thread.messages.map(t=>t.isThinking?{...t,id:e,isThinking:!1}:t),this.notify()}appendMessageContent(e,t){this._thread.messages=this._thread.messages.map(n=>n.id===e?{...n,content:n.content+t}:n),this.notify()}setMessages(e){this._thread.messages=e,this.notify()}async startNewThread(){this._thread={id:``,messages:[],isRunning:!1},this.agent&&(this.agent.threadId=``),this.notify()}async refreshConversations(){try{this._conversations=(await Z.getConversations()).map(e=>({id:e.id,title:e.title})),this.notify()}catch(e){console.error(`Failed to refresh conversations`,e)}}notify(){J.setMessages(this._thread.messages),this.dispatchEvent(new CustomEvent(`state-change`))}};var $e=class{constructor(e){this._onStateChange=()=>{this._host.requestUpdate()},this._host=e,this._host.addController(this)}initialize(e){return Q.initialize(e)}hostConnected(){Q.addEventListener(`state-change`,this._onStateChange)}hostDisconnected(){Q.removeEventListener(`state-change`,this._onStateChange)}get thread(){return Q.thread}get conversations(){return Q.conversations}sendMessage(e){return Q.sendMessage(e)}startNewThread(){return Q.startNewThread()}setAppContext(e){return Q.setAppContext(e)}refreshConversations(){return Q.refreshConversations()}},et=class{constructor(){this.originalFetch=window.fetch,this._isEnabled=!1}get isEnabled(){return this._isEnabled}init(){if(this._isEnabled)return;let e=this;window.fetch=async function(t,n){try{let r=new Headers(n?.headers||{});return r.has(`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AxhfYPZwRIPke5oAKIMxMqgiJ52Uma6NFC1SiUQX1afgkZBP3xsgeSt-aB27J1YgAH3yywZCCdwI88dPejsAOhLz_AdhR9YBndSUEabiau8q3F1D5UNgwaijt-1ziRgzj1ngVzqC3v5EQJ1KM2kP0Am_xXxJkZFTkWpS2Vv7du-vFjabkkMFzVzsksf5PYfoHL4HL7mvrXOjrFPX4KTM2fYAs6qUc274hPvMh-JaU6KbiFAFRFVW6UqhbgZ9FYI_eVEMzlmNG0aQhJ4cy0Iac59J9ZQV-6UvpiFFegIDIrdfqqCguKgCFXe7Tg`),e.originalFetch(t,{...n,headers:r})}catch(e){return Promise.reject(e)}},this._isEnabled=!0,console.log(`Fetch interceptor initialized with test Authorization header (Native implementation).`)}destroy(){this._isEnabled&&(window.fetch=this.originalFetch,this._isEnabled=!1,console.log(`Fetch interceptor destroyed (Native implementation).`))}};let tt=new et;var $=class extends L{constructor(...e){super(...e),this._chatController=new $e(this),this.backendUrl=`http://localhost:8001/ag_ui`,this.conversationUrl=`http://localhost:8003`,this.appName=`Lit-Chat-App`,this.agentAvatar=``,this.disclaimer=`Agent puede cometer errores. Verifica la información importante.`,this.emptyText=`¿Cómo puedo ayudarte hoy?`,this.placeholder=`Enviar un mensaje a Agent`,this.headerTitle=`Agent`,this.hideHeader=!1,this.interceptor=!1,this._historyOpen=!1,this._inspectorOpen=!1,this._inspectorEnabled=!1}static#e=this.styles=Pe;willUpdate(e){(e.has(`backendUrl`)||e.has(`appName`)||e.has(`conversationUrl`))&&(this._chatController.initialize({backendUrl:this.backendUrl,conversationUrl:this.conversationUrl,appName:this.appName,inspector:this.hasAttribute(`inspector`)||this.inspector}),this._inspectorEnabled=this.hasAttribute(`inspector`)||this.inspector),e.has(`interceptor`)&&(this.interceptor?this.enableFetchInterceptor():tt.destroy())}enableFetchInterceptor(){console.warn(`Fetch interceptor is only available in development mode.`)}_handleSend(e){this._chatController.sendMessage(e.detail.content)}_handleNewThread(){this._chatController.startNewThread()}setAppContext(e){this._chatController.setAppContext(e)}_toggleHistory(){this._historyOpen=!this._historyOpen,this._historyOpen&&this._chatController.refreshConversations()}_handleSelectThread(e){console.log(`Selected conversation:`,e.detail.conversation),this._historyOpen=!1}_toggleInspector(){this._inspectorOpen=!this._inspectorOpen}render(){return O`
686
724
  <div class="chat-layout">
687
- <agent-chat-header
688
- @new-thread="${this._handleNewThread}"
689
- @toggle-history="${this._toggleHistory}"
690
- ></agent-chat-header>
725
+ ${this.hideHeader?``:O`
726
+ <agent-chat-header
727
+ .title="${this.headerTitle}"
728
+ @new-thread="${this._handleNewThread}"
729
+ @toggle-history="${this._toggleHistory}"
730
+ ></agent-chat-header>
731
+ `}
691
732
  <agent-chat-history-list
692
733
  .conversations="${this._chatController.conversations}"
693
734
  ?open="${this._historyOpen}"
@@ -702,17 +743,18 @@
702
743
  <agent-chat-composer
703
744
  ?isRunning="${this._chatController.thread.isRunning}"
704
745
  .disclaimer="${this.disclaimer}"
746
+ .placeholder="${this.placeholder}"
705
747
  @send="${this._handleSend}">
706
748
  </agent-chat-composer>
707
749
 
708
- ${this._inspectorEnabled?k`
750
+ ${this._inspectorEnabled?O`
709
751
  <button class="inspector-toggle" @click="${this._toggleInspector}" title="Inspector">
710
- ${He}
752
+ ${Ue}
711
753
  </button>
712
754
  `:``}
713
755
 
714
- ${this._inspectorOpen?k`
756
+ ${this._inspectorOpen?O`
715
757
  <agent-inspector-window @close="${this._toggleInspector}"></agent-inspector-window>
716
758
  `:``}
717
759
  </div>
718
- `}};H([B({type:String,attribute:`backend-url`})],$.prototype,`backendUrl`,void 0),H([B({type:String,attribute:`app-name`})],$.prototype,`appName`,void 0),H([B({type:String,attribute:`agent-avatar`})],$.prototype,`agentAvatar`,void 0),H([B({type:String,attribute:`disclaimer`})],$.prototype,`disclaimer`,void 0),H([B({type:String,attribute:`empty-text`})],$.prototype,`emptyText`,void 0),H([B({type:Boolean,attribute:`interceptor`})],$.prototype,`interceptor`,void 0),H([V()],$.prototype,`_historyOpen`,void 0),H([V()],$.prototype,`_inspectorOpen`,void 0),H([V()],$.prototype,`_inspectorEnabled`,void 0),$=H([z(`agent-chat`)],$);function nt(e,t={}){let n=document.createElement(`agent-chat`);return Object.keys(t).forEach(e=>{e in n&&(n[e]=t[e])}),e.appendChild(n),n}function rt(){}Object.defineProperty(e,`AgentChat`,{enumerable:!0,get:function(){return $}}),e.ChatPortalService=Xe,e.FetchInterceptorService=et,e.chatPortalService=Z,e.fetchInterceptorService=tt,e.mount=nt,e.register=rt});
760
+ `}};V([z({type:String,attribute:`backend-url`})],$.prototype,`backendUrl`,void 0),V([z({type:String,attribute:`conversation-url`})],$.prototype,`conversationUrl`,void 0),V([z({type:String,attribute:`app-name`})],$.prototype,`appName`,void 0),V([z({type:String,attribute:`agent-avatar`})],$.prototype,`agentAvatar`,void 0),V([z({type:String,attribute:`disclaimer`})],$.prototype,`disclaimer`,void 0),V([z({type:String,attribute:`empty-text`})],$.prototype,`emptyText`,void 0),V([z({type:String,attribute:`placeholder`})],$.prototype,`placeholder`,void 0),V([z({type:String,attribute:`header-title`})],$.prototype,`headerTitle`,void 0),V([z({type:Boolean,attribute:`hide-header`})],$.prototype,`hideHeader`,void 0),V([z({type:Boolean,attribute:`interceptor`})],$.prototype,`interceptor`,void 0),V([B()],$.prototype,`_historyOpen`,void 0),V([B()],$.prototype,`_inspectorOpen`,void 0),V([B()],$.prototype,`_inspectorEnabled`,void 0),$=V([R(`agent-chat`)],$);function nt(e,t={}){let n=document.createElement(`agent-chat`);return Object.keys(t).forEach(e=>{e in n&&(n[e]=t[e])}),e.appendChild(n),n}function rt(){}Object.defineProperty(e,`AgentChat`,{enumerable:!0,get:function(){return $}}),e.ChatPortalService=Ze,e.FetchInterceptorService=et,e.chatPortalService=X,e.fetchInterceptorService=tt,e.mount=nt,e.register=rt});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "site-operator",
3
3
  "private": false,
4
- "version": "0.1.4",
4
+ "version": "0.1.9",
5
5
  "description": "A framework-agnostic AI chat widget that acts as a copilot for host applications.",
6
6
  "type": "module",
7
7
  "author": "jostvian",
@@ -61,7 +61,10 @@
61
61
  ]
62
62
  }
63
63
  },
64
- "dependencies": {},
64
+ "dependencies": {
65
+ "@lucide/lab": "^0.1.2",
66
+ "lucide-static": "^0.562.0"
67
+ },
65
68
  "peerDependencies": {
66
69
  "@ag-ui/client": "^0.0.42"
67
70
  },