@kolbo/mcp 1.71.2 → 1.71.4
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/package.json +1 -1
- package/src/apps/widgets/catalog.js +4 -1
- package/src/tools/models.js +10 -6
package/package.json
CHANGED
|
@@ -75,7 +75,10 @@ function boot(sc) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
window.kolbo.onToolResult(function (result) {
|
|
78
|
-
|
|
78
|
+
// NB: no text fallback here. The old second operand called a structured()
|
|
79
|
+
// that was never defined, so on any host sending no structuredContent this
|
|
80
|
+
// threw a ReferenceError and the card sat on Loading instead of collapsing.
|
|
81
|
+
if (boot(result.structuredContent)) return;
|
|
79
82
|
// No catalog data reached the iframe (host/version mismatch, or a filter
|
|
80
83
|
// that matched nothing) — collapse instead of showing a dead card.
|
|
81
84
|
var card = document.querySelector('.k-card');
|
package/src/tools/models.js
CHANGED
|
@@ -132,12 +132,16 @@ function registerModelTools(server, client, options = {}) {
|
|
|
132
132
|
// call. On 2026-08-09 that cost a wrong-model generation (minimax-h3).
|
|
133
133
|
// `extra` (json mode) carries the data as structured fields; without it the
|
|
134
134
|
// full text payload is attached verbatim. The widget ignores both.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
// Always ship structuredContent, exactly like listResult() does and for
|
|
136
|
+
// the same reason: the tool DECLARATION carries widget meta, so a host
|
|
137
|
+
// mounts the catalog iframe on every call — including hosts that never
|
|
138
|
+
// advertised MCP Apps (Kolbo Code). Gating the payload on ui() left that
|
|
139
|
+
// iframe with nothing to render and it sat on "Loading..." forever.
|
|
140
|
+
const respond = (text, extra) =>
|
|
141
|
+
uiResult(UI.catalog, text, {
|
|
142
|
+
...buildCatalogStructured(result.models, type, !showCatalog),
|
|
143
|
+
...(extra || { text }),
|
|
144
|
+
});
|
|
141
145
|
|
|
142
146
|
// JSON mode — the authoritative shape; every constraint the agent might
|
|
143
147
|
// need to validate a request lives here (durations, reference caps,
|