@aibranch/llm-meta-widget 0.7.1 → 0.7.2

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.
@@ -3564,8 +3564,6 @@ var MARKUP = `
3564
3564
  </div>
3565
3565
  <div class="lmw-messages"></div>
3566
3566
  <div class="lmw-input-container">
3567
- host MCP server actually offers one, so a tools-only server leaves
3568
- the widget exactly as it was. %>
3569
3567
  <div class="lmw-prompts" style="display:none"></div>
3570
3568
  <form class="lmw-form">
3571
3569
  <div class="lmw-input-wrapper">
@@ -3576,25 +3574,19 @@ var MARKUP = `
3576
3574
  </svg>
3577
3575
  </button>
3578
3576
  </div>
3579
- <% if enable_model_picker || enable_tool_picker %>
3580
- <div class="lmw-input-controls">
3581
- <% if enable_model_picker %>
3582
- <select class="lmw-model-picker" title="Select model" aria-label="Select model" style="display:none">
3583
- </select>
3584
- <% end %>
3585
- <% if enable_tool_picker %>
3586
- <details class="lmw-tools-picker">
3587
- <summary>
3588
- \u{1F527} Tools
3589
- <span class="lmw-tools-count lmw-tools-count-zero">0</span>
3590
- </summary>
3591
- <div class="lmw-tools-list">
3592
- <div class="lmw-tools-empty">Loading\u2026</div>
3593
- </div>
3594
- </details>
3595
- <% end %>
3596
- </div>
3597
- <% end %>
3577
+ <div class="lmw-input-controls">
3578
+ <select class="lmw-model-picker" title="Select model" aria-label="Select model" style="display:none">
3579
+ </select>
3580
+ <details class="lmw-tools-picker">
3581
+ <summary>
3582
+ \u{1F527} Tools
3583
+ <span class="lmw-tools-count lmw-tools-count-zero">0</span>
3584
+ </summary>
3585
+ <div class="lmw-tools-list">
3586
+ <div class="lmw-tools-empty">Loading\u2026</div>
3587
+ </div>
3588
+ </details>
3589
+ </div>
3598
3590
  </form>
3599
3591
  </div>
3600
3592
  </div>
@@ -3628,6 +3620,9 @@ var LlmMetaWidgetElement = class extends HTMLElement {
3628
3620
  if (typeof customElements !== "undefined" && !customElements.get("llm-meta-widget")) {
3629
3621
  customElements.define("llm-meta-widget", LlmMetaWidgetElement);
3630
3622
  }
3623
+ function dropNode(node) {
3624
+ if (node && node.parentNode) node.parentNode.removeChild(node);
3625
+ }
3631
3626
  function boot(cfg) {
3632
3627
  var LLM_BASE = cfg.LLM_BASE;
3633
3628
  var TOOL_HUB_BASE = cfg.TOOL_HUB_BASE;
@@ -3652,6 +3647,9 @@ function boot(cfg) {
3652
3647
  var inputEl = root.querySelector(".lmw-input");
3653
3648
  var clearBtn = root.querySelector(".lmw-clear");
3654
3649
  var hideBtn = root.querySelector(".lmw-hide");
3650
+ if (!ENABLE_MODEL_PICKER) dropNode(root.querySelector(".lmw-model-picker"));
3651
+ if (!ENABLE_TOOL_PICKER) dropNode(root.querySelector(".lmw-tools-picker"));
3652
+ if (!ENABLE_MODEL_PICKER && !ENABLE_TOOL_PICKER) dropNode(root.querySelector(".lmw-input-controls"));
3655
3653
  var modelPicker = root.querySelector(".lmw-model-picker");
3656
3654
  var toolsPicker = root.querySelector(".lmw-tools-picker");
3657
3655
  var toolsListEl = root.querySelector(".lmw-tools-list");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibranch/llm-meta-widget",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "//version": "Must stay in step with lib/llm_meta_widget/version.rb. Two independently versioned copies of the same client is the drift docs/custom-element-distribution.md warns about: bump both, release both.",
5
5
  "description": "Embeddable browser chat widget: a custom element that discovers tools at page, origin and hub scope and dispatches each tool call to the right one. Two lines of HTML on any host, Rails or not.",
6
6
  "keywords": [