@kolbo/mcp 1.75.0 → 1.75.1
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
CHANGED
package/src/apps/widgets/list.js
CHANGED
|
@@ -15,6 +15,8 @@ const { widgetPage } = require('../html');
|
|
|
15
15
|
* title: 'Your Projects',
|
|
16
16
|
* items: [{
|
|
17
17
|
* id, title, subtitle, // main two lines
|
|
18
|
+
* thumbnail, // optional — real image; falls back to the letter monogram on
|
|
19
|
+
* // missing/failed load, same idiom as catalog.js model icons
|
|
18
20
|
* badge, // small pill, e.g. role/status ("owner", "default", "shared")
|
|
19
21
|
* meta, // small trailing text, e.g. a date or count
|
|
20
22
|
* open_url, // optional — renders an "Open" button (openLink)
|
|
@@ -71,8 +73,11 @@ function apply(result) {
|
|
|
71
73
|
|
|
72
74
|
function itemHTML(item, i) {
|
|
73
75
|
var clickable = !!item.use_hint;
|
|
76
|
+
var avatar = item.thumbnail
|
|
77
|
+
? '<img class="k-audio-art" src="' + esc(item.thumbnail) + '" alt="" loading="lazy" onerror="this.outerHTML=monogram(\\'' + esc(item.title || '?').replace(/'/g, '') + '\\')">'
|
|
78
|
+
: monogram(item.title || '?');
|
|
74
79
|
return '<div class="k-audio-row" data-i="' + i + '"' + (clickable ? ' style="cursor:pointer"' : '') + '>' +
|
|
75
|
-
|
|
80
|
+
avatar +
|
|
76
81
|
'<div class="k-audio-meta"><div class="k-audio-title">' + esc(item.title || '') + '</div>' +
|
|
77
82
|
(item.subtitle ? '<div class="k-audio-sub">' + esc(item.subtitle) + '</div>' : '') + '</div>' +
|
|
78
83
|
(item.badge ? '<span class="k-chip" style="flex:none">' + esc(item.badge) + '</span>' : '') +
|
package/src/tools/projects.js
CHANGED
|
@@ -32,6 +32,7 @@ function registerProjectTools(server, client) {
|
|
|
32
32
|
role: p.role,
|
|
33
33
|
is_default: !!p.is_default,
|
|
34
34
|
is_archived: !!p.is_archived,
|
|
35
|
+
thumbnail_url: p.thumbnail_url || null,
|
|
35
36
|
open_url: buildProjectUrl(p.id, { is_default: !!p.is_default })
|
|
36
37
|
}));
|
|
37
38
|
const text = JSON.stringify({
|
|
@@ -48,6 +49,7 @@ function registerProjectTools(server, client) {
|
|
|
48
49
|
id: p.id,
|
|
49
50
|
title: p.name,
|
|
50
51
|
subtitle: p.role + (p.is_default ? ' · default' : '') + (p.is_archived ? ' · archived' : ''),
|
|
52
|
+
thumbnail: p.thumbnail_url,
|
|
51
53
|
open_url: p.open_url,
|
|
52
54
|
use_hint: 'Use my "{TITLE}" project (project_id: {ID}) for what I do next.'
|
|
53
55
|
})),
|