llm_meta_widget 0.7.0 → 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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59b4d4a0bbd1e56e7d120de12efc7b08a9d24f4727266d57b38ab9734ea590ad
|
|
4
|
+
data.tar.gz: 12da0bd0ca5d9ba992bc6ece49f14d9b5351edc41ce54a31fc12bb1d0cfc6440
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa75e94a1423da2e5d696bb79f4dc65976cac6e3e3254e9ddd04da497845319628094ec0d1f4920447f8639b8ad8bc874589b9cfe3c2b1a2913c7458ecde2c93
|
|
7
|
+
data.tar.gz: a23d46cf796b1e348683042341afa275fe677903fa0c8235172f929d54458ad24386a4d98e2f13079135025786959770624feeb245e422641bfa291722987078
|
|
@@ -50,8 +50,6 @@ const MARKUP = `
|
|
|
50
50
|
</div>
|
|
51
51
|
<div class="lmw-messages"></div>
|
|
52
52
|
<div class="lmw-input-container">
|
|
53
|
-
host MCP server actually offers one, so a tools-only server leaves
|
|
54
|
-
the widget exactly as it was. %>
|
|
55
53
|
<div class="lmw-prompts" style="display:none"></div>
|
|
56
54
|
<form class="lmw-form">
|
|
57
55
|
<div class="lmw-input-wrapper">
|
|
@@ -62,25 +60,19 @@ const MARKUP = `
|
|
|
62
60
|
</svg>
|
|
63
61
|
</button>
|
|
64
62
|
</div>
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<div class="lmw-tools-empty">Loading…</div>
|
|
79
|
-
</div>
|
|
80
|
-
</details>
|
|
81
|
-
<% end %>
|
|
82
|
-
</div>
|
|
83
|
-
<% end %>
|
|
63
|
+
<div class="lmw-input-controls">
|
|
64
|
+
<select class="lmw-model-picker" title="Select model" aria-label="Select model" style="display:none">
|
|
65
|
+
</select>
|
|
66
|
+
<details class="lmw-tools-picker">
|
|
67
|
+
<summary>
|
|
68
|
+
🔧 Tools
|
|
69
|
+
<span class="lmw-tools-count lmw-tools-count-zero">0</span>
|
|
70
|
+
</summary>
|
|
71
|
+
<div class="lmw-tools-list">
|
|
72
|
+
<div class="lmw-tools-empty">Loading…</div>
|
|
73
|
+
</div>
|
|
74
|
+
</details>
|
|
75
|
+
</div>
|
|
84
76
|
</form>
|
|
85
77
|
</div>
|
|
86
78
|
</div>
|
|
@@ -126,6 +118,11 @@ if (typeof customElements !== "undefined" && !customElements.get("llm-meta-widge
|
|
|
126
118
|
// Everything below is the panel's original logic, moved verbatim from the ERB
|
|
127
119
|
// template. The only change is the sixteen bindings above it, which the
|
|
128
120
|
// template used to inject.
|
|
121
|
+
// Removes a node if it is there. Used to honour the picker flags: see boot().
|
|
122
|
+
function dropNode(node) {
|
|
123
|
+
if (node && node.parentNode) node.parentNode.removeChild(node);
|
|
124
|
+
}
|
|
125
|
+
|
|
129
126
|
function boot(cfg) {
|
|
130
127
|
var LLM_BASE = cfg.LLM_BASE;
|
|
131
128
|
var TOOL_HUB_BASE = cfg.TOOL_HUB_BASE;
|
|
@@ -151,6 +148,14 @@ function boot(cfg) {
|
|
|
151
148
|
var inputEl = root.querySelector(".lmw-input");
|
|
152
149
|
var clearBtn = root.querySelector(".lmw-clear");
|
|
153
150
|
var hideBtn = root.querySelector(".lmw-hide");
|
|
151
|
+
// The ERB partial omitted these nodes entirely when their flag was false.
|
|
152
|
+
// One static template cannot express that, so prune instead — otherwise a
|
|
153
|
+
// disabled Tools picker still renders, and the lookups below never return
|
|
154
|
+
// the null the rest of boot() is written against.
|
|
155
|
+
if (!ENABLE_MODEL_PICKER) dropNode(root.querySelector(".lmw-model-picker"));
|
|
156
|
+
if (!ENABLE_TOOL_PICKER) dropNode(root.querySelector(".lmw-tools-picker"));
|
|
157
|
+
if (!ENABLE_MODEL_PICKER && !ENABLE_TOOL_PICKER) dropNode(root.querySelector(".lmw-input-controls"));
|
|
158
|
+
|
|
154
159
|
var modelPicker = root.querySelector(".lmw-model-picker"); // null when disabled
|
|
155
160
|
var toolsPicker = root.querySelector(".lmw-tools-picker"); // null when disabled
|
|
156
161
|
var toolsListEl = root.querySelector(".lmw-tools-list"); // null when disabled
|
|
@@ -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
|
-
|
|
3580
|
-
<
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
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");
|