@kolbo/mcp 1.106.2 → 1.106.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/theme.js +10 -5
- package/src/apps/widgets/credits.js +25 -11
- package/src/apps/widgets/generation.js +12 -3
- package/src/tools/trends.js +1 -1
package/package.json
CHANGED
package/src/apps/theme.js
CHANGED
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
const KOLBO_CSS = `
|
|
12
12
|
:root {
|
|
13
13
|
--bg: #0f0f0f;
|
|
14
|
-
|
|
14
|
+
/* A translucent lift, not a fixed colour: every host paints its own dark grey
|
|
15
|
+
behind the iframe (claude.ai, ChatGPT, Codex, Kolbo Code all differ), and a
|
|
16
|
+
fixed near-black card read as a hole cut into the chat. */
|
|
17
|
+
--card: rgba(255, 255, 255, 0.04);
|
|
15
18
|
--card-solid: #161619;
|
|
16
19
|
--panel: rgba(255, 255, 255, 0.035);
|
|
17
20
|
--surface: rgba(255, 255, 255, 0.03);
|
|
@@ -67,7 +70,8 @@ body {
|
|
|
67
70
|
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
|
68
71
|
border: 1px solid var(--border);
|
|
69
72
|
border-radius: var(--radius-card);
|
|
70
|
-
|
|
73
|
+
/* No drop shadow: on a dark host it only adds a muddy halo. */
|
|
74
|
+
box-shadow: var(--specular);
|
|
71
75
|
overflow: hidden;
|
|
72
76
|
animation: k-in 400ms var(--spring);
|
|
73
77
|
}
|
|
@@ -126,10 +130,11 @@ body {
|
|
|
126
130
|
display: inline-flex; align-items: center; gap: 5px;
|
|
127
131
|
padding: 3px 8px; border-radius: 999px;
|
|
128
132
|
background: var(--surface-2); border: 0;
|
|
129
|
-
font-size:
|
|
133
|
+
font-size: 11.5px; font-weight: 500; color: var(--text-muted);
|
|
130
134
|
white-space: nowrap;
|
|
131
|
-
font
|
|
132
|
-
|
|
135
|
+
/* UI font, not a code font: tags are labels people read ("7 images",
|
|
136
|
+
"Seedance 2.5"), and monospace made the whole row look like a log line. */
|
|
137
|
+
font-variant-numeric: tabular-nums;
|
|
133
138
|
animation: k-chip-in 200ms var(--spring);
|
|
134
139
|
}
|
|
135
140
|
@keyframes k-chip-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
|
|
@@ -4,27 +4,34 @@ const { widgetPage } = require('../html');
|
|
|
4
4
|
|
|
5
5
|
const BODY = `
|
|
6
6
|
<style>
|
|
7
|
-
#loading[hidden], #balance[hidden], #error[hidden] { display: none !important; }
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.k-credit-
|
|
11
|
-
.k-credit-
|
|
7
|
+
#loading[hidden], #balance[hidden], #error[hidden], #breakdown[hidden] { display: none !important; }
|
|
8
|
+
/* One line by default. Agents check the balance at session start and before
|
|
9
|
+
big batches; a full-height balance card each time buried the chat. */
|
|
10
|
+
.k-credit-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
|
|
11
|
+
.k-credit-total { font-size: 22px; font-weight: 650; letter-spacing: -0.5px; line-height: 1.2;
|
|
12
|
+
font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
13
|
+
.k-credit-label { color: var(--text-muted); font-size: 12px; }
|
|
14
|
+
.k-credit-line .k-text-btn { margin-left: auto; align-self: center; }
|
|
15
|
+
.k-credit-breakdown { margin: 10px 0 0; padding: 0; }
|
|
16
|
+
.k-credit-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
|
|
12
17
|
.k-credit-row dt { color: var(--text-muted); }
|
|
13
18
|
.k-credit-row dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
|
|
14
19
|
</style>
|
|
15
20
|
<div class="k-card">
|
|
16
|
-
<div class="k-head"><span class="k-logo" id="logo"></span><span class="k-title">
|
|
21
|
+
<div class="k-head"><span class="k-logo" id="logo"></span><span class="k-title">Credits</span></div>
|
|
17
22
|
<div class="k-body" aria-live="polite">
|
|
18
|
-
<div id="loading" class="k-skel" style="height:
|
|
23
|
+
<div id="loading" class="k-skel" style="min-height:0;height:28px" aria-label="Loading credit balance"></div>
|
|
19
24
|
<div id="balance" hidden>
|
|
20
|
-
<div class="k-credit-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
<div class="k-credit-line">
|
|
26
|
+
<span class="k-credit-total" id="total"></span>
|
|
27
|
+
<span class="k-credit-label">available</span>
|
|
28
|
+
<button type="button" class="k-text-btn" id="toggle" aria-expanded="false" aria-controls="breakdown">Details</button>
|
|
29
|
+
</div>
|
|
30
|
+
<dl class="k-credit-breakdown" id="breakdown" hidden>
|
|
23
31
|
<div class="k-credit-row"><dt>Plan credits</dt><dd id="plan"></dd></div>
|
|
24
32
|
<div class="k-credit-row"><dt>Credit pack</dt><dd id="pack"></dd></div>
|
|
25
33
|
<div class="k-credit-row"><dt>Redemption</dt><dd id="redemption"></dd></div>
|
|
26
34
|
</dl>
|
|
27
|
-
<div class="k-credit-label">Balance at time of check</div>
|
|
28
35
|
</div>
|
|
29
36
|
<div id="error" class="k-error" hidden>Credit balance unavailable. Please check again.</div>
|
|
30
37
|
</div>
|
|
@@ -32,6 +39,13 @@ const BODY = `
|
|
|
32
39
|
|
|
33
40
|
const SCRIPT = `
|
|
34
41
|
el('logo').innerHTML = KOLBO_LOGO + '<span>Kolbo</span>';
|
|
42
|
+
el('toggle').onclick = function () {
|
|
43
|
+
var open = el('breakdown').hidden;
|
|
44
|
+
el('breakdown').hidden = !open;
|
|
45
|
+
el('toggle').setAttribute('aria-expanded', String(open));
|
|
46
|
+
el('toggle').textContent = open ? 'Hide' : 'Details';
|
|
47
|
+
window.kolbo.notifySize();
|
|
48
|
+
};
|
|
35
49
|
function amount(value) {
|
|
36
50
|
if (value == null || value === '' || !Number.isFinite(Number(value))) return '\u2014';
|
|
37
51
|
return Number(value).toLocaleString('en-US', { maximumFractionDigits: 8 });
|
|
@@ -221,7 +221,13 @@ function boot(sc) {
|
|
|
221
221
|
// model_name / voice_name are the CLEAN catalog names, resolved server-side
|
|
222
222
|
// (src/tools/_shared.js on submit, get_generation_status on completion). The raw
|
|
223
223
|
// ids stay in sc.model / sc.voice for Recreate + model context — never for display.
|
|
224
|
-
|
|
224
|
+
// 'Generations' is the server's placeholder when a status check spans
|
|
225
|
+
// several generations and no single model is known (src/tools/generate.js).
|
|
226
|
+
// It is not a model: rendered as one it showed a "G Generations" brand chip.
|
|
227
|
+
function modelLabel(sc) {
|
|
228
|
+
var m = sc.model_name || sc.model;
|
|
229
|
+
return m && m !== 'Generations' ? m : '';
|
|
230
|
+
}
|
|
225
231
|
function voiceLabel(sc) { return sc.voice_name || sc.voice || (sc.settings || {}).voice; }
|
|
226
232
|
|
|
227
233
|
// @VisualDNA / #Moodboard mentions are the tag syntax the server resolves into
|
|
@@ -297,7 +303,10 @@ function renderChips(sc) {
|
|
|
297
303
|
var h = modelChipHTML(modelLabel(sc), sc.model_icon);
|
|
298
304
|
var s = sc.settings || {};
|
|
299
305
|
var kind = displayKind(sc);
|
|
300
|
-
|
|
306
|
+
// One chip says what and how many: "7 images", not "image" + "×7".
|
|
307
|
+
var many = sc.count > 1;
|
|
308
|
+
var noun = kind === '3d' ? '3D model' : kind === 'audio' ? 'track' : kind;
|
|
309
|
+
if (kind) h += chip(iconFor(kind) + ' ' + (many ? sc.count + ' ' + noun + 's' : (kind === '3d' ? '3D' : kind)));
|
|
301
310
|
// Shot count when we know it, otherwise just say multishot is on — the
|
|
302
311
|
// provider picks the count in that case, and showing nothing made an
|
|
303
312
|
// enabled toggle look like it had not applied.
|
|
@@ -332,7 +341,7 @@ function renderChips(sc) {
|
|
|
332
341
|
h += chip(face + ' ' + esc(voice));
|
|
333
342
|
}
|
|
334
343
|
if (s.mode) h += chip(esc(s.mode));
|
|
335
|
-
if (
|
|
344
|
+
if (many && !kind) h += chip(sc.count + ' items');
|
|
336
345
|
h += referenceHTML(sc);
|
|
337
346
|
el('chips').innerHTML = h;
|
|
338
347
|
}
|
package/src/tools/trends.js
CHANGED
|
@@ -30,7 +30,7 @@ const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
|
30
30
|
|
|
31
31
|
function trendTile(t) {
|
|
32
32
|
const example = (t.examples || [])[0] || {};
|
|
33
|
-
const poster = t.cover?.image || example.poster
|
|
33
|
+
const poster = t.cover?.image || example.poster;
|
|
34
34
|
return {
|
|
35
35
|
id: t.slug,
|
|
36
36
|
title: t.name,
|