@kolbo/mcp 1.30.7 → 1.30.8
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/index.js +10 -10
- package/src/tools/models.js +2 -4
package/package.json
CHANGED
package/src/apps/index.js
CHANGED
|
@@ -140,19 +140,19 @@ const infoCache = new Map(); // apiBase → { at, byKey: Map<lowername, {icon, e
|
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* Resolve a Model.avatar value to an absolute URL. Avatars are bare filenames
|
|
143
|
-
* (sometimes with spaces)
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
143
|
+
* (sometimes with spaces). They're mirrored from kolbo-api/assets to the
|
|
144
|
+
* public DO Spaces CDN by kolbo-api scripts/infra/upload-model-icons-cdn.js —
|
|
145
|
+
* the CDN is the ONLY host that reliably loads inside claude.ai's sandboxed
|
|
146
|
+
* widget iframes (api.kolbo.ai sits behind Cloudflare bot rules that block
|
|
147
|
+
* sandbox image requests; app.kolbo.ai is the SPA whose catch-all returns
|
|
148
|
+
* 200 text/html for missing files).
|
|
147
149
|
*/
|
|
148
|
-
|
|
150
|
+
const ICON_CDN_BASE = 'https://kolbo-general-media.fra1.cdn.digitaloceanspaces.com/models_icons';
|
|
151
|
+
|
|
152
|
+
function resolveAvatarUrl(avatar) {
|
|
149
153
|
if (!avatar) return null;
|
|
150
154
|
if (/^https?:\/\//i.test(avatar)) return avatar;
|
|
151
|
-
|
|
152
|
-
try {
|
|
153
|
-
origin = new URL(apiBase || 'https://api.kolbo.ai/api').origin;
|
|
154
|
-
} catch (_) { /* keep default */ }
|
|
155
|
-
return `${origin}/assets/${encodeURIComponent(avatar)}`;
|
|
155
|
+
return `${ICON_CDN_BASE}/${encodeURIComponent(avatar)}`;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
async function modelInfoMap(client) {
|
package/src/tools/models.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* new OPTIONAL args only. Full rules: ../index.js top-of-file and CLAUDE.md. */
|
|
5
5
|
|
|
6
6
|
const { z } = require('zod');
|
|
7
|
-
const { UI, uiResult, appsEnabled } = require('../apps');
|
|
7
|
+
const { UI, uiResult, appsEnabled, resolveAvatarUrl } = require('../apps');
|
|
8
8
|
|
|
9
9
|
// type name → human group label for the catalog widget
|
|
10
10
|
const TYPE_GROUPS = {
|
|
@@ -73,9 +73,7 @@ function buildCatalogStructured(models, type) {
|
|
|
73
73
|
if (g.models.length >= 6) continue; // curated cap — full list lives in the text payload
|
|
74
74
|
g.models.push({
|
|
75
75
|
name: m.name,
|
|
76
|
-
icon: m.avatar
|
|
77
|
-
? (/^https?:\/\//i.test(m.avatar) ? m.avatar : `https://app.kolbo.ai/models_icons/${m.avatar}`)
|
|
78
|
-
: null,
|
|
76
|
+
icon: resolveAvatarUrl(m.avatar),
|
|
79
77
|
description: String(m.smartSelect_StrengthsSummary || m.summary || m.description || '').slice(0, 90),
|
|
80
78
|
chips: modelChips(m),
|
|
81
79
|
use_hint: `Generate with the "${m.name}" model — ask me what I want to create first.`,
|